LOCKED are syntaxes added in MySQL 8.0 and MariaDB 10.3.
The idea came from AliSQL (MySQL fork by Alibaba). It was
revisited in MySQL, and I am not aware if MariaDB used the
While MySQL and MariaDB syntaxes are similar, there are important differences and the compatibility is only apparent. This article discusses these differences.
This syntax is only available in MariaDB. It means that, if a row or table that we want to read is write-locked, we can wait up to the specified number of seconds. If the lock is not released after the timeout occurs, the query will fail.
If a table or row we need to read is write-locked, the query will not be queued; instead, it will fail immediately.
- MariaDB supports this …