Files
sysbench/tests/include/oltp_legacy/parallel_prepare.lua
2017-01-14 01:29:57 +03:00

31 lines
527 B
Lua

-- for proper initialization use --max-requests = N, where N is --num-threads
--
pathtest = string.match(test, "(.*/)")
if pathtest then
dofile(pathtest .. "common.lua")
else
require("common")
end
function thread_init()
set_vars()
end
function event()
local index_name
local i
print("thread prepare"..thread_id)
if (oltp_secondary) then
index_name = "KEY xid"
else
index_name = "PRIMARY KEY"
end
for i=thread_id+1, oltp_tables_count, num_threads do
create_insert(i)
end
end