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

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Mon Feb 4 16:08:18 MSK 2019


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?





More information about the Tarantool-patches mailing list