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 2E6F02A8B0 for ; Thu, 21 Mar 2019 11:40: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 DkR6WhPuV-9r for ; Thu, 21 Mar 2019 11:40:00 -0400 (EDT) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 D9B912A868 for ; Thu, 21 Mar 2019 11:39:59 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 2/2] schema: add exact field count to SQL stat spaces References: <60BB00E1-8D5E-4AFD-A86E-30CE45D00446@tarantool.org> From: Vladislav Shpilevoy Message-ID: <5ec93f09-cc2a-0011-b156-c00f1416d94b@tarantool.org> Date: Thu, 21 Mar 2019 18:39:57 +0300 MIME-Version: 1.0 In-Reply-To: <60BB00E1-8D5E-4AFD-A86E-30CE45D00446@tarantool.org> 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: "n.pettik" , tarantool-patches@freelists.org, Kirill Yukhin On 21/03/2019 18:22, n.pettik wrote: > > >> On 21 Mar 2019, at 16:31, Vladislav Shpilevoy wrote: >> >> On that branch tests sql-tap/gh2548-select-compound-limit.test.lua >> and sql-tap/gh2250-trigger-chain-limit.test.lua fail. > > Are you sure? Travis is green; on my local machine both > release and debug builds pass these tests as well (memtx > and vinyl cases). Could you check it again, or provide more > details concerning fails? Hmm, I do not know, what it was, but now they pass :) LGTM. > >> On 19/03/2019 02:51, Nikita Pettik wrote: >>> As a rule, system spaces don't feature exact field count. There is a >>> reason for that: almost all of them have on replace triggers, which >>> extract data from tuple and verify it. However, _sql_stat1 and >>> _sql_stat4 spaces containing SQL specific statistics don't have such >>> triggers. Hence, one can insert tuple to this space with greater number >>> of fields, than format says. To prevent this, let's explicitly set exact >>> field count to number of fields in format. >>> --- >>> src/box/bootstrap.snap | Bin 1831 -> 1840 bytes >>> src/box/lua/upgrade.lua | 29 ++++++++++++++++++++++++++++- >>> test/box-py/bootstrap.result | 6 +++--- >>> test/box/access_misc.result | 4 ++-- >>> test/sql/upgrade.result | 39 +++++++++++++++++++++++++++++++++++++-- >>> test/sql/upgrade.test.lua | 13 +++++++++++++ >>> 6 files changed, 83 insertions(+), 8 deletions(-) >