Merge branch '1.0'
This commit is contained in:
@ -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"
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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'...
|
||||
|
||||
@ -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'...
|
||||
|
||||
Reference in New Issue
Block a user