Bug #48215 IDEMPOTENT breaks on Unique key constraint violation on NDB only.
Submitted: 21 Oct 2009 20:54 Modified: 18 Nov 2011 11:49
Reporter: Andrew Hutchings Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Replication Severity:S2 (Serious)
Version:mysql-5.1-telco-6.3 OS:Any
Assigned to: CPU Architecture:Any
Tags: 6.3.26

[21 Oct 2009 20:54] Andrew Hutchings
Description:
When hitting a unique key constraint violation an NDB slave will stop whereas other engines continue in IDEMPOTENT mode.

How to repeat:
master> create table t4 (a int primary key auto_increment, b int, c int, unique (c)) engine=ndb;
master> insert into t4 values(null,1,2),(null,2,3);

mysqldump, insert dump into slave

master> delete from t4 where a=2;
master> show master status;

Use position recorded here to start slave.

master> insert into t4 values (null, 2, 3);

An NDB slave dies here with "Constraint violation e.g. duplicate value in unique index"

Suggested fix:
Either make NDB ignore this or make IDEMPOTENT break here for all engines.
[10 May 2010 13:37] Luis Soares
See also: BUG#52473.
[18 Nov 2011 11:49] Jonas Oreland
fixed in 7.1.17
[14 Dec 2011 0:04] Jon Stephens
Documented bugfix in the NDB 7.1.17 changelog as follows:

      A unique key constraint violation caused NDB slaves to stop rather than
      to continue when slave_exec_mode was IDEMPOTENT. In such cases, NDB
      now behaves as other MySQL storage engines so when in IDEMPOTENT mode.

(Already closed.)