1615: Prepared statement needs to be re-prepared
MySQLWhat does it mean?
Execution of a server-side prepared statement was rejected because it became invalid after the metadata it depends on (table/view definition) changed. The statement must be prepared again.
Why does it happen?
DDL (ALTER TABLE) on the underlying table after the statement was prepared, the table being recreated, the metadata cache filling up and evicting the entry, or table_definition_cache/table_open_cache limits that are too small. Common on systems with heavy DDL and in some ORM/pool scenarios.
How to fix it
Most client libraries catch this and re-prepare the statement automatically; in the application, catch this error and retry prepare + execute. If it recurs frequently, increase table_definition_cache and table_open_cache. Avoid unnecessary DDL during application traffic.
More from this engine
- 1236Got fatal error 1236 from master when reading data from binary log
- 1129Host 'host' is blocked because of many connection errors
- 1194Table 'name' is marked as crashed and should be repaired
- 1553Cannot drop index needed in a foreign key constraint
- 3948Loading local data is disabled; this must be enabled on both the client and server sides
- 1075Incorrect table definition; there can be only one auto column and it must be defined as a key
- 1055Expression not in GROUP BY (only_full_group_by)