Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key下面有多个SQL语句时,未能全部成功执行 #1542

Open
ny83427 opened this issue Jan 31, 2020 · 0 comments
Open

Key下面有多个SQL语句时,未能全部成功执行 #1542

ny83427 opened this issue Jan 31, 2020 · 0 comments

Comments

@ny83427
Copy link

ny83427 commented Jan 31, 2020

数据库:SQLITE3
NUTZ版本:1.r.68.v20191031
场景:

/* search_terms */
CREATE TABLE IF NOT EXISTS search_terms
(
  id           INTEGER  NOT NULL PRIMARY KEY,
  sequence     VARCHAR  NOT NULL DEFAULT '',
  category     VARCHAR  NOT NULL DEFAULT '',
  sub_category VARCHAR  NOT NULL DEFAULT '',
  value1       VARCHAR  NOT NULL DEFAULT '',
  value2       VARCHAR  NOT NULL DEFAULT '',
  last_update  DATETIME NOT NULL
);
CREATE INDEX IF NOT EXISTS st_seq_idx ON search_terms (sequence);

上面的key下面挂了两条SQL语句,然而实际上只是执行了建表语句,创建索引的SQL没有按照期望执行,手工执行创建索引SQL语句无误。

期望:
当一个KEY下面挂着多条SQL语句时,能够全部执行。

目前需要为每个SQL语句都创建一个KEY才能成功执行

/* search_terms */
CREATE TABLE IF NOT EXISTS search_terms
(
  id           INTEGER  NOT NULL PRIMARY KEY,
  sequence     VARCHAR  NOT NULL DEFAULT '',
  category     VARCHAR  NOT NULL DEFAULT '',
  sub_category VARCHAR  NOT NULL DEFAULT '',
  value1       VARCHAR  NOT NULL DEFAULT '',
  value2       VARCHAR  NOT NULL DEFAULT '',
  last_update  DATETIME NOT NULL
);
/* create_search_term_index */
CREATE INDEX IF NOT EXISTS st_seq_idx ON search_terms (sequence);
@ny83427 ny83427 changed the title Key下面有多个SQL语句时,创建索引语句未成功执行 Key下面有多个SQL语句时,未能全部成功执行 Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant