From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: Kirill Shcherbatov <kshcherbatov@tarantool.org>, tarantool-patches@freelists.org Subject: [tarantool-patches] Re: [PATCH v1 1/2] sql: introduce pragma sql_default_engine Date: Wed, 27 Jun 2018 15:32:55 +0300 [thread overview] Message-ID: <f4a07e3a-adc4-9971-97cd-021f071bf494@tarantool.org> (raw) In-Reply-To: <cca6a46e-098c-761e-0c70-bdd0a24d6888@tarantool.org> Hello. Thanks for the fixes! > diff --git a/src/box/schema_def.h b/src/box/schema_def.h > index b9a5fa5..e6a7206 100644 > --- a/src/box/schema_def.h > +++ b/src/box/schema_def.h > @@ -243,6 +243,13 @@ enum schema_object_type { > schema_object_type_MAX = 8 > }; > > +/** SQL Storage engine. */ > +enum sql_storage_engine { > + SQL_STORAGE_ENGINE_MEMTX = 0, > + SQL_STORAGE_ENGINE_VINYL = 1, > + sql_storage_engine_MAX = 2 > +}; Please, put _strs here as extern and declare it in schema_def.c like it is done for other enum + _strs pairs (enum + extern strs in a header and declaration in source). > + > enum schema_object_type > schema_object_type(const char *name); > On the branch I got these errors: /Users/v.shpilevoy/Work/Repositories/tarantool/src/box/sql/trigger.c:102:6: error: variable 'trigger_name' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (sqlite3FixSrcList(&fixdb, table) != 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/v.shpilevoy/Work/Repositories/tarantool/src/box/sql/trigger.c:156:20: note: uninitialized use occurs here sqlite3DbFree(db, trigger_name); ^~~~~~~~~~~~ /Users/v.shpilevoy/Work/Repositories/tarantool/src/box/sql/trigger.c:102:2: note: remove the 'if' if its condition is always false if (sqlite3FixSrcList(&fixdb, table) != 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/v.shpilevoy/Work/Repositories/tarantool/src/box/sql/trigger.c:98:6: error: variable 'trigger_name' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (db->mallocFailed) ^~~~~~~~~~~~~~~~ /Users/v.shpilevoy/Work/Repositories/tarantool/src/box/sql/trigger.c:156:20: note: uninitialized use occurs here sqlite3DbFree(db, trigger_name); ^~~~~~~~~~~~ /Users/v.shpilevoy/Work/Repositories/tarantool/src/box/sql/trigger.c:98:2: note: remove the 'if' if its condition is always false if (db->mallocFailed) ^~~~~~~~~~~~~~~~~~~~~ /Users/v.shpilevoy/Work/Repositories/tarantool/src/box/sql/trigger.c:91:6: error: variable 'trigger_name' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (table == NULL || db->mallocFailed) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/v.shpilevoy/Work/Repositories/tarantool/src/box/sql/trigger.c:156:20: note: uninitialized use occurs here sqlite3DbFree(db, trigger_name); ^~~~~~~~~~~~ /Users/v.shpilevoy/Work/Repositories/tarantool/src/box/sql/trigger.c:91:2: note: remove the 'if' if its condition is always false if (table == NULL || db->mallocFailed) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/v.shpilevoy/Work/Repositories/tarantool/src/box/sql/trigger.c:91:6: error: variable 'trigger_name' is used uninitialized whenever '||' condition is true [-Werror,-Wsometimes-uninitialized] if (table == NULL || db->mallocFailed) ^~~~~~~~~~~~~ /Users/v.shpilevoy/Work/Repositories/tarantool/src/box/sql/trigger.c:156:20: note: uninitialized use occurs here sqlite3DbFree(db, trigger_name); ^~~~~~~~~~~~ /Users/v.shpilevoy/Work/Repositories/tarantool/src/box/sql/trigger.c:91:6: note: remove the '||' if its condition is always false if (table == NULL || db->mallocFailed) ^~~~~~~~~~~~~~~~ /Users/v.shpilevoy/Work/Repositories/tarantool/src/box/sql/trigger.c:105:2: note: variable 'trigger_name' is declared here char *trigger_name = sqlite3NameFromToken(db, name); ^ 4 errors generated.
next prev parent reply other threads:[~2018-06-27 12:33 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-06-20 17:06 [tarantool-patches] [PATCH v1 0/2] sql: default engine pragma Kirill Shcherbatov 2018-06-20 17:06 ` [tarantool-patches] [PATCH v1 1/2] sql: introduce pragma sql_default_engine Kirill Shcherbatov 2018-06-22 20:04 ` [tarantool-patches] " Vladislav Shpilevoy 2018-06-26 12:22 ` Kirill Shcherbatov 2018-06-26 13:34 ` Vladislav Shpilevoy 2018-06-26 17:09 ` Kirill Shcherbatov 2018-06-27 12:32 ` Vladislav Shpilevoy [this message] 2018-06-27 15:59 ` Kirill Shcherbatov 2018-06-20 17:06 ` [tarantool-patches] [PATCH v1 2/2] sql: enable multi-engine tests for SQL Kirill Shcherbatov 2018-06-22 20:04 ` [tarantool-patches] " Vladislav Shpilevoy 2018-06-26 12:22 ` Kirill Shcherbatov 2018-06-26 13:34 ` Vladislav Shpilevoy 2018-06-26 17:09 ` Kirill Shcherbatov 2018-06-26 12:23 ` [tarantool-patches] [PATCH v1 2/3] sql: fix SQL Count for vinyl engine Kirill Shcherbatov 2018-06-28 15:35 ` [tarantool-patches] Re: [PATCH v1 0/2] sql: default engine pragma Vladislav Shpilevoy 2018-06-28 16:00 ` 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=f4a07e3a-adc4-9971-97cd-021f071bf494@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=kshcherbatov@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH v1 1/2] sql: introduce pragma sql_default_engine' \ /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