Percona-Lab / sysbench-tpcc

Sysbench scripts to generate a tpcc-like workload for MySQL and PostgreSQL
Apache License 2.0
292 stars 104 forks source link

namecnt not made even (?) #32

Closed sdressler closed 4 years ago

sdressler commented 4 years ago

Not sure about this one, but in tpcc_run.lua lines 461 to 463 there is:

if namecnt % 2 == 0 then
    namecnt = namecnt + 1
end

In the standard however, the example transaction states as

if (namecnt%2) namecnt++; / / Locate midpoint customer

And therefore, I believe, it must be if namecnt % 2 == 1 then to increment if namecnt is uneven.

If my observation is correct, then I am happy to open a PR.

vadimtk commented 4 years ago

I think you are right. I've made changes to reflect it