From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 331299387A; Thu, 21 Jan 2021 15:51:17 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 331299387A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1611233477; bh=E/hz/WO/PnLXov9Koj6aTVZdadD5XMsgCuX/lo/uVCA=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=s9T5y8v577kQp8V5zaWD8tx/WzvkmNKdF4QtLJmmpDCTDjx+zGpCRoVdpyRQtvmvr ug1FPCcCtQb/BhoqOSqftK3sMZ2jW79F3WNHAnOB6GkGVATIOnCx+7SuGbQ0yFGpoq YpNVAlLCqiymSBH3tWHvEdqfG9GMhzOMmf8yxQa8= 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 dev.tarantool.org (Postfix) with ESMTPS id 7C4976465D for ; Thu, 21 Jan 2021 15:50:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7C4976465D Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1l2ZPq-0007wD-Cb; Thu, 21 Jan 2021 15:50:22 +0300 To: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org Date: Thu, 21 Jan 2021 15:49:55 +0300 Message-Id: <8990b58be43c6ddf0b470cb2a9f8db40df484e67.1611232655.git.sergeyb@tarantool.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9FAB20BF8F075903611E4AAC87D4D1F5ADD85E7A24115F22B182A05F538085040E2DA430C5A4965E040C428F1695A7C4318E621F9CD7E51EEF10A9AD6CD22E7A5 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7DA1A6500DE61AB7AEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637B3FBAE160100E6228638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCEB69F05919F51CB496CD3184EF87B19A93CFA0C31E8A8537389733CBF5DBD5E913377AFFFEAFD269A417C69337E82CC2CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92A417C69337E82CC2CC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FC6F009C1859321A3875ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE4931B544F03EFBC4D57C2546860BDEA057BC4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F05F538519369F3743B503F486389A921A5CC5B56E945C8DA X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C2549B6A8B600A67A9BD06D41576711234766892A886541E29C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EF6EA1BA7CA28B4A74699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34A2EC120135420F901CD6432EB107AACFCD4B28B689ED1BC4928C85394214408ED7B45BC60320FDBF1D7E09C32AA3244CA223C4249CB871EE591E9A67CA1C94005A1673A01BA68E40927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojYT//mZRaUegBxr7L0vCjIw== X-Mailru-Sender: 689FA8AB762F73936BC43F508A06382268FBC65EA77DE086EA079A106DA96FA8DD788429FD8613638ED9BB8B05EE7B3AFB559BB5D741EB96D19CD4E7312BAA970A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH v8 02/14] test: remove functions to open and close SQL connection X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: sergeyb@tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" From: Sergey Bronnikov Part of #5464 Closes #5741 --- test/sql-tap/aggnested.test.lua | 1 - test/sql-tap/autoinc.test.lua | 2 -- test/sql-tap/check.test.lua | 2 -- test/sql-tap/colname.test.lua | 2 -- test/sql-tap/e_expr.test.lua | 5 ----- test/sql-tap/eqp.test.lua | 2 -- test/sql-tap/index4.test.lua | 2 -- test/sql-tap/misc1.test.lua | 6 ------ test/sql-tap/misc5.test.lua | 1 - test/sql-tap/numcast.test.lua | 2 -- test/sql-tap/sort.test.lua | 8 -------- test/sql-tap/table.test.lua | 6 ------ test/sql-tap/tkt1443.test.lua | 1 - test/sql-tap/view.test.lua | 18 ++---------------- 14 files changed, 2 insertions(+), 56 deletions(-) diff --git a/test/sql-tap/aggnested.test.lua b/test/sql-tap/aggnested.test.lua index 8a79e0df2..37471f48a 100755 --- a/test/sql-tap/aggnested.test.lua +++ b/test/sql-tap/aggnested.test.lua @@ -73,7 +73,6 @@ test:do_execsql_test("aggnested-1.4", -- # http://www.mail-archive.com/sql-users@sql.org/msg70787.html -- # -- do_test aggnested-2.0 { --- sql db2 :memory: -- db2 eval { -- CREATE TABLE t1 (A1 INTEGER NOT NULL,A2 INTEGER NOT NULL,A3 INTEGER NOT -- NULL,A4 INTEGER NOT NULL,PRIMARY KEY(A1)); diff --git a/test/sql-tap/autoinc.test.lua b/test/sql-tap/autoinc.test.lua index 0ea1961fd..3f8000abd 100755 --- a/test/sql-tap/autoinc.test.lua +++ b/test/sql-tap/autoinc.test.lua @@ -52,8 +52,6 @@ test:do_execsql_test( -- test:do_test( -- "autoinc-1.4", -- function() --- db("close") --- sql("db", "test.db") -- return test:execsql([[ -- SELECT * FROM _sequence; -- ]]) diff --git a/test/sql-tap/check.test.lua b/test/sql-tap/check.test.lua index cd9f24796..6ecfedeb8 100755 --- a/test/sql-tap/check.test.lua +++ b/test/sql-tap/check.test.lua @@ -227,8 +227,6 @@ test:do_execsql_test( -- }) ---db("close") ---sql("db", "test.db") test:do_execsql_test( "check-2.3", [[ diff --git a/test/sql-tap/colname.test.lua b/test/sql-tap/colname.test.lua index 191396bcc..44fa4cf89 100755 --- a/test/sql-tap/colname.test.lua +++ b/test/sql-tap/colname.test.lua @@ -435,8 +435,6 @@ test:do_execsql2_test( test:do_test( "colname-6.1", function() - --db("close") - --sql("db", "test.db") -- instead of reconnect to database -- we are just turning settings to default state test:execsql([[ diff --git a/test/sql-tap/e_expr.test.lua b/test/sql-tap/e_expr.test.lua index f5b58cb79..81b08e223 100755 --- a/test/sql-tap/e_expr.test.lua +++ b/test/sql-tap/e_expr.test.lua @@ -2170,8 +2170,6 @@ test:do_test( "def", "abc", "X" -- }) ---db("close") ---sql("db", "test.db") -- EVIDENCE-OF: R-22868-25880 The LIKE operator can be made case -- sensitive using the case_sensitive_like pragma. -- @@ -3245,9 +3243,6 @@ end --------------------------------------------------------------------------- -- Test statements related to scalar sub-queries. -- --- catch { db close } --- forcedelete test.db --- sql db test.db test:catchsql "DROP TABLE t22;" test:do_execsql_test( "e_expr-35.0", diff --git a/test/sql-tap/eqp.test.lua b/test/sql-tap/eqp.test.lua index 6519fc4e9..6f08ca089 100755 --- a/test/sql-tap/eqp.test.lua +++ b/test/sql-tap/eqp.test.lua @@ -754,8 +754,6 @@ if (0 > 0) ANALYZE; ]]) - --db("close") - --sql("db", "test.db") test:do_eqp_test("7.4", "SELECT count(*) FROM t1", { {0, 0, 0, "SCAN TABLE T1"} }) diff --git a/test/sql-tap/index4.test.lua b/test/sql-tap/index4.test.lua index 4ea713a58..1019e0c89 100755 --- a/test/sql-tap/index4.test.lua +++ b/test/sql-tap/index4.test.lua @@ -58,8 +58,6 @@ test:do_execsql_test( -- MUST_WORK_TEST limit memory --soft_limit = sql_soft_heap_limit(50000) ---db("close") ---sql("db", "test.db") --test:do_execsql_test( -- 1.4, -- [[ diff --git a/test/sql-tap/misc1.test.lua b/test/sql-tap/misc1.test.lua index c9b9cd7a8..7d928bea0 100755 --- a/test/sql-tap/misc1.test.lua +++ b/test/sql-tap/misc1.test.lua @@ -1062,8 +1062,6 @@ test:do_catchsql_test( -- # 2015-04-19: NULL pointer dereference on a corrupt schema -- # --- db close --- sql db :memory: -- do_execsql_test misc1-23.1 { -- CREATE TABLE t1(x INT ); -- UPDATE sql_master SET sql='CREATE table t(d CHECK(T(#0)'; @@ -1074,9 +1072,7 @@ test:do_catchsql_test( -- } {} -- # 2015-04-19: Faulty assert() statement -- # --- db close -- database_may_be_corrupt --- sql db :memory: -- do_catchsql_test misc1-23.2 { -- CREATE TABLE t1(x INT UNIQUE); -- UPDATE sql_master SET sql='CREATE TABLE IF not EXISTS t(c)'; @@ -1085,8 +1081,6 @@ test:do_catchsql_test( -- ROLLBACK; -- DROP TABLE F; -- } {1 {no such table: F}} --- db close --- sql db :memory: -- do_catchsql_test misc1-23.3 { -- CREATE TABLE t1(x INT UNIQUE); -- UPDATE sql_master SET sql='CREATE table y(a TEXT, a TEXT)'; diff --git a/test/sql-tap/misc5.test.lua b/test/sql-tap/misc5.test.lua index 357c36ff6..4bc18aa87 100755 --- a/test/sql-tap/misc5.test.lua +++ b/test/sql-tap/misc5.test.lua @@ -308,7 +308,6 @@ test:do_test( -- # schema. -- # -- do_test misc5-7.2 { --- sql db2 :memory: -- catchsql { -- CREATE TABLE t1(x INT UNIQUE); -- UPDATE sql_master SET sql='CREATE table t(o CHECK(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((;VALUES(o)'; diff --git a/test/sql-tap/numcast.test.lua b/test/sql-tap/numcast.test.lua index 18c6adc9e..6ca1316d5 100755 --- a/test/sql-tap/numcast.test.lua +++ b/test/sql-tap/numcast.test.lua @@ -26,8 +26,6 @@ for _, enc in ipairs({"utf8"}) do test:do_test( "numcast-"..enc..".0", function() - --db("close") - --sql("db", ":memory:") --test:execsql("PRAGMA encoding='"..enc.."'") local x = "utf8"--test:execsql("PRAGMA encoding")[1] x = string.lower(x) diff --git a/test/sql-tap/sort.test.lua b/test/sql-tap/sort.test.lua index 065f648b7..5a951b0e9 100755 --- a/test/sql-tap/sort.test.lua +++ b/test/sql-tap/sort.test.lua @@ -805,8 +805,6 @@ box.internal.sql_create_function("cksum", cksum) --------------------------------------------------------------------------- -- for _ in X(0, "X!foreach", [=[["tn mmap_limit nWorker tmpstore coremutex fakeheap softheaplimit","\n 1 0 3 file true false 0\n 2 0 3 file true true 0\n 3 0 0 file true false 0\n 4 1000000 3 file true false 0\n 5 0 0 memory false true 0\n 6 0 0 file false true 1000000 \n 7 0 0 file false true 10000\n "]]=]) do - db("close") - sql_shutdown() if coremutex then sql_config("multithread") else @@ -815,7 +813,6 @@ box.internal.sql_create_function("cksum", cksum) sql_initialize() X(558, "X!cmd", [=[["sorter_test_fakeheap",["fakeheap"]]]=]) sql_soft_heap_limit(softheaplimit) - reset_db() sql_test_control("sql_TESTCTRL_SORTER_MMAP", "db", mmap_limit) test:execsql(string.format("PRAGMA temp_store = %s; PRAGMA threads = '%s'", tmpstore, nWorker)) local ten, one @@ -870,15 +867,12 @@ box.internal.sql_create_function("cksum", cksum) X(605, "X!cmd", [=[["sorter_test_fakeheap","0"]]=]) end - db("close") - sql_shutdown() X(617, "X!cmd", [=[["set","t(0)","singlethread"]]=]) X(618, "X!cmd", [=[["set","t(1)","multithread"]]=]) X(619, "X!cmd", [=[["set","t(2)","serialized"]]=]) sql_config(X(620, "X!expr", [=[["t($sql_options(threadsafe))"]]=])) sql_initialize() sql_soft_heap_limit(0) - reset_db() test:do_catchsql_test( 16.1, [[ @@ -895,7 +889,6 @@ box.internal.sql_create_function("cksum", cksum) -- }) - reset_db() test:do_catchsql_test( 16.2, [[ @@ -912,7 +905,6 @@ box.internal.sql_create_function("cksum", cksum) -- }) - reset_db() test:do_execsql_test( 17.1, [[ diff --git a/test/sql-tap/table.test.lua b/test/sql-tap/table.test.lua index 590dbafbd..6e45dbab1 100755 --- a/test/sql-tap/table.test.lua +++ b/test/sql-tap/table.test.lua @@ -422,9 +422,6 @@ if (0 > 0) test:do_test( "table-5.2.2", function() - db("close") - forcedelete("test.db") - sql("db", "test.db") return test:execsql [[ CREATE TABLE t0(a,b); CREATE INDEX t ON t0(a); @@ -440,9 +437,6 @@ if (0 > 0) -- }) - db("close") - forcedelete("test.db") - sql("db", "test.db") X(313, "X!cmd", [=[["Make","sure","an","EXPLAIN","does","not","really","create","a","new","table"]]=]) end test:do_test( diff --git a/test/sql-tap/tkt1443.test.lua b/test/sql-tap/tkt1443.test.lua index f0776285f..d1d837e72 100755 --- a/test/sql-tap/tkt1443.test.lua +++ b/test/sql-tap/tkt1443.test.lua @@ -50,7 +50,6 @@ test:plan(3) test:do_test( "tkt1443-1.0", function() - --sql("db", ":memory:") return test:execsql(string.format([[ CREATE TABLE Items( itemId integer primary key, diff --git a/test/sql-tap/view.test.lua b/test/sql-tap/view.test.lua index 4d85d8bcb..2f1af29b0 100755 --- a/test/sql-tap/view.test.lua +++ b/test/sql-tap/view.test.lua @@ -88,8 +88,6 @@ test:do_execsql_test( test:do_test( "view-1.3.1", function() - --db("close") - --sql("db", "test.db") return test:execsql [[ SELECT * FROM v1 ORDER BY a; ]] @@ -502,14 +500,12 @@ test:do_execsql_test( -- }) --- MUST_WORK_TEST db close problem +-- MUST_WORK_TEST if (0 > 0) then test:do_test( "view-7.2", function() - db("close") - sql("db", "test.db") return test:execsql [[ SELECT * FROM test; ]] @@ -540,8 +536,6 @@ if (0 > 0) test:do_test( "view-7.4", function() - db("close") - sql("db", "test.db") return test:execsql [[ SELECT * FROM test; ]] @@ -572,8 +566,6 @@ if (0 > 0) test:do_test( "view-7.6", function() - db("close") - sql("db", "test.db") return test:execsql [[ SELECT * FROM test; ]] @@ -595,14 +587,12 @@ test:do_execsql_test( -- }) --- MUST_WORK_TEST db close +-- MUST_WORK_TEST if (0 > 0) then test:do_test( "view-8.2", function() - db("close") - sql("db", "test.db") return test:execsql [[ SELECT * FROM v6 ORDER BY xyz; ]] @@ -1068,8 +1058,6 @@ test:do_execsql_test( if (0 > 0) then -- Ticket #d58ccbb3f1b"]],":"],"Prevent","Table.nRef","overflow. - --db("close") - --sql("db", ":memory:") test:execsql([[ drop view v1; drop view v2; @@ -1120,8 +1108,6 @@ if (0 > 0) - --db("close") - --sql("db", ":memory:") test:do_execsql_test( "view-22.1", [[ -- 2.25.1