From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id BA7E52963B for ; Thu, 7 Mar 2019 08:14:11 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oS7QjgiVPtA9 for ; Thu, 7 Mar 2019 08:14:11 -0500 (EST) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 4908D29618 for ; Thu, 7 Mar 2019 08:14:11 -0500 (EST) From: Nikita Pettik Subject: [tarantool-patches] [PATCH 3/4] sql: remove support of NUMERIC type from parser Date: Thu, 7 Mar 2019 16:14:03 +0300 Message-Id: <165f831c61c58debd088b13b7d77de2fade07924.1551964360.git.korablev@tarantool.org> In-Reply-To: References: In-Reply-To: References: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: v.shpilevoy@tarantool.org, Nikita Pettik NMERIC and DECIMAL were allowed to be specified as column types. But in fact, they were just synonyms for FLOAT type and mapped to NUMERIC Tarantool NoSQL type. So, we've decided to remove this type from parser and return back when NUMERIC will be implemented as a native type. Part of #4019 --- extra/mkkeywordhash.c | 6 ++--- src/box/sql/parse.y | 40 ++++++++++++++++++-------------- test/sql-tap/cast.test.lua | 30 ++++++++++++------------ test/sql-tap/default.test.lua | 2 +- test/sql-tap/in1.test.lua | 2 +- test/sql-tap/in3.test.lua | 4 ++-- test/sql-tap/in4.test.lua | 2 +- test/sql-tap/index1.test.lua | 2 +- test/sql-tap/table.test.lua | 2 +- test/sql-tap/tkt1444.test.lua | 2 +- test/sql-tap/whereB.test.lua | 4 ++-- test/sql/drop-index.result | 2 +- test/sql/drop-index.test.lua | 2 +- test/sql/errinj.result | 2 +- test/sql/errinj.test.lua | 2 +- test/sql/gh-2929-primary-key.result | 6 ++--- test/sql/gh-2929-primary-key.test.lua | 6 ++--- test/sql/gh2251-multiple-update.result | 2 +- test/sql/gh2251-multiple-update.test.lua | 2 +- test/sql/persistency.result | 2 +- test/sql/persistency.test.lua | 2 +- test/sql/transition.result | 2 +- test/sql/transition.test.lua | 2 +- 23 files changed, 67 insertions(+), 61 deletions(-) diff --git a/extra/mkkeywordhash.c b/extra/mkkeywordhash.c index 491b81ddd..298c19c47 100644 --- a/extra/mkkeywordhash.c +++ b/extra/mkkeywordhash.c @@ -227,7 +227,7 @@ static Keyword aKeywordTable[] = { { "CURRENT_TIMESTAMP", "TK_STANDARD", RESERVED, true }, { "DATE", "TK_STANDARD", RESERVED, true }, { "DATETIME", "TK_STANDARD", RESERVED, true }, - { "DECIMAL", "TK_DECIMAL", RESERVED, true }, + { "DECIMAL", "TK_STANDARD", RESERVED, true }, { "DECLARE", "TK_STANDARD", RESERVED, true }, { "DENSE_RANK", "TK_STANDARD", RESERVED, true }, { "DESCRIBE", "TK_STANDARD", RESERVED, true }, @@ -248,8 +248,8 @@ static Keyword aKeywordTable[] = { { "LOCALTIME", "TK_STANDARD", RESERVED, true }, { "LOCALTIMESTAMP", "TK_STANDARD", RESERVED, true }, { "LOOP", "TK_STANDARD", RESERVED, true }, - { "NUM", "TK_NUM", RESERVED, true }, - { "NUMERIC", "TK_NUMERIC", RESERVED, true }, + { "NUM", "TK_STANDARD", RESERVED, true }, + { "NUMERIC", "TK_STANDARD", RESERVED, true }, { "OUT", "TK_STANDARD", RESERVED, true }, { "OVER", "TK_STANDARD", RESERVED, true }, { "PARTITION", "TK_STANDARD", RESERVED, true }, diff --git a/src/box/sql/parse.y b/src/box/sql/parse.y index 92788ceb8..8b45eceaf 100644 --- a/src/box/sql/parse.y +++ b/src/box/sql/parse.y @@ -1504,20 +1504,26 @@ typedef(A) ::= number_typedef(A) . number_typedef(A) ::= FLOAT_KW|REAL|DOUBLE . { A.type = FIELD_TYPE_NUMBER; } number_typedef(A) ::= INT|INTEGER_KW . { A.type = FIELD_TYPE_INTEGER; } -%type number_len_typedef {struct type_def} -number_typedef(A) ::= DECIMAL|NUMERIC|NUM number_len_typedef(B) . { - A.type = FIELD_TYPE_NUMBER; - (void) B; -} - -number_len_typedef(A) ::= . { (void) A; } -number_len_typedef(A) ::= LP INTEGER(B) RP . { - (void) A; - (void) B; -} - -number_len_typedef(A) ::= LP INTEGER(B) COMMA INTEGER(C) RP . { - (void) A; - (void) B; - (void) C; -} +/** + * NUMERIC type is temporary disabled. To be enabled when + * it will be implemented as native Tarantool type. + * + * %type number_len_typedef {struct type_def} + * number_typedef(A) ::= DECIMAL|NUMERIC|NUM number_len_typedef(B) . { + * A.type = FIELD_TYPE_NUMBER; + * (void) B; + * } + * + * + * number_len_typedef(A) ::= . { (void) A; } + * number_len_typedef(A) ::= LP INTEGER(B) RP . { + * (void) A; + * (void) B; + * } + * + * number_len_typedef(A) ::= LP INTEGER(B) COMMA INTEGER(C) RP . { + * (void) A; + * (void) B; + * (void) C; + *} + */ diff --git a/test/sql-tap/cast.test.lua b/test/sql-tap/cast.test.lua index f861e4e76..05fa872b5 100755 --- a/test/sql-tap/cast.test.lua +++ b/test/sql-tap/cast.test.lua @@ -67,7 +67,7 @@ test:do_execsql_test( test:do_catchsql_test( "cast-1.5", [[ - SELECT CAST(x'616263' AS numeric) + SELECT CAST(x'616263' AS FLOAT) ]], { -- 1, 'Type mismatch: can not convert abc to number' @@ -147,7 +147,7 @@ test:do_execsql_test( test:do_execsql_test( "cast-1.15", [[ - SELECT CAST(NULL AS numeric) + SELECT CAST(NULL AS FLOAT) ]], { -- "" @@ -157,7 +157,7 @@ test:do_execsql_test( test:do_execsql_test( "cast-1.16", [[ - SELECT typeof(CAST(NULL AS numeric)) + SELECT typeof(CAST(NULL AS FLOAT)) ]], { -- "null" @@ -247,7 +247,7 @@ test:do_execsql_test( test:do_execsql_test( "cast-1.25", [[ - SELECT CAST(123 AS numeric) + SELECT CAST(123 AS FLOAT) ]], { -- 123 @@ -257,7 +257,7 @@ test:do_execsql_test( test:do_execsql_test( "cast-1.26", [[ - SELECT typeof(CAST(123 AS numeric)) + SELECT typeof(CAST(123 AS FLOAT)) ]], { -- "real" @@ -347,7 +347,7 @@ test:do_execsql_test( test:do_execsql_test( "cast-1.35", [[ - SELECT CAST(123.456 AS numeric) + SELECT CAST(123.456 AS FLOAT) ]], { -- 123.456 @@ -357,7 +357,7 @@ test:do_execsql_test( test:do_execsql_test( "cast-1.36", [[ - SELECT typeof(CAST(123.456 AS numeric)) + SELECT typeof(CAST(123.456 AS FLOAT)) ]], { -- "real" @@ -447,7 +447,7 @@ test:do_execsql_test( test:do_catchsql_test( "cast-1.45", [[ - SELECT CAST('123abc' AS numeric) + SELECT CAST('123abc' AS FLOAT) ]], { -- 1, 'Type mismatch: can not convert 123abc to number' @@ -477,7 +477,7 @@ test:do_catchsql_test( test:do_catchsql_test( "cast-1.51", [[ - SELECT CAST('123.5abc' AS numeric) + SELECT CAST('123.5abc' AS FLOAT) ]], { -- 1, 'Type mismatch: can not convert 123.5abc to number' @@ -625,7 +625,7 @@ test:do_execsql_test( test:do_execsql_test( "cast-3.2", [[ - SELECT CAST(9223372036854774800 AS numeric) + SELECT CAST(9223372036854774800 AS FLOAT) ]], { -- 9223372036854774784 @@ -660,7 +660,7 @@ test:do_execsql_test( test:do_execsql_test( "cast-3.6", [[ - SELECT CAST(-9223372036854774800 AS numeric) + SELECT CAST(-9223372036854774800 AS float) ]], { -- -9223372036854774784 @@ -695,7 +695,7 @@ test:do_execsql_test( test:do_execsql_test( "cast-3.12", [[ - SELECT CAST('9223372036854774800' AS numeric) + SELECT CAST('9223372036854774800' AS FLOAT) ]], { -- 9223372036854774784 @@ -732,7 +732,7 @@ test:do_execsql_test( test:do_execsql_test( "cast-3.16", [[ - SELECT CAST('-9223372036854774800' AS numeric) + SELECT CAST('-9223372036854774800' AS FLOAT) ]], { -- -9223372036854774784 @@ -770,7 +770,7 @@ if true then --test:execsql("PRAGMA encoding")[1][1]=="UTF-8" then test:do_execsql_test( "cast-3.22", [[ - SELECT CAST(x'39323233333732303336383534373734383030' AS numeric) + SELECT CAST(x'39323233333732303336383534373734383030' AS FLOAT) ]], { -- 9223372036854774784 @@ -796,7 +796,7 @@ end test:do_execsql_test( "case-3.31", [[ - SELECT CAST(NULL AS numeric) + SELECT CAST(NULL AS FLOAT) ]], { -- "" diff --git a/test/sql-tap/default.test.lua b/test/sql-tap/default.test.lua index e0dbb9145..349bcdf6c 100755 --- a/test/sql-tap/default.test.lua +++ b/test/sql-tap/default.test.lua @@ -105,7 +105,7 @@ test:do_execsql_test( b INT DEFAULT 12345 UNIQUE NOT NULL CHECK( b>=0 AND b<99999 ), c VARCHAR(123) DEFAULT 'hello' NOT NULL, d REAL, - e NUMERIC(5,10) DEFAULT 4.36, + e FLOAT DEFAULT 4.36, f VARCHAR(15), --COLLATE RTRIM, g INTEGER DEFAULT( 3600*12 ) ); diff --git a/test/sql-tap/in1.test.lua b/test/sql-tap/in1.test.lua index 41c0e0dae..835c10dd5 100755 --- a/test/sql-tap/in1.test.lua +++ b/test/sql-tap/in1.test.lua @@ -623,7 +623,7 @@ test:do_catchsql_test( test:do_execsql_test( "in-11.1", [[ - CREATE TABLE t6(a INT PRIMARY KEY,b NUMERIC); + CREATE TABLE t6(a INT PRIMARY KEY,b FLOAT); INSERT INTO t6 VALUES(1,2); INSERT INTO t6 VALUES(2,3); SELECT * FROM t6 WHERE b IN (2); diff --git a/test/sql-tap/in3.test.lua b/test/sql-tap/in3.test.lua index 41f08c8a0..18f57fa47 100755 --- a/test/sql-tap/in3.test.lua +++ b/test/sql-tap/in3.test.lua @@ -271,12 +271,12 @@ test:do_test( DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1; - CREATE TABLE t1(id INT primary key, a BLOB, b NUMERIC ,c TEXT); + CREATE TABLE t1(id INT primary key, a BLOB, b FLOAT ,c TEXT); CREATE UNIQUE INDEX t1_i1 ON t1(a); /* no affinity */ CREATE UNIQUE INDEX t1_i2 ON t1(b); /* numeric affinity */ CREATE UNIQUE INDEX t1_i3 ON t1(c); /* text affinity */ - CREATE TABLE t2(id INT primary key, x BLOB, y NUMERIC, z TEXT); + CREATE TABLE t2(id INT primary key, x BLOB, y FLOAT, z TEXT); CREATE UNIQUE INDEX t2_i1 ON t2(x); /* no affinity */ CREATE UNIQUE INDEX t2_i2 ON t2(y); /* numeric affinity */ CREATE UNIQUE INDEX t2_i3 ON t2(z); /* text affinity */ diff --git a/test/sql-tap/in4.test.lua b/test/sql-tap/in4.test.lua index c488cde45..9d488745d 100755 --- a/test/sql-tap/in4.test.lua +++ b/test/sql-tap/in4.test.lua @@ -588,7 +588,7 @@ test:do_execsql_test( test:do_execsql_test( "in4-4.11", [[ - CREATE TABLE t4b(a TEXT, b NUMERIC, c INT PRIMARY KEY); + CREATE TABLE t4b(a TEXT, b FLOAT, c INT PRIMARY KEY); INSERT INTO t4b VALUES('1.0',1,4); SELECT c FROM t4b WHERE a=b; ]], { diff --git a/test/sql-tap/index1.test.lua b/test/sql-tap/index1.test.lua index 2ed1451ac..fa97018d7 100755 --- a/test/sql-tap/index1.test.lua +++ b/test/sql-tap/index1.test.lua @@ -605,7 +605,7 @@ end test:do_execsql_test( "index-12.1", [[ - CREATE TABLE t4(id INT primary key, a NUM,b INT ); + CREATE TABLE t4(id INT primary key, a FLOAT,b INT ); INSERT INTO t4 VALUES(1, '0.0',1); INSERT INTO t4 VALUES(2, '0.00',2); INSERT INTO t4 VALUES(4, '-1.0',4); diff --git a/test/sql-tap/table.test.lua b/test/sql-tap/table.test.lua index 9c4048d4c..1583890da 100755 --- a/test/sql-tap/table.test.lua +++ b/test/sql-tap/table.test.lua @@ -892,7 +892,7 @@ test:do_execsql_test( [[ CREATE TABLE t7( a integer primary key, - b numeric(5,10), + b FLOAT, c VARCHAR(8), d VARCHAR(9), e blob, diff --git a/test/sql-tap/tkt1444.test.lua b/test/sql-tap/tkt1444.test.lua index 8def87e86..563bf3c07 100755 --- a/test/sql-tap/tkt1444.test.lua +++ b/test/sql-tap/tkt1444.test.lua @@ -28,7 +28,7 @@ test:plan(4) test:do_execsql_test( "tkt1444-1.1", [[ - CREATE TABLE DemoTable (id INT primary key, x INTEGER, TextKey TEXT, DKey NUM); + CREATE TABLE DemoTable (id INT primary key, x INTEGER, TextKey TEXT, DKey FLOAT); CREATE INDEX DemoTableIdx ON DemoTable (TextKey); INSERT INTO DemoTable VALUES(1, 9,8,7); INSERT INTO DemoTable VALUES(2, 1,2,3); diff --git a/test/sql-tap/whereB.test.lua b/test/sql-tap/whereB.test.lua index 84c9cd990..6ecc3cc5d 100755 --- a/test/sql-tap/whereB.test.lua +++ b/test/sql-tap/whereB.test.lua @@ -321,7 +321,7 @@ test:do_execsql_test( CREATE TABLE t1(x INT primary key, y BLOB); -- affinity of t1.y is NONE INSERT INTO t1 VALUES(1,'99'); - CREATE TABLE t2(a INT primary key, b NUMERIC); -- affinity of t2.b is NUMERIC + CREATE TABLE t2(a INT primary key, b FLOAT); -- affinity of t2.b is NUMERIC CREATE INDEX t2b ON t2(b); INSERT INTO t2 VALUES(2,99); @@ -618,7 +618,7 @@ test:do_execsql_test( DROP TABLE t1; DROP TABLE t2; - CREATE TABLE t1(x INT primary key, y NUMERIC); -- affinity of t1.y is NUMERIC + CREATE TABLE t1(x INT primary key, y FLOAT); -- affinity of t1.y is NUMERIC INSERT INTO t1 VALUES(1,99); CREATE TABLE t2(a INT primary key, b BLOB); -- affinity of t2.b is NONE diff --git a/test/sql/drop-index.result b/test/sql/drop-index.result index 8cd667bec..2590b74cb 100644 --- a/test/sql/drop-index.result +++ b/test/sql/drop-index.result @@ -9,7 +9,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'') ... -- box.cfg() -- create space -box.sql.execute("CREATE TABLE zzoobar (c1 NUM, c2 INT PRIMARY KEY, c3 TEXT, c4 NUM)") +box.sql.execute("CREATE TABLE zzoobar (c1 FLOAT, c2 INT PRIMARY KEY, c3 TEXT, c4 FLOAT)") --- ... 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 4fa7b9867..2493299b0 100644 --- a/test/sql/drop-index.test.lua +++ b/test/sql/drop-index.test.lua @@ -5,7 +5,7 @@ box.sql.execute('pragma sql_default_engine=\''..engine..'\'') -- box.cfg() -- create space -box.sql.execute("CREATE TABLE zzoobar (c1 NUM, c2 INT PRIMARY KEY, c3 TEXT, c4 NUM)") +box.sql.execute("CREATE TABLE zzoobar (c1 FLOAT, c2 INT PRIMARY KEY, c3 TEXT, c4 FLOAT)") 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/errinj.result b/test/sql/errinj.result index c423c8bc6..0f6075b13 100644 --- a/test/sql/errinj.result +++ b/test/sql/errinj.result @@ -239,7 +239,7 @@ box.sql.execute("DROP TABLE t2;") -- Tests which are aimed at verifying work of commit/rollback -- triggers on _fk_constraint space. -- -box.sql.execute("CREATE TABLE t3 (id NUMERIC PRIMARY KEY, a INT REFERENCES t3, b INT UNIQUE);") +box.sql.execute("CREATE TABLE t3 (id FLOAT PRIMARY KEY, a INT REFERENCES t3, b INT UNIQUE);") --- ... t = box.space._fk_constraint:select{}[1]:totable() diff --git a/test/sql/errinj.test.lua b/test/sql/errinj.test.lua index 8378c255c..6c9311b5a 100644 --- a/test/sql/errinj.test.lua +++ b/test/sql/errinj.test.lua @@ -88,7 +88,7 @@ box.sql.execute("DROP TABLE t2;") -- Tests which are aimed at verifying work of commit/rollback -- triggers on _fk_constraint space. -- -box.sql.execute("CREATE TABLE t3 (id NUMERIC PRIMARY KEY, a INT REFERENCES t3, b INT UNIQUE);") +box.sql.execute("CREATE TABLE t3 (id FLOAT PRIMARY KEY, a INT REFERENCES t3, b INT UNIQUE);") t = box.space._fk_constraint:select{}[1]:totable() errinj = box.error.injection errinj.set("ERRINJ_WAL_IO", true) diff --git a/test/sql/gh-2929-primary-key.result b/test/sql/gh-2929-primary-key.result index 280e90002..405266583 100644 --- a/test/sql/gh-2929-primary-key.result +++ b/test/sql/gh-2929-primary-key.result @@ -20,15 +20,15 @@ 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 NUM)") +box.sql.execute("CREATE TABLE t3(a FLOAT)") --- - error: PRIMARY KEY missing on table T3 ... -box.sql.execute("CREATE TABLE t4(a DECIMAL, b TEXT)") +box.sql.execute("CREATE TABLE t4(a FLOAT, b TEXT)") --- - error: PRIMARY KEY missing on table T4 ... -box.sql.execute("CREATE TABLE t5(a DECIMAL, b NUM UNIQUE)") +box.sql.execute("CREATE TABLE t5(a FLOAT, b FLOAT 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 a1446b2e5..6c2f0eb10 100644 --- a/test/sql/gh-2929-primary-key.test.lua +++ b/test/sql/gh-2929-primary-key.test.lua @@ -11,9 +11,9 @@ box.cfg{} 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 NUM)") -box.sql.execute("CREATE TABLE t4(a DECIMAL, b TEXT)") -box.sql.execute("CREATE TABLE t5(a DECIMAL, b NUM UNIQUE)") +box.sql.execute("CREATE TABLE t3(a FLOAT)") +box.sql.execute("CREATE TABLE t4(a FLOAT, b TEXT)") +box.sql.execute("CREATE TABLE t5(a FLOAT, b FLOAT UNIQUE)") box.sql.execute("DROP TABLE t1") diff --git a/test/sql/gh2251-multiple-update.result b/test/sql/gh2251-multiple-update.result index 7066ca99f..e6380a0ee 100644 --- a/test/sql/gh2251-multiple-update.result +++ b/test/sql/gh2251-multiple-update.result @@ -26,7 +26,7 @@ box.sql.execute("SELECT e FROM t1") - - [7] - [8] ... -box.sql.execute("CREATE TABLE t2(a integer primary key, b INT UNIQUE, c NUM, d NUM, e INT, UNIQUE(c,d));") +box.sql.execute("CREATE TABLE t2(a integer primary key, b INT UNIQUE, c FLOAT, d FLOAT, 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 6107125d7..656ed72e4 100644 --- a/test/sql/gh2251-multiple-update.test.lua +++ b/test/sql/gh2251-multiple-update.test.lua @@ -13,7 +13,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 INT UNIQUE, c NUM, d NUM, e INT, UNIQUE(c,d));") +box.sql.execute("CREATE TABLE t2(a integer primary key, b INT UNIQUE, c FLOAT, d FLOAT, 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/persistency.result b/test/sql/persistency.result index 09f8eab29..31c844f88 100644 --- a/test/sql/persistency.result +++ b/test/sql/persistency.result @@ -125,7 +125,7 @@ box.sql.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'") ... -- multi-index -- create space -box.sql.execute("CREATE TABLE barfoo (bar TEXT, foo NUM PRIMARY KEY)") +box.sql.execute("CREATE TABLE barfoo (bar TEXT, foo FLOAT PRIMARY KEY)") --- ... box.sql.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)") diff --git a/test/sql/persistency.test.lua b/test/sql/persistency.test.lua index e7b137b44..67659e881 100644 --- a/test/sql/persistency.test.lua +++ b/test/sql/persistency.test.lua @@ -41,7 +41,7 @@ box.sql.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'") -- multi-index -- create space -box.sql.execute("CREATE TABLE barfoo (bar TEXT, foo NUM PRIMARY KEY)") +box.sql.execute("CREATE TABLE barfoo (bar TEXT, foo FLOAT PRIMARY KEY)") box.sql.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)") -- prepare data diff --git a/test/sql/transition.result b/test/sql/transition.result index 04721596a..e7613c344 100644 --- a/test/sql/transition.result +++ b/test/sql/transition.result @@ -122,7 +122,7 @@ box.sql.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'") ... -- multi-index -- create space -box.sql.execute("CREATE TABLE barfoo (bar TEXT, foo NUM PRIMARY KEY)") +box.sql.execute("CREATE TABLE barfoo (bar TEXT, foo FLOAT PRIMARY KEY)") --- ... box.sql.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)") diff --git a/test/sql/transition.test.lua b/test/sql/transition.test.lua index 5a7010d93..276ff7174 100644 --- a/test/sql/transition.test.lua +++ b/test/sql/transition.test.lua @@ -40,7 +40,7 @@ box.sql.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'") -- multi-index -- create space -box.sql.execute("CREATE TABLE barfoo (bar TEXT, foo NUM PRIMARY KEY)") +box.sql.execute("CREATE TABLE barfoo (bar TEXT, foo FLOAT PRIMARY KEY)") box.sql.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)") -- prepare data -- 2.15.1