From: imeevma@tarantool.org To: v.shpilevoy@tarantool.org, tarantool-patches@freelists.org Subject: [tarantool-patches] [PATCH v2 1/6] sql: remove unnecessary macros from pragma.* Date: Sat, 15 Dec 2018 14:54:48 +0300 [thread overview] Message-ID: <5e5daaaeb306feae8caf3af98a3708431c58062e.1544871594.git.imeevma@gmail.com> (raw) In-Reply-To: <cover.1544871593.git.imeevma@gmail.com> Some of the macros used in pragma.c and pragma.h are obsolete because the values they checked were deleted. Part of #3832 --- src/box/sql/pragma.c | 4 ---- src/box/sql/pragma.h | 30 +++--------------------------- 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/src/box/sql/pragma.c b/src/box/sql/pragma.c index 5c35017..c052015 100644 --- a/src/box/sql/pragma.c +++ b/src/box/sql/pragma.c @@ -467,7 +467,6 @@ sqlite3Pragma(Parse * pParse, Token * pId, /* First part of [schema.]id field */ /* Jump to the appropriate pragma handler */ switch (pPragma->ePragTyp) { -#ifndef SQLITE_OMIT_FLAG_PRAGMAS case PragTyp_FLAG:{ if (zRight == 0) { setPragmaResultColumnNames(v, pPragma); @@ -496,9 +495,7 @@ sqlite3Pragma(Parse * pParse, Token * pId, /* First part of [schema.]id field */ } break; } -#endif /* SQLITE_OMIT_FLAG_PRAGMAS */ -#ifndef SQLITE_OMIT_SCHEMA_PRAGMAS case PragTyp_TABLE_INFO: sql_pragma_table_info(pParse, zRight); break; @@ -535,7 +532,6 @@ sqlite3Pragma(Parse * pParse, Token * pId, /* First part of [schema.]id field */ box_iterator_free(iter); break; } -#endif /* SQLITE_OMIT_SCHEMA_PRAGMAS */ case PragTyp_FOREIGN_KEY_LIST:{ if (zRight == NULL) diff --git a/src/box/sql/pragma.h b/src/box/sql/pragma.h index e608016..84ab478 100644 --- a/src/box/sql/pragma.h +++ b/src/box/sql/pragma.h @@ -97,41 +97,32 @@ static const PragmaName aPragmaName[] = { /* ePragFlg: */ PragFlg_NoColumns, /* ColNames: */ 0, 0, /* iArg: */ 0}, -#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS) { /* zName: */ "collation_list", /* ePragTyp: */ PragTyp_COLLATION_LIST, /* ePragFlg: */ PragFlg_Result0, /* ColNames: */ 21, 2, /* iArg: */ 0}, -#endif -#if !defined(SQLITE_OMIT_FLAG_PRAGMAS) { /* zName: */ "count_changes", /* ePragTyp: */ PragTyp_FLAG, /* ePragFlg: */ PragFlg_Result0 | PragFlg_NoColumns1, /* ColNames: */ 0, 0, /* iArg: */ SQLITE_CountRows}, -#endif -#if !defined(SQLITE_OMIT_FLAG_PRAGMAS) { /* zName: */ "defer_foreign_keys", /* ePragTyp: */ PragTyp_FLAG, /* ePragFlg: */ PragFlg_Result0 | PragFlg_NoColumns1, /* ColNames: */ 0, 0, /* iArg: */ SQLITE_DeferFKs}, -#endif { /* zName: */ "foreign_key_list", /* ePragTyp: */ PragTyp_FOREIGN_KEY_LIST, /* ePragFlg: */ PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt, /* ColNames: */ 23, 8, /* iArg: */ 0}, -#if !defined(SQLITE_OMIT_FLAG_PRAGMAS) { /* zName: */ "full_column_names", /* ePragTyp: */ PragTyp_FLAG, /* ePragFlg: */ PragFlg_Result0 | PragFlg_NoColumns1, /* ColNames: */ 0, 0, /* iArg: */ SQLITE_FullColNames}, -#endif -#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS) { /* zName: */ "index_info", /* ePragTyp: */ PragTyp_INDEX_INFO, /* ePragFlg: */ @@ -144,15 +135,13 @@ static const PragmaName aPragmaName[] = { PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt, /* ColNames: */ 16, 5, /* iArg: */ 0}, -#endif -#if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_PARSER_TRACE) +#if defined(SQLITE_DEBUG) { /* zName: */ "parser_trace", /* ePragTyp: */ PragTyp_PARSER_TRACE, /* ePragFlg: */ 0, /* ColNames: */ 0, 0, /* iArg: */ 0}, #endif -#if !defined(SQLITE_OMIT_FLAG_PRAGMAS) { /* zName: */ "query_only", /* ePragTyp: */ PragTyp_FLAG, /* ePragFlg: */ PragFlg_Result0 | PragFlg_NoColumns1, @@ -168,28 +157,23 @@ static const PragmaName aPragmaName[] = { /* ePragFlg: */ PragFlg_Result0 | PragFlg_NoColumns1, /* ColNames: */ 0, 0, /* iArg: */ SQLITE_RecTriggers}, -#endif -#if !defined(SQLITE_OMIT_FLAG_PRAGMAS) { /* zName: */ "reverse_unordered_selects", /* ePragTyp: */ PragTyp_FLAG, /* ePragFlg: */ PragFlg_Result0 | PragFlg_NoColumns1, /* ColNames: */ 0, 0, /* iArg: */ SQLITE_ReverseOrder}, -#endif -#if !defined(SQLITE_OMIT_FLAG_PRAGMAS) && defined(SQLITE_ENABLE_SELECTTRACE) +#if defined(SQLITE_ENABLE_SELECTTRACE) { /* zName: */ "select_trace", /* ePragTyp: */ PragTyp_FLAG, /* ePragFlg: */ PragFlg_Result0 | PragFlg_NoColumns1, /* ColNames: */ 0, 0, /* iArg: */ SQLITE_SelectTrace}, #endif -#if !defined(SQLITE_OMIT_FLAG_PRAGMAS) { /* zName: */ "short_column_names", /* ePragTyp: */ PragTyp_FLAG, /* ePragFlg: */ PragFlg_Result0 | PragFlg_NoColumns1, /* ColNames: */ 0, 0, /* iArg: */ SQLITE_ShortColNames}, -#endif { /* zName: */ "sql_compound_select_limit", /* ePragTyp: */ PragTyp_COMPOUND_SELECT_LIMIT, /* ePragFlg: */ PragFlg_Result0, @@ -200,7 +184,6 @@ static const PragmaName aPragmaName[] = { /* ePragFlg: */ PragFlg_Result0 | PragFlg_NoColumns1, /* ColNames: */ 0, 0, /* iArg: */ 0}, -#if !defined(SQLITE_OMIT_FLAG_PRAGMAS) #if defined(SQLITE_DEBUG) { /* zName: */ "sql_trace", /* ePragTyp: */ PragTyp_FLAG, @@ -208,24 +191,18 @@ static const PragmaName aPragmaName[] = { /* ColNames: */ 0, 0, /* iArg: */ SQLITE_SqlTrace}, #endif -#endif -#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS) { /* zName: */ "stats", /* ePragTyp: */ PragTyp_STATS, /* ePragFlg: */ PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq, /* ColNames: */ 6, 4, /* iArg: */ 0}, -#endif -#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS) { /* zName: */ "table_info", /* ePragTyp: */ PragTyp_TABLE_INFO, /* ePragFlg: */ PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt, /* ColNames: */ 0, 6, /* iArg: */ 0}, -#endif -#if !defined(SQLITE_OMIT_FLAG_PRAGMAS) #if defined(SQLITE_DEBUG) { /* zName: */ "vdbe_addoptrace", /* ePragTyp: */ PragTyp_FLAG, @@ -254,8 +231,7 @@ static const PragmaName aPragmaName[] = { /* ColNames: */ 0, 0, /* iArg: */ SQLITE_VdbeTrace}, #endif -#endif -#if !defined(SQLITE_OMIT_FLAG_PRAGMAS) && defined(SQLITE_ENABLE_WHERETRACE) +#if defined(SQLITE_ENABLE_WHERETRACE) { /* zName: */ "where_trace", /* ePragTyp: */ PragTyp_FLAG, -- 2.7.4
next prev parent reply other threads:[~2018-12-15 12:05 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-12-15 11:51 [tarantool-patches] [PATCH v2 0/6] sql: set column types for EXPLAIN and PRAGMA imeevma 2018-12-15 11:54 ` imeevma [this message] 2018-12-20 20:41 ` [tarantool-patches] Re: [PATCH v2 1/6] sql: remove unnecessary macros from pragma.* Vladislav Shpilevoy 2018-12-24 14:01 ` n.pettik 2018-12-15 11:56 ` [tarantool-patches] [PATCH v2 2/6] sql: fix "PRAGMA parser_trace" result imeevma 2018-12-24 14:01 ` [tarantool-patches] " n.pettik 2018-12-15 12:01 ` [tarantool-patches] [PATCH v2 3/6] sql: Show currently set sql_default_engine imeevma 2018-12-24 14:01 ` [tarantool-patches] " n.pettik 2018-12-15 12:03 ` [tarantool-patches] [PATCH v2 4/6] sql: fix "PRAGMA case_sensitive_like" result imeevma 2018-12-24 14:01 ` [tarantool-patches] " n.pettik 2018-12-15 12:05 ` [tarantool-patches] [PATCH v2 5/6] sql: 'PRAGMA' result in Tarantool format imeevma 2018-12-24 14:02 ` [tarantool-patches] " n.pettik 2018-12-15 12:08 ` [tarantool-patches] [PATCH v2 6/6] sql: set column types for EXPLAIN and PRAGMA imeevma 2018-12-24 14:02 ` [tarantool-patches] " n.pettik
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=5e5daaaeb306feae8caf3af98a3708431c58062e.1544871594.git.imeevma@gmail.com \ --to=imeevma@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [tarantool-patches] [PATCH v2 1/6] sql: remove unnecessary macros from pragma.*' \ /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