Skip to content

Commit c25b959

Browse files
committed
Merge branch 'master' of github.com:Percona-Lab/sysbench-tpcc
2 parents 7049143 + 298312e commit c25b959

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

tpcc.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,9 @@ function event()
5555

5656
end
5757

58+
function sysbench.hooks.report_intermediate(stat)
59+
-- -- print("my stat: ", val)
60+
sysbench.report_csv(stat)
61+
end
62+
5863
-- vim:ts=4 ss=4 sw=4 expandtab

tpcc_check.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,12 @@ function check_tables(drv, con, warehouse_num)
3434
local d_tax = tonumber(row[2])
3535
if d_tax ~= 0 then
3636
pass1=0
37+
print(string.format("Check 1, warehouse: %d, table %d FAILED!!!", warehouse_num, table_num))
3738
end
3839
end
3940
end
4041

41-
if pass1 == 1 then
42-
print(string.format("Check 1, warehouse: %d PASSED", warehouse_num))
43-
else
42+
if pass1 ~= 1 then
4443
print(string.format("Check 1, warehouse: %d FAILED!!!", warehouse_num))
4544
end
4645

tpcc_common.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,12 @@ function set_isolation_level(drv,con)
336336
isolation_level="SERIALIZABLE"
337337
end
338338

339-
con:query("SET SESSION transaction_isolation='".. isolation_level .."'")
339+
rs=con:query("SHOW VARIABLES LIKE 't%_isolation'")
340+
row = rs:fetch_row()
341+
isolation_variable = row[1]
342+
343+
con:query("SET SESSION " .. isolation_variable .. "='".. isolation_level .."'")
344+
-- con:query("SET SESSION transaction_isolation='".. isolation_level .."'")
340345
-- con:query("SET SESSION tx_isolation='".. isolation_level .."'")
341346
end
342347
end

tpcc_run.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,10 @@ function new_order()
160160
local i_data
161161

162162
if rs.nrows == 0 then
163-
con:query("ROLLBACK")
163+
--print("ROLLBACK")
164+
con:query("ROLLBACK")
164165
return
165-
end
166+
end
166167

167168
for i = 1, rs.nrows do
168169
row = rs:fetch_row()

0 commit comments

Comments
 (0)