From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id A6F0B2176C for ; Wed, 27 Jun 2018 08:33:00 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qs82aeOREt-1 for ; Wed, 27 Jun 2018 08:33:00 -0400 (EDT) Received: from smtp62.i.mail.ru (smtp62.i.mail.ru [217.69.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 666F1216E8 for ; Wed, 27 Jun 2018 08:33:00 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v1 1/2] sql: introduce pragma sql_default_engine References: <869f48ed-cf99-7e0a-f89b-8431dee2f72c@tarantool.org> <485804b9-8659-17a1-aaa9-cebc1d0e2893@tarantool.org> <9085644e-030f-b1bc-6928-4819bc5ffed7@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Wed, 27 Jun 2018 15:32:55 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: Kirill Shcherbatov , tarantool-patches@freelists.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.