Bug #41579 Replication from NDBCLUSTER to other storage engines problem
Submitted: 18 Dec 2008 5:25 Modified: 18 Dec 2008 8:53
Reporter: liu yunfei Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Cluster: Replication Severity:S2 (Serious)
Version:5.1.23-ndb-6.2.15-log OS:Linux
Assigned to: CPU Architecture:Any
Tags: replication

[18 Dec 2008 5:25] liu yunfei
Description:
1. master : ndbcluster + InnoDB (binlog_format=ROW)
   slave: InnoDB
2. a. ndbcluster replication to InnoDB  (ok);
   b. InnoDB replication to InnoDB (ok);
   c. ndbcluster replication to InnoDB is failed after InnoDB replication to InnoDB (fialed);

mysql> show innodb status \G;
*************************** 1. row ***************************
  Type: InnoDB
  Name: 
Status: 
=====================================
081217 21:38:05 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 0 seconds
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 236, signal count 236
Mutex spin waits 0, rounds 16550, OS waits 16
RW-shared spins 462, OS waits 213; RW-excl spins 8, OS waits 7
------------
TRANSACTIONS
------------
Trx id counter 0 4337983
Purge done for trx's n:o < 0 4336655 undo n:o < 0 0
History list length 13
Total number of lock structs in row lock hash table 0
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0 0, not started, process no 12574, OS thread id 2248113056
MySQL thread id 2635, query id 22002 localhost root
show innodb status
---TRANSACTION 0 0, not started, process no 12574, OS thread id 2274552736
MySQL thread id 2634, query id 21987 localhost root
---TRANSACTION 0 0, not started, process no 12574, OS thread id 2425109408
MySQL thread id 894, query id 12448 localhost root
---TRANSACTION 0 4336656, ACTIVE 2709 sec, process no 12574, OS thread id 2425912224
1 lock struct(s), heap size 320, 0 row lock(s), undo log entries 501
MySQL thread id 1349, query id 21665 Has read all relay log; waiting for the slave I/O thread to update it
--------
FILE I/O
--------
I/O thread 0 state: waiting for i/o request (insert buffer thread)
I/O thread 1 state: waiting for i/o request (log thread)
I/O thread 2 state: waiting for i/o request (read thread)
I/O thread 3 state: waiting for i/o request (write thread)
Pending normal aio reads: 0, aio writes: 0,
 ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 0
19255 OS file reads, 5449 OS file writes, 3664 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 90, seg size 92,
0 inserts, 0 merged recs, 0 merges
Hash table size 1452727, used cells 494, node heap has 2 buffer(s)
0.00 hash searches/s, 0.00 non-hash searches/s
---
LOG
---
Log sequence number 0 3638046713
Log flushed up to   0 3638046713
Last checkpoint at  0 3638046713
0 pending log writes, 0 pending chkp writes
3249 log i/o's done, 0.00 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 411510924; in additional pool allocated 1048576
Dictionary memory allocated 1020800
Buffer pool size   22400
Free buffers       0
Database pages     22398
Modified db pages  0
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages read 31107, created 1677, written 11908
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
No buffer pool page gets since the last printout
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
1 read views open inside InnoDB
Main thread process no. 12574, id 2571234208, state: waiting for server activity
Number of rows inserted 110003, updated 12, deleted 132001, read 113561128
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================

1 row in set, 1 warning (0.01 sec)

How to repeat:
1. master : 
create table a ( a int,b int) engine=ndb ;
create table b ( a int,b int) engine=innodb;
(binlog_format=ROW)

2. slave:
create table a ( a int,b int) engine=innodb ;
create table b ( a int,b int) engine=innodb ;

3.start replication
    insert into b (a,b) values (2,2);
    ... ...
    
    insert into a (a,b) values (2,2); 
    slave failed(Sometimes).
[18 Dec 2008 5:27] liu yunfei
master :my.cnf

Attachment: Untitled.txt (text/plain), 3.36 KiB.

[18 Dec 2008 5:30] liu yunfei
master : my.cnf

Attachment: my.cnf (application/octet-stream, text), 2.59 KiB.

[18 Dec 2008 5:32] liu yunfei
cluster config

Attachment: ndbconfig.ini (application/octet-stream, text), 7.49 KiB.

[18 Dec 2008 5:37] liu yunfei
slave :my.cnf

Attachment: my.cnf (application/octet-stream, text), 1.61 KiB.

[18 Dec 2008 8:53] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

When replication NDB->InnoDB failed slave thread stops and should be fixed manually. So what NDB->NDB replication fails after such statement is expected. Please read http://dev.mysql.com/doc/refman/5.1/en/replication-problems.html for instructions how to do it.