Bug #41614 rpl_row_func003 fails sporadically: diff_files failed with error 2
Submitted: 19 Dec 2008 6:14 Modified: 8 Apr 2009 0:27
Reporter: Sven Sandberg Email Updates:
Status: Closed Impact on me:
None 
Category:Tests Severity:S7 (Test Cases)
Version:6.0, 5.1 OS:Any
Assigned to: Serge Kozlov CPU Architecture:Any
Tags: diff_files, pb2, pushbuild, rpl_row_func003, sporadic, test failure

[19 Dec 2008 6:14] Sven Sandberg
Description:
rpl_row_func003 started to fail sporadically in 6.0-rpl in the beginning of December:

rpl.rpl_row_func003                      [ fail ]
        Test ended at 2008-12-19 05:36:04

CURRENT_TEST: rpl.rpl_row_func003
mysqltest: In included file "./extra/rpl_tests/rpl_row_func003.test": At line 89: command "diff_files" failed with error 2

The result from queries just before the failure was:
< snip >
create function test.f1() RETURNS CHAR(16) 
BEGIN
DECLARE tmp CHAR(16);
DECLARE var_name FLOAT;
SET var_name = RAND();
IF var_name > .6 
THEN SET tmp = 'Texas';
ELSE SET tmp = 'MySQL';
END IF;
RETURN tmp;
END|
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
SET AUTOCOMMIT=0;
START TRANSACTION;
INSERT INTO test.t1 VALUES (null,test.f1());
ROLLBACK;
SET AUTOCOMMIT=1;
DROP FUNCTION test.f1;
DROP TABLE test.t1;

More results from queries before failure can be found in /dev/shm/var-ps_row-101/log/rpl_row_func003.log

 - saving '/dev/shm/var-ps_row-101/log/rpl.rpl_row_func003/' to '/dev/shm/var-ps_row-101/log/rpl.rpl_row_func003/'

Retrying test, attempt(2/3)...

Questions:
 - What does "error 2" mean on this host?
 - Is this related to the error in https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=bzr_mysql-6.0-falcon&order=109 vm-win2003-32-a/rpl_binlog_row ? The latter includes a result diff.

BUG#19074 and BUG#19057 are bugs in rpl_row_func003, but probably unrelated to the present bug.

How to repeat:
https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=bzr_mysql-6.0-rpl&order=130 sapsrv2/ps_row
xref: http://tinyurl.com/4y5w3z
[16 Feb 2009 14:20] Serge Kozlov
Error 2 for diff_files means RESULT_LENGTH_MISMATCH. 
The test needs a debug info if diff_files returns an error.
[16 Feb 2009 18:35] 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/66540

3051 Serge Kozlov	2009-02-16
      Bug#41614. Master and slave are not sync'ed in test case.
      Since test cases used for NDB engine too test case has two ways of synchronization:
      a) for NDB: call include/wait_for_ndb_to_binlog.inc (add by this patch)
      b) for other engines: sync_slave_with_master (already implemented)
      modified:
        mysql-test/extra/rpl_tests/rpl_row_func003.test

=== modified file 'mysql-test/extra/rpl_tests/rpl_row_func003.test'
--- a/mysql-test/extra/rpl_tests/rpl_row_func003.test	2008-12-05 17:56:03 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_row_func003.test	2009-02-16 18:34:01 +0000
@@ -26,7 +26,6 @@ DROP TABLE IF EXISTS test.t1;
 
 --enable_warnings
 
-
 eval CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=$engine_type;
 
 delimiter |;
@@ -71,6 +70,12 @@ SET AUTOCOMMIT=1;
 #used for debugging
 #show binlog events;
 
+# Sync master and slave for all engines except NDB
+if (`SELECT UPPER(LEFT('$engine_type', 3)) != 'NDB'`) {
+  sync_slave_with_master;
+  connection master;
+}
+
 # time to dump the databases and so we can see if they match
 
 --exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func003_master.sql

-- 
MySQL Code Commits Mailing List
For list archives: http://lists.mysql.com/commits
To unsubscribe:    http://lists.mysql.com/commits?unsub=commits@bugs.mysql.com
[18 Feb 2009 10:01] 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/66741

3057 Serge Kozlov	2009-02-18
      Bug#41614: The issue appears because slave did not sync'ed with master for non-NDB engines.
      1. Removed unused debug code.
      2. Added sync for non-NDB engines.
      2. Sync for NDB and non-NDB engines moved at one place
      modified:
        mysql-test/extra/rpl_tests/rpl_row_func003.test
[3 Mar 2009 20:03] 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/68139

3101 Serge Kozlov	2009-03-03
      Bug#41614: error 2 for diff_files means RESULT_LENGTH_MISMATCH.
      It can happen if slave did not sync'ed with master properly and dump of DB on slave happens too early. 
      The patch add sync with master for all engines (NDB and non-NDB) and clean up for dumped files.
      modified:
        mysql-test/extra/rpl_tests/rpl_row_func003.test
[6 Mar 2009 10:46] 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/68478

3109 Serge Kozlov	2009-03-06
      Bug#41614: error 2 for diff_files means RESULT_LENGTH_MISMATCH.
      It can happen if slave did not sync'ed with master properly and dump of DB on slave happens too early. The patch add sync with master for all engines (NDB and non-NDB) and clean up for dumped files.
      modified:
        mysql-test/extra/rpl_tests/rpl_row_func003.test
[18 Mar 2009 13:19] Bugs System
Pushed into 6.0.11-alpha (revid:joro@sun.com-20090318122208-1b5kvg6zeb4hxwp9) (version source revid:matthias.leich@sun.com-20090310140952-gwtoq87wykhji3zi) (merge vers: 6.0.11-alpha) (pib:6)
[8 Apr 2009 0:27] Paul DuBois
Test case changes. No changelog entry needed.