luasql/tests/mysql.lua

33 lines
1.1 KiB
Lua
Raw Normal View History

2006-01-10 18:31:50 +00:00
---------------------------------------------------------------------
-- MySQL specific tests and configurations.
2006-01-25 20:28:30 +00:00
-- $Id: mysql.lua,v 1.4 2006/01/25 20:28:30 tomas Exp $
2006-01-10 18:31:50 +00:00
---------------------------------------------------------------------
QUERYING_STRING_TYPE_NAME = "binary(65535)"
2006-01-25 20:28:30 +00:00
table.insert (CUR_METHODS, "numrows")
table.insert (EXTENSIONS, numrows)
table.insert (CONN_METHODS, "escape")
table.insert (EXTENSIONS, escape)
2006-01-25 20:28:30 +00:00
2006-01-10 18:31:50 +00:00
---------------------------------------------------------------------
-- Build SQL command to create the test table.
---------------------------------------------------------------------
local _define_table = define_table
function define_table (n)
return _define_table(n) .. " ENGINE = InnoDB;"
2006-01-10 18:31:50 +00:00
end
---------------------------------------------------------------------
-- MySQL versions 4.0.x do not implement rollback.
---------------------------------------------------------------------
local _rollback = rollback
function rollback ()
if luasql._MYSQLVERSION and string.sub(luasql._MYSQLVERSION, 1, 3) == "4.0" then
io.write("skipping rollback test (mysql version 4.0.x)")
return
else
_rollback ()
end
end