mirror of
https://github.com/luapower/mysql.git
synced 2025-01-01 14:00:27 +01:00
unimportant
This commit is contained in:
parent
f6a430275c
commit
5dcd2cadf2
@ -935,7 +935,6 @@ function mysql.connect(opt)
|
|||||||
local user = opt.user or ''
|
local user = opt.user or ''
|
||||||
|
|
||||||
local collation = 0 --default
|
local collation = 0 --default
|
||||||
print(opt.collation)
|
|
||||||
if opt.collation ~= 'server' then
|
if opt.collation ~= 'server' then
|
||||||
if opt.collation then
|
if opt.collation then
|
||||||
collation = assert(collation_codes[opt.collation], 'invalid collation')
|
collation = assert(collation_codes[opt.collation], 'invalid collation')
|
||||||
@ -1343,8 +1342,9 @@ if not ... then --demo
|
|||||||
user = 'root',
|
user = 'root',
|
||||||
password = 'abcd12',
|
password = 'abcd12',
|
||||||
database = 'sp',
|
database = 'sp',
|
||||||
collation = 'server'
|
collation = 'server',
|
||||||
}
|
}
|
||||||
|
print(conn.charset, conn.collation)
|
||||||
pp(conn:query'select * from val where val = 1')
|
pp(conn:query'select * from val where val = 1')
|
||||||
local stmt = conn:prepare('select * from val where val = ?')
|
local stmt = conn:prepare('select * from val where val = ?')
|
||||||
assert(stmt:exec(1))
|
assert(stmt:exec(1))
|
||||||
|
Loading…
Reference in New Issue
Block a user