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 1B68D29184 for ; Wed, 29 Aug 2018 15:27:13 -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 irKyPU2ks3M5 for ; Wed, 29 Aug 2018 15:27:13 -0400 (EDT) Received: from smtp17.mail.ru (smtp17.mail.ru [94.100.176.154]) (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 70A0229170 for ; Wed, 29 Aug 2018 15:27:12 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v1 1/1] sql: hold in stat tables space/index id instead of name References: <1bb0b3ca-0977-ba88-6822-adf538eed6cc@tarantool.org> From: Vladislav Shpilevoy Message-ID: <7f90f218-d01c-d9c6-bc8c-3e8a29c76ebd@tarantool.org> Date: Wed, 29 Aug 2018 16:27:03 -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: Imeev Mergen , tarantool-patches@freelists.org Hi! Thanks for the fixes! I have force pushed my review fixes. I removed some leading white spaces and useless assertions. The diff is below. Please, fetch, rebase and send to Nikita on the second review. diff --git a/src/box/sql/analyze.c b/src/box/sql/analyze.c index a7cc173cd..3d825acb9 100644 --- a/src/box/sql/analyze.c +++ b/src/box/sql/analyze.c @@ -1016,8 +1016,6 @@ analyzeOneTable(Parse * pParse, /* Parser context */ /* Add the entry to the stat1 table. */ callStatGet(v, regStat4, STAT_GET_STAT1, regStat1); - assert("DDB"[0] == AFFINITY_INTEGER); - assert("BBB"[2] == AFFINITY_TEXT); sqlite3VdbeAddOp4(v, OP_MakeRecord, reg_space_id, 3, regTemp, "DDB", 0); sqlite3VdbeAddOp2(v, OP_IdxInsert, iStatCur, regTemp); diff --git a/test/sql-tap/analyze9.test.lua b/test/sql-tap/analyze9.test.lua index b0fec3b1c..2c6b4b8a0 100755 --- a/test/sql-tap/analyze9.test.lua +++ b/test/sql-tap/analyze9.test.lua @@ -70,8 +70,8 @@ test:do_execsql_test( SELECT "idx","neq","nlt","ndlt",msgpack_decode_sample("sample") FROM "_sql_stat4" where "idx" = %i; ]], t1.index['I1'].id), { -- <1.2> - 1, "1 1", "0 0", "0 0", "(0) (0)", 1, "1 1", "1 1", "1 1", "(1) (1)", - 1, "1 1", "2 2", "2 2", "(2) (2)", 1, "1 1", "3 3", "3 3", "(3) (3)", + 1, "1 1", "0 0", "0 0", "(0) (0)", 1, "1 1", "1 1", "1 1", "(1) (1)", + 1, "1 1", "2 2", "2 2", "(2) (2)", 1, "1 1", "3 3", "3 3", "(3) (3)", 1, "1 1", "4 4", "4 4", "(4) (4)" -- }) @@ -82,8 +82,8 @@ test:do_execsql_test( SELECT "idx","neq","nlt","ndlt",msgpack_decode_sample("sample") FROM "_sql_stat4" where "idx" = %i; ]], t1.index[0].id), { -- <1.3> - 0, '1', '0', '0', '(0)', 0, '1', '1', '1', '(1)', - 0, '1', '2', '2', '(2)', 0, '1', '3', '3', '(3)', + 0, '1', '0', '0', '(0)', 0, '1', '1', '1', '(1)', + 0, '1', '2', '2', '(2)', 0, '1', '3', '3', '(3)', 0, '1', '4', '4', '(4)' -- })