Bug #48934 | Delete from table; 3600 rows not replicated from MASTER to SLAVE | ||
---|---|---|---|
Submitted: | 20 Nov 2009 9:17 | Modified: | 19 Jul 2010 9:20 |
Reporter: | Jaap Postuma | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Cluster: Replication | Severity: | S2 (Serious) |
Version: | mysql-5.1-telco-7.0, 7.1.4b | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | delete, failing, replication |
[20 Nov 2009 9:17]
Jaap Postuma
[20 Nov 2009 9:48]
Hartmut Holzgraefe
Two quick questions: - how long does it take to execute the DELETE on the master? - what does the CREATE statement for the table look like?
[20 Nov 2009 10:00]
Jaap Postuma
The DELETE statement is executed very rapidly, for sure within 1 second. The INSERT statement looks like. It is just a small row inside table Towns within database snadb. "INSERT INTO Towns (CityNumber,CityId,TimeStamp) values ($citynumber,$citynumber,${TimeStamp})" snadb
[20 Nov 2009 11:42]
Hartmut Holzgraefe
I was actually more interested in the output of SHOW CREATE TABLE `Towns`; ...
[20 Nov 2009 12:23]
Jaap Postuma
mysql> SHOW CREATE TABLE `Towns`; +-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Towns | CREATE TABLE `Towns` ( `CityNumber` int(15) DEFAULT NULL, `CityId` int(15) DEFAULT NULL, `TimeStamp` char(30) DEFAULT NULL ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 | +-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql>
[1 Dec 2009 12:24]
Jonas Oreland
the problem is that the table does not have a primary key,
[3 Dec 2009 10:11]
Jaap Postuma
Eventhough no primary key, I assume that it is still faulty.
[9 Dec 2009 15:51]
Jaap Postuma
Just to confirm that with PRIMARY KEY the problem does not occur. So problem only applicable if no PRIMARY KEY specified.
[19 Jul 2010 9:20]
Sveta Smirnova
Thank you for the feedback. Verified as described. Test case for MTR: --source include/have_binlog_format_mixed_or_row.inc --source include/have_ndb.inc --source include/ndb_master-slave.inc CREATE TABLE `Towns` ( `CityNumber` int(15) DEFAULT NULL, `CityId` int(15) DEFAULT NULL, `TimeStamp` char(30) DEFAULT NULL ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ; --disable_query_log let $i=4000; while ($i) { --eval insert into Towns values($i, $i, '$i') dec $i; } --enable_query_log delete from Towns; select count(*) from Towns; sleep 3; connection slave; select count(*) from Towns; --vertical_results show slave status;