Bug #27194 error 121: Duplicate key on write or update
Submitted: 16 Mar 2007 1:14 Modified: 24 Oct 2008 11:23
Reporter: Johan Andersson Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Replication Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.2 OS:Any (*)
Assigned to: CPU Architecture:Any
Tags: 5.1.16-mysql-6.2.0-ndb
Triage: Triaged: D4 (Minor) / R6 (Needs Assessment) / E6 (Needs Assessment)

[16 Mar 2007 1:14] Johan Andersson
Description:
070315 20:04:05 [ERROR] Slave: Error in Write_rows event: error during transaction execution on table vlr.privateid, Error_code: 121
070315 20:04:05 [ERROR] Slave (additional info): Unknown error Error_code: 1105
070315 20:04:05 [Warning] Slave: Got error 4209 'Length parameter in equal/setValue is incorrect' from NDB Error_code: 1296
070315 20:04:05 [Warning] Slave: Got error 4209 'Length parameter in equal/setValue is incorrect' from NDB Error_code: 1296
070315 20:04:05 [Warning] Slave: Unknown error Error_code: 1105
070315 20:04:05 [Warning] Slave: Unknown error Error_code: 1105
070315 20:04:05 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'l118-bin.000001' position 14280150

How to repeat:
two 1 node clusters
replicate from cluster A to B
update some simple stuff in a loop that put some pressure on the system.
Really easy to trigger and reproduce with some load. Not with mysql-test-run as the test tool..
[25 Jul 2007 11:09] Hartmut Holzgraefe
error 121 is actually "Duplicate key on write or update", 
perror in MySQL 5.x only shows the OS error message
on error numbers that exist as both OS and MySQL errors
(see Bug #30003)

1296 is ER_GET_ERRMSG and 
1105 is ER_UNKNOWN_ERROR 

so theese two are not really helpfull in any way here ...
[31 Jul 2008 13:49] Bernd Ocklin
Actually just the comment that many errors are mapped to 121 in write_row: see also comment to bug#38246.