Tarantool development patches archive
 help / color / mirror / Atom feed
From: Georgy Kirichenko <georgy@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Georgy Kirichenko <georgy@tarantool.org>
Subject: [tarantool-patches] [PATCH 2/2] Fix some sql tests against static types
Date: Thu, 19 Apr 2018 12:15:18 +0300	[thread overview]
Message-ID: <3ae3d572bebb9c966955286f2552488e1090240b.1524128911.git.georgy@tarantool.org> (raw)
In-Reply-To: <cover.1524128911.git.georgy@tarantool.org>
In-Reply-To: <cover.1524128911.git.georgy@tarantool.org>

Update sql tests
Issue #3102
---
 test/sql/check-clear-ephemeral.result                  |  2 +-
 test/sql/check-clear-ephemeral.test.lua                |  2 +-
 test/sql/clear.result                                  |  2 +-
 test/sql/clear.test.lua                                |  2 +-
 test/sql/delete-multiple-idx.result                    |  2 +-
 test/sql/delete-multiple-idx.test.lua                  |  2 +-
 test/sql/delete.result                                 |  2 +-
 test/sql/delete.test.lua                               |  2 +-
 test/sql/drop-index.result                             |  2 +-
 test/sql/drop-index.test.lua                           |  2 +-
 test/sql/drop-table.result                             |  2 +-
 test/sql/drop-table.test.lua                           |  2 +-
 test/sql/errinj.result                                 |  2 +-
 test/sql/errinj.test.lua                               |  2 +-
 test/sql/gh-2929-primary-key.result                    | 10 +++++-----
 test/sql/gh-2929-primary-key.test.lua                  | 10 +++++-----
 test/sql/gh-3199-no-mem-leaks.result                   |  6 +++---
 test/sql/gh-3199-no-mem-leaks.test.lua                 |  6 +++---
 test/sql/gh2141-delete-trigger-drop-table.result       |  2 +-
 test/sql/gh2141-delete-trigger-drop-table.test.lua     |  2 +-
 test/sql/gh2251-multiple-update.result                 |  4 ++--
 test/sql/gh2251-multiple-update.test.lua               |  4 ++--
 test/sql/gh2808-inline-unique-persistency-check.result |  2 +-
 .../gh2808-inline-unique-persistency-check.test.lua    |  2 +-
 test/sql/insert-unique.result                          |  2 +-
 test/sql/insert-unique.test.lua                        |  2 +-
 test/sql/iproto.result                                 |  6 +++---
 test/sql/iproto.test.lua                               |  6 +++---
 test/sql/max-on-index.result                           |  2 +-
 test/sql/max-on-index.test.lua                         |  2 +-
 test/sql/misc.result                                   |  2 +-
 test/sql/misc.test.lua                                 |  2 +-
 test/sql/persistency.result                            | 10 +++++-----
 test/sql/persistency.test.lua                          |  8 ++++----
 test/sql/select-null.result                            |  2 +-
 test/sql/select-null.test.lua                          |  2 +-
 test/sql/transition.result                             | 10 +++++-----
 test/sql/transition.test.lua                           | 10 +++++-----
 test/sql/update-with-nested-select.result              |  2 +-
 test/sql/update-with-nested-select.test.lua            |  2 +-
 test/sql/view.result                                   |  2 +-
 test/sql/view.test.lua                                 |  2 +-
 42 files changed, 75 insertions(+), 75 deletions(-)

diff --git a/test/sql/check-clear-ephemeral.result b/test/sql/check-clear-ephemeral.result
index 156e06a4a..b4c2ce029 100644
--- a/test/sql/check-clear-ephemeral.result
+++ b/test/sql/check-clear-ephemeral.result
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 ...
 -- box.cfg()
 -- create space
-box.sql.execute("CREATE TABLE t1(a,b,c,PRIMARY KEY(b,c));")
+box.sql.execute("CREATE TABLE t1(a int, b int, c int,PRIMARY KEY(b,c));")
 ---
 ...
 -- Debug
diff --git a/test/sql/check-clear-ephemeral.test.lua b/test/sql/check-clear-ephemeral.test.lua
index 8a5787b04..9cf533e17 100644
--- a/test/sql/check-clear-ephemeral.test.lua
+++ b/test/sql/check-clear-ephemeral.test.lua
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 -- box.cfg()
 
 -- create space
-box.sql.execute("CREATE TABLE t1(a,b,c,PRIMARY KEY(b,c));")
+box.sql.execute("CREATE TABLE t1(a int, b int, c int,PRIMARY KEY(b,c));")
 
 -- Debug
 -- box.sql.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zoobar VALUES (111, 222, 'c3', 444)")
diff --git a/test/sql/clear.result b/test/sql/clear.result
index d267245f3..828d14c2b 100644
--- a/test/sql/clear.result
+++ b/test/sql/clear.result
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 ...
 -- box.cfg()
 -- create space
-box.sql.execute("CREATE TABLE zoobar (c1, c2 PRIMARY KEY, c3, c4)")
+box.sql.execute("CREATE TABLE zoobar (c1 int, c2 int PRIMARY KEY, c3 text, c4 int)")
 ---
 ...
 box.sql.execute("CREATE UNIQUE INDEX zoobar2 ON zoobar(c1, c4)")
diff --git a/test/sql/clear.test.lua b/test/sql/clear.test.lua
index 068a7c129..10adfb954 100644
--- a/test/sql/clear.test.lua
+++ b/test/sql/clear.test.lua
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 -- box.cfg()
 
 -- create space
-box.sql.execute("CREATE TABLE zoobar (c1, c2 PRIMARY KEY, c3, c4)")
+box.sql.execute("CREATE TABLE zoobar (c1 int, c2 int PRIMARY KEY, c3 text, c4 int)")
 box.sql.execute("CREATE UNIQUE INDEX zoobar2 ON zoobar(c1, c4)")
 
 -- Debug
diff --git a/test/sql/delete-multiple-idx.result b/test/sql/delete-multiple-idx.result
index 000dad2a3..4320bf96a 100644
--- a/test/sql/delete-multiple-idx.result
+++ b/test/sql/delete-multiple-idx.result
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 ...
 -- box.cfg()
 -- Create space.
-box.sql.execute("CREATE TABLE t3(id primary key,x,y);");
+box.sql.execute("CREATE TABLE t3(id int primary key,x int,y int);");
 ---
 ...
 box.sql.execute("CREATE UNIQUE INDEX t3y ON t3(y);");
diff --git a/test/sql/delete-multiple-idx.test.lua b/test/sql/delete-multiple-idx.test.lua
index 26c19a03d..2b7dbed9d 100644
--- a/test/sql/delete-multiple-idx.test.lua
+++ b/test/sql/delete-multiple-idx.test.lua
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 -- box.cfg()
 
 -- Create space.
-box.sql.execute("CREATE TABLE t3(id primary key,x,y);");
+box.sql.execute("CREATE TABLE t3(id int primary key,x int,y int);");
 box.sql.execute("CREATE UNIQUE INDEX t3y ON t3(y);");
 
 -- Debug.
diff --git a/test/sql/delete.result b/test/sql/delete.result
index b7dc588a9..14eac5aac 100644
--- a/test/sql/delete.result
+++ b/test/sql/delete.result
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 ...
 -- box.cfg()
 -- create space
-box.sql.execute("CREATE TABLE t1(a, b, PRIMARY KEY(a, b));");
+box.sql.execute("CREATE TABLE t1(a int, b int, PRIMARY KEY(a, b));");
 ---
 ...
 -- Debug
diff --git a/test/sql/delete.test.lua b/test/sql/delete.test.lua
index 69d8ff9f6..46a6fbf7c 100644
--- a/test/sql/delete.test.lua
+++ b/test/sql/delete.test.lua
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 -- box.cfg()
 
 -- create space
-box.sql.execute("CREATE TABLE t1(a, b, PRIMARY KEY(a, b));");
+box.sql.execute("CREATE TABLE t1(a int, b int, PRIMARY KEY(a, b));");
 
 -- Debug
 -- box.sql.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zoobar VALUES (111, 222, 'c3', 444)")
diff --git a/test/sql/drop-index.result b/test/sql/drop-index.result
index 9fa8b8b75..a8650aa69 100644
--- a/test/sql/drop-index.result
+++ b/test/sql/drop-index.result
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 ...
 -- box.cfg()
 -- create space
-box.sql.execute("CREATE TABLE zzoobar (c1, c2 PRIMARY KEY, c3, c4)")
+box.sql.execute("CREATE TABLE zzoobar (c1 int, c2 int PRIMARY KEY, c3 text, c4 int)")
 ---
 ...
 box.sql.execute("CREATE UNIQUE INDEX zoobar2 ON zzoobar(c1, c4)")
diff --git a/test/sql/drop-index.test.lua b/test/sql/drop-index.test.lua
index d39d33b64..d8a82a0f7 100644
--- a/test/sql/drop-index.test.lua
+++ b/test/sql/drop-index.test.lua
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 -- box.cfg()
 
 -- create space
-box.sql.execute("CREATE TABLE zzoobar (c1, c2 PRIMARY KEY, c3, c4)")
+box.sql.execute("CREATE TABLE zzoobar (c1 int, c2 int PRIMARY KEY, c3 text, c4 int)")
 
 box.sql.execute("CREATE UNIQUE INDEX zoobar2 ON zzoobar(c1, c4)")
 box.sql.execute("CREATE        INDEX zoobar3 ON zzoobar(c3)")
diff --git a/test/sql/drop-table.result b/test/sql/drop-table.result
index e89176454..c76e74226 100644
--- a/test/sql/drop-table.result
+++ b/test/sql/drop-table.result
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 ...
 -- box.cfg()
 -- create space
-box.sql.execute("CREATE TABLE zzzoobar (c1, c2 PRIMARY KEY, c3, c4)")
+box.sql.execute("CREATE TABLE zzzoobar (c1 int, c2 int PRIMARY KEY, c3 varchar(20), c4 int)")
 ---
 ...
 -- Debug
diff --git a/test/sql/drop-table.test.lua b/test/sql/drop-table.test.lua
index a72156385..bc2a8cf5a 100644
--- a/test/sql/drop-table.test.lua
+++ b/test/sql/drop-table.test.lua
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 -- box.cfg()
 
 -- create space
-box.sql.execute("CREATE TABLE zzzoobar (c1, c2 PRIMARY KEY, c3, c4)")
+box.sql.execute("CREATE TABLE zzzoobar (c1 int, c2 int PRIMARY KEY, c3 varchar(20), c4 int)")
 
 -- Debug
 -- box.sql.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zzzoobar VALUES (111, 222, 'c3', 444)")
diff --git a/test/sql/errinj.result b/test/sql/errinj.result
index 00a0d6bab..19c7f0b3b 100644
--- a/test/sql/errinj.result
+++ b/test/sql/errinj.result
@@ -7,7 +7,7 @@ errinj = box.error.injection
 fiber = require('fiber')
 ---
 ...
-box.sql.execute('create table test (id primary key, a float, b text)')
+box.sql.execute('create table test (id int primary key, a float, b text)')
 ---
 ...
 box.schema.user.grant('guest','read,write,execute', 'universe')
diff --git a/test/sql/errinj.test.lua b/test/sql/errinj.test.lua
index 63d306312..c5f3eca22 100644
--- a/test/sql/errinj.test.lua
+++ b/test/sql/errinj.test.lua
@@ -2,7 +2,7 @@ remote = require('net.box')
 errinj = box.error.injection
 fiber = require('fiber')
 
-box.sql.execute('create table test (id primary key, a float, b text)')
+box.sql.execute('create table test (id int primary key, a float, b text)')
 box.schema.user.grant('guest','read,write,execute', 'universe')
 cn = remote.connect(box.cfg.listen)
 cn:ping()
diff --git a/test/sql/gh-2929-primary-key.result b/test/sql/gh-2929-primary-key.result
index 53896fcda..26710e866 100644
--- a/test/sql/gh-2929-primary-key.result
+++ b/test/sql/gh-2929-primary-key.result
@@ -4,22 +4,22 @@
 box.cfg{}
 ---
 ...
-box.sql.execute("CREATE TABLE t1(a INT PRIMARY KEY, b UNIQUE)")
+box.sql.execute("CREATE TABLE t1(a INT PRIMARY KEY, b int UNIQUE)")
 ---
 ...
-box.sql.execute("CREATE TABLE t2(a UNIQUE, b)")
+box.sql.execute("CREATE TABLE t2(a int UNIQUE, b int)")
 ---
 - error: PRIMARY KEY missing on table T2
 ...
-box.sql.execute("CREATE TABLE t3(a)")
+box.sql.execute("CREATE TABLE t3(a int)")
 ---
 - error: PRIMARY KEY missing on table T3
 ...
-box.sql.execute("CREATE TABLE t4(a, b)")
+box.sql.execute("CREATE TABLE t4(a int, b int)")
 ---
 - error: PRIMARY KEY missing on table T4
 ...
-box.sql.execute("CREATE TABLE t5(a, b UNIQUE)")
+box.sql.execute("CREATE TABLE t5(a int, b int UNIQUE)")
 ---
 - error: PRIMARY KEY missing on table T5
 ...
diff --git a/test/sql/gh-2929-primary-key.test.lua b/test/sql/gh-2929-primary-key.test.lua
index 27338a6ce..95d4f7ac4 100644
--- a/test/sql/gh-2929-primary-key.test.lua
+++ b/test/sql/gh-2929-primary-key.test.lua
@@ -4,11 +4,11 @@
 
 box.cfg{}
 
-box.sql.execute("CREATE TABLE t1(a INT PRIMARY KEY, b UNIQUE)")
-box.sql.execute("CREATE TABLE t2(a UNIQUE, b)")
+box.sql.execute("CREATE TABLE t1(a INT PRIMARY KEY, b int UNIQUE)")
+box.sql.execute("CREATE TABLE t2(a int UNIQUE, b int)")
 
-box.sql.execute("CREATE TABLE t3(a)")
-box.sql.execute("CREATE TABLE t4(a, b)")
-box.sql.execute("CREATE TABLE t5(a, b UNIQUE)")
+box.sql.execute("CREATE TABLE t3(a int)")
+box.sql.execute("CREATE TABLE t4(a int, b int)")
+box.sql.execute("CREATE TABLE t5(a int, b int UNIQUE)")
 
 box.sql.execute("DROP TABLE t1")
diff --git a/test/sql/gh-3199-no-mem-leaks.result b/test/sql/gh-3199-no-mem-leaks.result
index 682ca62a7..4645378cf 100644
--- a/test/sql/gh-3199-no-mem-leaks.result
+++ b/test/sql/gh-3199-no-mem-leaks.result
@@ -8,7 +8,7 @@ fiber = require('fiber')
 -- executing SQL queries.
 --
 -- box.cfg()
-box.sql.execute('CREATE TABLE test (id PRIMARY KEY, x INTEGER, y INTEGER)')
+box.sql.execute('CREATE TABLE test (id INT PRIMARY KEY, x INTEGER, y INTEGER)')
 ---
 ...
 box.sql.execute('INSERT INTO test VALUES (1, 1, 1), (2, 2, 2)')
@@ -47,7 +47,7 @@ fiber.info()[fiber.self().id()].memory.used
 ---
 - 0
 ...
-box.sql.execute('CREATE TABLE test2 (id PRIMARY KEY, a TEXT, b INTEGER)')
+box.sql.execute('CREATE TABLE test2 (id INT PRIMARY KEY, a TEXT, b INTEGER)')
 ---
 ...
 box.sql.execute('INSERT INTO test2 VALUES (1, \'abc\', 1), (2, \'hello\', 2)')
@@ -56,7 +56,7 @@ box.sql.execute('INSERT INTO test2 VALUES (1, \'abc\', 1), (2, \'hello\', 2)')
 box.sql.execute('INSERT INTO test2 VALUES (3, \'test\', 3), (4, \'xx\', 4)')
 ---
 ...
-box.sql.execute('SELECT a, id + 2 * a, b FROM test2 WHERE b < id * 2 ORDER BY a ')
+box.sql.execute('SELECT a, id, b FROM test2 WHERE b < id * 2 ORDER BY a ')
 ---
 - - ['abc', 1, 1]
   - ['hello', 2, 2]
diff --git a/test/sql/gh-3199-no-mem-leaks.test.lua b/test/sql/gh-3199-no-mem-leaks.test.lua
index d61d474d9..cb4ef7cb7 100644
--- a/test/sql/gh-3199-no-mem-leaks.test.lua
+++ b/test/sql/gh-3199-no-mem-leaks.test.lua
@@ -8,7 +8,7 @@ fiber = require('fiber')
 -- box.cfg()
 
 
-box.sql.execute('CREATE TABLE test (id PRIMARY KEY, x INTEGER, y INTEGER)')
+box.sql.execute('CREATE TABLE test (id INT PRIMARY KEY, x INTEGER, y INTEGER)')
 box.sql.execute('INSERT INTO test VALUES (1, 1, 1), (2, 2, 2)')
 box.sql.execute('SELECT x, y, x + y FROM test ORDER BY y')
 
@@ -21,10 +21,10 @@ box.sql.execute('SELECT x, y, x + y FROM test ORDER BY y')
 
 fiber.info()[fiber.self().id()].memory.used
 
-box.sql.execute('CREATE TABLE test2 (id PRIMARY KEY, a TEXT, b INTEGER)')
+box.sql.execute('CREATE TABLE test2 (id INT PRIMARY KEY, a TEXT, b INTEGER)')
 box.sql.execute('INSERT INTO test2 VALUES (1, \'abc\', 1), (2, \'hello\', 2)')
 box.sql.execute('INSERT INTO test2 VALUES (3, \'test\', 3), (4, \'xx\', 4)')
-box.sql.execute('SELECT a, id + 2 * a, b FROM test2 WHERE b < id * 2 ORDER BY a ')
+box.sql.execute('SELECT a, id, b FROM test2 WHERE b < id * 2 ORDER BY a ')
 
 fiber.info()[fiber.self().id()].memory.used
 
diff --git a/test/sql/gh2141-delete-trigger-drop-table.result b/test/sql/gh2141-delete-trigger-drop-table.result
index ba7016c48..695dcb327 100644
--- a/test/sql/gh2141-delete-trigger-drop-table.result
+++ b/test/sql/gh2141-delete-trigger-drop-table.result
@@ -2,7 +2,7 @@ test_run = require('test_run').new()
 ---
 ...
 -- create space
-box.sql.execute("CREATE TABLE t(id PRIMARY KEY)")
+box.sql.execute("CREATE TABLE t(id int PRIMARY KEY)")
 ---
 ...
 box.sql.execute("CREATE TRIGGER tt_bu BEFORE UPDATE ON t BEGIN SELECT 1; END")
diff --git a/test/sql/gh2141-delete-trigger-drop-table.test.lua b/test/sql/gh2141-delete-trigger-drop-table.test.lua
index e6a030cb4..a2214a263 100644
--- a/test/sql/gh2141-delete-trigger-drop-table.test.lua
+++ b/test/sql/gh2141-delete-trigger-drop-table.test.lua
@@ -1,7 +1,7 @@
 test_run = require('test_run').new()
 
 -- create space
-box.sql.execute("CREATE TABLE t(id PRIMARY KEY)")
+box.sql.execute("CREATE TABLE t(id int PRIMARY KEY)")
 
 box.sql.execute("CREATE TRIGGER tt_bu BEFORE UPDATE ON t BEGIN SELECT 1; END")
 box.sql.execute("CREATE TRIGGER tt_au AFTER UPDATE ON t BEGIN SELECT 1; END")
diff --git a/test/sql/gh2251-multiple-update.result b/test/sql/gh2251-multiple-update.result
index 5372cfc3a..32e0c94db 100644
--- a/test/sql/gh2251-multiple-update.result
+++ b/test/sql/gh2251-multiple-update.result
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 ---
 ...
 -- box.cfg()
-box.sql.execute("CREATE TABLE t1(a integer primary key, b UNIQUE, e);")
+box.sql.execute("CREATE TABLE t1(a integer primary key, b int UNIQUE, e int);")
 ---
 ...
 box.sql.execute("INSERT INTO t1 VALUES(1,4,6);")
@@ -20,7 +20,7 @@ box.sql.execute("SELECT e FROM t1")
 - - [7]
   - [8]
 ...
-box.sql.execute("CREATE TABLE t2(a integer primary key, b UNIQUE, c, d, e,  UNIQUE(c,d));")
+box.sql.execute("CREATE TABLE t2(a integer primary key, b int UNIQUE, c int, d int, e int,  UNIQUE(c,d));")
 ---
 ...
 box.sql.execute("INSERT INTO t2 VALUES(1,2,3,4,5);")
diff --git a/test/sql/gh2251-multiple-update.test.lua b/test/sql/gh2251-multiple-update.test.lua
index 15795f12b..2619bf96d 100644
--- a/test/sql/gh2251-multiple-update.test.lua
+++ b/test/sql/gh2251-multiple-update.test.lua
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 
 -- box.cfg()
 
-box.sql.execute("CREATE TABLE t1(a integer primary key, b UNIQUE, e);")
+box.sql.execute("CREATE TABLE t1(a integer primary key, b int UNIQUE, e int);")
 box.sql.execute("INSERT INTO t1 VALUES(1,4,6);")
 box.sql.execute("INSERT INTO t1 VALUES(2,5,7);")
 
@@ -11,7 +11,7 @@ box.sql.execute("UPDATE t1 SET e=e+1 WHERE b IN (SELECT b FROM t1);")
 
 box.sql.execute("SELECT e FROM t1")
 
-box.sql.execute("CREATE TABLE t2(a integer primary key, b UNIQUE, c, d, e,  UNIQUE(c,d));")
+box.sql.execute("CREATE TABLE t2(a integer primary key, b int UNIQUE, c int, d int, e int,  UNIQUE(c,d));")
 box.sql.execute("INSERT INTO t2 VALUES(1,2,3,4,5);")
 box.sql.execute("INSERT INTO t2 VALUES(2,3,4,4,6);")
 
diff --git a/test/sql/gh2808-inline-unique-persistency-check.result b/test/sql/gh2808-inline-unique-persistency-check.result
index e171f7aa7..88d31d01f 100644
--- a/test/sql/gh2808-inline-unique-persistency-check.result
+++ b/test/sql/gh2808-inline-unique-persistency-check.result
@@ -6,7 +6,7 @@ test_run = env.new()
 ---
 ...
 -- Create a table and insert a datum
-box.sql.execute([[CREATE TABLE t1(a PRIMARY KEY, b, UNIQUE(b));]])
+box.sql.execute([[CREATE TABLE t1(a int PRIMARY KEY, b int, UNIQUE(b));]])
 ---
 ...
 box.sql.execute([[INSERT INTO t1 VALUES(1,2);]])
diff --git a/test/sql/gh2808-inline-unique-persistency-check.test.lua b/test/sql/gh2808-inline-unique-persistency-check.test.lua
index 19ae87760..cea449bb7 100644
--- a/test/sql/gh2808-inline-unique-persistency-check.test.lua
+++ b/test/sql/gh2808-inline-unique-persistency-check.test.lua
@@ -3,7 +3,7 @@ env = require('test_run')
 test_run = env.new()
 
 -- Create a table and insert a datum
-box.sql.execute([[CREATE TABLE t1(a PRIMARY KEY, b, UNIQUE(b));]])
+box.sql.execute([[CREATE TABLE t1(a int PRIMARY KEY, b int, UNIQUE(b));]])
 box.sql.execute([[INSERT INTO t1 VALUES(1,2);]])
 
 -- Sanity check
diff --git a/test/sql/insert-unique.result b/test/sql/insert-unique.result
index 7e564ec77..bdde9d71c 100644
--- a/test/sql/insert-unique.result
+++ b/test/sql/insert-unique.result
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 ...
 -- box.cfg()
 -- create space
-box.sql.execute("CREATE TABLE zoobar (c1, c2 PRIMARY KEY, c3, c4)")
+box.sql.execute("CREATE TABLE zoobar (c1 INT, c2 INT PRIMARY KEY, c3 varchar(10), c4 int)")
 ---
 ...
 box.sql.execute("CREATE UNIQUE INDEX zoobar2 ON zoobar(c1, c4)")
diff --git a/test/sql/insert-unique.test.lua b/test/sql/insert-unique.test.lua
index dfdaa30cc..4ca784ef2 100644
--- a/test/sql/insert-unique.test.lua
+++ b/test/sql/insert-unique.test.lua
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 -- box.cfg()
 
 -- create space
-box.sql.execute("CREATE TABLE zoobar (c1, c2 PRIMARY KEY, c3, c4)")
+box.sql.execute("CREATE TABLE zoobar (c1 INT, c2 INT PRIMARY KEY, c3 varchar(10), c4 int)")
 box.sql.execute("CREATE UNIQUE INDEX zoobar2 ON zoobar(c1, c4)")
 
 -- Debug
diff --git a/test/sql/iproto.result b/test/sql/iproto.result
index 39e51d84c..dc5f97142 100644
--- a/test/sql/iproto.result
+++ b/test/sql/iproto.result
@@ -1,7 +1,7 @@
 remote = require('net.box')
 ---
 ...
-box.sql.execute('create table test (id primary key, a float, b text)')
+box.sql.execute('create table test (id int primary key, a float, b text)')
 ---
 ...
 space = box.space.TEST
@@ -282,7 +282,7 @@ cn:execute('select :value', parameters)
 - error: Bind value type MAP for parameter ':value' is not supported
 ...
 -- gh-2608 SQL iproto DDL
-cn:execute('create table test2(id primary key, a, b, c)')
+cn:execute('create table test2(id int primary key, a decimal, b int, c decimal)')
 ---
 - rowcount: 1
 ...
@@ -318,7 +318,7 @@ box.space.TEST2
 ...
 -- gh-2617 DDL row_count either 0 or 1.
 -- Test CREATE [IF NOT EXISTS] TABLE.
-cn:execute('create table test3(id primary key, a, b)')
+cn:execute('create table test3(id int primary key, a int, b int)')
 ---
 - rowcount: 1
 ...
diff --git a/test/sql/iproto.test.lua b/test/sql/iproto.test.lua
index faf844226..ea50343c9 100644
--- a/test/sql/iproto.test.lua
+++ b/test/sql/iproto.test.lua
@@ -1,6 +1,6 @@
 remote = require('net.box')
 
-box.sql.execute('create table test (id primary key, a float, b text)')
+box.sql.execute('create table test (id int primary key, a float, b text)')
 space = box.space.TEST
 space:replace{1, 2, '3'}
 space:replace{4, 5, '6'}
@@ -110,7 +110,7 @@ parameters[1][':value'] = {kek = 300}
 cn:execute('select :value', parameters)
 
 -- gh-2608 SQL iproto DDL
-cn:execute('create table test2(id primary key, a, b, c)')
+cn:execute('create table test2(id int primary key, a decimal, b int, c decimal)')
 box.space.TEST2.name
 cn:execute('insert into test2 values (1, 1, 1, 1)')
 cn:execute('select * from test2')
@@ -122,7 +122,7 @@ box.space.TEST2
 -- gh-2617 DDL row_count either 0 or 1.
 
 -- Test CREATE [IF NOT EXISTS] TABLE.
-cn:execute('create table test3(id primary key, a, b)')
+cn:execute('create table test3(id int primary key, a int, b int)')
 -- 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)')
diff --git a/test/sql/max-on-index.result b/test/sql/max-on-index.result
index afd43628b..ea6aff29a 100644
--- a/test/sql/max-on-index.result
+++ b/test/sql/max-on-index.result
@@ -4,7 +4,7 @@ test_run = require('test_run').new()
 -- box.cfg()
 -- create space
 -- scalar affinity
-box.sql.execute("CREATE TABLE test1 (f1, f2 INT, PRIMARY KEY(f1))")
+box.sql.execute("CREATE TABLE test1 (f1 INT, f2 INT, PRIMARY KEY(f1))")
 ---
 ...
 box.sql.execute("CREATE INDEX test1_index ON test1 (f2)")
diff --git a/test/sql/max-on-index.test.lua b/test/sql/max-on-index.test.lua
index 5ce6cd70a..9681ea015 100644
--- a/test/sql/max-on-index.test.lua
+++ b/test/sql/max-on-index.test.lua
@@ -4,7 +4,7 @@ test_run = require('test_run').new()
 
 -- create space
 -- scalar affinity
-box.sql.execute("CREATE TABLE test1 (f1, f2 INT, PRIMARY KEY(f1))")
+box.sql.execute("CREATE TABLE test1 (f1 INT, f2 INT, PRIMARY KEY(f1))")
 box.sql.execute("CREATE INDEX test1_index ON test1 (f2)")
 
 -- integer affinity
diff --git a/test/sql/misc.result b/test/sql/misc.result
index b1ddb89a1..fa8709775 100644
--- a/test/sql/misc.result
+++ b/test/sql/misc.result
@@ -7,7 +7,7 @@ box.sql.execute('select 1; select 2;')
 ---
 - error: keyword "select" is reserved
 ...
-box.sql.execute('create table t1 (id primary key); select 100;')
+box.sql.execute('create table t1 (id int primary key); select 100;')
 ---
 - error: keyword "select" is reserved
 ...
diff --git a/test/sql/misc.test.lua b/test/sql/misc.test.lua
index 2c05fcd0c..59821cc6f 100644
--- a/test/sql/misc.test.lua
+++ b/test/sql/misc.test.lua
@@ -1,7 +1,7 @@
 -- Forbid multistatement queries.
 box.sql.execute('select 1;')
 box.sql.execute('select 1; select 2;')
-box.sql.execute('create table t1 (id primary key); select 100;')
+box.sql.execute('create table t1 (id int primary key); select 100;')
 box.space.t1 == nil
 box.sql.execute(';')
 box.sql.execute('')
diff --git a/test/sql/persistency.result b/test/sql/persistency.result
index 7a7f6b82a..3e2e3de54 100644
--- a/test/sql/persistency.result
+++ b/test/sql/persistency.result
@@ -5,7 +5,7 @@ test_run = env.new()
 ---
 ...
 -- create space
-box.sql.execute("CREATE TABLE foobar (foo PRIMARY KEY, bar)")
+box.sql.execute("CREATE TABLE foobar (foo int PRIMARY KEY, bar text)")
 ---
 ...
 -- prepare data
@@ -120,7 +120,7 @@ box.sql.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
 ...
 -- multi-index
 -- create space
-box.sql.execute("CREATE TABLE barfoo (bar, foo NUM PRIMARY KEY)")
+box.sql.execute("CREATE TABLE barfoo (bar int, foo NUMERIC PRIMARY KEY)")
 ---
 ...
 box.sql.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)")
@@ -145,7 +145,7 @@ box.sql.execute("SELECT * FROM \"_trigger\"");
 - - ['TFOOBAR', !!binary gaNzcWzZaUNSRUFURSBUUklHR0VSIHRmb29iYXIgQUZURVIgSU5TRVJUIE9OIGZvb2JhciBCRUdJTiBJTlNFUlQgSU5UTyBiYXJmb28gVkFMVUVTICgndHJpZ2dlciB0ZXN0JywgOTk5OSk7IEVORA==]
 ...
 -- Many entries
-box.sql.execute("CREATE TABLE t1(a,b,c,PRIMARY KEY(b,c));")
+box.sql.execute("CREATE TABLE t1(a INT,b INT,c INT,PRIMARY KEY(b,c));")
 ---
 ...
 box.sql.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;")
@@ -171,7 +171,7 @@ box.sql.execute("SELECT * FROM \"_trigger\"");
 - - ['TFOOBAR', !!binary gaNzcWzZaUNSRUFURSBUUklHR0VSIHRmb29iYXIgQUZURVIgSU5TRVJUIE9OIGZvb2JhciBCRUdJTiBJTlNFUlQgSU5UTyBiYXJmb28gVkFMVUVTICgndHJpZ2dlciB0ZXN0JywgOTk5OSk7IEVORA==]
 ...
 -- ... functional
-box.sql.execute("INSERT INTO foobar VALUES ('foobar trigger test', 8888)")
+box.sql.execute("INSERT INTO foobar VALUES (8888, 'foobar trigger test')")
 ---
 ...
 box.sql.execute("SELECT * FROM barfoo WHERE foo = 9999");
@@ -214,7 +214,7 @@ box.sql.execute("SELECT * FROM foobar");
 ---
 - - [2, 'bar']
   - [1000, 'foobar']
-  - ['foobar trigger test', 8888]
+  - [8888, 'foobar trigger test']
 ...
 box.sql.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;");
 ---
diff --git a/test/sql/persistency.test.lua b/test/sql/persistency.test.lua
index bd055457b..fb8c37e21 100644
--- a/test/sql/persistency.test.lua
+++ b/test/sql/persistency.test.lua
@@ -2,7 +2,7 @@ env = require('test_run')
 test_run = env.new()
 
 -- create space
-box.sql.execute("CREATE TABLE foobar (foo PRIMARY KEY, bar)")
+box.sql.execute("CREATE TABLE foobar (foo int PRIMARY KEY, bar text)")
 
 -- prepare data
 box.sql.execute("INSERT INTO foobar VALUES (1, 'foo')")
@@ -39,7 +39,7 @@ box.sql.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
 -- multi-index
 
 -- create space
-box.sql.execute("CREATE TABLE barfoo (bar, foo NUM PRIMARY KEY)")
+box.sql.execute("CREATE TABLE barfoo (bar int, foo NUMERIC PRIMARY KEY)")
 box.sql.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)")
 
 -- prepare data
@@ -52,7 +52,7 @@ box.sql.execute("CREATE TRIGGER tfoobar AFTER INSERT ON foobar BEGIN INSERT INTO
 box.sql.execute("SELECT * FROM \"_trigger\"");
 
 -- Many entries
-box.sql.execute("CREATE TABLE t1(a,b,c,PRIMARY KEY(b,c));")
+box.sql.execute("CREATE TABLE t1(a INT,b INT,c INT,PRIMARY KEY(b,c));")
 box.sql.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;")
 box.sql.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;");
 
@@ -62,7 +62,7 @@ test_run:cmd('restart server default');
 box.sql.execute("SELECT * FROM \"_trigger\"");
 
 -- ... functional
-box.sql.execute("INSERT INTO foobar VALUES ('foobar trigger test', 8888)")
+box.sql.execute("INSERT INTO foobar VALUES (8888, 'foobar trigger test')")
 box.sql.execute("SELECT * FROM barfoo WHERE foo = 9999");
 
 -- and still persistent
diff --git a/test/sql/select-null.result b/test/sql/select-null.result
index a229eb93b..b2dac09c2 100644
--- a/test/sql/select-null.result
+++ b/test/sql/select-null.result
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 ...
 -- box.cfg()
 -- create space
-box.sql.execute("CREATE TABLE t3(id INT, a, b, PRIMARY KEY(id))")
+box.sql.execute("CREATE TABLE t3(id INT, a text, b text, PRIMARY KEY(id))")
 ---
 ...
 -- Debug
diff --git a/test/sql/select-null.test.lua b/test/sql/select-null.test.lua
index a2c126614..95ac1eb4a 100644
--- a/test/sql/select-null.test.lua
+++ b/test/sql/select-null.test.lua
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 -- box.cfg()
 
 -- create space
-box.sql.execute("CREATE TABLE t3(id INT, a, b, PRIMARY KEY(id))")
+box.sql.execute("CREATE TABLE t3(id INT, a text, b text, PRIMARY KEY(id))")
 
 -- Debug
 -- box.sql.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zoobar VALUES (111, 222, 'c3', 444)")
diff --git a/test/sql/transition.result b/test/sql/transition.result
index 7c4a2c813..16f461d33 100644
--- a/test/sql/transition.result
+++ b/test/sql/transition.result
@@ -1,5 +1,5 @@
 -- create space
-box.sql.execute("CREATE TABLE foobar (foo PRIMARY KEY, bar)")
+box.sql.execute("CREATE TABLE foobar (foo int PRIMARY KEY, bar text)")
 ---
 ...
 -- prepare data
@@ -114,7 +114,7 @@ box.sql.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
 ...
 -- multi-index
 -- create space
-box.sql.execute("CREATE TABLE barfoo (bar, foo NUM PRIMARY KEY)")
+box.sql.execute("CREATE TABLE barfoo (bar text, foo NUMERIC PRIMARY KEY)")
 ---
 ...
 box.sql.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)")
@@ -171,17 +171,17 @@ box.sql.execute("DROP TABLE barfoo")
 ---
 ...
 -- attempt to create a table lacking PRIMARY KEY
-box.sql.execute("CREATE TABLE without_rowid_lacking_primary_key(x)")
+box.sql.execute("CREATE TABLE without_rowid_lacking_primary_key(x int)")
 ---
 - error: PRIMARY KEY missing on table WITHOUT_ROWID_LACKING_PRIMARY_KEY
 ...
 -- attempt to create a table lacking WITHOUT ROWID clause
-box.sql.execute("CREATE TABLE rowid(x)")
+box.sql.execute("CREATE TABLE rowid(x int)")
 ---
 - error: PRIMARY KEY missing on table ROWID
 ...
 -- create a table with implicit indices (used to SEGFAULT)
-box.sql.execute("CREATE TABLE implicit_indices(a PRIMARY KEY,b,c,d UNIQUE)")
+box.sql.execute("CREATE TABLE implicit_indices(a int PRIMARY KEY,b int,c int,d int UNIQUE)")
 ---
 ...
 box.sql.execute("DROP TABLE implicit_indices")
diff --git a/test/sql/transition.test.lua b/test/sql/transition.test.lua
index 50ee7f569..845a8b7d5 100644
--- a/test/sql/transition.test.lua
+++ b/test/sql/transition.test.lua
@@ -1,5 +1,5 @@
 -- create space
-box.sql.execute("CREATE TABLE foobar (foo PRIMARY KEY, bar)")
+box.sql.execute("CREATE TABLE foobar (foo int PRIMARY KEY, bar text)")
 
 -- prepare data
 box.sql.execute("INSERT INTO foobar VALUES (1, 'foo')")
@@ -36,7 +36,7 @@ box.sql.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
 -- multi-index
 
 -- create space
-box.sql.execute("CREATE TABLE barfoo (bar, foo NUM PRIMARY KEY)")
+box.sql.execute("CREATE TABLE barfoo (bar text, foo NUMERIC PRIMARY KEY)")
 box.sql.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)")
 
 -- prepare data
@@ -59,11 +59,11 @@ box.sql.execute("DROP TABLE foobar")
 box.sql.execute("DROP TABLE barfoo")
 
 -- attempt to create a table lacking PRIMARY KEY
-box.sql.execute("CREATE TABLE without_rowid_lacking_primary_key(x)")
+box.sql.execute("CREATE TABLE without_rowid_lacking_primary_key(x int)")
 
 -- attempt to create a table lacking WITHOUT ROWID clause
-box.sql.execute("CREATE TABLE rowid(x)")
+box.sql.execute("CREATE TABLE rowid(x int)")
 
 -- create a table with implicit indices (used to SEGFAULT)
-box.sql.execute("CREATE TABLE implicit_indices(a PRIMARY KEY,b,c,d UNIQUE)")
+box.sql.execute("CREATE TABLE implicit_indices(a int PRIMARY KEY,b int,c int,d int UNIQUE)")
 box.sql.execute("DROP TABLE implicit_indices")
diff --git a/test/sql/update-with-nested-select.result b/test/sql/update-with-nested-select.result
index 419cebb61..64a4fb656 100644
--- a/test/sql/update-with-nested-select.result
+++ b/test/sql/update-with-nested-select.result
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 ...
 -- box.cfg()
 -- create space
-box.sql.execute("CREATE TABLE t1(a integer primary key, b UNIQUE, e);");
+box.sql.execute("CREATE TABLE t1(a integer primary key, b int UNIQUE, e int);");
 ---
 ...
 -- Debug
diff --git a/test/sql/update-with-nested-select.test.lua b/test/sql/update-with-nested-select.test.lua
index 7b90968ae..9421a3b52 100644
--- a/test/sql/update-with-nested-select.test.lua
+++ b/test/sql/update-with-nested-select.test.lua
@@ -3,7 +3,7 @@ test_run = require('test_run').new()
 -- box.cfg()
 
 -- create space
-box.sql.execute("CREATE TABLE t1(a integer primary key, b UNIQUE, e);");
+box.sql.execute("CREATE TABLE t1(a integer primary key, b int UNIQUE, e int);");
 
 -- Debug
 -- box.sql.execute("PRAGMA vdbe_debug=ON ; INSERT INTO zoobar VALUES (111, 222, 'c3', 444)")
diff --git a/test/sql/view.result b/test/sql/view.result
index 04cb3fae8..b5b7fe56e 100644
--- a/test/sql/view.result
+++ b/test/sql/view.result
@@ -4,7 +4,7 @@ test_run = require('test_run').new()
 -- Verify that constraints on 'view' option are working.
 -- box.cfg()
 -- Create space and view.
-box.sql.execute("CREATE TABLE t1(a, b, PRIMARY KEY(a, b));");
+box.sql.execute("CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a, b));");
 ---
 ...
 box.sql.execute("CREATE VIEW v1 AS SELECT a+b FROM t1;");
diff --git a/test/sql/view.test.lua b/test/sql/view.test.lua
index ab2843cb6..f0f9fac59 100644
--- a/test/sql/view.test.lua
+++ b/test/sql/view.test.lua
@@ -5,7 +5,7 @@ test_run = require('test_run').new()
 -- box.cfg()
 
 -- Create space and view.
-box.sql.execute("CREATE TABLE t1(a, b, PRIMARY KEY(a, b));");
+box.sql.execute("CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a, b));");
 box.sql.execute("CREATE VIEW v1 AS SELECT a+b FROM t1;");
 
 -- View can't have any indexes.
-- 
2.17.0

  parent reply	other threads:[~2018-04-19  9:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19  9:15 [tarantool-patches] [PATCH 0/2] Update " Georgy Kirichenko
2018-04-19  9:15 ` [tarantool-patches] [PATCH 1/2] Convert some tests into a static-types form Georgy Kirichenko
2018-04-19  9:26   ` [tarantool-patches] " Vladislav Shpilevoy
2018-04-19  9:15 ` Georgy Kirichenko [this message]
2018-04-19  9:20   ` [tarantool-patches] Re: [PATCH 2/2] Fix some sql tests against static types Vladislav Shpilevoy

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=3ae3d572bebb9c966955286f2552488e1090240b.1524128911.git.georgy@tarantool.org \
    --to=georgy@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] [PATCH 2/2] Fix some sql tests against static types' \
    /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