DELETE Query Gives Error: "Got error 147 when reading table" (Doc ID 2095316.1)

Last updated on FEBRUARY 16, 2016

Applies to:

MySQL Server - Version 5.0 and later
Information in this document applies to any platform.

Symptoms

When trying to delete from the t1_detail table, the following error occurs in the MySQL Error log:

=====================================
2015-12-19 20:08:18 7fd00e4db700 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 16 seconds
...
------------
TRANSACTIONS
------------
Trx id counter 45261376
Purge done for trx's n:o < 45261093 undo n:o < 0 state: running but idle
History list length 2427
LIST OF TRANSACTIONS FOR EACH SESSION:
...
---TRANSACTION 45240024, ACTIVE 1722 sec starting index read
mysql tables in use 2, locked 2
2430745 lock struct(s), heap size 292419112, 632923979 row lock(s)
MySQL thread id 720673, OS thread handle 0x7fd070110700, query id 92753279 192.168.100.13 u_test preparing
DELETE FROM t1_detail WHERE t_id in (SELECT id from t1 where n_id=1841540)
...
----------------------------
END OF INNODB MONITOR OUTPUT
============================
2015-12-19 20:08:49 2578 [ERROR] Got error 147 when reading table './test/t1'

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms