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
=== added directory 'mysql-test/innodb_deadlock_count.patch'
=== renamed file 'mysql-test/percona_innodb_deadlock_count.result' => 'mysql-test/innodb_deadlock_count.patch/percona_innodb_deadlock_count.result'
--- mysql-test/percona_innodb_deadlock_count.result 2010-06-07 10:32:56 +0000
+++ mysql-test/innodb_deadlock_count.patch/percona_innodb_deadlock_count.result 2011-06-21 16:40:18 +0000
@@ -22,6 +22,11 @@
22SELECT b FROM t WHERE a=2 FOR UPDATE;22SELECT b FROM t WHERE a=2 FOR UPDATE;
23# Switch to connection con223# Switch to connection con2
24SELECT b FROM t WHERE a=1 FOR UPDATE;24SELECT b FROM t WHERE a=1 FOR UPDATE;
25# Switch to connection con1
26b
271
28# Switch to connection con2
29ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
25# Switch to connection con330# Switch to connection con3
261311
27# Drop test table32# Drop test table
2833
=== renamed file 'mysql-test/percona_innodb_deadlock_count.test' => 'mysql-test/innodb_deadlock_count.patch/percona_innodb_deadlock_count.test'
--- mysql-test/percona_innodb_deadlock_count.test 2010-06-07 10:32:56 +0000
+++ mysql-test/innodb_deadlock_count.patch/percona_innodb_deadlock_count.test 2011-06-21 16:40:18 +0000
@@ -38,7 +38,14 @@
38connection con2;38connection con2;
39SEND SELECT b FROM t WHERE a=1 FOR UPDATE;39SEND SELECT b FROM t WHERE a=1 FOR UPDATE;
4040
41SLEEP 0.2;41--echo # Switch to connection con1
42connection con1;
43reap;
44
45--echo # Switch to connection con2
46connection con2;
47reap;
48
42--echo # Switch to connection con349--echo # Switch to connection con3
43connection con3;50connection con3;
44let $result = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_deadlocks'`;51let $result = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_deadlocks'`;
4552
=== modified file 'series'
--- series 2011-04-20 07:13:25 +0000
+++ series 2011-06-21 16:40:18 +0000
@@ -55,4 +55,3 @@
55mysql_remove_eol_carret.patch55mysql_remove_eol_carret.patch
56innodb_expand_fast_index_creation.patch56innodb_expand_fast_index_creation.patch
57innodb_bug60788.patch57innodb_bug60788.patch
58

Subscribers

People subscribed via source and target branches