Bug #19227 rpl_ndb_2innodb fails, does not replicate pk delete
Submitted: 20 Apr 2006 16:48 Modified: 14 Dec 2006 18:29
Reporter: Pekka Nousiainen Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S2 (Serious)
Version:5.1 bk src OS:Linux (Linux 32 Bit OS)
Assigned to: Assigned Account CPU Architecture:Any

[20 Apr 2006 16:48] Pekka Nousiainen
Description:
master: delete where id = 42
master: select count(*) => 4
--sync_slave_with_master
--sleep 5
slave : select count(*) => 5
[ not in all test cases ]

rpl_ndb_2myisam works

How to repeat:
./mysql-test-run.pl --with-ndbcluster --mysqld=--binlog-format=row rpl_ndb_2innodb
[20 Apr 2006 17:06] Valeriy Kravchuk
Thank you for a problem report. Verified just as described with 5.0.10-BK (ChangeSet@1.2365, 2006-04-20 13:32:41+02:00) on Linux:

openxs@suse:~/dbs/5.1/mysql-test> ./mysql-test-run.pl --with-ndbcluster --mysqld=--binlog-format=row rpl_ndb_2innodb
Using ndbcluster, mysqld supports it
Skipping SSL, mysqld not compiled with SSL
Using MTR_BUILD_THREAD      = 0
Using MASTER_MYPORT         = 9306
Using MASTER_MYPORT1        = 9307
Using SLAVE_MYPORT          = 9308
Using SLAVE_MYPORT1         = 9309
Using SLAVE_MYPORT2         = 9310
Using NDBCLUSTER_PORT       = 9310
Using NDBCLUSTER_PORT_SLAVE = 9311
Using IM_PORT               = 9312
Using IM_MYSQLD1_PORT       = 9313
Using IM_MYSQLD2_PORT       = 9314
Killing Possible Leftover Processes
Removing Stale Files
Installing Master Databases
Installing Master Databases
Installing Slave Databases
Installing Slave Databases
Installing Slave Databases
Creating IM password file (/home/openxs/dbs/5.1/mysql-test/var/im.passwd)
Installing Im_mysqld_1 Databases
Installing Im_mysqld_2 Databases
Installing ndbcluster master
Starting ndbd 1(2)
Starting ndbd 2(2)
Waiting for started...
Ok
Installing ndbcluster slave
Starting ndbd 1(1)
Waiting for started...
Ok
=======================================================
Finding  Tests in the 'main' suite
Starting Tests in the 'main' suite

TEST                           RESULT         TIME (ms)
-------------------------------------------------------

rpl_ndb_2innodb                [ fail ]

Errors are (from /home/openxs/dbs/5.1/mysql-test/var/log/mysqltest-time) :
/home/openxs/dbs/5.1/bin/mysqltest: Can't get stat of '/home/openxs/dbs/5.1/mysq
l-test/r/rpl_ndb_2innodb.result' (Errcode: 2)
(the last lines may be the most important ones)
Result from queries before failure can be found in r/rpl_ndb_2innodb.log

Aborting: rpl_ndb_2innodb failed in default mode. To continue, re-run with '--fo
rce'.
Ending Tests
Shutting-down MySQL daemon

Master(s) shutdown finished
Slave(s) shutdown finished
openxs@suse:~/dbs/5.1/mysql-test> tail r/rpl_ndb_2innodb.log
COUNT(*)
4
--- Show current count on slave for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
5
DELETE FROM t1;
--- End test 5 key partition testing ---
--- Do Cleanup ---
DROP TABLE IF EXISTS t1;
[15 Sep 2006 15:58] Lars Thalmann
There is still disabled test cases for this bug:

rpl_ndb_2innodb          : BUG#19227 2006-04-20 pekka pk delete apparently not replicated
rpl_ndb_2myisam          : BUG#19227 Seems to pass currently

Please check if these test cases are still failing
and update disabled.def if not.
[15 Sep 2006 18:09] Pekka Nousiainen
rpl_ndb_2myisam has never failed far as I know
[14 Dec 2006 18:29] Andrei Elkin
Bug #19259 rpl_ndb_dd_partitions also fails at copy-and-paste CREATE partitioned query of ndb.
Set this one as a dup.
[15 Mar 2007 8:47] Mats Kindahl
Please see BUG #26591, since that seems to be potential cause of failure.
[20 Aug 2007 17:30] Rafal Somla
When trying to run rpl_ndb_2xxx tests on the current tree (5.1.21) I hit these problems:

a) File ndb_mastr-slave.inc doesn't work correctly and causes tests to fail;

This can be fixed by using master-slave.inc instead.

b) Statement "DELETE FROM t1" used in the tests causes slave to fail because of violated assertion (BUG#28538);

This can be avoided by using "TRUNCATE TABLE t1" instead.

c) Replication fails for partitioned tables.

d) When ndb table is modified on table and this is written to binlog in row mode, the binlog entry contains also modifications of mysql.ndb_apply_status table. If on slave the table uses other engine (myisam,innodb), slave reports error and stops when applying such replication event. This is because changes to tables using ndb and other (incompatibile) engine can not be logged correctly.

This can be fixed by adding --replicate-wild-ignore-table=mysql.ndb_% option to
slave server.

See BUG#21842 for some temporary fixes making it possible to run these tests.
[4 Sep 2007 17:12] Bugs System
Pushed into 5.1.23-beta
[30 Oct 2007 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/36638

ChangeSet@1.2679, 2007-10-30 12:54:01+01:00, tomas@whalegate.ndb.mysql.com +12 -0
  bug#19227
  - enable logging of full rows and update as updates to make binlog compatible with other engines
[30 Oct 2007 15:19] 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/36664

ChangeSet@1.2681, 2007-10-30 16:22:06+01:00, tomas@whalegate.ndb.mysql.com +1 -0
  bug#19227
  - small correction to harmonize code
[5 Nov 2007 13:53] Bugs System
Pushed into 6.0.4-alpha
[8 Nov 2007 14:32] Jon Stephens
Documented fix in 6.0.4 changelog - see Bug #19259 of which this bug is a duplicate.