File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,11 @@ function cmd_prepare()
78
78
end
79
79
80
80
-- make sure all tables are created before we load data
81
+
82
+ if drv :name () == " pgsql" then
83
+ show_query = " select * from pg_catalog.pg_tables where schemaname != 'information_schema' and schemaname != 'pg_catalog'"
84
+ end
85
+
81
86
repeat
82
87
rs = con :query (show_query )
83
88
ffi .C .usleep (1000 )
@@ -355,6 +360,20 @@ function set_isolation_level(drv,con)
355
360
356
361
con :query (" SET SESSION " .. isolation_variable .. " ='" .. isolation_level .. " '" )
357
362
end
363
+
364
+ if drv :name () == " pgsql"
365
+ then
366
+ if sysbench .opt .trx_level == " RR" then
367
+ isolation_level = " REPEATABLE READ"
368
+ elseif sysbench .opt .trx_level == " RC" then
369
+ isolation_level = " READ COMMITTED"
370
+ elseif sysbench .opt .trx_level == " SER" then
371
+ isolation_level = " SERIALIZABLE"
372
+ end
373
+
374
+ con :query (" SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL " .. isolation_level )
375
+ end
376
+
358
377
end
359
378
360
379
You can’t perform that action at this time.
0 commit comments