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 27CEB2853E for ; Mon, 18 Mar 2019 19:51:28 -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 k6VYydqD2HJb for ; Mon, 18 Mar 2019 19:51:27 -0400 (EDT) Received: from smtp14.mail.ru (smtp14.mail.ru [94.100.181.95]) (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 6FBDE2819D for ; Mon, 18 Mar 2019 19:51:27 -0400 (EDT) From: Nikita Pettik Subject: [tarantool-patches] [PATCH 2/2] schema: add exact field count to SQL stat spaces Date: Tue, 19 Mar 2019 02:51:21 +0300 Message-Id: In-Reply-To: References: In-Reply-To: References: 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 Cc: v.shpilevoy@tarantool.org, Nikita Pettik 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(-) diff --git a/src/box/b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