From: imeevma@tarantool.org To: v.shpilevoy@tarantool.org Cc: tarantool-patches@freelists.org Subject: [tarantool-patches] [PATCH v1 1/1] sql: set consistent names Date: Tue, 2 Apr 2019 18:59:41 +0300 [thread overview] Message-ID: <42434eb6adc25c50b3c6969705000580519f116e.1554220609.git.imeevma@gmail.com> (raw) This patch changes the name of the function used in the port_sql methods and the name of the member of the result of the execution. Follow up #3505 --- src/box/execute.c | 8 +- src/box/lua/execute.c | 12 +- src/box/lua/net_box.c | 5 +- test/box/sql-update-with-nested-select.result | 10 +- test/sql/bind.result | 4 +- test/sql/check-clear-ephemeral.result | 8 +- test/sql/checks.result | 2 +- test/sql/clear.result | 12 +- test/sql/collation.result | 218 ++++++++++----------- test/sql/delete-multiple-idx.result | 20 +- test/sql/delete.result | 50 ++--- test/sql/drop-index.result | 22 +-- test/sql/drop-table.result | 20 +- test/sql/engine.result | 16 +- test/sql/errinj.result | 54 ++--- test/sql/foreign-keys.result | 32 +-- test/sql/func-recreate.result | 2 +- test/sql/gh-2347-max-int-literals.result | 2 +- test/sql/gh-2362-select-access-rights.result | 22 +-- test/sql/gh-2929-primary-key.result | 6 +- test/sql/gh-2981-check-autoinc.result | 22 +-- test/sql/gh-3199-no-mem-leaks.result | 16 +- test/sql/gh-3613-idx-alter-update-2.result | 12 +- test/sql/gh-3613-idx-alter-update.result | 16 +- test/sql/gh-3888-values-blob-assert.result | 2 +- test/sql/gh2141-delete-trigger-drop-table.result | 18 +- test/sql/gh2251-multiple-update.result | 22 +-- test/sql/gh2483-remote-persistency-check.result | 8 +- .../gh2808-inline-unique-persistency-check.result | 10 +- test/sql/icu-upper-lower.result | 2 +- test/sql/insert-unique.result | 12 +- test/sql/integer-overflow.result | 4 +- test/sql/iproto.result | 122 ++++++------ test/sql/iproto.test.lua | 6 +- test/sql/max-on-index.result | 24 +-- test/sql/message-func-indexes.result | 14 +- test/sql/misc.result | 2 +- test/sql/no-pk-space.result | 6 +- test/sql/on-conflict.result | 36 ++-- test/sql/persistency.result | 38 ++-- test/sql/row-count.result | 62 +++--- test/sql/savepoints.result | 2 +- test/sql/select-null.result | 10 +- test/sql/sql-debug.result | 4 +- test/sql/sql-statN-index-drop.result | 42 ++-- test/sql/tokenizer.result | 2 +- test/sql/transition.result | 34 ++-- test/sql/transitive-transactions.result | 8 +- test/sql/triggers.result | 122 ++++++------ test/sql/types.result | 24 +-- test/sql/update-with-nested-select.result | 12 +- test/sql/upgrade.result | 16 +- test/sql/view.result | 72 +++---- test/sql/view_delayed_wal.result | 8 +- test/sql/vinyl-opts.result | 6 +- 55 files changed, 672 insertions(+), 669 deletions(-) diff --git a/src/box/execute.c b/src/box/execute.c index af21828..54013a5 100644 --- a/src/box/execute.c +++ b/src/box/execute.c @@ -47,7 +47,8 @@ #include "box/lua/execute.h" const char *sql_info_key_strs[] = { - "row count", + "row_count", + "autoincrement_ids", }; static_assert(sizeof(struct port_sql) <= sizeof(struct port), @@ -263,8 +264,7 @@ error: * @retval -1 Client or memory error. */ static inline int -sql_get_description(struct sql_stmt *stmt, struct obuf *out, - int column_count) +sql_get_metadata(struct sql_stmt *stmt, struct obuf *out, int column_count) { assert(column_count > 0); int size = mp_sizeof_uint(IPROTO_METADATA) + @@ -321,7 +321,7 @@ port_sql_dump_msgpack(struct port *port, struct obuf *out) return -1; } pos = mp_encode_map(pos, keys); - if (sql_get_description(stmt, out, column_count) != 0) + if (sql_get_metadata(stmt, out, column_count) != 0) return -1; size = mp_sizeof_uint(IPROTO_DATA); pos = (char *) obuf_alloc(out, size); diff --git a/src/box/lua/execute.c b/src/box/lua/execute.c index 71d64bc..3581969 100644 --- a/src/box/lua/execute.c +++ b/src/box/lua/execute.c @@ -14,8 +14,8 @@ * @param column_count Statement's column count. */ static inline void -lua_sql_get_description(struct sql_stmt *stmt, struct lua_State *L, - int column_count) +lua_sql_get_metadata(struct sql_stmt *stmt, struct lua_State *L, + int column_count) { assert(column_count > 0); lua_createtable(L, column_count, 0); @@ -47,7 +47,7 @@ port_sql_dump_lua(struct port *port, struct lua_State *L) int column_count = sql_column_count(stmt); if (column_count > 0) { lua_createtable(L, 0, 2); - lua_sql_get_description(stmt, L, column_count); + lua_sql_get_metadata(stmt, L, column_count); lua_setfield(L, -2, "metadata"); port_tuple_vtab.dump_lua(port, L); lua_setfield(L, -2, "rows"); @@ -58,7 +58,7 @@ port_sql_dump_lua(struct port *port, struct lua_State *L) lua_createtable(L, 0, stailq_empty(autoinc_id_list) ? 1 : 2); luaL_pushuint64(L, db->nChange); - lua_setfield(L, -2, "rowcount"); + lua_setfield(L, -2, sql_info_key_strs[SQL_INFO_ROW_COUNT]); if (!stailq_empty(autoinc_id_list)) { lua_newtable(L); @@ -71,7 +71,9 @@ port_sql_dump_lua(struct port *port, struct lua_State *L) luaL_pushint64(L, id_entry->id); lua_rawseti(L, -2, i++); } - lua_setfield(L, -2, "autoincrement_ids"); + const char *field_name = + sql_info_key_strs[SQL_INFO_AUTOINCREMENT_IDS]; + lua_setfield(L, -2, field_name); } } } diff --git a/src/box/lua/net_box.c b/src/box/lua/net_box.c index c7063d9..2dfc4fc 100644 --- a/src/box/lua/net_box.c +++ b/src/box/lua/net_box.c @@ -681,7 +681,7 @@ netbox_decode_sql_info(struct lua_State *L, const char **data) assert(key == SQL_INFO_ROW_COUNT); uint32_t row_count = mp_decode_uint(data); lua_pushinteger(L, row_count); - lua_setfield(L, -2, "rowcount"); + lua_setfield(L, -2, sql_info_key_strs[SQL_INFO_ROW_COUNT]); /* * If data have two elements then second is * SQL_INFO_AUTOINCREMENT_IDS. @@ -699,7 +699,8 @@ netbox_decode_sql_info(struct lua_State *L, const char **data) luaL_pushint64(L, id); lua_rawseti(L, -2, j + 1); } - lua_setfield(L, -2, "autoincrement_ids"); + lua_setfield(L, -2, + sql_info_key_strs[SQL_INFO_AUTOINCREMENT_IDS]); } } diff --git a/test/box/sql-update-with-nested-select.result b/test/box/sql-update-with-nested-select.result index 24da618..9f69c45 100644 --- a/test/box/sql-update-with-nested-select.result +++ b/test/box/sql-update-with-nested-select.result @@ -5,23 +5,23 @@ test_run = require('test_run').new() -- create space box.execute("CREATE TABLE t1(a integer primary key, b int UNIQUE, e int);"); --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- box.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zoobar VALUES (111, 222, 'c3', 444)") -- Seed entries box.execute("INSERT INTO t1 VALUES(1,4,6);"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t1 VALUES(2,5,7);"); --- -- rowcount: 1 +- row_count: 1 ... -- Both entries must be updated box.execute("UPDATE t1 SET e=e+1 WHERE b IN (SELECT b FROM t1);"); --- -- rowcount: 2 +- row_count: 2 ... -- Check box.execute("SELECT e FROM t1"); @@ -36,7 +36,7 @@ box.execute("SELECT e FROM t1"); -- Cleanup box.execute("DROP TABLE t1;"); --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- require("console").start() diff --git a/test/sql/bind.result b/test/sql/bind.result index acf23a5..618fde0 100644 --- a/test/sql/bind.result +++ b/test/sql/bind.result @@ -6,7 +6,7 @@ test_run = require('test_run').new() ... box.execute('CREATE TABLE test (id INT PRIMARY KEY, a FLOAT, b TEXT)') --- -- rowcount: 1 +- row_count: 1 ... box.space.TEST:replace{1, 2, '3'} --- @@ -292,5 +292,5 @@ test_run:cmd("setopt delimiter ''"); ... box.execute('DROP TABLE test') --- -- rowcount: 1 +- row_count: 1 ... diff --git a/test/sql/check-clear-ephemeral.result b/test/sql/check-clear-ephemeral.result index 9fd6b87..b31c139 100644 --- a/test/sql/check-clear-ephemeral.result +++ b/test/sql/check-clear-ephemeral.result @@ -6,20 +6,20 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- box.cfg() -- create space box.execute("CREATE TABLE t1(a INT,b INT,c INT,PRIMARY KEY(b,c));") --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- box.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zoobar VALUES (111, 222, 'c3', 444)") -- Seed entries box.execute("WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000) INSERT INTO t1 SELECT x, x%40, x/40 FROM cnt;") --- -- rowcount: 1000 +- row_count: 1000 ... -- Ephemeral table is not belong to Tarantool, so must be cleared sql-way. box.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;"); @@ -42,7 +42,7 @@ box.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;"); -- Cleanup box.execute("DROP TABLE t1") --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- require("console").start() diff --git a/test/sql/checks.result b/test/sql/checks.result index 108fea6..f7cddec 100644 --- a/test/sql/checks.result +++ b/test/sql/checks.result @@ -13,7 +13,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- -- gh-3272: Move SQL CHECK into server diff --git a/test/sql/clear.result b/test/sql/clear.result index 0694a1e..b314744 100644 --- a/test/sql/clear.result +++ b/test/sql/clear.result @@ -6,17 +6,17 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- box.cfg() -- create space box.execute("CREATE TABLE zoobar (c1 INT, c2 INT PRIMARY KEY, c3 TEXT, c4 INT)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE UNIQUE INDEX zoobar2 ON zoobar(c1, c4)") --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- box.execute("PRAGMA vdbe_debug=ON;") @@ -141,7 +141,7 @@ box.execute("SELECT * FROM zoobar") -- Do clean up box.execute("DELETE FROM zoobar") --- -- rowcount: 100 +- row_count: 100 ... -- Make sure table is empty box.execute("SELECT * from zoobar") @@ -160,11 +160,11 @@ box.execute("SELECT * from zoobar") -- Cleanup box.execute("DROP INDEX zoobar2 ON zoobar") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE zoobar") --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- require("console").start() diff --git a/test/sql/collation.result b/test/sql/collation.result index d74a4a1..c763362 100644 --- a/test/sql/collation.result +++ b/test/sql/collation.result @@ -9,7 +9,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- gh-3010: COLLATE after LIMIT should throw an error -- All of these tests should throw error "near "COLLATE": syntax error" @@ -37,26 +37,26 @@ box.execute("SELECT 1 LIMIT 1 COLLATE BINARY, 1;") -- For tr-TR result depends on collation box.execute([[CREATE TABLE tu (descriptor VARCHAR(50) PRIMARY KEY, letter VARCHAR(50))]]); --- -- rowcount: 1 +- row_count: 1 ... box.internal.collation.create('TURKISH', 'ICU', 'tr-TR', {strength='primary'}); --- ... box.execute([[INSERT INTO tu VALUES ('Latin Capital Letter I U+0049','I');]]) --- -- rowcount: 1 +- row_count: 1 ... box.execute([[INSERT INTO tu VALUES ('Latin Small Letter I U+0069','i');]]) --- -- rowcount: 1 +- row_count: 1 ... box.execute([[INSERT INTO tu VALUES ('Latin Capital Letter I With Dot Above U+0130','İ');]]) --- -- rowcount: 1 +- row_count: 1 ... box.execute([[INSERT INTO tu VALUES ('Latin Small Letter Dotless I U+0131','ı');]]) --- -- rowcount: 1 +- row_count: 1 ... -- Without collation box.execute([[SELECT descriptor, upper(letter) AS upper,lower(letter) AS lower FROM tu;]]) @@ -99,7 +99,7 @@ box.internal.collation.create('GERMAN', 'ICU', 'de-DE', {strength='primary'}); ... box.execute([[INSERT INTO tu VALUES ('German Small Letter Sharp S U+00DF','ß');]]) --- -- rowcount: 1 +- row_count: 1 ... -- Without collation box.execute([[SELECT descriptor, upper(letter), letter FROM tu where UPPER(letter) = 'SS';]]) @@ -132,7 +132,7 @@ box.internal.collation.drop('GERMAN') ... box.execute(([[DROP TABLE tu]])) --- -- rowcount: 1 +- row_count: 1 ... box.schema.user.grant('guest','read,write,execute', 'universe') --- @@ -151,7 +151,7 @@ cn:close() -- box.execute("CREATE TABLE t (id INT PRIMARY KEY, a TEXT, b TEXT COLLATE \"binary\");") --- -- rowcount: 1 +- row_count: 1 ... box.space.T:format()[2]['collation'] --- @@ -163,7 +163,7 @@ box.space.T:format()[3]['collation'] ... box.execute("DROP TABLE t;") --- -- rowcount: 1 +- row_count: 1 ... -- BINARY collation works in the same way as there is no collation -- at all. @@ -223,7 +223,7 @@ box.space._collation:delete{0} -- box.execute("CREATE TABLE t (id INT PRIMARY KEY, a TEXT, b TEXT COLLATE \"binary\", c TEXT COLLATE \"unicode_ci\");") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM t WHERE a = b;") --- @@ -330,7 +330,7 @@ box.execute("SELECT b COLLATE \"unicode\" FROM t UNION SELECT a FROM t;") ... box.execute("DROP TABLE t;") --- -- rowcount: 1 +- row_count: 1 ... box.schema.user.revoke('guest', 'read,write,execute', 'universe') --- @@ -357,26 +357,26 @@ box.schema.user.drop('tmp') -- Check that foreign key update doesn't fail with "unicode_ci". box.execute('CREATE TABLE t0 (s1 VARCHAR(5) COLLATE "unicode_ci" UNIQUE, id INT PRIMARY KEY AUTOINCREMENT);') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE TABLE t1 (s1 INT PRIMARY KEY, s0 VARCHAR(5) COLLATE "unicode_ci" REFERENCES t0(s1));') --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t0(s1) VALUES ('a');") --- - autoincrement_ids: - 1 - rowcount: 1 + row_count: 1 ... box.execute("INSERT INTO t1 VALUES (1,'a');") --- -- rowcount: 1 +- row_count: 1 ... -- Should't fail. box.execute("UPDATE t0 SET s1 = 'A';") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT s1 FROM t0;") --- @@ -398,30 +398,30 @@ box.execute("SELECT * FROM t1;") ... box.execute("DROP TABLE t1;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t0;") --- -- rowcount: 1 +- row_count: 1 ... -- Check that foreign key update fails with default collation. box.execute('CREATE TABLE t0 (s1 VARCHAR(5) UNIQUE, id INT PRIMARY KEY AUTOINCREMENT);') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE TABLE t1 (s1 INT PRIMARY KEY, s0 VARCHAR(5) REFERENCES t0(s1));') --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t0(s1) VALUES ('a');") --- - autoincrement_ids: - 1 - rowcount: 1 + row_count: 1 ... box.execute("INSERT INTO t1 VALUES (1,'a');") --- -- rowcount: 1 +- row_count: 1 ... -- Should fail. box.execute("UPDATE t0 SET s1 = 'A';") @@ -448,25 +448,25 @@ box.execute("SELECT s1 FROM t0;") ... box.execute("DROP TABLE t1;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t0;") --- -- rowcount: 1 +- row_count: 1 ... -- gh-3937: result of concatination has derived collation. -- box.execute("CREATE TABLE t4a(a TEXT COLLATE \"unicode\", b TEXT COLLATE \"unicode_ci\", c INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t4a VALUES('ABC','abc',1);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t4a VALUES('ghi','ghi',3);") --- -- rowcount: 1 +- row_count: 1 ... -- Only LHS of concatenation has implicitly set collation. -- Hence, no collation is used. @@ -523,15 +523,15 @@ box.execute("SELECT c FROM t4a WHERE (a||b)=(b||a);") ... box.execute("CREATE TABLE t4b(a TEXT COLLATE \"unicode_ci\", b TEXT COLLATE \"unicode_ci\", c INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t4b VALUES('BCD','bcd',1);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t4b VALUES('ghi','ghi',3);") --- -- rowcount: 1 +- row_count: 1 ... -- Operands have the same implicit collation, so it is derived. -- @@ -559,11 +559,11 @@ box.execute("SELECT c FROM t4a WHERE (a||b COLLATE \"binary\")=(b COLLATE \"unic ... box.execute("INSERT INTO t4b VALUES('abc', 'xxx', 2);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t4b VALUES('gHz', 'xxx', 4);") --- -- rowcount: 1 +- row_count: 1 ... -- Results are sorted with case-insensitive order. -- Otherwise capital latters come first. @@ -600,19 +600,19 @@ box.space.T4B:drop() -- pk - default, sc - unicode_ci box.execute('CREATE TABLE t3 (s1 VARCHAR(5) PRIMARY KEY);') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE INDEX i3 ON t3 (s1 collate "unicode_ci");') --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3 VALUES ('a');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3 VALUES ('A');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM t3;") --- @@ -625,24 +625,24 @@ box.execute("SELECT * FROM t3;") ... box.execute("DROP TABLE t3;") --- -- rowcount: 1 +- row_count: 1 ... -- pk - binary, sc - unicode box.execute('CREATE TABLE t3b (s1 VARCHAR(5) collate "binary" PRIMARY KEY);') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE INDEX i3b ON t3b (s1 collate "unicode");') --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3b VALUES ('a');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3b VALUES ('A');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM t3b;") --- @@ -655,24 +655,24 @@ box.execute("SELECT * FROM t3b;") ... box.execute("DROP TABLE t3b;") --- -- rowcount: 1 +- row_count: 1 ... -- pk - binary, sc - unicode (make dup) box.execute('CREATE TABLE t3b (s1 VARCHAR(5) collate "binary" PRIMARY KEY);') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE INDEX i3b ON t3b (s1 collate "unicode");') --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3b VALUES ('a');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3b VALUES ('A');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3b VALUES ('a');") --- @@ -690,24 +690,24 @@ box.execute("SELECT * FROM t3b;") ... box.execute("DROP TABLE t3b;") --- -- rowcount: 1 +- row_count: 1 ... -- pk - unicode, sc - binary box.execute('CREATE TABLE t3c (s1 VARCHAR(5) collate "unicode" PRIMARY KEY);') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE INDEX i3c ON t3c (s1 collate "binary");') --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3c VALUES ('a');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3c VALUES ('A');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM t3c;") --- @@ -720,24 +720,24 @@ box.execute("SELECT * FROM t3c;") ... box.execute("DROP TABLE t3c;") --- -- rowcount: 1 +- row_count: 1 ... -- pk - unicode, sc - binary (make dup) box.execute('CREATE TABLE t3c (s1 VARCHAR(5) collate "unicode" PRIMARY KEY);') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE INDEX i3c ON t3c (s1 collate "binary");') --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3c VALUES ('a');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3c VALUES ('A');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3c VALUES ('a');") --- @@ -755,24 +755,24 @@ box.execute("SELECT * FROM t3c;") ... box.execute("DROP TABLE t3c;") --- -- rowcount: 1 +- row_count: 1 ... -- pk - binary, sc - unicode_ci box.execute('CREATE TABLE t3d (s1 VARCHAR(5) collate "binary" PRIMARY KEY);') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE INDEX i3d ON t3d (s1 collate "unicode_ci");') --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3d VALUES ('a');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3d VALUES ('A');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM t3d;") --- @@ -785,24 +785,24 @@ box.execute("SELECT * FROM t3d;") ... box.execute("DROP TABLE t3d;") --- -- rowcount: 1 +- row_count: 1 ... -- pk - binary, sc - unicode_ci (make dup) box.execute('CREATE TABLE t3d (s1 VARCHAR(5) collate "binary" PRIMARY KEY);') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE INDEX i3d ON t3d (s1 collate "unicode_ci");') --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3d VALUES ('a');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3d VALUES ('A');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3d VALUES ('a');") --- @@ -820,20 +820,20 @@ box.execute("SELECT * FROM t3d;") ... box.execute("DROP TABLE t3d;") --- -- rowcount: 1 +- row_count: 1 ... -- pk - unicode_ci, sc - binary (should fail) box.execute('CREATE TABLE t3e (s1 VARCHAR(5) collate "unicode_ci" PRIMARY KEY);') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE INDEX i3e ON t3e (s1 collate "binary");') --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3e VALUES ('a');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3e VALUES ('A');") --- @@ -850,24 +850,24 @@ box.execute("SELECT * FROM t3e;") ... box.execute("DROP TABLE t3e;") --- -- rowcount: 1 +- row_count: 1 ... -- pk - unicode, sc - unicode_ci box.execute('CREATE TABLE t3f (s1 VARCHAR(5) collate "unicode" PRIMARY KEY);') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE INDEX i3f ON t3f (s1 collate "unicode_ci");') --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3f VALUES ('a');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3f VALUES ('A');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM t3f;") --- @@ -880,24 +880,24 @@ box.execute("SELECT * FROM t3f;") ... box.execute("DROP TABLE t3f;") --- -- rowcount: 1 +- row_count: 1 ... -- pk - unicode, sc - unicode_ci (make dup) box.execute('CREATE TABLE t3f (s1 VARCHAR(5) collate "unicode" PRIMARY KEY);') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE INDEX i3f ON t3f (s1 collate "unicode_ci");') --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3f VALUES ('a');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3f VALUES ('A');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3f VALUES ('a');") --- @@ -915,20 +915,20 @@ box.execute("SELECT * FROM t3f;") ... box.execute("DROP TABLE t3f;") --- -- rowcount: 1 +- row_count: 1 ... -- pk - unicode_ci, sc - unicode (should fail) box.execute('CREATE TABLE t3g (s1 VARCHAR(5) collate "unicode_ci" PRIMARY KEY);') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE INDEX i3g ON t3g (s1 collate "unicode");') --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3g VALUES ('a');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3g VALUES ('A');") --- @@ -945,24 +945,24 @@ box.execute("SELECT * FROM t3g;") ... box.execute("DROP TABLE t3g;") --- -- rowcount: 1 +- row_count: 1 ... -- pk - default, sc - multipart box.execute('CREATE TABLE qms1 (w VARCHAR(5) PRIMARY KEY, n VARCHAR(5), q VARCHAR(5), s INTEGER);') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE INDEX iqms1 ON qms1 (w collate "unicode_ci", n);') --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO qms1 VALUES ('www', 'nnn', 'qqq', 1);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO qms1 VALUES ('WWW', 'nnn', 'qqq', 2);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM qms1;") --- @@ -981,23 +981,23 @@ box.execute("SELECT * FROM qms1;") ... box.execute("DROP TABLE qms1;") --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE TABLE qms2 (w VARCHAR(5) PRIMARY KEY, n VARCHAR(5), q VARCHAR(5), s INTEGER);') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE INDEX iqms2 ON qms2 (w collate "unicode", n);') --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO qms2 VALUES ('www', 'nnn', 'qqq', 1);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO qms2 VALUES ('WWW', 'nnn', 'qqq', 2);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM qms2;") --- @@ -1016,24 +1016,24 @@ box.execute("SELECT * FROM qms2;") ... box.execute("DROP TABLE qms2;") --- -- rowcount: 1 +- row_count: 1 ... -- pk - multipart, sc overlaps with pk box.execute('CREATE TABLE qms3 (w VARCHAR(5), n VARCHAR(5), q VARCHAR(5), s INTEGER, CONSTRAINT pk_qms3 PRIMARY KEY(w, n, q));') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE INDEX iqms3 ON qms3 (w collate "unicode_ci", s);') --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO qms3 VALUES ('www', 'nnn', 'qqq', 1);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO qms3 VALUES ('WWW', 'nnn', 'qqq', 2);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM qms3;") --- @@ -1052,23 +1052,23 @@ box.execute("SELECT * FROM qms3;") ... box.execute("DROP TABLE qms3;") --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE TABLE qms4 (w VARCHAR(5), n VARCHAR(5), q VARCHAR(5), s INTEGER, CONSTRAINT pk_qms4 PRIMARY KEY(w, n, q));') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE INDEX iqms4 ON qms4 (w collate "unicode", s);') --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO qms4 VALUES ('www', 'nnn', 'qqq', 1);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO qms4 VALUES ('WWW', 'nnn', 'qqq', 2);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM qms4;") --- @@ -1087,18 +1087,18 @@ box.execute("SELECT * FROM qms4;") ... box.execute("DROP TABLE qms4;") --- -- rowcount: 1 +- row_count: 1 ... -- gh-3932: make sure set build-in functions derive collation -- from their arguments. -- box.execute("CREATE TABLE jj (s1 INT PRIMARY KEY, s2 VARCHAR(3) COLLATE \"unicode_ci\");") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO jj VALUES (1,'A'), (2,'a')") --- -- rowcount: 2 +- row_count: 2 ... box.execute("SELECT DISTINCT trim(s2) FROM jj;") --- @@ -1110,7 +1110,7 @@ box.execute("SELECT DISTINCT trim(s2) FROM jj;") ... box.execute("INSERT INTO jj VALUES (3, 'aS'), (4, 'AS');") --- -- rowcount: 2 +- row_count: 2 ... box.execute("SELECT DISTINCT replace(s2, 'S', 's') FROM jj;") --- diff --git a/test/sql/delete-multiple-idx.result b/test/sql/delete-multiple-idx.result index 9614ead..9485d32 100644 --- a/test/sql/delete-multiple-idx.result +++ b/test/sql/delete-multiple-idx.result @@ -6,41 +6,41 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- box.cfg() -- Create space. box.execute("CREATE TABLE t3(id INT primary key,x INT,y INT);"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE UNIQUE INDEX t3y ON t3(y);"); --- -- rowcount: 1 +- row_count: 1 ... -- Debug. -- box.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zoobar VALUES (111, 222, 'c3', 444)") -- Seed entries. box.execute("INSERT INTO t3 VALUES (1, 1, NULL);"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3 VALUES(2,9,NULL);"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3 VALUES(3,5,NULL);"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3 VALUES(6, 234,567);"); --- -- rowcount: 1 +- row_count: 1 ... -- Delete should be done from both trees.. box.execute("DELETE FROM t3 WHERE y IS NULL;"); --- -- rowcount: 3 +- row_count: 3 ... -- Verify. box.execute("SELECT * FROM t3;"); @@ -58,11 +58,11 @@ box.execute("SELECT * FROM t3;"); -- Cleanup. box.execute("DROP INDEX t3y ON t3"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t3;"); --- -- rowcount: 1 +- row_count: 1 ... -- Debug. -- require("console").start() diff --git a/test/sql/delete.result b/test/sql/delete.result index f4b5962..cc16e58 100644 --- a/test/sql/delete.result +++ b/test/sql/delete.result @@ -6,33 +6,33 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- box.cfg() -- create space box.execute("CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a, b));"); --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- box.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zoobar VALUES (111, 222, 'c3', 444)") -- Seed entries box.execute("INSERT INTO t1 VALUES(1, 2);"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t1 VALUES(2, 4);"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t1 VALUES(1, 5);"); --- -- rowcount: 1 +- row_count: 1 ... -- Two rows to be removed. box.execute("DELETE FROM t1 WHERE a=1;"); --- -- rowcount: 2 +- row_count: 2 ... -- Verify box.execute("SELECT * FROM t1;"); @@ -48,7 +48,7 @@ box.execute("SELECT * FROM t1;"); -- Cleanup box.execute("DROP TABLE t1;"); --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- require("console").start() @@ -61,11 +61,11 @@ box.execute("DELETE FROM t1;") ... box.execute("CREATE TABLE t2 (s1 INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TRIGGER t2 BEFORE INSERT ON t2 BEGIN DELETE FROM t1; END;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t2 VALUES (0);") --- @@ -73,7 +73,7 @@ box.execute("INSERT INTO t2 VALUES (0);") ... box.execute("DROP TABLE t2;") --- -- rowcount: 1 +- row_count: 1 ... -- -- gh-2201: TRUNCATE TABLE operation. @@ -85,28 +85,28 @@ box.execute("TRUNCATE TABLE \"_sql_stat1\";") ... box.execute("CREATE TABLE t1(id INT PRIMARY KEY, a INT, b TEXT);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t1 VALUES(1, 1, 'one');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t1 VALUES(2, 2, 'two');") --- -- rowcount: 1 +- row_count: 1 ... -- Truncate rollback box.execute("START TRANSACTION") --- -- rowcount: 0 +- row_count: 0 ... box.execute("TRUNCATE TABLE t1;") --- -- rowcount: 0 +- row_count: 0 ... box.execute("ROLLBACK") --- -- rowcount: 0 +- row_count: 0 ... box.execute("SELECT * FROM t1") --- @@ -124,7 +124,7 @@ box.execute("SELECT * FROM t1") -- Can't truncate view. box.execute("CREATE VIEW v1 AS SELECT * FROM t1;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("TRUNCATE TABLE v1;") --- @@ -133,7 +133,7 @@ box.execute("TRUNCATE TABLE v1;") -- Can't truncate table with FK. box.execute("CREATE TABLE t2(x INT PRIMARY KEY REFERENCES t1(id));") --- -- rowcount: 1 +- row_count: 1 ... box.execute("TRUNCATE TABLE t1;") --- @@ -143,19 +143,19 @@ box.execute("TRUNCATE TABLE t1;") -- Table triggers should be ignored. box.execute("DROP TABLE t2;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE t2(x INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TRIGGER trig2 BEFORE DELETE ON t1 BEGIN INSERT INTO t2 VALUES(old.x); END;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("TRUNCATE TABLE t1;") --- -- rowcount: 0 +- row_count: 0 ... box.execute("SELECT * FROM t1;") --- @@ -178,13 +178,13 @@ box.execute("SELECT * FROM t2;") -- Cleanup. box.execute("DROP VIEW v1"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t1;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t2;") --- -- rowcount: 1 +- row_count: 1 ... diff --git a/test/sql/drop-index.result b/test/sql/drop-index.result index 7693f9e..1104b5f 100644 --- a/test/sql/drop-index.result +++ b/test/sql/drop-index.result @@ -6,55 +6,55 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- box.cfg() -- create space box.execute("CREATE TABLE zzoobar (c1 FLOAT, c2 INT PRIMARY KEY, c3 TEXT, c4 FLOAT)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE UNIQUE INDEX zoobar2 ON zzoobar(c1, c4)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE INDEX zoobar3 ON zzoobar(c3)") --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- box.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zzoobar VALUES (111, 222, 'c3', 444)") -- Dummy entry box.execute("INSERT INTO zzoobar VALUES (111, 222, 'c3', 444)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP INDEX zoobar2 ON zzoobar") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP INDEX zoobar3 On zzoobar") --- -- rowcount: 1 +- row_count: 1 ... -- zoobar2 is dropped - should be OK box.execute("INSERT INTO zzoobar VALUES (111, 223, 'c3', 444)") --- -- rowcount: 1 +- row_count: 1 ... -- zoobar2 was dropped. Re-creation should be OK box.execute("CREATE INDEX zoobar2 ON zzoobar(c3)") --- -- rowcount: 1 +- row_count: 1 ... -- Cleanup box.execute("DROP INDEX zoobar2 ON zzoobar") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE zzoobar") --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- require("console").start() diff --git a/test/sql/drop-table.result b/test/sql/drop-table.result index f752a92..48b0010 100644 --- a/test/sql/drop-table.result +++ b/test/sql/drop-table.result @@ -6,28 +6,28 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- box.cfg() -- create space box.execute("CREATE TABLE zzzoobar (c1 INT, c2 INT PRIMARY KEY, c3 TEXT, c4 INT)") --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- box.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zzzoobar VALUES (111, 222, 'c3', 444)") box.execute("CREATE INDEX zb ON zzzoobar(c1, c3)") --- -- rowcount: 1 +- row_count: 1 ... -- Dummy entry box.execute("INSERT INTO zzzoobar VALUES (111, 222, 'c3', 444)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE zzzoobar") --- -- rowcount: 1 +- row_count: 1 ... -- Table does not exist anymore. Should error here. box.execute("INSERT INTO zzzoobar VALUES (111, 222, 'c3', 444)") @@ -39,13 +39,13 @@ box.execute("INSERT INTO zzzoobar VALUES (111, 222, 'c3', 444)") -- box.execute("CREATE TABLE t1 (id INT PRIMARY KEY AUTOINCREMENT);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t1 VALUES (NULL);") --- - autoincrement_ids: - 1 - rowcount: 1 + row_count: 1 ... box.snapshot() --- @@ -54,7 +54,7 @@ box.snapshot() test_run:cmd('restart server default') box.execute("DROP TABLE t1;") --- -- rowcount: 1 +- row_count: 1 ... -- Cleanup -- DROP TABLE should do the job @@ -173,7 +173,7 @@ box.session.su('tmp') ... box.execute('CREATE TABLE t3(a INTEGER PRIMARY KEY);') --- -- rowcount: 1 +- row_count: 1 ... -- -- Error: Failed to create foreign key constraint. @@ -185,7 +185,7 @@ box.execute('CREATE TABLE t4(x INTEGER PRIMARY KEY REFERENCES t3, a INT UNIQUE, ... box.execute('DROP TABLE t3;') --- -- rowcount: 1 +- row_count: 1 ... -- -- Check that _space, _index and _sequence have the same number of diff --git a/test/sql/engine.result b/test/sql/engine.result index bfbde14..cee9f7f 100644 --- a/test/sql/engine.result +++ b/test/sql/engine.result @@ -6,23 +6,23 @@ test_run = env.new() ... box.execute("pragma sql_default_engine='vinyl'") --- -- rowcount: 0 +- row_count: 0 ... box.execute("CREATE TABLE t1_vinyl(a INT PRIMARY KEY, b INT, c INT);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE t2_vinyl(a INT PRIMARY KEY, b INT, c INT);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("pragma sql_default_engine='memtx'") --- -- rowcount: 0 +- row_count: 0 ... box.execute("CREATE TABLE t3_memtx(a INT PRIMARY KEY, b INT, c INT);") --- -- rowcount: 1 +- row_count: 1 ... assert(box.space.T1_VINYL.engine == 'vinyl') --- @@ -38,13 +38,13 @@ assert(box.space.T3_MEMTX.engine == 'memtx') ... box.execute("DROP TABLE t1_vinyl;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t2_vinyl;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t3_memtx;") --- -- rowcount: 1 +- row_count: 1 ... diff --git a/test/sql/errinj.result b/test/sql/errinj.result index ebea128..71df9f3 100644 --- a/test/sql/errinj.result +++ b/test/sql/errinj.result @@ -9,7 +9,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... errinj = box.error.injection --- @@ -21,19 +21,19 @@ fiber = require('fiber') -- reused. box.execute("CREATE TABLE t4 (id INTEGER PRIMARY KEY, a INTEGER);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t4 VALUES (1,1)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t4 VALUES (2,1)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t4 VALUES (3,2)") --- -- rowcount: 1 +- row_count: 1 ... errinj.set('ERRINJ_TUPLE_FORMAT_COUNT', 200) --- @@ -56,11 +56,11 @@ errinj.set('ERRINJ_TUPLE_FORMAT_COUNT', -1) ... box.execute('DROP TABLE t4') --- -- rowcount: 1 +- row_count: 1 ... box.execute('create table test (id int primary key, a float, b text)') --- -- rowcount: 1 +- row_count: 1 ... box.schema.user.grant('guest','read,write,execute', 'universe') --- @@ -116,7 +116,7 @@ while f1:status() ~= 'dead' do fiber.sleep(0) end ... insert_res --- -- rowcount: 1 +- row_count: 1 ... select_res --- @@ -131,7 +131,7 @@ cn:close() ... box.execute('drop table test') --- -- rowcount: 1 +- row_count: 1 ... -- -- gh-3326: after the iproto start using new buffers rotation @@ -140,7 +140,7 @@ box.execute('drop table test') -- box.execute('CREATE TABLE test (id integer primary key)') --- -- rowcount: 1 +- row_count: 1 ... cn = remote.connect(box.cfg.listen) --- @@ -167,7 +167,7 @@ errinj.set("ERRINJ_IPROTO_TX_DELAY", false) ... box.execute('DROP TABLE test') --- -- rowcount: 1 +- row_count: 1 ... box.schema.user.revoke('guest', 'read,write,execute', 'universe') --- @@ -177,11 +177,11 @@ box.schema.user.revoke('guest', 'read,write,execute', 'universe') ---- box.execute("CREATE TABLE t1(id INTEGER PRIMARY KEY, a INTEGER);"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE t2(id INTEGER PRIMARY KEY, a INTEGER);"); --- -- rowcount: 1 +- row_count: 1 ... box.error.injection.set("ERRINJ_WAL_IO", true) --- @@ -201,11 +201,11 @@ box.error.injection.set("ERRINJ_WAL_IO", false) ... box.execute("CREATE TRIGGER t1t INSERT ON t1 BEGIN INSERT INTO t2 VALUES (1, 1); END;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t1 VALUES (3, 3);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * from t1"); --- @@ -265,15 +265,15 @@ box.error.injection.set("ERRINJ_WAL_IO", false) ... box.execute("DELETE FROM t1;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DELETE FROM t2;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t1 VALUES (3, 3);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * from t1"); --- @@ -297,18 +297,18 @@ box.execute("SELECT * from t2"); ... box.execute("DROP TABLE t1;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t2;") --- -- rowcount: 1 +- row_count: 1 ... -- Tests which are aimed at verifying work of commit/rollback -- triggers on _fk_constraint space. -- box.execute("CREATE TABLE t3 (id FLOAT PRIMARY KEY, a INT REFERENCES t3, b INT UNIQUE);") --- -- rowcount: 1 +- row_count: 1 ... t = box.space._fk_constraint:select{}[1]:totable() --- @@ -350,11 +350,11 @@ errinj.set("ERRINJ_WAL_IO", false) ... box.execute("INSERT INTO t3 VALUES(1, 1, 3);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DELETE FROM t3;") --- -- rowcount: 1 +- row_count: 1 ... box.snapshot() --- @@ -362,7 +362,7 @@ box.snapshot() ... box.execute("ALTER TABLE t3 ADD CONSTRAINT fk1 FOREIGN KEY (b) REFERENCES t3;") --- -- rowcount: 0 +- row_count: 0 ... box.execute("INSERT INTO t3 VALUES(1, 1, 3);") --- @@ -386,7 +386,7 @@ errinj.set("ERRINJ_WAL_IO", false) ... box.execute("DROP TABLE t3;") --- -- rowcount: 1 +- row_count: 1 ... -- gh-3780: space without PK raises error if -- it is used in SQL queries. @@ -399,11 +399,11 @@ fiber = require('fiber') ... box.execute("CREATE TABLE t (id INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t VALUES (1);") --- -- rowcount: 1 +- row_count: 1 ... errinj.set("ERRINJ_WAL_DELAY", true) --- diff --git a/test/sql/foreign-keys.result b/test/sql/foreign-keys.result index afd75c1..2331c59 100644 --- a/test/sql/foreign-keys.result +++ b/test/sql/foreign-keys.result @@ -10,19 +10,19 @@ test_run:cmd('restart server default with cleanup=1') -- box.execute("CREATE TABLE t1 (id INT PRIMARY KEY, a INT, b INT);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE UNIQUE INDEX i1 ON t1(a);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE t2 (a INT, b INT, id INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE VIEW v1 AS SELECT * FROM t1;") --- -- rowcount: 1 +- row_count: 1 ... -- Parent and child spaces must exist. -- @@ -62,7 +62,7 @@ box.space._fk_constraint:insert(t) ... box.execute("DROP VIEW v1;") --- -- rowcount: 1 +- row_count: 1 ... -- Match clause can be only one of: simple, partial, full. -- @@ -94,7 +94,7 @@ box.space._fk_constraint:insert(t) -- box.execute("INSERT INTO t2 VALUES (1, 2, 3);") --- -- rowcount: 1 +- row_count: 1 ... t = {'fk_1', child_id, parent_id, false, 'simple', 'restrict', 'restrict', {2}, {1}} --- @@ -106,7 +106,7 @@ box.space._fk_constraint:insert(t) ... box.execute("DELETE FROM t2;") --- -- rowcount: 1 +- row_count: 1 ... -- Links must be specififed correctly. -- @@ -223,11 +223,11 @@ box.space.T1:drop() -- box.execute("CREATE TABLE child (id INT PRIMARY KEY, a INT);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE parent (a INT, id INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... parent_id = box.space._space.index.name:select('PARENT')[1]['id'] --- @@ -342,15 +342,15 @@ box.space.PARENT:drop() -- box.execute('CREATE TABLE tp (id INT PRIMARY KEY, a INT UNIQUE)') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE TABLE tc (id INT PRIMARY KEY, a INT REFERENCES tp(a) MATCH FULL ON DELETE SET NULL)') --- -- rowcount: 1 +- row_count: 1 ... box.execute('ALTER TABLE tc ADD CONSTRAINT fk1 FOREIGN KEY (id) REFERENCES tp(id) MATCH PARTIAL ON DELETE CASCADE ON UPDATE SET NULL') --- -- rowcount: 0 +- row_count: 0 ... box.space._fk_constraint:select{} --- @@ -360,17 +360,17 @@ box.space._fk_constraint:select{} ... box.execute('DROP TABLE tc') --- -- rowcount: 1 +- row_count: 1 ... box.execute('DROP TABLE tp') --- -- rowcount: 1 +- row_count: 1 ... -- gh-3475: ON UPDATE and ON DELETE clauses must appear once; -- MATCH clause must come first. box.execute('CREATE TABLE t1 (id INT PRIMARY KEY);') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE TABLE t2 (id INT PRIMARY KEY REFERENCES t2 ON DELETE CASCADE ON DELETE RESTRICT);') --- @@ -397,7 +397,7 @@ box.space.T1:drop() -- box.execute("CREATE TABLE t4 (id INT PRIMARY KEY REFERENCES t4);") --- -- rowcount: 1 +- row_count: 1 ... box.space.T4:drop() --- diff --git a/test/sql/func-recreate.result b/test/sql/func-recreate.result index 85c2c9c..90182e7 100644 --- a/test/sql/func-recreate.result +++ b/test/sql/func-recreate.result @@ -6,7 +6,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- Check errors during function create process fiber = require('fiber') diff --git a/test/sql/gh-2347-max-int-literals.result b/test/sql/gh-2347-max-int-literals.result index c3fe48f..537bcfb 100644 --- a/test/sql/gh-2347-max-int-literals.result +++ b/test/sql/gh-2347-max-int-literals.result @@ -6,7 +6,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... box.cfg{} --- diff --git a/test/sql/gh-2362-select-access-rights.result b/test/sql/gh-2362-select-access-rights.result index c6026c1..edaa6db 100644 --- a/test/sql/gh-2362-select-access-rights.result +++ b/test/sql/gh-2362-select-access-rights.result @@ -9,23 +9,23 @@ nb = require('net.box') ... box.execute("PRAGMA sql_default_engine='"..engine.."'") --- -- rowcount: 0 +- row_count: 0 ... box.execute("CREATE TABLE t1 (s1 INT PRIMARY KEY, s2 INT UNIQUE);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE t2 (s1 INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t1 VALUES (1, 1);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t2 VALUES (1);") --- -- rowcount: 1 +- row_count: 1 ... box.schema.user.grant('guest','read', 'space', 'T1') --- @@ -65,7 +65,7 @@ c:execute('SELECT * FROM t1, t2 WHERE t1.s1 = t2.s1') ... box.execute("CREATE VIEW v AS SELECT * FROM t1") --- -- rowcount: 1 +- row_count: 1 ... box.schema.user.grant('guest','read', 'space', 'V') --- @@ -79,7 +79,7 @@ c:execute('SELECT * FROM v') ... box.execute('CREATE TABLE t3 (s1 INT PRIMARY KEY, fk INT, FOREIGN KEY (fk) REFERENCES t1(s2))') --- -- rowcount: 1 +- row_count: 1 ... box.schema.user.grant('guest','read','space', 'T3') --- @@ -103,17 +103,17 @@ box.schema.user.revoke('guest','read','space', 'T3') ... box.execute('DROP VIEW v') --- -- rowcount: 1 +- row_count: 1 ... box.execute('DROP TABLE t3') --- -- rowcount: 1 +- row_count: 1 ... box.execute('DROP TABLE t2') --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t1") --- -- rowcount: 1 +- row_count: 1 ... diff --git a/test/sql/gh-2929-primary-key.result b/test/sql/gh-2929-primary-key.result index 25d4149..abb38fb 100644 --- a/test/sql/gh-2929-primary-key.result +++ b/test/sql/gh-2929-primary-key.result @@ -6,7 +6,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- All tables in SQL are now WITHOUT ROW ID, so if user -- tries to create table without a primary key, an appropriate error message @@ -16,7 +16,7 @@ box.cfg{} ... box.execute("CREATE TABLE t1(a INT PRIMARY KEY, b INT UNIQUE)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE t2(a INT UNIQUE, b INT)") --- @@ -36,7 +36,7 @@ box.execute("CREATE TABLE t5(a FLOAT, b FLOAT UNIQUE)") ... box.execute("DROP TABLE t1") --- -- rowcount: 1 +- row_count: 1 ... -- -- gh-3522: invalid primary key name diff --git a/test/sql/gh-2981-check-autoinc.result b/test/sql/gh-2981-check-autoinc.result index ee5ab4c..9e347ca 100644 --- a/test/sql/gh-2981-check-autoinc.result +++ b/test/sql/gh-2981-check-autoinc.result @@ -6,26 +6,26 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... box.cfg{} --- ... box.execute("CREATE TABLE t1 (s1 INTEGER PRIMARY KEY AUTOINCREMENT, s2 INTEGER, CHECK (s1 <> 19));"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE t2 (s1 INTEGER PRIMARY KEY AUTOINCREMENT, s2 INTEGER, CHECK (s1 <> 19 AND s1 <> 25));"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE t3 (s1 INTEGER PRIMARY KEY AUTOINCREMENT, s2 INTEGER, CHECK (s1 < 10));"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("insert into t1 values (18, null);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("insert into t1(s2) values (null);") --- @@ -33,7 +33,7 @@ box.execute("insert into t1(s2) values (null);") ... box.execute("insert into t2 values (18, null);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("insert into t2(s2) values (null);") --- @@ -41,7 +41,7 @@ box.execute("insert into t2(s2) values (null);") ... box.execute("insert into t2 values (24, null);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("insert into t2(s2) values (null);") --- @@ -49,7 +49,7 @@ box.execute("insert into t2(s2) values (null);") ... box.execute("insert into t3 values (9, null)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("insert into t3(s2) values (null)") --- @@ -57,13 +57,13 @@ box.execute("insert into t3(s2) values (null)") ... box.execute("DROP TABLE t1") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t2") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t3") --- -- rowcount: 1 +- row_count: 1 ... diff --git a/test/sql/gh-3199-no-mem-leaks.result b/test/sql/gh-3199-no-mem-leaks.result index 759645b..8ccad6d 100644 --- a/test/sql/gh-3199-no-mem-leaks.result +++ b/test/sql/gh-3199-no-mem-leaks.result @@ -6,7 +6,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... fiber = require('fiber') --- @@ -17,11 +17,11 @@ fiber = require('fiber') -- box.cfg() box.execute('CREATE TABLE test (id INT PRIMARY KEY, x INTEGER, y INTEGER)') --- -- rowcount: 1 +- row_count: 1 ... box.execute('INSERT INTO test VALUES (1, 1, 1), (2, 2, 2)') --- -- rowcount: 2 +- row_count: 2 ... box.execute('SELECT x, y, x + y FROM test ORDER BY y') --- @@ -98,15 +98,15 @@ fiber.info()[fiber.self().id()].memory.used ... box.execute('CREATE TABLE test2 (id INT PRIMARY KEY, a TEXT, b INTEGER)') --- -- rowcount: 1 +- row_count: 1 ... box.execute('INSERT INTO test2 VALUES (1, \'abc\', 1), (2, \'hello\', 2)') --- -- rowcount: 2 +- row_count: 2 ... box.execute('INSERT INTO test2 VALUES (3, \'test\', 3), (4, \'xx\', 4)') --- -- rowcount: 2 +- row_count: 2 ... box.execute('SELECT a, id + 2, b FROM test2 WHERE b < id * 2 ORDER BY a ') --- @@ -222,9 +222,9 @@ fiber.info()[fiber.self().id()].memory.used -- Cleanup box.execute('DROP TABLE test') --- -- rowcount: 1 +- row_count: 1 ... box.execute('DROP TABLE test2') --- -- rowcount: 1 +- row_count: 1 ... diff --git a/test/sql/gh-3613-idx-alter-update-2.result b/test/sql/gh-3613-idx-alter-update-2.result index d899121..ff63eb2 100644 --- a/test/sql/gh-3613-idx-alter-update-2.result +++ b/test/sql/gh-3613-idx-alter-update-2.result @@ -6,29 +6,29 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... box.execute('CREATE TABLE t (s1 INT PRIMARY KEY)') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE INDEX i ON t (s1)') --- -- rowcount: 1 +- row_count: 1 ... box.execute('ALTER TABLE t RENAME TO j3') --- -- rowcount: 0 +- row_count: 0 ... -- After gh-3613 fix, bug in cmp_def was discovered. -- Comparison didn't take .opts.sql into account. test_run:cmd('restart server default') box.execute('DROP INDEX i ON j3') --- -- rowcount: 1 +- row_count: 1 ... -- Cleanup box.execute('DROP TABLE j3') --- -- rowcount: 1 +- row_count: 1 ... diff --git a/test/sql/gh-3613-idx-alter-update.result b/test/sql/gh-3613-idx-alter-update.result index 85078df..20315df 100644 --- a/test/sql/gh-3613-idx-alter-update.result +++ b/test/sql/gh-3613-idx-alter-update.result @@ -6,24 +6,24 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... box.execute('CREATE TABLE t (s1 INT PRIMARY KEY)') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE INDEX i ON t (s1)') --- -- rowcount: 1 +- row_count: 1 ... box.execute('ALTER TABLE t RENAME TO j3') --- -- rowcount: 0 +- row_count: 0 ... -- Due to gh-3613, next stmt caused segfault box.execute('DROP INDEX i ON j3') --- -- rowcount: 1 +- row_count: 1 ... -- Make sure that no artifacts remain after restart. box.snapshot() @@ -37,7 +37,7 @@ box.execute('DROP INDEX i ON j3') ... box.execute('CREATE INDEX i ON j3 (s1)') --- -- rowcount: 1 +- row_count: 1 ... -- Check that _index was altered properly box.snapshot() @@ -47,10 +47,10 @@ box.snapshot() test_run:cmd('restart server default') box.execute('DROP INDEX i ON j3') --- -- rowcount: 1 +- row_count: 1 ... -- Cleanup box.execute('DROP TABLE j3') --- -- rowcount: 1 +- row_count: 1 ... diff --git a/test/sql/gh-3888-values-blob-assert.result b/test/sql/gh-3888-values-blob-assert.result index e7f3e38..3fee884 100644 --- a/test/sql/gh-3888-values-blob-assert.result +++ b/test/sql/gh-3888-values-blob-assert.result @@ -12,7 +12,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- check 'VALUES' against typedef keywords (should fail) box.execute('VALUES(scalar)') diff --git a/test/sql/gh2141-delete-trigger-drop-table.result b/test/sql/gh2141-delete-trigger-drop-table.result index f1fefc7..7c50454 100644 --- a/test/sql/gh2141-delete-trigger-drop-table.result +++ b/test/sql/gh2141-delete-trigger-drop-table.result @@ -6,36 +6,36 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- create space box.execute("CREATE TABLE t(id INT PRIMARY KEY)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TRIGGER tt_bu BEFORE UPDATE ON t BEGIN SELECT 1; END") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TRIGGER tt_au AFTER UPDATE ON t BEGIN SELECT 1; END") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TRIGGER tt_bi BEFORE INSERT ON t BEGIN SELECT 1; END") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TRIGGER tt_ai AFTER INSERT ON t BEGIN SELECT 1; END") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TRIGGER tt_bd BEFORE DELETE ON t BEGIN SELECT 1; END") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TRIGGER tt_ad AFTER DELETE ON t BEGIN SELECT 1; END") --- -- rowcount: 1 +- row_count: 1 ... -- check that these triggers exist box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"") @@ -56,7 +56,7 @@ box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"") -- drop table box.execute("DROP TABLE t") --- -- rowcount: 1 +- row_count: 1 ... -- check that triggers were dropped with deleted table box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"") diff --git a/test/sql/gh2251-multiple-update.result b/test/sql/gh2251-multiple-update.result index cc1a4c8..73e7269 100644 --- a/test/sql/gh2251-multiple-update.result +++ b/test/sql/gh2251-multiple-update.result @@ -7,24 +7,24 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- box.cfg() box.execute("CREATE TABLE t1(a integer primary key, b INT UNIQUE, e INT);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t1 VALUES(1,4,6);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t1 VALUES(2,5,7);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("UPDATE t1 SET e=e+1 WHERE b IN (SELECT b FROM t1);") --- -- rowcount: 2 +- row_count: 2 ... box.execute("SELECT e FROM t1") --- @@ -37,19 +37,19 @@ box.execute("SELECT e FROM t1") ... box.execute("CREATE TABLE t2(a integer primary key, b INT UNIQUE, c FLOAT, d FLOAT, e INT, UNIQUE(c,d));") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t2 VALUES(1,2,3,4,5);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t2 VALUES(2,3,4,4,6);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("UPDATE t2 SET e=e+1 WHERE b IN (SELECT b FROM t2);") --- -- rowcount: 2 +- row_count: 2 ... box.execute("SELECT e FROM t2") --- @@ -62,11 +62,11 @@ box.execute("SELECT e FROM t2") ... box.execute("DROP TABLE t1") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t2") --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- require("console").start() diff --git a/test/sql/gh2483-remote-persistency-check.result b/test/sql/gh2483-remote-persistency-check.result index 0a45db4..85c0620 100644 --- a/test/sql/gh2483-remote-persistency-check.result +++ b/test/sql/gh2483-remote-persistency-check.result @@ -10,7 +10,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... box.schema.user.grant('guest', 'read,write,execute', 'universe') --- @@ -18,11 +18,11 @@ box.schema.user.grant('guest', 'read,write,execute', 'universe') -- Create a table and insert a datum box.execute([[CREATE TABLE t(id int PRIMARY KEY)]]) --- -- rowcount: 1 +- row_count: 1 ... box.execute([[INSERT INTO t (id) VALUES (1)]]) --- -- rowcount: 1 +- row_count: 1 ... -- Sanity check box.execute([[SELECT * FROM t]]) @@ -48,7 +48,7 @@ c:eval([[ return box.execute('SELECT * FROM t') ]]) -- sql.execute([[SELECT * FROM t]]) box.execute([[DROP TABLE t]]) --- -- rowcount: 1 +- row_count: 1 ... box.schema.user.revoke('guest', 'read,write,execute', 'universe') --- diff --git a/test/sql/gh2808-inline-unique-persistency-check.result b/test/sql/gh2808-inline-unique-persistency-check.result index d2440da..ea04c4a 100644 --- a/test/sql/gh2808-inline-unique-persistency-check.result +++ b/test/sql/gh2808-inline-unique-persistency-check.result @@ -10,16 +10,16 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- Create a table and insert a datum box.execute([[CREATE TABLE t1(a INT PRIMARY KEY, b INT, UNIQUE(b));]]) --- -- rowcount: 1 +- row_count: 1 ... box.execute([[INSERT INTO t1 VALUES(1,2);]]) --- -- rowcount: 1 +- row_count: 1 ... -- Sanity check box.execute([[SELECT * FROM t1]]) @@ -38,7 +38,7 @@ test_run:cmd('restart server default'); -- correctly after restart (#2808) box.execute([[INSERT INTO t1 VALUES(2,3);]]) --- -- rowcount: 1 +- row_count: 1 ... -- Sanity check box.execute([[SELECT * FROM t1]]) @@ -55,5 +55,5 @@ box.execute([[SELECT * FROM t1]]) -- Cleanup box.execute([[drop table t1;]]) --- -- rowcount: 1 +- row_count: 1 ... diff --git a/test/sql/icu-upper-lower.result b/test/sql/icu-upper-lower.result index c062beb..fffe2f3 100644 --- a/test/sql/icu-upper-lower.result +++ b/test/sql/icu-upper-lower.result @@ -6,7 +6,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... test_run:cmd("setopt delimiter ';'") --- diff --git a/test/sql/insert-unique.result b/test/sql/insert-unique.result index 75354de..61b35a3 100644 --- a/test/sql/insert-unique.result +++ b/test/sql/insert-unique.result @@ -6,24 +6,24 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- box.cfg() -- create space box.execute("CREATE TABLE zoobar (c1 INT, c2 INT PRIMARY KEY, c3 TEXT, c4 INT)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE UNIQUE INDEX zoobar2 ON zoobar(c1, c4)") --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- box.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zoobar VALUES (111, 222, 'c3', 444)") -- Seed entry box.execute("INSERT INTO zoobar VALUES (111, 222, 'c3', 444)") --- -- rowcount: 1 +- row_count: 1 ... -- PK must be unique box.execute("INSERT INTO zoobar VALUES (112, 222, 'c3', 444)") @@ -40,11 +40,11 @@ box.execute("INSERT INTO zoobar VALUES (111, 223, 'c3', 444)") -- Cleanup box.execute("DROP INDEX zoobar2 ON zoobar") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE zoobar") --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- require("console").start() diff --git a/test/sql/integer-overflow.result b/test/sql/integer-overflow.result index 622e9a2..d6ca66e 100644 --- a/test/sql/integer-overflow.result +++ b/test/sql/integer-overflow.result @@ -6,7 +6,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- gh-3735: make sure that integer overflows errors are -- handled during VDBE execution. @@ -66,7 +66,7 @@ box.execute('SELECT CAST(9223372036854775807.0 AS INTEGER);') -- box.execute('CREATE TABLE t (id INT PRIMARY KEY);') --- -- rowcount: 1 +- row_count: 1 ... box.space.T:insert({9223372036854775809}) --- diff --git a/test/sql/iproto.result b/test/sql/iproto.result index 112225b..5f9e6a5 100644 --- a/test/sql/iproto.result +++ b/test/sql/iproto.result @@ -9,11 +9,11 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... box.execute('create table test (id int primary key, a float, b text)') --- -- rowcount: 1 +- row_count: 1 ... space = box.space.TEST --- @@ -82,22 +82,22 @@ type(ret.rows[1]) --- - cdata ... --- Operation with rowcount result. +-- Operation with row_count result. cn:execute('insert into test values (10, 11, NULL)') --- -- rowcount: 1 +- row_count: 1 ... cn:execute('delete from test where a = 5') --- -- rowcount: 1 +- row_count: 1 ... cn:execute('insert into test values (11, 12, NULL), (12, 12, NULL), (13, 12, NULL)') --- -- rowcount: 3 +- row_count: 3 ... cn:execute('delete from test where a = 12') --- -- rowcount: 3 +- row_count: 3 ... -- SQL errors. cn:execute('insert into not_existing_table values ("kek")') @@ -201,7 +201,7 @@ cn:execute('select * from test limit 1 offset ?', {'Hello'}) -- gh-2608 SQL iproto DDL cn:execute('create table test2(id int primary key, a int, b int, c int)') --- -- rowcount: 1 +- row_count: 1 ... box.space.TEST2.name --- @@ -209,7 +209,7 @@ box.space.TEST2.name ... cn:execute('insert into test2 values (1, 1, 1, 1)') --- -- rowcount: 1 +- row_count: 1 ... cn:execute('select * from test2') --- @@ -227,7 +227,7 @@ cn:execute('select * from test2') ... cn:execute('create index test2_a_b_index on test2(a, b)') --- -- rowcount: 1 +- row_count: 1 ... #box.space.TEST2.index --- @@ -235,7 +235,7 @@ cn:execute('create index test2_a_b_index on test2(a, b)') ... cn:execute('drop table test2') --- -- rowcount: 1 +- row_count: 1 ... box.space.TEST2 --- @@ -245,100 +245,100 @@ box.space.TEST2 -- Test CREATE [IF NOT EXISTS] TABLE. cn:execute('create table test3(id int primary key, a int, b int)') --- -- rowcount: 1 +- row_count: 1 ... -- Rowcount = 1, although two tuples were created: -- for _space and for _index. cn:execute('insert into test3 values (1, 1, 1), (2, 2, 2), (3, 3, 3)') --- -- rowcount: 3 +- row_count: 3 ... cn:execute('create table if not exists test3(id int primary key)') --- -- rowcount: 0 +- row_count: 0 ... -- Test CREATE VIEW [IF NOT EXISTS] and -- DROP VIEW [IF EXISTS]. cn:execute('create view test3_view(id) as select id from test3') --- -- rowcount: 1 +- row_count: 1 ... cn:execute('create view if not exists test3_view(id) as select id from test3') --- -- rowcount: 0 +- row_count: 0 ... cn:execute('drop view test3_view') --- -- rowcount: 1 +- row_count: 1 ... cn:execute('drop view if exists test3_view') --- -- rowcount: 0 +- row_count: 0 ... -- Test CREATE INDEX [IF NOT EXISTS] and -- DROP INDEX [IF EXISTS]. cn:execute('create index test3_sec on test3(a, b)') --- -- rowcount: 1 +- row_count: 1 ... cn:execute('create index if not exists test3_sec on test3(a, b)') --- -- rowcount: 0 +- row_count: 0 ... cn:execute('drop index test3_sec on test3') --- -- rowcount: 1 +- row_count: 1 ... cn:execute('drop index if exists test3_sec on test3') --- -- rowcount: 0 +- row_count: 0 ... -- Test CREATE TRIGGER [IF NOT EXISTS] and -- DROP TRIGGER [IF EXISTS]. cn:execute('create trigger trig INSERT ON test3 BEGIN SELECT * FROM test3; END;') --- -- rowcount: 1 +- row_count: 1 ... cn:execute('create trigger if not exists trig INSERT ON test3 BEGIN SELECT * FROM test3; END;') --- -- rowcount: 0 +- row_count: 0 ... cn:execute('drop trigger trig') --- -- rowcount: 1 +- row_count: 1 ... cn:execute('drop trigger if exists trig') --- -- rowcount: 0 +- row_count: 0 ... -- Test DROP TABLE [IF EXISTS]. -- Create more indexes, triggers and _truncate tuple. cn:execute('create index idx1 on test3(a)') --- -- rowcount: 1 +- row_count: 1 ... cn:execute('create index idx2 on test3(b)') --- -- rowcount: 1 +- row_count: 1 ... box.space.TEST3:truncate() --- ... cn:execute('create trigger trig INSERT ON test3 BEGIN SELECT * FROM test3; END;') --- -- rowcount: 1 +- row_count: 1 ... cn:execute('insert into test3 values (1, 1, 1), (2, 2, 2), (3, 3, 3)') --- -- rowcount: 3 +- row_count: 3 ... cn:execute('drop table test3') --- -- rowcount: 1 +- row_count: 1 ... cn:execute('drop table if exists test3') --- -- rowcount: 0 +- row_count: 0 ... -- -- gh-2948: sql: remove unnecessary templates for binding @@ -406,7 +406,7 @@ res.metadata ... box.execute('drop table test') --- -- rowcount: 1 +- row_count: 1 ... cn:close() --- @@ -419,7 +419,7 @@ cn = remote.connect(box.cfg.listen) ... cn:execute('create table test (id integer primary key, a integer, b integer)') --- -- rowcount: 1 +- row_count: 1 ... future1 = cn:execute('insert into test values (1, 1, 1)', nil, nil, {is_async = true}) --- @@ -432,7 +432,7 @@ future3 = cn:execute('insert into test values (2, 2, 2), (3, 3, 3)', nil, nil, { ... future1:wait_result() --- -- rowcount: 1 +- row_count: 1 ... future2:wait_result() --- @@ -442,7 +442,7 @@ future2:wait_result() ... future3:wait_result() --- -- rowcount: 2 +- row_count: 2 ... future4 = cn:execute('select * from test', nil, nil, {is_async = true}) --- @@ -466,37 +466,37 @@ cn:close() ... box.execute('drop table test') --- -- rowcount: 1 +- row_count: 1 ... -- gh-2618 Return generated columns after INSERT in IPROTO. -- Return all ids generated in current INSERT statement. box.execute('create table test (id integer primary key autoincrement, a integer)') --- -- rowcount: 1 +- row_count: 1 ... cn = remote.connect(box.cfg.listen) --- ... cn:execute('insert into test values (1, 1)') --- -- rowcount: 1 +- row_count: 1 ... cn:execute('insert into test values (null, 2)') --- - autoincrement_ids: - 2 - rowcount: 1 + row_count: 1 ... cn:execute('update test set a = 11 where id == 1') --- -- rowcount: 1 +- row_count: 1 ... cn:execute('insert into test values (100, 1), (null, 1), (120, 1), (null, 1)') --- - autoincrement_ids: - 101 - 121 - rowcount: 4 + row_count: 4 ... cn:execute('insert into test values (null, 1), (null, 1), (null, 1), (null, 1), (null, 1)') --- @@ -506,7 +506,7 @@ cn:execute('insert into test values (null, 1), (null, 1), (null, 1), (null, 1), - 124 - 125 - 126 - rowcount: 5 + row_count: 5 ... cn:execute('select * from test') --- @@ -549,11 +549,11 @@ cn:execute('insert into test values (null, 1)') - 127 - 1 - 2 - rowcount: 1 + row_count: 1 ... box.execute('create table test3 (id int primary key autoincrement)') --- -- rowcount: 1 +- row_count: 1 ... box.schema.sequence.alter('TEST3', {min=-10000, step=-10}) --- @@ -565,11 +565,11 @@ cn:execute('insert into TEST3 values (null), (null), (null), (null)') - -9 - -19 - -29 - rowcount: 4 + row_count: 4 ... box.execute('drop table test') --- -- rowcount: 1 +- row_count: 1 ... s:drop() --- @@ -579,38 +579,38 @@ sq:drop() ... box.execute('drop table test3') --- -- rowcount: 1 +- row_count: 1 ... -- --- Ensure that FK inside CREATE TABLE does not affect rowcount. +-- Ensure that FK inside CREATE TABLE does not affect row_count. -- cn:execute('create table test (id integer primary key, a integer)') --- -- rowcount: 1 +- row_count: 1 ... cn:execute('create table test2 (id integer primary key, ref integer references test(id))') --- -- rowcount: 1 +- row_count: 1 ... cn:execute('drop table test2') --- -- rowcount: 1 +- row_count: 1 ... -- --- Ensure that REPLACE is accounted twice in rowcount. As delete + +-- Ensure that REPLACE is accounted twice in row_count. As delete + -- insert. -- cn:execute('insert into test values(1, 1)') --- -- rowcount: 1 +- row_count: 1 ... cn:execute('insert or replace into test values(1, 2)') --- -- rowcount: 2 +- row_count: 2 ... cn:execute('drop table test') --- -- rowcount: 1 +- row_count: 1 ... -- SELECT returns unpacked msgpack. format = {{name = 'id', type = 'integer'}, {name = 'x', type = 'any'}} @@ -650,7 +650,7 @@ cn = remote.connect(box.cfg.listen) ... box.execute('CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT)') --- -- rowcount: 1 +- row_count: 1 ... for i = 0, 1000 do cn:execute("INSERT INTO t1 VALUES (null)") end --- @@ -660,7 +660,7 @@ _ = cn:execute("INSERT INTO t1 SELECT NULL from t1") ... box.execute('DROP TABLE t1') --- -- rowcount: 1 +- row_count: 1 ... cn:close() --- @@ -668,7 +668,7 @@ cn:close() -- gh-3832: Some statements do not return column type box.execute('CREATE TABLE t1(id INTEGER PRIMARY KEY)') --- -- rowcount: 1 +- row_count: 1 ... cn = remote.connect(box.cfg.listen) --- @@ -734,7 +734,7 @@ res.metadata -- result has a column type. cn:execute("PRAGMA count_changes = 1;") --- -- rowcount: 0 +- row_count: 0 ... cn:execute("INSERT INTO t1 VALUES (1), (2), (3);") --- @@ -765,7 +765,7 @@ cn:close() ... box.execute('DROP TABLE t1') --- -- rowcount: 1 +- row_count: 1 ... box.schema.user.revoke('guest', 'read,write,execute', 'universe') --- diff --git a/test/sql/iproto.test.lua b/test/sql/iproto.test.lua index fc27ca6..b6ab068 100644 --- a/test/sql/iproto.test.lua +++ b/test/sql/iproto.test.lua @@ -23,7 +23,7 @@ ret = cn:execute('select * from test') ret type(ret.rows[1]) --- Operation with rowcount result. +-- Operation with row_count result. cn:execute('insert into test values (10, 11, NULL)') cn:execute('delete from test where a = 5') cn:execute('insert into test values (11, 12, NULL), (12, 12, NULL), (13, 12, NULL)') @@ -174,14 +174,14 @@ sq:drop() box.execute('drop table test3') -- --- Ensure that FK inside CREATE TABLE does not affect rowcount. +-- Ensure that FK inside CREATE TABLE does not affect row_count. -- cn:execute('create table test (id integer primary key, a integer)') cn:execute('create table test2 (id integer primary key, ref integer references test(id))') cn:execute('drop table test2') -- --- Ensure that REPLACE is accounted twice in rowcount. As delete + +-- Ensure that REPLACE is accounted twice in row_count. As delete + -- insert. -- cn:execute('insert into test values(1, 1)') diff --git a/test/sql/max-on-index.result b/test/sql/max-on-index.result index de1fbb3..e79dee3 100644 --- a/test/sql/max-on-index.result +++ b/test/sql/max-on-index.result @@ -6,46 +6,46 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- box.cfg() -- create space -- scalar affinity box.execute("CREATE TABLE test1 (f1 INT, f2 INT, PRIMARY KEY(f1))") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE INDEX test1_index ON test1 (f2)") --- -- rowcount: 1 +- row_count: 1 ... -- integer affinity box.execute("CREATE TABLE test2 (f1 INT, f2 INT, PRIMARY KEY(f1))") --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- box.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zoobar VALUES (111, 222, 'c3', 444)") -- Seed entries box.execute("INSERT INTO test1 VALUES(1, 2)"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO test1 VALUES(2, NULL)"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO test1 VALUES(3, NULL)"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO test1 VALUES(4, 3)"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO test2 VALUES(1, 2)"); --- -- rowcount: 1 +- row_count: 1 ... -- Select must return properly decoded `NULL` box.execute("SELECT MAX(f1) FROM test1") @@ -75,15 +75,15 @@ box.execute("SELECT MAX(f1) FROM test2") -- Cleanup box.execute("DROP INDEX test1_index ON test1") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE test1") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE test2") --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- require("console").start() diff --git a/test/sql/message-func-indexes.result b/test/sql/message-func-indexes.result index 04e7a52..eb2d6c7 100644 --- a/test/sql/message-func-indexes.result +++ b/test/sql/message-func-indexes.result @@ -6,16 +6,16 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- Creating tables. box.execute("CREATE TABLE t1(id INTEGER PRIMARY KEY, a INTEGER)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE t2(object INTEGER PRIMARY KEY, price INTEGER, count INTEGER)") --- -- rowcount: 1 +- row_count: 1 ... -- Expressions that're supposed to create functional indexes -- should return certain message. @@ -25,7 +25,7 @@ box.execute("CREATE INDEX i1 ON t1(a+1)") ... box.execute("CREATE INDEX i2 ON t1(a)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE INDEX i3 ON t2(price + 100)") --- @@ -33,7 +33,7 @@ box.execute("CREATE INDEX i3 ON t2(price + 100)") ... box.execute("CREATE INDEX i4 ON t2(price)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE INDEX i5 ON t2(count + 1)") --- @@ -46,9 +46,9 @@ box.execute("CREATE INDEX i6 ON t2(count * price)") -- Cleaning up. box.execute("DROP TABLE t1") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t2") --- -- rowcount: 1 +- row_count: 1 ... diff --git a/test/sql/misc.result b/test/sql/misc.result index bc6e19f..c8a0e57 100644 --- a/test/sql/misc.result +++ b/test/sql/misc.result @@ -6,7 +6,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- Forbid multistatement queries. box.execute('select 1;') diff --git a/test/sql/no-pk-space.result b/test/sql/no-pk-space.result index b270b1f..f4f6059 100644 --- a/test/sql/no-pk-space.result +++ b/test/sql/no-pk-space.result @@ -6,7 +6,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... format = {} --- @@ -42,11 +42,11 @@ s:drop() -- box.execute("CREATE TABLE t1 (id INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE VIEW v1 AS SELECT * FROM t1;") --- -- rowcount: 1 +- row_count: 1 ... box.space.T1:drop() --- diff --git a/test/sql/on-conflict.result b/test/sql/on-conflict.result index 253b356..47f15dc 100644 --- a/test/sql/on-conflict.result +++ b/test/sql/on-conflict.result @@ -6,7 +6,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- -- Check that original sql ON CONFLICT clause is really @@ -70,15 +70,15 @@ box.execute("CREATE TABLE test (a int, b int NULL, c int, PRIMARY KEY(a, b, c))" -- box.execute("CREATE TABLE a (id INT PRIMARY KEY, a INT NOT NULL ON CONFLICT REPLACE DEFAULT 1, b INT NOT NULL ON CONFLICT REPLACE DEFAULT 2);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO a VALUES(1, NULL, NULL);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO a VALUES(2, NULL, NULL);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM a;") --- @@ -95,25 +95,25 @@ box.execute("SELECT * FROM a;") ... box.execute("DROP TABLE a;") --- -- rowcount: 1 +- row_count: 1 ... -- gh-3566: UPDATE OR IGNORE causes deletion of old entry. -- box.execute("CREATE TABLE tj (s0 INT PRIMARY KEY, s1 INT UNIQUE, s2 INT);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO tj VALUES (1, 1, 2), (2, 2, 3);") --- -- rowcount: 2 +- row_count: 2 ... box.execute("CREATE UNIQUE INDEX i ON tj (s2);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("UPDATE OR IGNORE tj SET s1 = s1 + 1;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT s1, s2 FROM tj;") --- @@ -128,7 +128,7 @@ box.execute("SELECT s1, s2 FROM tj;") ... box.execute("UPDATE OR IGNORE tj SET s2 = s2 + 1;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT s1, s2 FROM tj;") --- @@ -145,23 +145,23 @@ box.execute("SELECT s1, s2 FROM tj;") -- box.execute("DROP TABLE tj;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE tj (s1 INT PRIMARY KEY, s2 INT);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO tj VALUES (1, 2),(2, 3);") --- -- rowcount: 2 +- row_count: 2 ... box.execute("CREATE UNIQUE INDEX i ON tj (s2);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("REPLACE INTO tj VALUES (1, 3);") --- -- rowcount: 3 +- row_count: 3 ... box.execute("SELECT * FROM tj;") --- @@ -175,11 +175,11 @@ box.execute("SELECT * FROM tj;") ... box.execute("INSERT INTO tj VALUES (2, 4), (3, 5);") --- -- rowcount: 2 +- row_count: 2 ... box.execute("UPDATE OR REPLACE tj SET s2 = s2 + 1;") --- -- rowcount: 5 +- row_count: 5 ... box.execute("SELECT * FROM tj;") --- @@ -194,5 +194,5 @@ box.execute("SELECT * FROM tj;") ... box.execute("DROP TABLE tj;") --- -- rowcount: 1 +- row_count: 1 ... diff --git a/test/sql/persistency.result b/test/sql/persistency.result index 8ba42cb..63fa8a5 100644 --- a/test/sql/persistency.result +++ b/test/sql/persistency.result @@ -9,25 +9,25 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- create space box.execute("CREATE TABLE foobar (foo INT PRIMARY KEY, bar TEXT)") --- -- rowcount: 1 +- row_count: 1 ... -- prepare data box.execute("INSERT INTO foobar VALUES (1, 'foo')") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO foobar VALUES (2, 'bar')") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO foobar VALUES (1000, 'foobar')") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO foobar VALUES (1, 'duplicate')") --- @@ -259,7 +259,7 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar DESC") -- updates box.execute("REPLACE INTO foobar VALUES (1, 'cacodaemon')") --- -- rowcount: 2 +- row_count: 2 ... box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1") --- @@ -279,7 +279,7 @@ box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'") ... box.execute("DELETE FROM foobar WHERE bar='cacodaemon'") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'") --- @@ -293,29 +293,29 @@ box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'") -- create space box.execute("CREATE TABLE barfoo (bar TEXT, foo FLOAT PRIMARY KEY)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)") --- -- rowcount: 1 +- row_count: 1 ... -- prepare data box.execute("INSERT INTO barfoo VALUES ('foo', 1)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO barfoo VALUES ('bar', 2)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO barfoo VALUES ('foobar', 1000)") --- -- rowcount: 1 +- row_count: 1 ... -- create a trigger box.execute("CREATE TRIGGER tfoobar AFTER INSERT ON foobar BEGIN INSERT INTO barfoo VALUES ('trigger test', 9999); END") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\""); --- @@ -331,11 +331,11 @@ box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\""); -- Many entries box.execute("CREATE TABLE t1(a INT,b INT,c INT,PRIMARY KEY(b,c));") --- -- rowcount: 1 +- row_count: 1 ... box.execute("WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000) INSERT INTO t1 SELECT x, x%40, x/40 FROM cnt;") --- -- rowcount: 1000 +- row_count: 1000 ... box.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;"); --- @@ -396,7 +396,7 @@ box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"") -- and can be dropped just once box.execute("DROP TRIGGER tfoobar") --- -- rowcount: 1 +- row_count: 1 ... -- Should error box.execute("DROP TRIGGER tfoobar") @@ -462,13 +462,13 @@ box.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;"); -- cleanup box.execute("DROP TABLE foobar") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE barfoo") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t1") --- -- rowcount: 1 +- row_count: 1 ... diff --git a/test/sql/row-count.result b/test/sql/row-count.result index 8aa77e3..a41012a 100644 --- a/test/sql/row-count.result +++ b/test/sql/row-count.result @@ -6,13 +6,13 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- Test cases concerning row count calculations. -- box.execute("CREATE TABLE t1 (s1 VARCHAR(10) PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT ROW_COUNT();") --- @@ -32,7 +32,7 @@ box.execute("SELECT ROW_COUNT();") ... box.execute("CREATE TABLE t2 (s1 VARCHAR(10) PRIMARY KEY, s2 VARCHAR(10) REFERENCES t1 ON DELETE CASCADE);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT ROW_COUNT();") --- @@ -44,11 +44,11 @@ box.execute("SELECT ROW_COUNT();") ... box.execute("CREATE TABLE t3 (i1 INT UNIQUE, i2 INT, i3 INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3 VALUES (0, 0, 0);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT ROW_COUNT();") --- @@ -60,7 +60,7 @@ box.execute("SELECT ROW_COUNT();") ... box.execute("CREATE TRIGGER x AFTER DELETE ON t1 FOR EACH ROW BEGIN UPDATE t3 SET i1 = i1 + ROW_COUNT(); END;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT ROW_COUNT();") --- @@ -72,7 +72,7 @@ box.execute("SELECT ROW_COUNT();") ... box.execute("INSERT INTO t1 VALUES ('a');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT ROW_COUNT();") --- @@ -84,7 +84,7 @@ box.execute("SELECT ROW_COUNT();") ... box.execute("INSERT INTO t2 VALUES ('a','a');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT ROW_COUNT();") --- @@ -96,7 +96,7 @@ box.execute("SELECT ROW_COUNT();") ... box.execute("INSERT INTO t1 VALUES ('b'), ('c'), ('d');") --- -- rowcount: 3 +- row_count: 3 ... box.execute("SELECT ROW_COUNT();") --- @@ -109,7 +109,7 @@ box.execute("SELECT ROW_COUNT();") -- REPLACE is accounted for two operations: DELETE + INSERT. box.execute("REPLACE INTO t2 VALUES('a', 'c');") --- -- rowcount: 2 +- row_count: 2 ... box.execute("SELECT ROW_COUNT();") --- @@ -121,7 +121,7 @@ box.execute("SELECT ROW_COUNT();") ... box.execute("DELETE FROM t1;") --- -- rowcount: 4 +- row_count: 4 ... box.execute("SELECT ROW_COUNT();") --- @@ -133,11 +133,11 @@ box.execute("SELECT ROW_COUNT();") ... box.execute("INSERT INTO t3 VALUES (1, 1, 1), (2, 2, 2), (3, 3, 3);") --- -- rowcount: 3 +- row_count: 3 ... box.execute("TRUNCATE TABLE t3;") --- -- rowcount: 0 +- row_count: 0 ... box.execute("SELECT ROW_COUNT();") --- @@ -149,11 +149,11 @@ box.execute("SELECT ROW_COUNT();") ... box.execute("INSERT INTO t3 VALUES (1, 1, 1), (2, 2, 2), (3, 3, 3);") --- -- rowcount: 3 +- row_count: 3 ... box.execute("UPDATE t3 SET i2 = 666;") --- -- rowcount: 3 +- row_count: 3 ... box.execute("SELECT ROW_COUNT();") --- @@ -168,7 +168,7 @@ box.execute("SELECT ROW_COUNT();") -- box.execute("DELETE FROM t3 WHERE 0 = 0;") --- -- rowcount: 3 +- row_count: 3 ... box.execute("SELECT ROW_COUNT();") --- @@ -180,11 +180,11 @@ box.execute("SELECT ROW_COUNT();") ... box.execute("INSERT INTO t3 VALUES (1, 1, 1), (2, 2, 2), (3, 3, 3);") --- -- rowcount: 3 +- row_count: 3 ... box.execute("DELETE FROM t3") --- -- rowcount: 3 +- row_count: 3 ... box.execute("SELECT ROW_COUNT();") --- @@ -198,27 +198,27 @@ box.execute("SELECT ROW_COUNT();") -- box.execute("CREATE TABLE tt1 (id INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE tt2 (id INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TRIGGER tr1 AFTER DELETE ON tt1 BEGIN DELETE FROM tt2; END;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO tt1 VALUES (1), (2), (3);") --- -- rowcount: 3 +- row_count: 3 ... box.execute("INSERT INTO tt2 VALUES (1), (2), (3);") --- -- rowcount: 3 +- row_count: 3 ... box.execute("DELETE FROM tt1 WHERE id = 2;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT ROW_COUNT();") --- @@ -237,18 +237,18 @@ box.execute("SELECT * FROM tt2;") ... box.execute("DROP TABLE tt1;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE tt2;") --- -- rowcount: 1 +- row_count: 1 ... -- All statements which are not accounted as DML should -- return 0 (zero) as a row count. -- box.execute("START TRANSACTION;") --- -- rowcount: 0 +- row_count: 0 ... box.execute("SELECT ROW_COUNT();") --- @@ -260,7 +260,7 @@ box.execute("SELECT ROW_COUNT();") ... box.execute("COMMIT;") --- -- rowcount: 0 +- row_count: 0 ... box.execute("SELECT ROW_COUNT();") --- @@ -325,13 +325,13 @@ box.execute('PRAGMA recursive_triggers') -- box.execute("DROP TABLE t2;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t3;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t1;") --- -- rowcount: 1 +- row_count: 1 ... diff --git a/test/sql/savepoints.result b/test/sql/savepoints.result index 3cebc65..2f943bd 100644 --- a/test/sql/savepoints.result +++ b/test/sql/savepoints.result @@ -6,7 +6,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- These tests check that SQL savepoints properly work outside -- transactions as well as inside transactions started in Lua. diff --git a/test/sql/select-null.result b/test/sql/select-null.result index 948d53d..2de9c13 100644 --- a/test/sql/select-null.result +++ b/test/sql/select-null.result @@ -6,24 +6,24 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- box.cfg() -- create space box.execute("CREATE TABLE t3(id INT, a text, b TEXT, PRIMARY KEY(id))") --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- box.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zoobar VALUES (111, 222, 'c3', 444)") -- Seed entries box.execute("INSERT INTO t3 VALUES(1, 'abc',NULL)"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t3 VALUES(2, NULL,'xyz')"); --- -- rowcount: 1 +- row_count: 1 ... -- Select must return properly decoded `NULL` box.execute("SELECT * FROM t3") @@ -42,7 +42,7 @@ box.execute("SELECT * FROM t3") -- Cleanup box.execute("DROP TABLE t3") --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- require("console").start() diff --git a/test/sql/sql-debug.result b/test/sql/sql-debug.result index a2aca8b..32c65cc 100644 --- a/test/sql/sql-debug.result +++ b/test/sql/sql-debug.result @@ -13,7 +13,7 @@ result = box.execute('PRAGMA parser_trace').rows ... box.execute('PRAGMA parser_trace = 1') --- -- rowcount: 0 +- row_count: 0 ... box.execute('PRAGMA parser_trace') --- @@ -25,7 +25,7 @@ box.execute('PRAGMA parser_trace') ... box.execute('PRAGMA parser_trace = '.. result[1][1]) --- -- rowcount: 0 +- row_count: 0 ... -- -- Make PRAGMA command return the result as a result set. diff --git a/test/sql/sql-statN-index-drop.result b/test/sql/sql-statN-index-drop.result index 0636cd9..b2a4458 100644 --- a/test/sql/sql-statN-index-drop.result +++ b/test/sql/sql-statN-index-drop.result @@ -6,37 +6,37 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- Initializing some things. box.execute("CREATE TABLE t1(id INT PRIMARY KEY, a INT);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE t2(id INT PRIMARY KEY, a INT);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE INDEX i1 ON t1(a);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE INDEX i1 ON t2(a);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t1 VALUES(1, 2);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t2 VALUES(1, 2);") --- -- rowcount: 1 +- row_count: 1 ... -- Analyze. box.execute("ANALYZE;") --- -- rowcount: 0 +- row_count: 0 ... -- Checking the data. box.execute("SELECT * FROM \"_sql_stat4\";") @@ -78,7 +78,7 @@ box.execute("SELECT * FROM \"_sql_stat1\";") -- Dropping an index. box.execute("DROP INDEX i1 ON t1;") --- -- rowcount: 3 +- row_count: 3 ... -- Checking the DROP INDEX results. box.execute("SELECT * FROM \"_sql_stat4\";") @@ -118,41 +118,41 @@ box.execute("SELECT * FROM \"_sql_stat1\";") --Cleaning up. box.execute("DROP TABLE t1;") --- -- rowcount: 3 +- row_count: 3 ... box.execute("DROP TABLE t2;") --- -- rowcount: 5 +- row_count: 5 ... -- Same test but dropping an INDEX ON t2. box.execute("CREATE TABLE t1(id INT PRIMARY KEY, a INT);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE t2(id INT PRIMARY KEY, a INT);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE INDEX i1 ON t1(a);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE INDEX i1 ON t2(a);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t1 VALUES(1, 2);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t2 VALUES(1, 2);") --- -- rowcount: 1 +- row_count: 1 ... -- Analyze. box.execute("ANALYZE;") --- -- rowcount: 0 +- row_count: 0 ... -- Checking the data. box.execute("SELECT * FROM \"_sql_stat4\";") @@ -194,7 +194,7 @@ box.execute("SELECT * FROM \"_sql_stat1\";") -- Dropping an index. box.execute("DROP INDEX i1 ON t2;") --- -- rowcount: 3 +- row_count: 3 ... -- Checking the DROP INDEX results. box.execute("SELECT * FROM \"_sql_stat4\";") @@ -234,9 +234,9 @@ box.execute("SELECT * FROM \"_sql_stat1\";") --Cleaning up. box.execute("DROP TABLE t1;") --- -- rowcount: 5 +- row_count: 5 ... box.execute("DROP TABLE t2;") --- -- rowcount: 3 +- row_count: 3 ... diff --git a/test/sql/tokenizer.result b/test/sql/tokenizer.result index 47fb9d4..1ae9ef2 100644 --- a/test/sql/tokenizer.result +++ b/test/sql/tokenizer.result @@ -9,7 +9,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... sql_tokenizer = require('sql_tokenizer') --- diff --git a/test/sql/transition.result b/test/sql/transition.result index dc8ef79..e457061 100644 --- a/test/sql/transition.result +++ b/test/sql/transition.result @@ -6,25 +6,25 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- create space box.execute("CREATE TABLE foobar (foo INT PRIMARY KEY, bar TEXT)") --- -- rowcount: 1 +- row_count: 1 ... -- prepare data box.execute("INSERT INTO foobar VALUES (1, 'foo')") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO foobar VALUES (2, 'bar')") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO foobar VALUES (1000, 'foobar')") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO foobar VALUES (1, 'duplicate')") --- @@ -256,7 +256,7 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar DESC") -- updates box.execute("REPLACE INTO foobar VALUES (1, 'cacodaemon')") --- -- rowcount: 2 +- row_count: 2 ... box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1") --- @@ -276,7 +276,7 @@ box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'") ... box.execute("DELETE FROM foobar WHERE bar='cacodaemon'") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'") --- @@ -290,24 +290,24 @@ box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'") -- create space box.execute("CREATE TABLE barfoo (bar TEXT, foo FLOAT PRIMARY KEY)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)") --- -- rowcount: 1 +- row_count: 1 ... -- prepare data box.execute("INSERT INTO barfoo VALUES ('foo', 1)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO barfoo VALUES ('bar', 2)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO barfoo VALUES ('foobar', 1000)") --- -- rowcount: 1 +- row_count: 1 ... -- prove barfoo2 was created box.execute("INSERT INTO barfoo VALUES ('xfoo', 1)") @@ -372,15 +372,15 @@ box.execute("SELECT foo, bar FROM barfoo WHERE foo<=2") -- cleanup box.execute("DROP INDEX barfoo2 ON barfoo") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE foobar") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE barfoo") --- -- rowcount: 1 +- row_count: 1 ... -- attempt to create a table lacking PRIMARY KEY box.execute("CREATE TABLE without_rowid_lacking_primary_key(x SCALAR)") @@ -391,9 +391,9 @@ box.execute("CREATE TABLE without_rowid_lacking_primary_key(x SCALAR)") -- create a table with implicit indices (used to SEGFAULT) box.execute("CREATE TABLE implicit_indices(a INT PRIMARY KEY,b INT,c INT,d TEXT UNIQUE)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE implicit_indices") --- -- rowcount: 1 +- row_count: 1 ... diff --git a/test/sql/transitive-transactions.result b/test/sql/transitive-transactions.result index 72b19d2..883cc00 100644 --- a/test/sql/transitive-transactions.result +++ b/test/sql/transitive-transactions.result @@ -6,7 +6,7 @@ engine = test_run:get_cfg('engine') ... box.execute("pragma sql_default_engine=\'"..engine.."\'") --- -- rowcount: 0 +- row_count: 0 ... test_run:cmd("setopt delimiter ';'") --- @@ -30,11 +30,11 @@ box.execute('START TRANSACTION;') box.rollback(); ... box.execute('CREATE TABLE parent(id INT PRIMARY KEY, y INT UNIQUE);'); --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE TABLE child(id INT PRIMARY KEY, x INT REFERENCES parent(y) DEFERRABLE INITIALLY DEFERRED);'); --- -- rowcount: 1 +- row_count: 1 ... fk_violation_1 = function() box.begin() @@ -132,5 +132,5 @@ box.execute('DROP TABLE child;'); ... box.execute('DROP TABLE parent;'); --- -- rowcount: 1 +- row_count: 1 ... diff --git a/test/sql/triggers.result b/test/sql/triggers.result index 9c5d5dd..2a22289 100644 --- a/test/sql/triggers.result +++ b/test/sql/triggers.result @@ -9,7 +9,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- Get invariant part of the tuple; name and opts don't change. function immutable_part(data) local r = {} for i, l in pairs(data) do table.insert(r, {l.name, l.opts}) end return r end @@ -20,15 +20,15 @@ box.execute('pragma sql_default_engine=\''..engine..'\'') -- box.execute("CREATE TABLE t1(x INTEGER PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE t2(x INTEGER PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute([[CREATE TRIGGER t1t AFTER INSERT ON t1 BEGIN INSERT INTO t2 VALUES(1); END; ]]) --- -- rowcount: 1 +- row_count: 1 ... immutable_part(box.space._trigger:select()) --- @@ -70,7 +70,7 @@ immutable_part(box.space._trigger:select()) ... box.execute("DROP TABLE T1;") --- -- rowcount: 1 +- row_count: 1 ... immutable_part(box.space._trigger:select()) --- @@ -78,11 +78,11 @@ immutable_part(box.space._trigger:select()) ... box.execute("CREATE TABLE t1(x INTEGER PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute([[CREATE TRIGGER t1t AFTER INSERT ON t1 BEGIN INSERT INTO t2 VALUES(1); END; ]]) --- -- rowcount: 1 +- row_count: 1 ... immutable_part(box.space._trigger:select()) --- @@ -96,7 +96,7 @@ space_id = box.space._space.index["name"]:get('T1').id -- Test, didn't trigger t1t degrade. box.execute("INSERT INTO t1 VALUES(1);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM t2;") --- @@ -108,7 +108,7 @@ box.execute("SELECT * FROM t2;") ... box.execute("DELETE FROM t2;") --- -- rowcount: 1 +- row_count: 1 ... -- Test triggers. tuple = {"T2T", space_id, {sql = "CREATE TRIGGER t2t AFTER INSERT ON t1 BEGIN INSERT INTO t2 VALUES(2); END;"}} @@ -137,7 +137,7 @@ immutable_part(box.space._trigger:select()) ... box.execute("INSERT INTO t1 VALUES(2);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM t2;") --- @@ -151,12 +151,12 @@ box.execute("SELECT * FROM t2;") ... box.execute("DELETE FROM t2;") --- -- rowcount: 3 +- row_count: 3 ... -- Test t1t after t2t and t3t drop. box.execute("DROP TRIGGER T2T;") --- -- rowcount: 1 +- row_count: 1 ... _ = box.space._trigger:delete("T3T") --- @@ -169,7 +169,7 @@ immutable_part(box.space._trigger:select()) ... box.execute("INSERT INTO t1 VALUES(3);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM t2;") --- @@ -181,16 +181,16 @@ box.execute("SELECT * FROM t2;") ... box.execute("DELETE FROM t2;") --- -- rowcount: 1 +- row_count: 1 ... -- Insert new SQL t2t and t3t. box.execute([[CREATE TRIGGER t2t AFTER INSERT ON t1 BEGIN INSERT INTO t2 VALUES(2); END; ]]) --- -- rowcount: 1 +- row_count: 1 ... box.execute([[CREATE TRIGGER t3t AFTER INSERT ON t1 BEGIN INSERT INTO t2 VALUES(3); END; ]]) --- -- rowcount: 1 +- row_count: 1 ... immutable_part(box.space._trigger:select()) --- @@ -206,7 +206,7 @@ immutable_part(box.space._trigger:select()) ... box.execute("INSERT INTO t1 VALUES(4);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM t2;") --- @@ -221,11 +221,11 @@ box.execute("SELECT * FROM t2;") -- Clean up. box.execute("DROP TABLE t1;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t2;") --- -- rowcount: 1 +- row_count: 1 ... immutable_part(box.space._trigger:select()) --- @@ -234,7 +234,7 @@ immutable_part(box.space._trigger:select()) -- Test target tables restricts. box.execute("CREATE TABLE t1(a INT PRIMARY KEY,b INT);") --- -- rowcount: 1 +- row_count: 1 ... space_id = box.space.T1.id --- @@ -248,7 +248,7 @@ box.space._trigger:insert(tuple) ... box.execute("CREATE VIEW V1 AS SELECT * FROM t1;") --- -- rowcount: 1 +- row_count: 1 ... space_id = box.space.V1.id --- @@ -279,11 +279,11 @@ box.space._trigger:insert(tuple) ... box.execute("DROP VIEW V1;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE T1;") --- -- rowcount: 1 +- row_count: 1 ... -- -- gh-3531: Assertion with trigger and two storage engines @@ -291,31 +291,31 @@ box.execute("DROP TABLE T1;") -- Case 1: Src 'vinyl' table; Dst 'memtx' table box.execute("PRAGMA sql_default_engine ('vinyl');") --- -- rowcount: 0 +- row_count: 0 ... box.execute("CREATE TABLE m (s0 INT PRIMARY KEY, s1 TEXT UNIQUE);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TRIGGER m1 BEFORE UPDATE ON m FOR EACH ROW BEGIN UPDATE n SET s2 = 'now'; END;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("PRAGMA sql_default_engine('memtx');") --- -- rowcount: 0 +- row_count: 0 ... box.execute("CREATE TABLE n (s0 INT PRIMARY KEY, s1 TEXT UNIQUE, s2 REAL);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO m VALUES (0, '0');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO n VALUES (0, '',null);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("UPDATE m SET s1 = 'The Rain In Spain';") --- @@ -325,40 +325,40 @@ box.execute("UPDATE m SET s1 = 'The Rain In Spain';") -- box.sql.execute("ANALYZE m;") box.execute("DROP TABLE m;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE n;") --- -- rowcount: 1 +- row_count: 1 ... -- Case 2: Src 'memtx' table; Dst 'vinyl' table box.execute("PRAGMA sql_default_engine ('memtx');") --- -- rowcount: 0 +- row_count: 0 ... box.execute("CREATE TABLE m (s0 INT PRIMARY KEY, s1 TEXT UNIQUE);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TRIGGER m1 BEFORE UPDATE ON m FOR EACH ROW BEGIN UPDATE n SET s2 = 'now'; END;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("PRAGMA sql_default_engine('vinyl');") --- -- rowcount: 0 +- row_count: 0 ... box.execute("CREATE TABLE n (s0 INT PRIMARY KEY, s1 TEXT UNIQUE, s2 REAL);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO m VALUES (0, '0');") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO n VALUES (0, '',null);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("UPDATE m SET s1 = 'The Rain In Spain';") --- @@ -368,40 +368,40 @@ box.execute("UPDATE m SET s1 = 'The Rain In Spain';") -- box.sql.execute("ANALYZE n;") box.execute("DROP TABLE m;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE n;") --- -- rowcount: 1 +- row_count: 1 ... -- Test SQL Transaction with LUA box.execute("PRAGMA sql_default_engine ('memtx');") --- -- rowcount: 0 +- row_count: 0 ... box.execute("CREATE TABLE test (id INT PRIMARY KEY)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("PRAGMA sql_default_engine='vinyl'") --- -- rowcount: 0 +- row_count: 0 ... box.execute("CREATE TABLE test2 (id INT PRIMARY KEY)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO test2 VALUES (2)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("START TRANSACTION") --- -- rowcount: 0 +- row_count: 0 ... box.execute("INSERT INTO test VALUES (1)") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM test2") --- @@ -409,42 +409,42 @@ box.execute("SELECT * FROM test2") ... box.execute("ROLLBACK;") --- -- rowcount: 0 +- row_count: 0 ... box.execute("DROP TABLE test;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE test2;") --- -- rowcount: 1 +- row_count: 1 ... -- -- gh-3536: Some triggers cause error messages and/or half-finished updates -- box.execute("CREATE TABLE t (s1 INT, s2 INT, s3 INT, s4 INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE VIEW v AS SELECT s1, s2 FROM t;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TRIGGER tv INSTEAD OF UPDATE ON v BEGIN UPDATE t SET s3 = new.s1 WHERE s1 = old.s1; END;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t VALUES (1,1,1,1);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("UPDATE v SET s2 = s1 + 1;") --- -- rowcount: 0 +- row_count: 0 ... box.execute("UPDATE v SET s1 = s1 + 5;") --- -- rowcount: 0 +- row_count: 0 ... box.execute("SELECT * FROM t;") --- @@ -462,18 +462,18 @@ box.execute("SELECT * FROM t;") ... box.execute("DROP VIEW v;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t;") --- -- rowcount: 1 +- row_count: 1 ... -- -- gh-3653: Dissallow bindings for DDL -- box.execute("CREATE TABLE t1(a INT PRIMARY KEY, b INT);") --- -- rowcount: 1 +- row_count: 1 ... space_id = box.space.T1.id --- @@ -491,5 +491,5 @@ box.space._trigger:insert(tuple) ... box.execute("DROP TABLE t1;") --- -- rowcount: 1 +- row_count: 1 ... diff --git a/test/sql/types.result b/test/sql/types.result index a0a1ba9..5e83af4 100644 --- a/test/sql/types.result +++ b/test/sql/types.result @@ -33,7 +33,7 @@ box.execute("CREATE TABLE t1 (id INT PRIMARY KEY, a INT, b UNIQUE);") -- box.execute("CREATE TABLE t1 (id TEXT PRIMARY KEY, a REAL, b INT, c TEXT, d SCALAR);") --- -- rowcount: 1 +- row_count: 1 ... box.space.T1:format() --- @@ -45,7 +45,7 @@ box.space.T1:format() ... box.execute("CREATE VIEW v1 AS SELECT b + a, b - a FROM t1;") --- -- rowcount: 1 +- row_count: 1 ... box.space.V1:format() --- @@ -56,19 +56,19 @@ box.space.V1:format() -- box.execute("CREATE INDEX i1 ON t1 (a);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE INDEX i2 ON t1 (b);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE INDEX i3 ON t1 (c);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE INDEX i4 ON t1 (id, c, b, a, d);") --- -- rowcount: 1 +- row_count: 1 ... box.space.T1.index.I1.parts --- @@ -108,11 +108,11 @@ box.space.T1.index.I4.parts ... box.execute("DROP VIEW v1;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t1;") --- -- rowcount: 1 +- row_count: 1 ... -- gh-3906: data of type BOOL is displayed as should -- during SQL SELECT. @@ -194,11 +194,11 @@ box.execute("VALUES (TYPEOF(randomblob(5) || zeroblob(5)));") -- box.execute("CREATE TABLE t1 (s SCALAR PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t1 VALUES (randomblob(5));") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM t1 WHERE s LIKE 'blob';") --- @@ -222,11 +222,11 @@ box.execute("SELECT s LIKE NULL FROM t1;") ... box.execute("DELETE FROM t1;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t1 VALUES (1);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("SELECT * FROM t1 WHERE s LIKE 'int';") --- diff --git a/test/sql/update-with-nested-select.result b/test/sql/update-with-nested-select.result index 0a93243..cdd5669 100644 --- a/test/sql/update-with-nested-select.result +++ b/test/sql/update-with-nested-select.result @@ -6,29 +6,29 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- box.cfg() -- create space box.execute("CREATE TABLE t1(a integer primary key, b INT UNIQUE, e INT);"); --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- box.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zoobar VALUES (111, 222, 'c3', 444)") -- Seed entries box.execute("INSERT INTO t1 VALUES(1,4,6);"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("INSERT INTO t1 VALUES(2,5,7);"); --- -- rowcount: 1 +- row_count: 1 ... -- Both entries must be updated box.execute("UPDATE t1 SET e=e+1 WHERE b IN (SELECT b FROM t1);"); --- -- rowcount: 2 +- row_count: 2 ... -- Check box.execute("SELECT e FROM t1"); @@ -43,7 +43,7 @@ box.execute("SELECT e FROM t1"); -- Cleanup box.execute("DROP TABLE t1;"); --- -- rowcount: 1 +- row_count: 1 ... -- Debug -- require("console").start() diff --git a/test/sql/upgrade.result b/test/sql/upgrade.result index 980ac05..f51172d 100644 --- a/test/sql/upgrade.result +++ b/test/sql/upgrade.result @@ -6,7 +6,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... work_dir = 'sql/upgrade/1.10/' --- @@ -69,19 +69,19 @@ box.space._index:get({box.space._space.index['name']:get('T1').id, 0}) -- test system tables functionality box.execute("CREATE TABLE t(x INTEGER PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE t_out(x INTEGER PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TRIGGER t1t AFTER INSERT ON t BEGIN INSERT INTO t_out VALUES(1); END;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TRIGGER t2t AFTER INSERT ON t BEGIN INSERT INTO t_out VALUES(2); END;") --- -- rowcount: 1 +- row_count: 1 ... box.space._space.index['name']:get('T') --- @@ -127,7 +127,7 @@ assert(t1t.space_id == box.space.T.id) ... box.execute("INSERT INTO T VALUES(1);") --- -- rowcount: 1 +- row_count: 1 ... box.space.T:select() --- @@ -156,11 +156,11 @@ box.execute("SELECT * FROM T") ... box.execute("DROP TABLE T;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE T_OUT;") --- -- rowcount: 1 +- row_count: 1 ... test_run:switch('default') --- diff --git a/test/sql/view.result b/test/sql/view.result index 5c689ca..cbc80db 100644 --- a/test/sql/view.result +++ b/test/sql/view.result @@ -6,18 +6,18 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... -- Verify that constraints on 'view' option are working. -- box.cfg() -- Create space and view. box.execute("CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a, b));"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE VIEW v1 AS SELECT a+b FROM t1;"); --- -- rowcount: 1 +- row_count: 1 ... -- View can't have any indexes. box.execute("CREATE INDEX i1 on v1(a);"); @@ -119,11 +119,11 @@ sp = box.space._space:replace(raw_sp); -- Can't drop space via Lua if at least one view refers to it. box.execute('CREATE TABLE t2(id INT PRIMARY KEY);'); --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE VIEW v2 AS SELECT * FROM t2;'); --- -- rowcount: 1 +- row_count: 1 ... box.space.T2:drop(); --- @@ -131,20 +131,20 @@ box.space.T2:drop(); ... box.execute('DROP VIEW v2;'); --- -- rowcount: 1 +- row_count: 1 ... box.execute('DROP TABLE t2;'); --- -- rowcount: 1 +- row_count: 1 ... -- Check that alter transfers reference counter. box.execute("CREATE TABLE t2(id INTEGER PRIMARY KEY);"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE VIEW v2 AS SELECT * FROM t2;"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t2;"); --- @@ -162,45 +162,45 @@ box.execute("DROP TABLE t2;"); ... box.execute("DROP VIEW v2;"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t2;"); --- -- rowcount: 1 +- row_count: 1 ... -- gh-3849: failed to create VIEW in form of AS VALUES (const); -- box.execute("CREATE VIEW cv AS VALUES(1);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE VIEW cv1 AS VALUES('k', 1);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE VIEW cv2 AS VALUES((VALUES((SELECT 1))));") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE VIEW cv3 AS VALUES(1+2, 1+2);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP VIEW cv;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP VIEW cv1;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP VIEW cv2;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP VIEW cv3;") --- -- rowcount: 1 +- row_count: 1 ... -- gh-3815: AS VALUES syntax didn't incerement VIEW reference -- counter. Moreover, tables within sub-select were not accounted @@ -208,11 +208,11 @@ box.execute("DROP VIEW cv3;") -- box.execute("CREATE TABLE b (s1 INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE VIEW bv (wombat) AS VALUES ((SELECT 'k' FROM b));") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE b;") --- @@ -220,23 +220,23 @@ box.execute("DROP TABLE b;") ... box.execute("DROP VIEW bv;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE b;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE b (s1 INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE c (s1 INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE VIEW bcv AS SELECT * FROM b WHERE s1 IN (SELECT * FROM c);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE c;") --- @@ -244,19 +244,19 @@ box.execute("DROP TABLE c;") ... box.execute("DROP VIEW bcv;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE c;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE TABLE c (s1 INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE VIEW bcv(x, y) AS VALUES((SELECT 'k' FROM b), (VALUES((SELECT 1 FROM b WHERE s1 IN (VALUES((SELECT 1 + c.s1 FROM c)))))))") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE c;") --- @@ -267,11 +267,11 @@ box.space.BCV:drop() ... box.execute("DROP TABLE c;") --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE b;") --- -- rowcount: 1 +- row_count: 1 ... -- gh-3814: make sure that recovery of view processed without -- unexpected errors. @@ -282,11 +282,11 @@ box.snapshot() ... box.execute("CREATE TABLE t2 (id INT PRIMARY KEY);") --- -- rowcount: 1 +- row_count: 1 ... box.execute("CREATE VIEW v2 AS SELECT * FROM t2;") --- -- rowcount: 1 +- row_count: 1 ... test_run:cmd('restart server default') box.execute("DROP TABLE t2;") @@ -309,9 +309,9 @@ box.space.T2:drop() -- Cleanup box.execute("DROP VIEW v1;"); --- -- rowcount: 1 +- row_count: 1 ... box.execute("DROP TABLE t1;"); --- -- rowcount: 1 +- row_count: 1 ... diff --git a/test/sql/view_delayed_wal.result b/test/sql/view_delayed_wal.result index ff0c70f..5197949 100644 --- a/test/sql/view_delayed_wal.result +++ b/test/sql/view_delayed_wal.result @@ -6,7 +6,7 @@ engine = test_run:get_cfg('engine') ... box.execute('pragma sql_default_engine=\''..engine..'\'') --- -- rowcount: 0 +- row_count: 0 ... fiber = require('fiber') --- @@ -18,7 +18,7 @@ fiber = require('fiber') -- box.execute('CREATE TABLE t1(id INT PRIMARY KEY)') --- -- rowcount: 1 +- row_count: 1 ... function create_view() box.execute('CREATE VIEW v1 AS SELECT * FROM t1') end --- @@ -64,11 +64,11 @@ box.space.V1 -- box.execute('CREATE TABLE t2 (id INT PRIMARY KEY)') --- -- rowcount: 1 +- row_count: 1 ... box.execute('CREATE VIEW view2 AS SELECT * FROM t2') --- -- rowcount: 1 +- row_count: 1 ... function drop_view() box.space._space:delete{box.space.VIEW2.id} end --- diff --git a/test/sql/vinyl-opts.result b/test/sql/vinyl-opts.result index 19769f8..10a649a 100644 --- a/test/sql/vinyl-opts.result +++ b/test/sql/vinyl-opts.result @@ -15,11 +15,11 @@ test_run:cmd("switch test") ... box.execute('pragma sql_default_engine= \'vinyl\'') --- -- rowcount: 0 +- row_count: 0 ... box.execute('CREATE TABLE v1 (id INT PRIMARY KEY, b INT);') --- -- rowcount: 1 +- row_count: 1 ... box.space.V1.index[0].options --- @@ -31,7 +31,7 @@ box.space.V1.index[0].options ... box.execute('CREATE INDEX i1 ON v1(b);') --- -- rowcount: 1 +- row_count: 1 ... box.space.V1.index[1].options --- -- 2.7.4
next reply other threads:[~2019-04-02 15:59 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-02 15:59 imeevma [this message] 2019-04-02 16:02 ` [tarantool-patches] " Imeev Mergen 2019-04-02 18:04 ` Konstantin Osipov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=42434eb6adc25c50b3c6969705000580519f116e.1554220609.git.imeevma@gmail.com \ --to=imeevma@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [tarantool-patches] [PATCH v1 1/1] sql: set consistent names' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox