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 CFD6121262 for ; Wed, 30 Jan 2019 08:57:04 -0500 (EST) 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 XtWJSYW4ALKz for ; Wed, 30 Jan 2019 08:57:04 -0500 (EST) Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 70F1721152 for ; Wed, 30 Jan 2019 08:57:04 -0500 (EST) Subject: [tarantool-patches] Re: [PATCH v5 2/6] sql: fix "PRAGMA parser_trace" result References: From: Vladislav Shpilevoy Message-ID: <3e0c44e3-21fc-8288-c877-da8fe5996758@tarantool.org> Date: Wed, 30 Jan 2019 16:57:01 +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, imeevma@tarantool.org Cc: korablev@tarantool.org On 29/01/2019 17:29, imeevma@tarantool.org wrote: > Currently PRAGMA parser_trace returns an empty table. This seems > wrong, since other similar pragmas return their status. Fixed in > the current patch. > --- > src/box/sql/pragma.c | 59 +++++++++++++++++---------------------------- > src/box/sql/pragma.h | 7 +++--- > src/box/sql/sqliteInt.h | 2 ++ > test/sql/sql-debug.result | 29 ++++++++++++++++++++++ > test/sql/sql-debug.test.lua | 14 +++++++++++ > test/sql/suite.ini | 2 +- > 6 files changed, 71 insertions(+), 42 deletions(-) > create mode 100644 test/sql/sql-debug.result > create mode 100644 test/sql/sql-debug.test.lua > > diff --git a/test/sql/sql-debug.result b/test/sql/sql-debug.result > new file mode 100644 > index 0000000..0c9ac97 > --- /dev/null > +++ b/test/sql/sql-debug.result > @@ -0,0 +1,29 @@ > +remote = require('net.box') > +--- > +... > +test_run = require('test_run').new() > +--- > +... > +engine = test_run:get_cfg('engine') Why do you need an engine here? This test never touches the data dictionary. > +--- > +... > +box.sql.execute('pragma sql_default_engine=\''..engine..'\'') > +--- > +... > +-- > +-- gh-3832: Some statements do not return column type > +-- Check that "PRAGMA parser_trace" returns 0 or 1 if called > +-- without parameter. > +result = box.sql.execute('PRAGMA parser_trace') > +--- > +... > +box.sql.execute('PRAGMA parser_trace = 1') > +--- > +... > +box.sql.execute('PRAGMA parser_trace') > +--- > +- - [1] > +... > +box.sql.execute('PRAGMA parser_trace = '.. result[1][1]) > +--- > +...