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
1=== modified file 'storage/innobase/xtrabackup/test/t/kill_long_selects.sh'
2--- storage/innobase/xtrabackup/test/t/kill_long_selects.sh 2014-03-24 17:48:44 +0000
3+++ storage/innobase/xtrabackup/test/t/kill_long_selects.sh 2014-06-27 14:04:57 +0000
4@@ -79,10 +79,20 @@
5 rm -f $MYSQLD_TMPDIR/killall.sql
6 }
7
8+function wait_for_connection_count()
9+{
10+ n=$(($1 + 1))
11+ for i in {1..200} ; do
12+ count=`${MYSQL} ${MYSQL_ARGS} -N -e "SHOW PROCESSLIST" test | wc -l`
13+ [ $count != $n ] || break
14+ sleep 0.3
15+ done
16+}
17+
18 start_server --innodb_file_per_table
19
20-if $MYSQL $MYSQL_ARGS -Ns -e "SHOW VARIABLES LIKE 'have_backup_locks'\G" \
21- 2> /dev/null | egrep -q "^YES$"
22+if $MYSQL $MYSQL_ARGS -s -e "SHOW VARIABLES LIKE 'have_backup_locks'\G" \
23+ 2> /dev/null | egrep -q "Value: YES"
24 then
25 skip_test "Requires a server without backup locks support"
26 fi
27@@ -97,11 +107,9 @@
28 # ==============================================================
29 vlog "===================== case 1 ====================="
30 bg_run bg_select_pid "mysql_select 3"
31-bg_run bg_update_pid "sleep 1" "mysql_update 3"
32-
33-sleep 8
34-
35-innobackupex $topdir/full --kill-long-queries-timeout=10 \
36+bg_run bg_update_pid "mysql_update 3"
37+
38+innobackupex $topdir/full --kill-long-queries-timeout=50 \
39 --kill-long-query-type=all
40
41 bg_wait_ok $bg_select_pid
42@@ -117,7 +125,8 @@
43 # it. then it may be still alive by the time of kill_all_queries
44 vlog "===================== case 2 ====================="
45 bg_run bg_select_pid "mysql_select 200"
46-bg_run bg_update_pid "sleep 1" "mysql_update 5"
47+bg_run bg_update_pid "mysql_update 5"
48+wait_for_connection_count 2
49
50 innobackupex $topdir/full --kill-long-queries-timeout=3 \
51 --kill-long-query-type=select
52@@ -131,6 +140,7 @@
53 vlog "===================== case 3 ====================="
54 bg_run bg_select_pid "mysql_select 200"
55 bg_run bg_update_pid "mysql_update 200"
56+wait_for_connection_count 2
57
58 innobackupex $topdir/full --kill-long-queries-timeout=3 \
59 --kill-long-query-type=all
60@@ -144,8 +154,7 @@
61 vlog "===================== case 4 ====================="
62 bg_run bg_select_pid "mysql_select 200"
63 bg_run bg_update_pid "mysql_update 200"
64-
65-sleep 1
66+wait_for_connection_count 2
67
68 run_cmd_expect_failure ${IB_BIN} ${IB_ARGS} $topdir/full \
69 --lock-wait-timeout=3 \
70@@ -163,8 +172,7 @@
71 vlog "===================== case 5 ====================="
72 bg_run bg_select_pid "mysql_select 200"
73 bg_run bg_update_pid "mysql_update 200"
74-
75-sleep 2
76+wait_for_connection_count 2
77
78 run_cmd_expect_failure ${IB_BIN} ${IB_ARGS} $topdir/full \
79 --lock-wait-timeout=3 \
80@@ -181,9 +189,9 @@
81 # ==============================================================
82 vlog "===================== case 6 ====================="
83 bg_run bg_update_pid "mysql_update 5"
84-bg_run bg_select_pid "sleep 1" "mysql_select 200"
85-
86-sleep 2
87+wait_for_connection_count 1
88+bg_run bg_select_pid "mysql_select 200"
89+wait_for_connection_count 2
90
91 innobackupex $topdir/full \
92 --lock-wait-timeout=6 \

Subscribers

People subscribed via source and target branches