Bug #40867 1032 error when executing delete on an innodb table
Submitted: 19 Nov 2008 21:26 Modified: 2 Jan 2009 9:42
Reporter: van pham Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S2 (Serious)
Version:5.1.29 OS:Linux
Assigned to: CPU Architecture:Any

[19 Nov 2008 21:26] van pham
Description:
We have been experiencing the following errors for the last few days and upgrading to Mysql  5.1.29-rc-log did not seems to help: 

Last_SQL_Errno: 1032
               Last_SQL_Error: Could not execute Delete_rows event on table openfire.jivePresence; Can't find record in 'jivePresence', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master.000034, end_log_pos 252606019

and 

Last_SQL_Errno: 1032
               Last_SQL_Error: Could not execute Delete_rows event on table openfire.jivePresence; Can't find record in 'jivePresence', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master.000034, end_log_pos 252606019

Is there anything that I can do or is there a patch that I can install that would resolve this problem ?

How to repeat:
deleting any event on table jivePresence or any innodb or Myisam tables seems to trigger this problem. Here is the ddl for this table:

CREATE TABLE `jivePresence` (
  `username` varchar(64) NOT NULL,
  `offlinePresence` text,
  `offlineDate` char(15) NOT NULL,
  PRIMARY KEY (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
[19 Nov 2008 21:57] Sveta Smirnova
Thank you for the report.

You said in description "1032 error when executing delete on an innodb table", but provided SHOW CREATE of MyISAM table. Which engine do you use?

Also, please, provide error log and output of CHECK TABLE jivePresence
[20 Nov 2008 6:09] Sveta Smirnova
Thank you for the feedback.

Looks similar to bug #40278. Did you provide output of SHOW CREATE on master or on slave? Does table use same engine on master and slave? Do you see this error for every DELETE query or only periodically?

Please also send master.000034, so we can guess which events do you issue.
[20 Nov 2008 17:08] van pham
This is a dual master server name red & green. Green is the server that is having problem. The output of SHOW CREATE on Green (slave & master of red) was provided since it's the only one with problem. This is a production server so I like to resolve this as soon as possible and upgrading Green to 5.1.29 did not fix this issue.

This is the show create on RED (master and slave of Green):
CREATE TABLE `jivePresence` (
  `username` varchar(64) NOT NULL,
  `offlinePresence` text,
  `offlineDate` char(15) NOT NULL,
  PRIMARY KEY (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1

Essentially the table is of the same engine and format on both servers.
[2 Dec 2008 9:42] Sveta Smirnova
Thank you for the feedback.

Could you please also send master.000034, so we can guess which events do you issue?
[3 Jan 2009 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".