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 3F7B52943D for ; Tue, 28 Aug 2018 20:58:34 -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 tL7T1IqzlPxy for ; Tue, 28 Aug 2018 20:58:34 -0400 (EDT) Received: from smtp2.mail.ru (smtp2.mail.ru [94.100.179.91]) (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 5D84E293A7 for ; Tue, 28 Aug 2018 20:58:33 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 6/7] sql: don't add system spaces to Table hash References: From: Vladislav Shpilevoy Message-ID: Date: Tue, 28 Aug 2018 21:58:27 -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: tarantool-patches@freelists.org, Nikita Pettik Thanks for the patch! See my review fixes on the branch and below: commit 882627479793ae3958cec7274cc3e353395aea40 Author: Vladislav Shpilevoy Date: Tue Aug 28 21:28:49 2018 -0300 Review fixes diff --git a/src/box/sql/prepare.c b/src/box/sql/prepare.c index a59e70dd0..0dfdf251f 100644 --- a/src/box/sql/prepare.c +++ b/src/box/sql/prepare.c @@ -133,26 +133,14 @@ sql_init_callback(struct init_data *init, const char *name, extern int sqlite3InitDatabase(sqlite3 * db) { - int rc; - struct init_data init; - assert(db->pSchema != NULL); - - memset(&init, 0, sizeof(init)); - init.db = db; - /* Read the schema information out of the schema tables - */ assert(db->init.busy); - { - rc = init.rc; - if (rc == SQLITE_OK) - sql_analysis_load(db); - } + sql_analysis_load(db); if (db->mallocFailed) { - rc = SQLITE_NOMEM_BKPT; sqlite3ResetAllSchemasOfConnection(db); + return SQLITE_NOMEM_BKPT; } - return rc; + return SQLITE_OK; } diff --git a/src/box/sql/tarantoolInt.h b/src/box/sql/tarantoolInt.h index 9334de52d..8622cd19f 100644 --- a/src/box/sql/tarantoolInt.h +++ b/src/box/sql/tarantoolInt.h @@ -10,10 +10,6 @@ struct fkey_def; -/* Insert or replace operation types - necessary for vdbe */ -#define TARANTOOL_INDEX_INSERT 1 -#define TARANTOOL_INDEX_REPLACE 2 - /* Misc */ const char *tarantoolErrorMessage();