diff --git a/sysbench/tests/db/common.lua b/sysbench/tests/db/common.lua index 1677dc4..5d9be23 100644 --- a/sysbench/tests/db/common.lua +++ b/sysbench/tests/db/common.lua @@ -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 diff --git a/tests/t/drivers.t b/tests/t/drivers.t index 6eaf6db..943b8ee 100644 --- a/tests/t/drivers.t +++ b/tests/t/drivers.t @@ -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]