Bug #5312 | Ndb Cluster returns wrong error code for duplicate key at insert | ||
---|---|---|---|
Submitted: | 31 Aug 2004 9:08 | Modified: | 17 Nov 2004 14:04 |
Reporter: | Martin Skold | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S3 (Non-critical) |
Version: | OS: | Any | |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[31 Aug 2004 9:08]
Martin Skold
[31 Aug 2004 15:01]
Martin Skold
Pushed to mysql-4.1
[17 Nov 2004 14:04]
Martin Skold
We are backing out of this fix since this error code requires that the handler returns the key value that caused the error. This would be very expensive to do in a handler that can batch many inserts at once, all primary keys would then have to be saved for each batch wasting a lot of space. Error code 1022 is also a valid MySQL code and users should be prepared to get that one as well. An alternative would be to have some way of disable the key value part of error 1062 output (but then 1062 and 1022 would be identical).
[17 Nov 2004 15:52]
Martin Skold
Does not seem to be possible to use error code 1022 since then INSERT ... ON DUPLICATE KEY ... will not work! Oh well, innodb has the same bug, see we use 1062 anyhow then.
[14 May 2006 21:32]
Hartmut Holzgraefe
This seems to work as expected now in latest 4.1 and 5.0 now so that we can close this bug?
[13 Mar 2014 13:33]
Omer Barnir
This bug is not scheduled to be fixed at this time.