Bug #47228 Incorrect conducting or loading binary logs
Submitted: 9 Sep 2009 19:00 Modified: 10 Sep 2009 18:46
Reporter: Ivan Ivanov Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:mysql-5.1-telco-7.0 OS:Any (tested on freebsd and linux)
Assigned to: CPU Architecture:Any
Tags: 5.1.34-ndb-7.0.6, 5.1.38, binlog, mysqlbinlog, ndb, ndbcluster, recovery, telco-7.0 bzr
Triage: Triaged: D2 (Serious) / R6 (Needs Assessment) / E6 (Needs Assessment)

[9 Sep 2009 19:00] Ivan Ivanov
Description:
At restoring from binary logs on ndbcluster engine if in the table it is used "UNIQUE KEY" the data load incorrectly.

How to repeat:
mysql>  CREATE TABLE `testndb`( `id` int(11) NOT NULL DEFAULT '0',
`name` varchar(32) DEFAULT NULL, `name2` varchar(32) DEFAULT NULL,
`number` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `number` (`number`) ) ENGINE=ndbcluster DEFAULT CHARSET=latin1;

mysql> insert into test.testndb set id=1,name='ivan',name2='ivanov',number=10;
Query OK, 1 row affected (0.02 sec)                                           

mysql> update test.testndb set number=20 where id=1;
Query OK, 1 row affected (0.00 sec)                 
Rows matched: 1  Changed: 1  Warnings: 0            

mysqlbinlog mysql-bin.000001 > load.sql

mysql> delete from test.testndb;
Query OK, 1 row affected (0.00 sec)

mysql> \. ./load.sql
ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY'

Suggested fix:
not known
[9 Sep 2009 21:06] Sveta Smirnova
Thank you for the report.

Verified as described.

To repeat one needs to follow instructions manually. If issue same statements using MTR I get no error, but table is not updated same time.
[10 Sep 2009 18:46] Ivan Ivanov
Здравствуйте!
Мы можем как-нибудь помочь решению данной проблемы?
Наша база данных содержит множество уникальных ключей, поэтому мы крайне заинтересованы в скорейшем ее исправлении.
[10 Sep 2009 20:30] Sveta Smirnova
Ivan,

thank you for the feedback.

But this bug database is used by people from different countries, so English is official language and is only language which should be used here.

We will ask you for additional information if such information would be needed to fix the bug.