Skip to content
Snippets Groups Projects
Commit 35052b97 authored by Kirill Yukhin's avatar Kirill Yukhin
Browse files

sql: Fix test

Use `net.box` instead of `console`.
parent 0bf0a00c
No related branches found
No related tags found
No related merge requests found
......@@ -22,14 +22,17 @@ box.sql.execute([[SELECT * FROM t]])
...
test_run:cmd('restart server default');
-- Connect to ourself
require('console').connect(os.getenv("LISTEN"))
c = require('net.box').connect(os.getenv("LISTEN"))
---
- true
...
-- This segfaults due to gh-2483 since
-- before the patch sql schema was read on-demand.
-- Which could obviously lead to access denied error.
box.sql.execute([[SELECT * FROM t]])
c:eval([[ return box.sql.execute('SELECT * FROM t') ]])
---
- [[1]]
...
-- sql.execute([[SELECT * FROM t]])
box.sql.execute([[DROP TABLE t]])
---
- - [1]
...
......@@ -14,9 +14,12 @@ box.sql.execute([[SELECT * FROM t]])
test_run:cmd('restart server default');
-- Connect to ourself
require('console').connect(os.getenv("LISTEN"))
c = require('net.box').connect(os.getenv("LISTEN"))
-- This segfaults due to gh-2483 since
-- before the patch sql schema was read on-demand.
-- Which could obviously lead to access denied error.
box.sql.execute([[SELECT * FROM t]])
c:eval([[ return box.sql.execute('SELECT * FROM t') ]])
-- sql.execute([[SELECT * FROM t]])
box.sql.execute([[DROP TABLE t]])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment