← Back to team overview

sysbench-developers team mailing list archive

[Merge] lp:~vadim-tk/sysbench/oltp_skip_trx into lp:sysbench

 

Vadim Tkachenko has proposed merging lp:~vadim-tk/sysbench/oltp_skip_trx into lp:sysbench.

Requested reviews:
  Alexey Kopytov (akopytov)

For more details, see:
https://code.launchpad.net/~vadim-tk/sysbench/oltp_skip_trx/+merge/84169

Added option oltp_skip_trx.
When "on", this will skip BEGIN/COMMIT statements.
 
-- 
https://code.launchpad.net/~vadim-tk/sysbench/oltp_skip_trx/+merge/84169
Your team sysbench-developers is subscribed to branch lp:sysbench.
=== modified file 'sysbench/tests/db/common.lua'
--- sysbench/tests/db/common.lua	2011-11-01 06:00:27 +0000
+++ sysbench/tests/db/common.lua	2011-12-01 20:06:03 +0000
@@ -144,4 +144,10 @@
       oltp_read_only = false
    end
 
+   if (oltp_skip_trx == 'on') then
+      oltp_skip_trx = true
+   else
+      oltp_skip_trx = false
+   end
+
 end

=== modified file 'sysbench/tests/db/oltp.lua'
--- sysbench/tests/db/oltp.lua	2011-04-28 05:43:05 +0000
+++ sysbench/tests/db/oltp.lua	2011-12-01 20:06:03 +0000
@@ -25,7 +25,9 @@
    local query
 
    table_name = "sbtest".. sb_rand_uniform(1, oltp_tables_count)
-   db_query(begin_query)
+   if not oltp_skip_trx then
+      db_query(begin_query)
+   end
 
    for i=1, oltp_point_selects do
       rs = db_query("SELECT c FROM ".. table_name .." WHERE id=" .. sb_rand(1, oltp_table_size))
@@ -79,7 +81,9 @@
 
    end -- oltp_read_only
 
-   db_query(commit_query)
+   if not oltp_skip_trx then
+      db_query(commit_query)
+   end
 
 end
 


Follow ups