From: imeevma@tarantool.org To: korablev@tarantool.org Cc: tarantool-patches@freelists.org Subject: [tarantool-patches] [PATCH v1 1/1] sql: ban ANALYZE statement Date: Fri, 22 Mar 2019 19:14:03 +0300 [thread overview] Message-ID: <a417f035ec8526467e241ab258fb818e2df906b5.1553271184.git.imeevma@gmail.com> (raw) At this point, an ANALYZE statement can lead to many problems. It was decided to temporarily ban this statement. Closes #4069 --- https://github.com/tarantool/tarantool/issues/4069 https://github.com/tarantool/tarantool/tree/imeevma/gh-4069-ban-analyze src/box/box.cc | 2 -- src/box/sql/parse.y | 4 ++-- src/box/sql/sqlInt.h | 1 - test/sql-tap/suite.ini | 12 ++++++++++++ test/sql-tap/whereG.test.lua | 6 ++++-- test/sql/suite.ini | 1 + 6 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/box/box.cc b/src/box/box.cc index f7ce33a..7d89055 100644 --- a/src/box/box.cc +++ b/src/box/box.cc @@ -2139,8 +2139,6 @@ box_cfg_xc(void) /* Follow replica */ replicaset_follow(); - sql_load_schema(); - fiber_gc(); is_box_configured = true; diff --git a/src/box/sql/parse.y b/src/box/sql/parse.y index b27651c..03787d9 100644 --- a/src/box/sql/parse.y +++ b/src/box/sql/parse.y @@ -1448,8 +1448,8 @@ cmd ::= DROP TRIGGER ifexists(NOERR) fullname(X). { } /////////////////////////////////// ANALYZE /////////////////////////////////// -cmd ::= ANALYZE. {sqlAnalyze(pParse, 0);} -cmd ::= ANALYZE nm(X). {sqlAnalyze(pParse, &X);} +cmd ::= ANALYZE. {} +cmd ::= ANALYZE nm(X). {(void)X;} //////////////////////// ALTER TABLE table ... //////////////////////////////// cmd ::= ALTER TABLE fullname(X) RENAME TO nm(Z). { diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h index 8967ea3..aebd131 100644 --- a/src/box/sql/sqlInt.h +++ b/src/box/sql/sqlInt.h @@ -4492,7 +4492,6 @@ char* rename_trigger(sql *, char const *, char const *, bool *); */ struct coll * sql_get_coll_seq(Parse *parser, const char *name, uint32_t *coll_id); -void sqlAnalyze(Parse *, Token *); /** * This function returns average size of tuple in given index. diff --git a/test/sql-tap/suite.ini b/test/sql-tap/suite.ini index bb49289..95207f4 100644 --- a/test/sql-tap/suite.ini +++ b/test/sql-tap/suite.ini @@ -8,6 +8,18 @@ disabled = selectA.test.lua ; date.test.lua ; tkt-bd484a090c.test.lua ; tkt3791.test.lua ; + analyze1.test.lua ; + analyze3.test.lua ; + analyze4.test.lua ; + analyze5.test.lua ; + analyze6.test.lua ; + analyze7.test.lua ; + analyze8.test.lua ; + analyze9.test.lua ; + analyzeC.test.lua ; + analyzeD.test.lua ; + analyzeE.test.lua ; + analyzeF.test.lua ; lua_libs = lua/sqltester.lua ../sql/lua/sql_tokenizer.lua ../box/lua/identifier.lua is_parallel = True diff --git a/test/sql-tap/whereG.test.lua b/test/sql-tap/whereG.test.lua index 155c906..bb9cf39 100755 --- a/test/sql-tap/whereG.test.lua +++ b/test/sql-tap/whereG.test.lua @@ -452,7 +452,9 @@ test:do_execsql_test( ANALYZE; EXPLAIN QUERY PLAN SELECT name FROM people WHERE height>=180; ]], - {0,0,0,"SEARCH TABLE PEOPLE USING COVERING INDEX PEOPLE_IDX1" .. - " (ANY(ROLE) AND HEIGHT>?)"}) + -- {0,0,0,"SEARCH TABLE PEOPLE USING COVERING INDEX PEOPLE_IDX1" .. + -- " (ANY(ROLE) AND HEIGHT>?)"} + {0,0,0,"SCAN TABLE PEOPLE" } + ) test:finish_test() diff --git a/test/sql/suite.ini b/test/sql/suite.ini index ce6ccb7..bfe0fa0 100644 --- a/test/sql/suite.ini +++ b/test/sql/suite.ini @@ -7,3 +7,4 @@ config = engine.cfg is_parallel = True lua_libs = lua/sql_tokenizer.lua release_disabled = errinj.test.lua view_delayed_wal.test.lua sql-debug.test.lua +disabled = sql-statN-index-drop.test.lua -- 2.7.4
next reply other threads:[~2019-03-22 16:14 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-03-22 16:14 imeevma [this message] 2019-03-22 16:58 ` [tarantool-patches] " n.pettik 2019-03-23 12:58 ` Mergen Imeev 2019-03-23 19:13 ` n.pettik 2019-03-25 16:30 ` Imeev Mergen 2019-03-26 10:27 ` Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=a417f035ec8526467e241ab258fb818e2df906b5.1553271184.git.imeevma@gmail.com \ --to=imeevma@tarantool.org \ --cc=korablev@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [tarantool-patches] [PATCH v1 1/1] sql: ban ANALYZE statement' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox