[tarantool-patches] Re: [PATCH v1 1/1] sql: added tests for TEMP and TEMPORARY clauses

roman.habibov1 at yandex.ru roman.habibov1 at yandex.ru
Sat May 19 02:44:00 MSK 2018



14.05.2018, 17:50, "n.pettik" <korablev at tarantool.org>:
>>  + CREATE TEMP TABLE t1(col1 int, col2 int);
>>  + CREATE TEMPORARY TABLE t1(col1 int, col2 int);
>
> You can’t create table this way: you must specify primary key.
diff --git a/test/sql-tap/table.test.lua b/test/sql-tap/table.test.lua
index f0a1cbc..b0e99b0 100755
--- a/test/sql-tap/table.test.lua
+++ b/test/sql-tap/table.test.lua
@@ -617,7 +617,7 @@ test:do_execsql2_test(
 test:do_catchsql_test(
 	"temp",
 	[[
-		CREATE TEMP TABLE t1(col1 int, col2 int);
+		CREATE TEMP TABLE t1(a INTEGER PRIMARY KEY, b VARCHAR(10));
 	]], {
 	-- <temp>
 	1, "near \"TEMP\": syntax error"
@@ -627,7 +627,7 @@ test:do_catchsql_test(
 test:do_catchsql_test(
 	"temporary",
 	[[
-		CREATE TEMPORARY TABLE t1(col1 int, col2 int);
+		CREATE TEMPORARY TABLE t1(a INTEGER PRIMARY KEY, b VARCHAR(10));
 	]], {
 	-- <temporary>
 	1, "near \"TEMPORARY\": syntax error"




More information about the Tarantool-patches mailing list