Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/lua/oltp_common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ function prepare_commit()
end

function prepare_for_each_table(key)
if drv:name() == "mysql"
then
con:query("SET autocommit=0, unique_checks=0, foreign_key_checks=0")
end
for t = 1, sysbench.opt.tables do
stmt[t][key] = con:prepare(string.format(stmt_defs[key][1], t))

Expand Down Expand Up @@ -316,6 +320,10 @@ function prepare_for_each_table(key)
stmt[t][key]:bind_param(unpack(param[t][key]))
end
end
if drv:name() == "mysql"
then
con:query("SET autocommit=1, unique_checks=1, foreign_key_checks=1")
end
end

function prepare_point_selects()
Expand Down