Merge lp:~tsarev/percona-server/innodb_deadlock_788569 into lp:percona-server/5.1

Proposed by Oleg Tsarev
Status: Merged
Merged at revision: 236
Proposed branch: lp:~tsarev/percona-server/innodb_deadlock_788569
Merge into: lp:percona-server/5.1
Diff against target: 45 lines (+13/-2)
3 files modified
mysql-test/innodb_deadlock_count.patch/percona_innodb_deadlock_count.result (+5/-0)
mysql-test/innodb_deadlock_count.patch/percona_innodb_deadlock_count.test (+8/-1)
series (+0/-1)
To merge this branch: bzr merge lp:~tsarev/percona-server/innodb_deadlock_788569
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Valentine Gostev qa Pending
Review via email: mp+65374@code.launchpad.net

This proposal supersedes a proposal from 2011-05-27.

Description of the change

Move tests from mysql-test/ to mysql-test/innodb_deadlock_count.patch according to bug #788569
Now test explicit return "ERROR 40001: Deadlock found when trying to get lock; try restarting transaction"

To post a comment you must log in.
Revision history for this message
Valentine Gostev (longbow) wrote : Posted in a previous version of this proposal

good to go

review: Approve (qa)
Revision history for this message
Alexey Kopytov (akopytov) wrote : Posted in a previous version of this proposal

Please revert this merge. It has certain issues that must be addressed.

review: Needs Fixing
Revision history for this message
Alexey Kopytov (akopytov) wrote : Posted in a previous version of this proposal

The only reason why the current test does not show the "deadlock found" error is because you use "send" without "reap", thus preventing mysqltest from processing the error.

So here's the patch against the .test file that achieves *absolutely* the same as this MP. Everything else in the MP is just irrelevant noise.

I would also remove disable_abort_on_error. A more clean way would be to define the expected errors explicitly, rather than disabling them all, that is adding "--error 0, ER_LOCK_DEADLOCK" before calling "reap".

@@ -38,7 +38,12 @@
 connection con2;
 SEND SELECT b FROM t WHERE a=1 FOR UPDATE;

-SLEEP 0.2;
+connection con1;
+reap;
+
+connection con2;
+reap;
+
 --echo # Switch to connection con3
 connection con3;
 let $result = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_deadlocks'`;

review: Needs Fixing
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=== added directory 'mysql-test/innodb_deadlock_count.patch'
2=== renamed file 'mysql-test/percona_innodb_deadlock_count.result' => 'mysql-test/innodb_deadlock_count.patch/percona_innodb_deadlock_count.result'
3--- mysql-test/percona_innodb_deadlock_count.result 2010-06-07 10:32:56 +0000
4+++ mysql-test/innodb_deadlock_count.patch/percona_innodb_deadlock_count.result 2011-06-21 16:40:18 +0000
5@@ -22,6 +22,11 @@
6 SELECT b FROM t WHERE a=2 FOR UPDATE;
7 # Switch to connection con2
8 SELECT b FROM t WHERE a=1 FOR UPDATE;
9+# Switch to connection con1
10+b
11+1
12+# Switch to connection con2
13+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
14 # Switch to connection con3
15 1
16 # Drop test table
17
18=== renamed file 'mysql-test/percona_innodb_deadlock_count.test' => 'mysql-test/innodb_deadlock_count.patch/percona_innodb_deadlock_count.test'
19--- mysql-test/percona_innodb_deadlock_count.test 2010-06-07 10:32:56 +0000
20+++ mysql-test/innodb_deadlock_count.patch/percona_innodb_deadlock_count.test 2011-06-21 16:40:18 +0000
21@@ -38,7 +38,14 @@
22 connection con2;
23 SEND SELECT b FROM t WHERE a=1 FOR UPDATE;
24
25-SLEEP 0.2;
26+--echo # Switch to connection con1
27+connection con1;
28+reap;
29+
30+--echo # Switch to connection con2
31+connection con2;
32+reap;
33+
34 --echo # Switch to connection con3
35 connection con3;
36 let $result = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_deadlocks'`;
37
38=== modified file 'series'
39--- series 2011-04-20 07:13:25 +0000
40+++ series 2011-06-21 16:40:18 +0000
41@@ -55,4 +55,3 @@
42 mysql_remove_eol_carret.patch
43 innodb_expand_fast_index_creation.patch
44 innodb_bug60788.patch
45-

Subscribers

People subscribed via source and target branches