Bug #16677 Cluster returns different duplicate key error then other engines
Submitted: 20 Jan 2006 16:22 Modified: 17 Feb 2006 12:53
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:4.1-> OS:Linux (Linux)
Assigned to: Jon Stephens CPU Architecture:Any

[20 Jan 2006 16:22] Jonathan Miller
Description:
MyISAM: 1062
  CREATE TABLE t3 ( a INT UNIQUE );
  SET FOREIGN_KEY_CHECKS=0;
  INSERT INTO t3 VALUES (1),(1);
  ERROR 23000: Duplicate entry '1' for key 1
  SET FOREIGN_KEY_CHECKS=0;
  DROP TABLE IF EXISTS t1,t2,t3;
  SET FOREIGN_KEY_CHECKS=1;

NDB: 1022
  CREATE TABLE t3 ( a INT UNIQUE );
  SET FOREIGN_KEY_CHECKS=0;
  INSERT INTO t3 VALUES (1),(1);
! ERROR 23000: Can't write; duplicate key in table 't3'
  SET FOREIGN_KEY_CHECKS=0;
  DROP TABLE IF EXISTS t1,t2,t3;
  SET FOREIGN_KEY_CHECKS=1;

How to repeat:
See above

Suggested fix:
make errors consistent between engines
[7 Feb 2006 19:57] Martin Skold
This one will not be fixed as long as 1062 requires that
key value must be printed out. This does not work with
batching of inserts for cluster since it would require storing 
all keys in a batch, would require allocating lot's of memory.
[8 Feb 2006 7:29] Jon Stephens
Discussed with M Hillyer - setting category/status to Docs/Verified is the way to handle these cases.
[17 Feb 2006 12:53] Jon Stephens
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant
product(s).

Additional info:

Updated 4.1/5.0/5.2 Manual as suggested. Closed.