Bug #55173 ERROR 1032 (HY000) at line XXXX: Can't find record in 'tablenameXXXXXXX'
Submitted: 12 Jul 2010 9:34 Modified: 13 Aug 2010 6:57
Reporter: Anil Alpati Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Replication Severity:S1 (Critical)
Version:5.1.45 OS:Linux
Assigned to: CPU Architecture:Any

[12 Jul 2010 9:34] Anil Alpati
Description:
ERROR 1032 (HY000) at line XXXX: Can't find record in 'tablenameXXXXXXX'.

How to repeat:
ERROR 1032 (HY000) at line XXXX: Can't find record in 'tablenameXXXXXXX'
[12 Jul 2010 9:39] Valeriy Kravchuk
Why do you think that this error message is the result of some bug in MySQL code? 

Please, send the results of CHECK TABLE ... EXTENDED for the table in question and send server's error log also.
[12 Jul 2010 10:39] Anil Alpati
SERVER LOGS - 

100712  2:42:46 [Note] Event Scheduler: Purging the queue. 0 events
100712  2:42:48  InnoDB: Starting shutdown...
100712  2:42:51  InnoDB: Shutdown completed; log sequence number 334 2439509139
100712  2:42:51 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

100712 02:42:51 mysqld_safe mysqld from pid file /usr/local/mysql/data/gfs.pid ended
100712 02:43:14 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
100712  2:43:14 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
100712  2:43:15 [Note] Plugin 'FEDERATED' is disabled.
100712  2:43:17  InnoDB: Started; log sequence number 334 2439509139
100712  2:43:17 [Note] Event Scheduler: Loaded 0 events
100712  2:43:17 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.1.45-enterprise-gpl-advanced'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Enterprise Server - Advanced Edition (GPL)
100712  2:44:23 [ERROR] Slave SQL: Could not execute Delete_rows event on table microfindb.journal; Can't find record in 'journal', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log FIRST, end_log_pos 100675, Error_code: 1032
100712  3:19:02 [ERROR] Slave SQL: Could not execute Delete_rows event on table microfindb.journal; Can't find record in 'journal', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log FIRST, end_log_pos 135342, Error_code: 1032

CHECK TABLE 
mysql> check table microfindb.journal EXTENDED;
+--------------------+-------+----------+----------+
| Table              | Op    | Msg_type | Msg_text |
+--------------------+-------+----------+----------+
| microfindb.journal | check | status   | OK       |
+--------------------+-------+----------+----------+
1 row in set (0.68 sec)

Awaiting your feedback
[12 Jul 2010 11:56] Valeriy Kravchuk
Please, send the results of SHOW CREATE TABLE and SHOW TABLE STATUS for the problematic table. Also, as error happens on slave, please, try to find out what exact statement causes it from master's binary log. 

Is it possible that you modify data on slave and record that master refers to does not exist on slave as a result?
[12 Jul 2010 12:23] Anil Alpati
SHOW CREATE TABLE - 
===
CREATE TABLE `journal` (
  `DeptId` varchar(10) NOT NULL DEFAULT '',
  `TransactionDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `VoucherNo` varchar(15) NOT NULL DEFAULT '',
  `AccountCode` varchar(10) NOT NULL DEFAULT '',
  `TransactionType` varchar(2) NOT NULL DEFAULT '',
  `Debit` decimal(10,2) DEFAULT NULL,
  `Credit` decimal(10,2) DEFAULT NULL,
  `Narration` text,
  `VoucherType` varchar(10) DEFAULT NULL,
  `Reference` varchar(10) DEFAULT NULL,
  `DetailNaration` text,
  `UserID` varchar(1) DEFAULT NULL,
  `UserName` varchar(15) DEFAULT NULL,
  `RecordDate` datetime DEFAULT NULL,
  `Insertable` varchar(1) DEFAULT NULL,
  PRIMARY KEY (`DeptId`,`TransactionDate`,`VoucherNo`,`AccountCode`,`TransactionType`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

====
[12 Jul 2010 12:53] Valeriy Kravchuk
OK, what about other requests from my previous comment?
[12 Jul 2010 13:12] Anil Alpati
Sorry its was not pasted properly.

SHOW TABLE STATUS returns ZERO Records

Yes, ERRORS happens on SLAVE.

which exact statement caused you are trying get from me. I'm seeing binary log looks fine ( I have changed binary log to verbose mode and every thing looks fine )

[Valeriy Kravchuk] - Is it possible that you modify data on slave and record that master refers to does not exist on slave as a result?

[Anil Alpati] - NO I haven't  updated on SLAVE databases
[12 Jul 2010 13:20] Valeriy Kravchuk
Please, send the results of

show slave status\G

from this slave server. I want to find out what exact DELETE statement failed.
[13 Jul 2010 4:34] Anil Alpati
Yes mentioned in yesterday's comment. I have not opened any SLAVE option in MASTER SERVER Configuration Settings.
[13 Jul 2010 4:36] Anil Alpati
I am just running incremental backups ( binary logs) manually in SLAVE Server
[13 Jul 2010 6:57] Valeriy Kravchuk
So, where is complete text of DELETE statement that failed?

To put it simple: to declare this a bug we need a repeatable test case that can be reproduced on any other machines. I am trying to find out some details for such a test case, without much success.
[13 Aug 2010 23: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".