Merge lp:~sergei.glushchenko/percona-xtrabackup/2.2-xb-bug1326224 into lp:percona-xtrabackup/2.2

Proposed by Sergei Glushchenko
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 4985
Proposed branch: lp:~sergei.glushchenko/percona-xtrabackup/2.2-xb-bug1326224
Merge into: lp:percona-xtrabackup/2.2
Diff against target: 92 lines (+23/-15)
1 file modified
storage/innobase/xtrabackup/test/t/kill_long_selects.sh (+23/-15)
To merge this branch: bzr merge lp:~sergei.glushchenko/percona-xtrabackup/2.2-xb-bug1326224
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+224533@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'storage/innobase/xtrabackup/test/t/kill_long_selects.sh'
--- storage/innobase/xtrabackup/test/t/kill_long_selects.sh 2014-03-24 17:48:44 +0000
+++ storage/innobase/xtrabackup/test/t/kill_long_selects.sh 2014-06-27 14:04:57 +0000
@@ -79,10 +79,20 @@
79 rm -f $MYSQLD_TMPDIR/killall.sql79 rm -f $MYSQLD_TMPDIR/killall.sql
80}80}
8181
82function wait_for_connection_count()
83{
84 n=$(($1 + 1))
85 for i in {1..200} ; do
86 count=`${MYSQL} ${MYSQL_ARGS} -N -e "SHOW PROCESSLIST" test | wc -l`
87 [ $count != $n ] || break
88 sleep 0.3
89 done
90}
91
82start_server --innodb_file_per_table92start_server --innodb_file_per_table
8393
84if $MYSQL $MYSQL_ARGS -Ns -e "SHOW VARIABLES LIKE 'have_backup_locks'\G" \94if $MYSQL $MYSQL_ARGS -s -e "SHOW VARIABLES LIKE 'have_backup_locks'\G" \
85 2> /dev/null | egrep -q "^YES$"95 2> /dev/null | egrep -q "Value: YES"
86then96then
87 skip_test "Requires a server without backup locks support"97 skip_test "Requires a server without backup locks support"
88fi98fi
@@ -97,11 +107,9 @@
97# ==============================================================107# ==============================================================
98vlog "===================== case 1 ====================="108vlog "===================== case 1 ====================="
99bg_run bg_select_pid "mysql_select 3"109bg_run bg_select_pid "mysql_select 3"
100bg_run bg_update_pid "sleep 1" "mysql_update 3"110bg_run bg_update_pid "mysql_update 3"
101111
102sleep 8112innobackupex $topdir/full --kill-long-queries-timeout=50 \
103
104innobackupex $topdir/full --kill-long-queries-timeout=10 \
105 --kill-long-query-type=all113 --kill-long-query-type=all
106114
107bg_wait_ok $bg_select_pid115bg_wait_ok $bg_select_pid
@@ -117,7 +125,8 @@
117# it. then it may be still alive by the time of kill_all_queries125# it. then it may be still alive by the time of kill_all_queries
118vlog "===================== case 2 ====================="126vlog "===================== case 2 ====================="
119bg_run bg_select_pid "mysql_select 200"127bg_run bg_select_pid "mysql_select 200"
120bg_run bg_update_pid "sleep 1" "mysql_update 5"128bg_run bg_update_pid "mysql_update 5"
129wait_for_connection_count 2
121130
122innobackupex $topdir/full --kill-long-queries-timeout=3 \131innobackupex $topdir/full --kill-long-queries-timeout=3 \
123 --kill-long-query-type=select132 --kill-long-query-type=select
@@ -131,6 +140,7 @@
131vlog "===================== case 3 ====================="140vlog "===================== case 3 ====================="
132bg_run bg_select_pid "mysql_select 200"141bg_run bg_select_pid "mysql_select 200"
133bg_run bg_update_pid "mysql_update 200"142bg_run bg_update_pid "mysql_update 200"
143wait_for_connection_count 2
134144
135innobackupex $topdir/full --kill-long-queries-timeout=3 \145innobackupex $topdir/full --kill-long-queries-timeout=3 \
136 --kill-long-query-type=all146 --kill-long-query-type=all
@@ -144,8 +154,7 @@
144vlog "===================== case 4 ====================="154vlog "===================== case 4 ====================="
145bg_run bg_select_pid "mysql_select 200"155bg_run bg_select_pid "mysql_select 200"
146bg_run bg_update_pid "mysql_update 200"156bg_run bg_update_pid "mysql_update 200"
147157wait_for_connection_count 2
148sleep 1
149158
150run_cmd_expect_failure ${IB_BIN} ${IB_ARGS} $topdir/full \159run_cmd_expect_failure ${IB_BIN} ${IB_ARGS} $topdir/full \
151 --lock-wait-timeout=3 \160 --lock-wait-timeout=3 \
@@ -163,8 +172,7 @@
163vlog "===================== case 5 ====================="172vlog "===================== case 5 ====================="
164bg_run bg_select_pid "mysql_select 200"173bg_run bg_select_pid "mysql_select 200"
165bg_run bg_update_pid "mysql_update 200"174bg_run bg_update_pid "mysql_update 200"
166175wait_for_connection_count 2
167sleep 2
168176
169run_cmd_expect_failure ${IB_BIN} ${IB_ARGS} $topdir/full \177run_cmd_expect_failure ${IB_BIN} ${IB_ARGS} $topdir/full \
170 --lock-wait-timeout=3 \178 --lock-wait-timeout=3 \
@@ -181,9 +189,9 @@
181# ==============================================================189# ==============================================================
182vlog "===================== case 6 ====================="190vlog "===================== case 6 ====================="
183bg_run bg_update_pid "mysql_update 5"191bg_run bg_update_pid "mysql_update 5"
184bg_run bg_select_pid "sleep 1" "mysql_select 200"192wait_for_connection_count 1
185193bg_run bg_select_pid "mysql_select 200"
186sleep 2194wait_for_connection_count 2
187195
188innobackupex $topdir/full \196innobackupex $topdir/full \
189 --lock-wait-timeout=6 \197 --lock-wait-timeout=6 \

Subscribers

People subscribed via source and target branches