We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d8b9a5 commit d7d3956Copy full SHA for d7d3956
tpcc.lua
@@ -52,7 +52,9 @@ function event()
52
end
53
54
-- Repeat transaction execution until success
55
- while not pcall(function () trx() end ) do end
+ while not pcall(function () trx() end ) do
56
+ con:query("ROLLBACK")
57
+ end
58
59
60
@@ -61,17 +63,5 @@ function sysbench.hooks.report_intermediate(stat)
61
63
sysbench.report_csv(stat)
62
64
65
-function sysbench.hooks.sql_error_ignorable(err)
- if err.sql_errno == 1205 then
66
- print("Lock timeout detected. Rollback")
67
- con:query("ROLLBACK")
68
- return true
69
- end
70
- if err.sql_errno == 1213 then
71
- print("Deadlock detected. Rollback")
72
73
74
75
-end
76
77
-- vim:ts=4 ss=4 sw=4 expandtab
0 commit comments