Bug #58416 binlog.binlog_row_failure_mixing_engines fails on win x86 debug_max
Submitted: 23 Nov 2010 13:06 Modified: 20 Dec 2010 3:12
Reporter: Ramil Kalimullin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.1 OS:Windows
Assigned to: Luis Soares CPU Architecture:Any
Tags: disabled, pb2, single, test failure

[23 Nov 2010 13:06] Ramil Kalimullin
Description:
binlog.binlog_row_failure_mixing_engines w1 [ fail ]
        Test ended at 2010-11-23 01:34:10
CURRENT_TEST: binlog.binlog_row_failure_mixing_engines
'diff' is not recognized as an internal or external command,
operable program or batch file.
--- H:/pb2/test/sb_2-2569476-1290470654.03/mysql-5.1.54-win-x86-test/mysql-test/suite/binlog/r/binlog_row_failure_mixing_engines.result 2010-11-23 01:17:22.000000000 +0300
+++ H:\pb2\test\sb_2-2569476-1290470654.03\mysql-5.1.54-win-x86-test\mysql-test\suite\binlog\r\binlog_row_failure_mixing_engines.reject 2010-11-23 03:34:09.474518700 +0300
@@ -29,20 +29,6 @@
 COMMIT;
 show binlog events from <binlog_start>;
 Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Table_map # # table_id: # (test.nt_1)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Table_map # # table_id: # (test.tt_1)
-master-bin.000001 # Table_map # # table_id: # (test.nt_1)
-master-bin.000001 # Write_rows # # table_id: #
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # ROLLBACK
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Table_map # # table_id: # (test.tt_2)
-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
-master-bin.000001 # Xid # # COMMIT /* XID */
...

How to repeat:
http://pb2.norway.sun.com/web.py?template=mysql_show_test_failure&search=yes&push_id=17601...

Suggested fix:
Perfect Luis' investigation result:
"
  Five observations:

  1. After your push mtr runs in parallel mode for windows, thence test
     execution order differs in those hosts.

  2. It could be that MTR does not restart the server between the test
     that executed before the failing test case  and the position we get
     in (see contents of the failing test case file):

     let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);

     is the position for the wrong binlog file (for instance if some
     previous test did "flush logs" and this test case is ran without
     resetting the binlogs.

  3. Looking at the logs I see that for worker thread w4, the following
     test is ran before binlog_row_failure_mixing_engines:

     - mysqlbinlog_row_innodb

  4. MTR restarts the test case and it passes.

  5. Linux (at least) does not run MTR with --parallel, thence the
     sequence of tests is different. This can hide the failure.

  Suggestions:

  1. run the following mtr command:

     perl mtr --mysqld=--binlog-format=row mysqlbinlog_row_innodb binlog_row_failure_mixing_engines

     This could possibly show the same failure

  2. Deploy a RESET MASTER at the beginning of binlog_row_failure_mixing_engines.test
     before calling:

     --source extra/binlog_tests/binlog_failure_mixing_engines.test
"
[27 Nov 2010 11: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/125214

3523 Luis Soares	2010-11-27
      BUG#58416: binlog.binlog_row_failure_mixing_engines fails on 
      win x86 debug_max
      
      The windows MTR run exhibited a different test execution 
      ordering (due to the fact that in these platforms MTR is invoked
      with --parallel > 1). This uncovered a bug in the aforementioned
      test case, which is triggered by the following conditions:
      
        1. server is not restarted between two different tests;
        2. the test before binlog.binlog_row_failure_mixing_engines
           issues flush logs;
        3. binlog.binlog_row_failure_mixing_engines uses binlog
           positions to limit the output of show_binlog_events;
        4. binlog.binlog_row_failure_mixing_engines does not state which
           binlog file to use, thence it uses a wrong binlog file with
           the correct position.
      
      There are two possible fixes: 1. make sure that the test start 
      from a clean slate - binlog wise; 2. in addition to the position, 
      also state the binary log file before sourcing 
      show_binlog_events.inc .
      
      We go for fix #1, ie, deploy a RESET MASTER before the test is 
      actually started.
[7 Dec 2010 14:27] 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/126212

3512 Luis Soares	2010-12-07 [merge]
      BUG#58416
      
      Automerging bzr bundle from bug report into latest 
      mysql-5.1-bugteam.
[7 Dec 2010 14:30] 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/126213

3173 Luis Soares	2010-12-07 [merge]
      BUG#58416
      
      Null merge to from mysql-5.1-bugteam to mysql-5.5-bugteam.
      Test case does not exist in 5.5 tree.
[7 Dec 2010 14:45] Luis Soares
Queued in mysql-5.1-bugteam. Null-merged to mysql-5.5-bugteam.
[15 Dec 2010 5:51] Bugs System
Pushed into mysql-5.1 5.1.55 (revid:sunanda.menon@oracle.com-20101215054055-vgwki317xg1wphhh) (version source revid:sunanda.menon@oracle.com-20101215054055-vgwki317xg1wphhh) (merge vers: 5.1.55) (pib:23)
[16 Dec 2010 21:47] Bugs System
Pushed into mysql-trunk 5.6.1 (revid:alexander.nozdrin@oracle.com-20101216181820-7afubgk2fmuv9qsb) (version source revid:alexander.nozdrin@oracle.com-20101216173826-ze3y5h450sksotrh) (merge vers: 5.6.1) (pib:23)
[16 Dec 2010 22:27] Bugs System
Pushed into mysql-5.5 5.5.9 (revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (version source revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (merge vers: 5.5.9) (pib:24)
[17 Dec 2010 3:39] Paul DuBois
Changes to test suite. No changelog entry needed.
[17 Dec 2010 12:49] Bugs System
Pushed into mysql-5.1 5.1.55 (revid:georgi.kodinov@oracle.com-20101217124435-9imm43geck5u55qw) (version source revid:luis.soares@oracle.com-20101207142620-ln86kclusvbxacg5) (merge vers: 5.1.55) (pib:24)
[17 Dec 2010 12:53] Bugs System
Pushed into mysql-5.5 5.5.9 (revid:georgi.kodinov@oracle.com-20101217124733-p1ivu6higouawv8l) (version source revid:luis.soares@oracle.com-20101207143100-0fix15a9kbkdpsd5) (merge vers: 5.5.8) (pib:24)
[17 Dec 2010 12:56] Bugs System
Pushed into mysql-trunk 5.6.1 (revid:georgi.kodinov@oracle.com-20101217125013-y8pb3az32rtbplc9) (version source revid:anitha.gopi@sun.com-20101210041312-50t9adyhwwybsm6x) (merge vers: 5.6.1) (pib:24)