Skip to content

Commit cd6e4b2

Browse files
committed
Merge branch 'master' of github.com:Percona-Lab/sysbench-tpcc
2 parents 12fc4d1 + c25b959 commit cd6e4b2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tpcc_check.lua

+20
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,26 @@ function check_tables(drv, con, warehouse_num)
113113
print(string.format("Check 4, warehouse: %d FAILED!!!", warehouse_num))
114114
end
115115

116+
local pass5 = 1
117+
for table_num = 1, sysbench.opt.tables do
118+
-- print(string.format("Checking tables: %d for warehouse: %d\n", table_num, warehouse_num))
119+
rs = con:query(string.format("SELECT count(*) FROM orders%d LEFT JOIN new_orders%d ON (no_w_id=o_w_id AND o_d_id=no_d_id AND o_id=no_o_id) where o_w_id=%d and ((o_carrier_id IS NULL and no_o_id IS NULL) OR (o_carrier_id IS NOT NULL and no_o_id IS NOT NULL )) ",table_num, table_num, warehouse_num))
120+
121+
for i = 1, rs.nrows do
122+
row = rs:fetch_row()
123+
local d1 = tonumber(row[1])
124+
if d1 ~= 0 then
125+
pass5=0
126+
end
127+
end
128+
end
129+
130+
if pass5 == 1 then
131+
print(string.format("Check 5, warehouse: %d PASSED", warehouse_num))
132+
else
133+
print(string.format("Check 5, warehouse: %d FAILED!!!", warehouse_num))
134+
end
135+
116136
local pass7 = 1
117137
for table_num = 1, sysbench.opt.tables do
118138
-- print(string.format("Checking tables: %d for warehouse: %d\n", table_num, warehouse_num))

0 commit comments

Comments
 (0)