[tarantool-patches] Re: [PATCH v5 2/6] sql: fix "PRAGMA parser_trace" result
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Wed Jan 30 16:57:01 MSK 2019
On 29/01/2019 17:29, imeevma at 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])
> +---
> +...
More information about the Tarantool-patches
mailing list