Bug #51049 main.bug39022 fails in mysql-trunk-merge
Submitted: 10 Feb 2010 7:23 Modified: 21 Jun 2010 1:00
Reporter: Alexey Kopytov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.1-bugteam OS:Any
Assigned to: Georgi Kodinov CPU Architecture:Any
Tags: pb2, test failure

[10 Feb 2010 7:23] Alexey Kopytov
Description:
main.bug39022 fails on all hosts in mysql-trunk-merge:

main.bug39022                            [ fail ]
        Test ended at 2010-02-09 10:33:15

CURRENT_TEST: main.bug39022
mysqltest: At line 46: query 'SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d)' succeeded - should have failed with errno 1213...

The result from queries just before the failure was:
< snip >
(11,5),(11,6),(7,7),(7,8),(4,9),(6,10),(3,11),(11,12),
(12,13),(7,14);
INSERT INTO t2 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),
(11),(12),(13),(14);
# in thread1
START TRANSACTION;
# in thread2
REPLACE INTO t2 VALUES (-17);
SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d);
d
# in thread1
REPLACE INTO t1(a,b) VALUES (67,20);
# in thread2
COMMIT;
START TRANSACTION;
REPLACE INTO t1(a,b) VALUES (65,-50);
REPLACE INTO t2 VALUES (-91);
SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d);
# in thread1
# should not crash

How to repeat:
http://pb2.norway.sun.com/web.py?template=push_details&push=940521
[11 Feb 2010 9:41] Sveta Smirnova
Thank you for the report.

Verified as described using link provided.
[15 Feb 2010 8:36] Georgi Kodinov
This test started failing in 5.1-bugteam after the following push : http://lists.mysql.com/commits/99416.
[15 Feb 2010 12:08] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/100361

3341 Georgi Kodinov	2010-02-15
      Bug #51049: main.bug39022 fails in mysql-trunk-merge
      
      On some platforms/compile combinations the deadlock exected by 
      this test may not occur. The test is testing for a crash. 
      
      Fixed by making the no-error condition expected result.
[15 Feb 2010 12:22] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/100370

3341 Georgi Kodinov	2010-02-15
      Bug #51049: main.bug39022 fails in mysql-trunk-merge
      
      The test depends on the timing and locking modes of dynamic execution
      and is not compatible with the prepared statement client protocol
      as implemented by mysqltest.
      Extended the test to temporarily disable ps_protocol and re-enable it
      after the completion of the deadlock statement.
[15 Feb 2010 18:51] Patrick Crews
Ok to push with the suggested changes to the patch (disable the test for binlog_format=row).  I believe Joro is correct in regards to isolation level differing and being the cause for the change in behavior from one binlog format to another.
[18 Feb 2010 8:48] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/100710

3341 Georgi Kodinov	2010-02-18
      Bug #51049: main.bug39022 fails in mysql-trunk-merge
      
      Fixed the test to behave correctly with ps-protocol
      and binlog format row.
[18 Feb 2010 8:51] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/100711

3346 Georgi Kodinov	2010-02-18
      Bug #51049: main.bug39022 fails in mysql-trunk-merge
      
      Fixed the test to behave correctly with ps-protocol
      and binlog format row.
[1 Mar 2010 8:44] Bugs System
Pushed into 5.1.45 (revid:joro@sun.com-20100301083827-xnimmrjg6bh33o1o) (version source revid:azundris@mysql.com-20100222123150-0dgmbmlh2tu7zinq) (merge vers: 5.1.45) (pib:16)
[1 Mar 2010 16:39] Paul DuBois
Changes to test case. No changelog entry needed.

Setting report to Need Merge pending push to Celosia, 6.0.x.
[2 Mar 2010 14:34] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100302142746-u1gxdf5yk2bjrq3e) (version source revid:alik@sun.com-20100225090938-2j5ybqoau570mytu) (merge vers: 6.0.14-alpha) (pib:16)
[2 Mar 2010 14:39] Bugs System
Pushed into 5.5.3-m2 (revid:alik@sun.com-20100302072233-t3uqgjzdukt1pyhe) (version source revid:alexey.kopytov@sun.com-20100221213311-xf5nyv391dsw9v6j) (merge vers: 5.5.2-m2) (pib:16)
[2 Mar 2010 14:44] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100302072432-k8xvfkgcggkwgi94) (version source revid:alik@sun.com-20100224135227-rcqs9pe9b2in80pf) (pib:16)
[2 Mar 2010 15:58] Paul DuBois
No changelog entry needed.
[12 Apr 2010 10:17] Bugs System
Pushed into 5.1.47 (revid:build@mysql.com-20100412101220-adgau1r18kwgthps) (version source revid:build@mysql.com-20100412101220-adgau1r18kwgthps) (merge vers: 5.1.47) (pib:16)
[28 May 2010 6:01] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100524190136-egaq7e8zgkwb9aqi) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (pib:16)
[28 May 2010 6:30] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100524190941-nuudpx60if25wsvx) (version source revid:alik@sun.com-20100422150658-fkhgnwwkyugtxrmu) (merge vers: 6.0.14-alpha) (pib:16)
[28 May 2010 6:58] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100524185725-c8k5q7v60i5nix3t) (version source revid:alexey.kopytov@sun.com-20100429203306-tg0wz4y2xyx8edrl) (merge vers: 5.5.5-m3) (pib:16)
[17 Jun 2010 12:04] Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:martin.skold@mysql.com-20100617114014-bva0dy24yyd67697) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 12:48] Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 13:31] Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:martin.skold@mysql.com-20100617114611-61aqbb52j752y116) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)