Merge pull request #92 from robins/redshift5

Add AWS Redshift support for sysbench
This commit is contained in:
Alexey Kopytov
2016-12-08 19:17:43 +04:00
committed by GitHub
2 changed files with 13 additions and 2 deletions

View File

@ -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

View File

@ -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]