Error
Error Code:
1100
MariaDB Error 1100: Table Not Locked
Description
This error occurs when an operation attempts to access or modify a table that was expected to be locked using the `LOCK TABLES` statement, but the required lock was not acquired. It indicates a discrepancy between the expected locking state of a table and its actual state, often in contexts requiring explicit table-level concurrency control.
Error Message
Table '%s' was not locked with LOCK TABLES
Known Causes
4 known causesMissing LOCK TABLES Statement
An application or script attempted an operation that requires a table lock, but the `LOCK TABLES` statement was not executed beforehand.
Incorrect Lock Type or Scope
A `LOCK TABLES` statement was used, but the specified lock type (e.g., `READ` instead of `WRITE`) was insufficient for the subsequent operation, or the lock was released prematurely.
Session Termination or Disconnect
The database session that acquired the table locks was terminated or disconnected unexpectedly, implicitly releasing all locks before the intended operations completed.
Implicit Lock Release by Other Operations
Another database operation, such as `ALTER TABLE` or `FLUSH TABLES WITH READ LOCK`, executed in a different session, implicitly released existing table locks.
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