[tarantool-patches] Re: [PATCH v5 5/6] sql: get results of PRAGMA statement in YAML format

Mergen Imeev imeevma at tarantool.org
Sat Feb 9 13:11:45 MSK 2019


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 <imeevma at gmail.com>
> >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.
 




More information about the Tarantool-patches mailing list