Comments - transaction control
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
Yes, `unlock tables` does an implicit commit too. Locking tables shouldn't be part of transactions, the control provided by start transaction and other partial row level locks like `select in share mode`, `select ... for update` should be sufficient.
LOCK TABLES is there for large system wide schema/backups but even then, if you are using them, your probably not following best practices in database schema changes or/backups.
thank you for answer.
i was using brackets to show the processflow. it ended with messing up everything. it so was hard to understand. sorry for that.
you therefore missed the hint the process does insert records. i was using the lock tables in order to prevent other users to lock table for the duration of my insert operation. otherwise everyone else could exclusively lock the table at any time while i'm working, means locks me out working.
lock table does an implicit commit mentioned in https://mariadb.com/kb/en/lock-tables/. this description is helpfull. i'm missing the information how long a lock is hold .. does a commit release locks? have to test this.
mentioning the implicit commit when unlock tables would complete the description https://mariadb.com/kb/en/transactions-unlock-tables/.
the implicit commit when unlock tables would complete description https://mariadb.com/kb/en/sql-statements-that-cause-an-implicit-commit/.
thank you and have a great day.