Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.17, 10.3.8
Description
When a table is renamed to an internal #sql2 or #sql-ib name during a table-rebuilding DDL operation such as OPTIMIZE TABLE or ALTER TABLE, and shortly after that a purge operation in an index on virtual columns is attempted, the operation could fail, but purge would fail to release the table reference:
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
|
index c3a6bd663b3..35e091e0f11 100644
|
--- a/storage/innobase/handler/ha_innodb.cc
|
+++ b/storage/innobase/handler/ha_innodb.cc
|
@@ -21425,6 +21425,7 @@ static TABLE* innodb_acquire_mdl(THD* thd, dict_table_t* table)
|
|
if (!table_name_parse(table->name, db_buf, tbl_buf,
|
db_buf_len, tbl_buf_len)) {
|
+ table->release();
|
return NULL;
|
}
|
|
This bug was found during the development of a backup-friendly TRUNCATE (RENAME, CREATE, DROP) in MDEV-13564. It would occasionally cause the TRUNCATE TABLE statement to hang during the DROP part in the test gcol.innodb_virtual_purge_debug.
A similar hang should be possible in a table-rebuilding ALTER TABLE of a table that had indexed virtual columns before the operation.
Attachments
Issue Links
- is caused by
-
MDEV-15855 Assertion `mysql_table' failed in innobase_get_computed_value upon DDL/DML on a table with virtual columns
- Closed
- relates to
-
MDEV-13564 TRUNCATE TABLE and undo tablespace truncation are not compatible with Mariabackup
- Closed