Skip to content

Commit

Permalink
Merge pull request #6 from cyliu0/mysql-compatible
Browse files Browse the repository at this point in the history
src/lua/oltp_common.lua: change create table ddl to be compatible wit…
  • Loading branch information
cyliu0 authored Nov 8, 2023
2 parents 812d639 + 0f958da commit 751c648
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/lua/oltp_common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,18 @@ CREATE TABLE sbtest%d(
) %s %s]],
table_num, id_def, id_index_def, engine_def,
sysbench.opt.create_table_options)

if drv:name() == "mysql" then
query = string.format([[
CREATE TABLE sbtest%d(
id %s,
k INTEGER,
c VARCHAR(120),
pad VARCHAR(60),
%s (id)
) %s %s]],
table_num, id_def, id_index_def, engine_def,
sysbench.opt.create_table_options)
end
con:query(query)
end

Expand Down

0 comments on commit 751c648

Please sign in to comment.