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

Proposed by Vadim Tkachenko
Status: Merged
Approved by: Alexey Kopytov
Approved revision: 101
Merged at revision: 101
Proposed branch: lp:~vadim-tk/sysbench/oltp_skip_trx
Merge into: lp:sysbench
Diff against target: 39 lines (+12/-2)
2 files modified
sysbench/tests/db/common.lua (+6/-0)
sysbench/tests/db/oltp.lua (+6/-2)
To merge this branch: bzr merge lp:~vadim-tk/sysbench/oltp_skip_trx
Reviewer Review Type Date Requested Status
Alexey Kopytov Pending
Review via email: mp+84169@code.launchpad.net

Description of the change

Added option oltp_skip_trx.
When "on", this will skip BEGIN/COMMIT statements.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sysbench/tests/db/common.lua'
2--- sysbench/tests/db/common.lua 2011-11-01 06:00:27 +0000
3+++ sysbench/tests/db/common.lua 2011-12-01 20:06:03 +0000
4@@ -144,4 +144,10 @@
5 oltp_read_only = false
6 end
7
8+ if (oltp_skip_trx == 'on') then
9+ oltp_skip_trx = true
10+ else
11+ oltp_skip_trx = false
12+ end
13+
14 end
15
16=== modified file 'sysbench/tests/db/oltp.lua'
17--- sysbench/tests/db/oltp.lua 2011-04-28 05:43:05 +0000
18+++ sysbench/tests/db/oltp.lua 2011-12-01 20:06:03 +0000
19@@ -25,7 +25,9 @@
20 local query
21
22 table_name = "sbtest".. sb_rand_uniform(1, oltp_tables_count)
23- db_query(begin_query)
24+ if not oltp_skip_trx then
25+ db_query(begin_query)
26+ end
27
28 for i=1, oltp_point_selects do
29 rs = db_query("SELECT c FROM ".. table_name .." WHERE id=" .. sb_rand(1, oltp_table_size))
30@@ -79,7 +81,9 @@
31
32 end -- oltp_read_only
33
34- db_query(commit_query)
35+ if not oltp_skip_trx then
36+ db_query(commit_query)
37+ end
38
39 end
40

Subscribers

People subscribed via source and target branches

to status/vote changes: