Merge pull request #92 from robins/redshift5
Add AWS Redshift support for sysbench
This commit is contained in:
@ -17,6 +17,12 @@ function create_insert(table_id)
|
||||
index_name = "PRIMARY KEY"
|
||||
end
|
||||
|
||||
if (pgsql_variant == 'redshift') then
|
||||
auto_inc_type = "INTEGER IDENTITY(1,1)"
|
||||
else
|
||||
auto_inc_type = "SERIAL"
|
||||
end
|
||||
|
||||
i = table_id
|
||||
|
||||
print("Creating table 'sbtest" .. i .. "'...")
|
||||
@ -36,7 +42,7 @@ pad CHAR(60) DEFAULT '' NOT NULL,
|
||||
elseif (db_driver == "pgsql") then
|
||||
query = [[
|
||||
CREATE TABLE sbtest]] .. i .. [[ (
|
||||
id SERIAL NOT NULL,
|
||||
id ]] .. auto_inc_type .. [[ NOT NULL,
|
||||
k INTEGER DEFAULT '0' NOT NULL,
|
||||
c CHAR(120) DEFAULT '' NOT NULL,
|
||||
pad CHAR(60) DEFAULT '' NOT NULL,
|
||||
@ -176,4 +182,9 @@ function set_vars()
|
||||
oltp_create_secondary = true
|
||||
end
|
||||
|
||||
if (pgsql_variant == 'redshift') then
|
||||
oltp_create_secondary = false
|
||||
oltp_delete_inserts = 0
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -18,5 +18,5 @@ Make sure all available DB drivers are covered
|
||||
|
||||
Dropping table 'sbtest1'...
|
||||
FATAL: invalid database driver name: 'nonexisting'
|
||||
FATAL: failed to execute function `cleanup': */common.lua:122: DB initialization failed (glob)
|
||||
FATAL: failed to execute function `cleanup': */common.lua:128: DB initialization failed (glob)
|
||||
[1]
|
||||
|
||||
Reference in New Issue
Block a user