Error
Error Code:
1099
MariaDB Error 1099: Table Read-Locked Update Failure
Description
This error occurs when an attempt is made to modify a table that is currently held under a `READ` lock by another session or operation. A `READ` lock explicitly prevents any `WRITE` operations on the table, ensuring data consistency during read-heavy tasks or administrative operations. MariaDB prevents the update to avoid data corruption or unexpected behavior.
Error Message
Table '%s' was locked with a READ lock and can't be updated
Known Causes
3 known causesExplicit `LOCK TABLES ... READ`
Another database session or process has explicitly acquired a `READ` lock on the table using the `LOCK TABLES ... READ` statement, which prevents all write operations until released.
Global Read Lock Active
A global read lock (e.g., `FLUSH TABLES WITH READ LOCK` or a similar administrative command) is currently active, blocking writes to all tables in the database for consistency purposes.
Unreleased Application Lock
An application or script acquired a `READ` lock on the table but failed to release it, causing subsequent update attempts to be blocked indefinitely.
Solutions
Coming SoonGeneral Troubleshooting Tips
- Check the error message carefully for specific details
- Review recent changes that might have caused the error
- Search for the exact error code in the official documentation
- Check log files for additional context
- Try restarting the application or service