Mani's Blog

August 5, 2011

Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND;

Filed under: MySQL — mani @ 10:13 pm
Tags:

I ran into this error while rebuilding slave off Master DB hot backup. The replication is stopped due to this error.

Here is the complete error
“Problem Description: Could not execute Delete_rows event on table inv002.invitation; Can’t find record in ‘invitation’, Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event’s master log binary-logs.000408, end_log_pos 4359444”

Later realized that event on the slave is enable obviously since it got refreshed from Master. General practice for event is “Enable only on Master and disable it on Slave”. This will avoid the conflict.

Disabling event resolved the issue.

(root@localhost) [inv001]> show events\G
*************************** 1. row ***************************
Db: inv001
Name: delete_old_invitations
Definer: root@localhost
Time zone: SYSTEM
Type: RECURRING
Execute at: NULL
Interval value: 5
Interval field: MINUTE
Starts: 2011-05-04 22:55:19
Ends: NULL
Status: ENABLED
Originator: 2000
character_set_client: utf8
collation_connection: utf8_general_ci
Database Collation: utf8_general_ci
1 row in set (0.00 sec)

(root@localhost) [inv001]> alter event delete_old_invitations disable;
Query OK, 0 rows affected (0.00 sec)

(root@localhost) [inv001]> show events\G
*************************** 1. row ***************************
Db: inv001
Name: delete_old_invitations
Definer: root@localhost
Time zone: SYSTEM
Type: RECURRING
Execute at: NULL
Interval value: 5
Interval field: MINUTE
Starts: 2011-05-04 22:55:19
Ends: NULL
Status: DISABLED
Originator: 2001
character_set_client: utf8
collation_connection: utf8_general_ci
Database Collation: utf8_general_ci
1 row in set (0.00 sec)

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: