Skip to content
Snippets Groups Projects
Commit 2be3151c authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

Fix net_sql.mysql.test

parent 7fec9e34
No related branches found
No related tags found
No related merge requests found
lua c = box.net.sql.connect('abcd')
---
error: '[string "-- sql.lua (internal file)..."]:29: Unknown driver ''abcd'''
error: '../../src/module/sql/sql.lua:29: Unknown driver ''abcd'''
...
lua c = box.net.sql.connect('mysql')
---
error: '[string "-- sql.lua (internal file)..."]:64: Usage: box.net.sql.connect(''mysql'', host, port, user, password, db, ...)'
error: '../../src/module/sql/sql.lua:64: Usage: box.net.sql.connect(''mysql'', host, port, user, password, db, ...)'
...
lua dump = function(v) return box.cjson.encode(v) end
---
......@@ -33,7 +33,7 @@ port: string
...
lua c:execute('SEL ECT 1')
---
error: '[string "-- sql.lua (internal file)..."]:105: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''SEL ECT 1'' at line 1'
error: '../../src/module/sql/sql.lua:105: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''SEL ECT 1'' at line 1'
...
lua dump({c:execute('SELECT ? AS bool1, ? AS bool2, ? AS nil, ? AS num, ? AS str', true, false, nil, 123, 'abc')})
---
......
......@@ -11,6 +11,7 @@ server.stop()
server.deploy(init_lua="module/net_sql.mysql.lua")
exec admin "lua c = box.net.sql.connect('abcd')"
exec admin "lua c = box.net.sql.connect('mysql')"
exec admin "lua dump = function(v) return box.cjson.encode(v) end"
exec admin "lua connect = {}"
......
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