MDEV-17432 Assertion `lock_trx_has_sys_table_locks(trx) == 0' failed upon...

MDEV-17432 Assertion `lock_trx_has_sys_table_locks(trx) == 0' failed upon ALTER TABLE .. ADD FOREIGN KEY

- This is a regression of commit b26e603a. While dropping
the incompletely created table, InnoDB shouldn't consider that operation as non-atomic one.
parent 46960365
......@@ -207,3 +207,9 @@ DROP TABLE tr,tc,td,tz,tp;
--list_files $bugdir
--remove_files_wildcard $bugdir
--rmdir $bugdir
call mtr.add_suppression("ERROR HY000: Can't create table `test`.`t1`");
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1(f1 INT, f2 VARCHAR(1), KEY k1(f2),
FULLTEXT KEY(f2),
FOREIGN KEY (f2) REFERENCES t1(f3))ENGINE=InnoDB;
......@@ -12865,7 +12865,8 @@ ha_innobase::create(
if (info.drop_before_rollback()) {
trx->error_state = DB_SUCCESS;
row_drop_table_for_mysql(info.table_name(),
trx, SQLCOM_TRUNCATE, true);
trx, SQLCOM_TRUNCATE, true,
false);
}
trx_rollback_for_mysql(trx);
row_mysql_unlock_data_dictionary(trx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment