Bug #56913 rpl_row_ignorable_event fails sporadically on next-mr-bugfixing codebase.
Submitted: 21 Sep 2010 23:39 Modified: 15 Nov 2010 19:37
Reporter: Luis Manuel Oliveira Soares Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Replication Severity:S3 (Non-critical)
Version:mysql-next-mr-bugfixing OS:Any
Assigned to: Daogang Qu CPU Architecture:Any

[21 Sep 2010 23:39] Luis Manuel Oliveira Soares
Description:
rpl_row_ignorable_event fails sporadically on several platforms
with the following symptom:

rpl.rpl_row_ignorable_event              [ fail ]
        Test ended at 2010-09-21 05:25:50

CURRENT_TEST: rpl.rpl_row_ignorable_event
--- /export/home2/pb2/test/sb_1-2299226-1285018746.18/mysql-5.6.99-m5-linux-i686-test/mysql-test/suite/rpl/r/rpl_row_ignorable_event.result	2010-09-20 15:33:45.000000000 +0300
+++ /export/home2/pb2/test/sb_1-2299226-1285018746.18/mysql-5.6.99-m5-linux-i686-test/mysql-test/suite/rpl/r/rpl_row_ignorable_event.reject	2010-09-21 06:25:50.000000000 +0300
@@ -132,6 +132,10 @@
 master-bin.000001	#	Rows_query	#	#	# insert delayed into t3(a,b) values(1,5),(1,6),(1,7)
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; create table t6(a VARCHAR(60)) engine= myisam
 master-bin.000001	#	Query	#	#	BEGIN
@@ -526,10 +530,18 @@
 ### SET
 ###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
 ###   @2=5 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t3` mapped to number #
+#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
 ### INSERT INTO test.t3
 ### SET
 ###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
 ###   @2=6 /* INT meta=0 nullable=1 is_null=0 */
+# at #
+# at #
+#server id #  end_log_pos # 	Table_map: `test`.`t3` mapped to number #
+#server id #  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
 ### INSERT INTO test.t3
 ### SET
 ###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
@@ -935,6 +947,16 @@
 slave-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
 slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
 slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# h&	°æ·elayed into t3(a,b) values(1,5),(1,6),(1,7)
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
+slave-bin.000001	#	Query	#	#	BEGIN
+slave-bin.000001	#	Rows_query	#	#	# h&	ðµ$	elayed into t3(a,b) values(1,5),(1,6),(1,7)
+slave-bin.000001	#	Table_map	#	#	table_id: # (test.t3)
+slave-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+slave-bin.000001	#	Query	#	#	COMMIT
 slave-bin.000001	#	Query	#	#	use `test`; create table t6(a VARCHAR(60)) engine= myisam
 slave-bin.000001	#	Query	#	#	BEGIN
 slave-bin.000001	#	Rows_query	#	#	# load data infile '../../std_data/words.dat' into table t6

mysqltest: Result content mismatch

This seems to be a different failure from the one reported before
on the valgrind run: BUG#56883.

How to repeat:
Check list of failures in xref: http://tinyurl.com/2do8393

Suggested fix:
.
[30 Sep 2010 4:26] 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/119471

3265 Dao-Gang.Qu@sun.com	2010-09-30
      Bug #56913    rpl_row_ignorable_event fails sporadically on next-mr-bugfixing codebase
      
      In RBR, every value is inserted into a queue for multi 'INSERT DELAYED ...'
      stmt by one thread. Then these values will be taken out and inserted
      into table in one execution series or in separate execution series by
      another thread parallelly. Values in one execution series will be
      binlogged into one rows event with its table map event, values in
      separate execution series will be binlogged into separate rows event
      with its table map event. So the binlog of multi 'INSERT DELAYED ...'
      stmt is unstable.
      
      To fix the problom to just test single 'INSERT DELAYED ...' stmt
      in the test.
     @ mysql-test/suite/rpl/r/rpl_row_ignorable_event.result
        Updated for the patch of Bug#56913.
     @ mysql-test/suite/rpl/t/rpl_row_ignorable_event.test
        Update to test single 'INSERT DELAYED ...' stmt as the binlog
        of multi 'INSERT DELAYED ...' stmt is unstable.
[5 Oct 2010 23:02] Omer Barnir
triage: setting tag to SRMRTBD
[9 Oct 2010 7: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/120421

3321 Dao-Gang.Qu@sun.com	2010-10-09
      Bug #56913    rpl_row_ignorable_event fails sporadically on next-mr-bugfixing codebase
      
      In RBR, every value is inserted into a queue for multi 'INSERT DELAYED ...'
      stmt by one thread. Then these values will be taken out and inserted
      into table in one execution series or in separate execution series by
      another thread parallelly. Values in one execution series will be
      binlogged into one rows event with its table map event, values in
      separate execution series will be binlogged into separate rows event
      with its table map event. So the binlog of multi 'INSERT DELAYED ...'
      stmt is unstable.
      
      To make the binlog of multi 'INSERT DELAYED ...' stmt stable to force
      every value is executed in one separate execution series, and then it
      will be binlogged into separate rows event with its table map event.
      And the original SQL statement will be displayed just for the first
      separate rows event because the query is NULL in other separate rows. 
     @ mysql-test/suite/rpl/r/rpl_row_ignorable_event.result
        Updated for the patch of Bug#56913.
     @ mysql-test/suite/rpl/t/rpl_row_ignorable_event.test
        Update to test single 'INSERT DELAYED ...' stmt as the binlog
        of multi 'INSERT DELAYED ...' stmt is unstable.
     @ sql/log_event.cc
        Added code to clear query in case the randomizing pointer
        to the query will be used to binlog Rows_query_log_event
        for the second and following separate rows events for
        multi 'INSERT DELAYED ...' stmt
     @ sql/sql_insert.cc
        Set DBUG point to make every value is executed in one separate
        execution series for multi 'INSERT DELAYED ...' stmt.
[12 Oct 2010 1:24] 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/120538

3321 Dao-Gang.Qu@sun.com	2010-10-12
      Bug #56913    rpl_row_ignorable_event fails sporadically on next-mr-bugfixing codebase
      
      In RBR, The rows are inserted to a queue by the thread that executing
      the 'INSERT DELAYED' statement, and are taken out from the queue by
      the handler thread to do the real insertion. Because these two threads
      are running in parallel, there is a possibility that they are run in a
      interweaved manner, and result in different number of table_map and
      rows events.
      
      Added a debug option for the test to make the binlog of multi
      'INSERT DELAYED ...' stmt stable to force every value is executed
      in one separate execution series, and then it will be binlogged
      into separate rows event with its table map event. And the original
      SQL statement will be displayed just for the first separate rows
      event because the query is NULL in other separate rows. 
     @ mysql-test/suite/rpl/r/rpl_row_ignorable_event.result
        Updated for the patch of Bug#56913.
     @ mysql-test/suite/rpl/t/rpl_row_ignorable_event.test
        Update to test single 'INSERT DELAYED ...' stmt as the binlog
        of multi 'INSERT DELAYED ...' stmt is unstable.
     @ sql/log_event.cc
        Added code to clear query in case the randomizing pointer
        to the query will be used to binlog Rows_query_log_event
        for the second and following separate rows events for
        multi 'INSERT DELAYED ...' stmt
     @ sql/sql_insert.cc
        Set DBUG point to make every value is executed in one separate
        execution series for multi 'INSERT DELAYED ...' stmt.
[15 Oct 2010 5:34] 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/120805

3324 Dao-Gang.Qu@sun.com	2010-10-15
      Bug #56913    rpl_row_ignorable_event fails sporadically on next-mr-bugfixing codebase
      
      In RBR, The rows are inserted to a queue by the thread executing
      the 'INSERT DELAYED' statement, and are taken out from the queue
      by the handler thread to do the real insertion. Because these two
      threads are running in parallel, there is a possibility that they
      are run in an interleaved manner, and result in different number
      of table_map and rows events.
      
      Added a debug option for the test to make the binlog of multi
      'INSERT DELAYED ...' stmt stable by forcing every value is
      executed into one execution series, and then each value will
      be binlogged into a separate rows event with its table map
      event. And the original SQL statement will be displayed just
      for the first separate rows event because the query is NULL
      in other separate rows. 
     @ mysql-test/suite/rpl/r/rpl_row_ignorable_event.result
        Updated for the patch of Bug#56913.
     @ mysql-test/suite/rpl/t/rpl_row_ignorable_event.test
        Updated to test single 'INSERT DELAYED ...' stmt as the binlog
        of multi 'INSERT DELAYED ...' stmt is unstable.
     @ sql/log_event.cc
        Added code to clear query in case the randomizing pointer
        to the query will be used to binlog Rows_query_log_event
        for the second and following separate rows events for
        multi 'INSERT DELAYED ...' stmt
     @ sql/sql_insert.cc
        Set DBUG point to make every value is executed in one separate
        execution series for multi 'INSERT DELAYED ...' stmt.
[15 Oct 2010 6:25] Daogang Qu
Pushed into mysql-next-mr-bugfixing.
[19 Oct 2010 8:55] 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/121071

3325 Dao-Gang.Qu@sun.com	2010-10-19
      Bug #56913    rpl_row_ignorable_event fails sporadically on next-mr-bugfixing codebase
      
      Post fix
     @ mysql-test/suite/rpl/t/rpl_row_ignorable_event.test
        Added debug check.
[13 Nov 2010 16:13] Bugs System
Pushed into mysql-trunk 5.6.99-m5 (revid:alexander.nozdrin@oracle.com-20101113155825-czmva9kg4n31anmu) (version source revid:vasil.dimov@oracle.com-20100629074804-359l9m9gniauxr94) (merge vers: 5.6.99-m4) (pib:21)
[13 Nov 2010 16:30] Bugs System
Pushed into mysql-next-mr (revid:alexander.nozdrin@oracle.com-20101113160336-atmtmfb3mzm4pz4i) (version source revid:jimmy.yang@oracle.com-20100804103744-vbpeghipkz6pyc9z) (pib:21)
[15 Nov 2010 19:37] Jon Stephens
Appears to affect testing only, closing without further action.