[MDEV-15061] TRUNCATE TABLE should honor InnoDB table locks Created: 2018-01-25  Updated: 2018-02-04  Resolved: 2018-01-25

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 5.5, 10.0, 10.1, 10.2, 10.3
Fix Version/s: 10.3.5

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: consistency, ddl, truncate


 Description   

Traditionally, DROP TABLE and TRUNCATE TABLE discarded any locks that may have been held on the table. This feels like an ACID violation. Probably most occurrences of it were prevented by meta-data locks (MDL) which were introduced in MySQL 5.5.

It is cleaner to always protect DDL operations with an exclusive table lock. Other operations are doing this in MariaDB 10.3, but not TRUNCATE TABLE.


Generated at Thu Feb 08 08:18:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.