diff --git a/src/lua/oltp_common.lua b/src/lua/oltp_common.lua index 539311de..f80fc6db 100644 --- a/src/lua/oltp_common.lua +++ b/src/lua/oltp_common.lua @@ -263,9 +263,14 @@ CREATE TABLE sbtest%d( end if (not sysbench.opt.skip_ddl) and sysbench.opt.create_covered_secondary then print(string.format("Creating a covered secondary index on 'sbtest%d'...", - table_num)) - con:query(string.format("CREATE INDEX ck_%d ON sbtest%d(k) include(id, c, pad)", - table_num, table_num)) + table_num)) + if drv:name() == "mysql" then + con:query(string.format("CREATE INDEX ck_%d ON sbtest%d(k, id, c, pad)", + table_num, table_num)) + else + con:query(string.format("CREATE INDEX ck_%d ON sbtest%d(k) include(id, c, pad)", + table_num, table_num)) + end end end