[Tarantool-patches] [PATCH] sql: fix assertion fail when selecting from _vfunc

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sat Dec 21 00:10:35 MSK 2019


Hi! Thanks for the patch!

See my review fixes below and on the branch in a separate
commit. Please, review them. If the fixes are ok, then squash
with your commit, and it will LGTM. Otherwise lets discuss.

===============================================================

commit 29230b80b7e80101ed9d47f1ddf63ce6deaafbbd
Author: Vladislav Shpilevoy <v.shpilevoy at tarantool.org>
Date:   Fri Dec 20 22:05:15 2019 +0100

    Review fixes

diff --git a/test/sql/engine.cfg b/test/sql/engine.cfg
index 284c42082..5e8199ad8 100644
--- a/test/sql/engine.cfg
+++ b/test/sql/engine.cfg
@@ -5,6 +5,7 @@
     "sql-debug.test.lua": {
         "memtx": {"engine": "memtx"}
     },
+    "gh-4666-sql-select-from-vfunc.test.lua": { },
===============================================================

By that setting I tell test-run that no matter which other
rules that file matches, it should run only once, without any
settings. I did it to overwrite the '*' rule below.

===============================================================
     "bind.test.lua": {
         "remote": {"remote": "true"},
         "local": {"remote": "false"}
diff --git a/test/sql/gh-4666-sql-select-from-vfunc.result b/test/sql/gh-4666-sql-select-from-vfunc.result
index 16876e740..13262113e 100644
--- a/test/sql/gh-4666-sql-select-from-vfunc.result
+++ b/test/sql/gh-4666-sql-select-from-vfunc.result
@@ -1,14 +1,6 @@
-test_run = require('test_run').new()
----
-...
-engine = test_run:get_cfg('engine')
----
-...
-box.execute('pragma sql_default_engine=\''..engine..'\'')
----
-- row_count: 0
-...
===============================================================

Since we do not create any spaces here, engine does not matter.
So I dropped it. After drop of the engine, test_run appeared to
be unused, so I dropped it too.

===============================================================
--- Make sure assertion does not fail
+--
+-- Make sure assertion does not fail.
+--
 box.execute([[select count(*)&0 from "_vfunc";]])
 ---
 - metadata:
diff --git a/test/sql/gh-4666-sql-select-from-vfunc.test.lua b/test/sql/gh-4666-sql-select-from-vfunc.test.lua
index be227d119..cca30abe5 100644
--- a/test/sql/gh-4666-sql-select-from-vfunc.test.lua
+++ b/test/sql/gh-4666-sql-select-from-vfunc.test.lua
@@ -1,7 +1,4 @@
-test_run = require('test_run').new()
-engine = test_run:get_cfg('engine')
-box.execute('pragma sql_default_engine=\''..engine..'\'')
-
--- Make sure assertion does not fail
-
+--
+-- Make sure assertion does not fail.
+--
 box.execute([[select count(*)&0 from "_vfunc";]])


More information about the Tarantool-patches mailing list