Merge branch '1.0'

This commit is contained in:
Alexey Kopytov
2017-09-12 10:13:40 +03:00
4 changed files with 18 additions and 4 deletions

View File

@ -198,8 +198,10 @@ CREATE TABLE sbtest%d(
con:query(query)
print(string.format("Inserting %d records into 'sbtest%d'",
sysbench.opt.table_size, table_num))
if (sysbench.opt.table_size > 0) then
print(string.format("Inserting %d records into 'sbtest%d'",
sysbench.opt.table_size, table_num))
end
if sysbench.opt.auto_inc then
query = "INSERT INTO sbtest" .. table_num .. "(k, c, pad) VALUES"

View File

@ -21,6 +21,20 @@
require("oltp_common")
sysbench.cmdline.commands.prepare = {
function ()
if (not sysbench.opt.auto_inc) then
-- Create empty tables on prepare when --auto-inc is off, since IDs
-- generated on prepare may collide later with values generated by
-- sysbench.rand.unique()
sysbench.opt.table_size=0
end
cmd_prepare()
end,
sysbench.cmdline.PARALLEL_PREPARE
}
function prepare_statements()
-- We do not use prepared statements here, but oltp_common.sh expects this
-- function to be defined

View File

@ -196,6 +196,5 @@ oltp_insert.lua + MySQL tests
Dropping table 'sbtest1'...
# Test --auto-inc=off
Creating table 'sbtest1'...
Inserting 10000 records into 'sbtest1'
Creating a secondary index on 'sbtest1'...
Dropping table 'sbtest1'...

View File

@ -198,6 +198,5 @@ oltp_insert.lua + PostgreSQL tests
Dropping table 'sbtest1'...
# Test --auto-inc=off
Creating table 'sbtest1'...
Inserting 10000 records into 'sbtest1'
Creating a secondary index on 'sbtest1'...
Dropping table 'sbtest1'...