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 1BAFC265EF for ; Sat, 9 Feb 2019 05:11:49 -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 PSUe0DPgBr1P for ; Sat, 9 Feb 2019 05:11:49 -0500 (EST) Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [94.100.177.97]) (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 8991323C73 for ; Sat, 9 Feb 2019 05:11:48 -0500 (EST) Date: Sat, 9 Feb 2019 13:11:45 +0300 From: Mergen Imeev Subject: [tarantool-patches] Re: [PATCH v5 5/6] sql: get results of PRAGMA statement in YAML format Message-ID: <20190209101144.GB4043@tarantool.org> References: <1a7fd53719a4790845c68f815a4f1a9f4f84b97a.1548771900.git.imeevma@gmail.com> <64adcf21-d8dc-6069-8382-79fc1a467e15@tarantool.org> <9c3b19c5-a1ba-5816-d525-9f6dacc04144@tarantool.org> <2591c7d9-4d3e-308c-39e5-3da864ef000e@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2591c7d9-4d3e-308c-39e5-3da864ef000e@tarantool.org> 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: Vladislav Shpilevoy Cc: tarantool-patches@freelists.org, korablev@tarantool.org Hi! Thank you for review! My answer below. On Mon, Feb 04, 2019 at 04:08:18PM +0300, Vladislav Shpilevoy wrote: > Thanks for the fixes! > > >commit 3c930d8c81aed9ff25f2d582e8bd7743ff57d861 > >Author: Mergen Imeev > >Date:   Thu Dec 13 21:07:31 2018 +0300 > > > >     sql: get results of PRAGMA statement as result set > > > >     Currently box.sql.execute ('PRAGMA') returns nothing, but prints > >     list of pragmas and their statuses to stdout. Such strategy is > >     considered to be wrong since output of this command would be > >     unavailable for users who redirect stdout, use net box connection > >     etc. This patch makes the command to return result as the rest of > >     SQL commands. The result contains only FLAG-type pragmas and their > >     statuses. > > > >diff --git a/test/sql/sql-debug.test.lua b/test/sql/sql-debug.test.lua > >index 721ef19..e429c38 100644 > >--- a/test/sql/sql-debug.test.lua > >+++ b/test/sql/sql-debug.test.lua > >@@ -10,3 +10,8 @@ result = box.sql.execute('PRAGMA parser_trace') > >  box.sql.execute('PRAGMA parser_trace = 1') > >  box.sql.execute('PRAGMA parser_trace') > >  box.sql.execute('PRAGMA parser_trace = '.. result[1][1]) > >+ > >+-- > >+-- Make PRAGMA command return the result as a result set. > >+-- > >+box.sql.execute('PRAGMA') > > > > Why is this test in sql-debug.test.lua instead of pragma.test.lua? > I did this because the result of the command in the debug build is different from the result in the non-debug build.