mirror of
https://github.com/MariaDB/server.git
synced 2025-05-28 13:01:41 +03:00
MDEV-18016: Cover the no-rebuild case, and remove a bogus debug assertion
The code path where the table was not being rebuilt during ALTER TABLE was not covered by the test. Add coverage, and remove the debug assertion that could fail in this case.
This commit is contained in:
parent
af3cbb51ce
commit
be25414828
@ -82,3 +82,13 @@ ALTER TABLE t1 ADD FULLTEXT INDEX ft2 (f);
|
||||
Warnings:
|
||||
Warning 1088 failed to load FOREIGN KEY constraints
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f VARCHAR(256), FTS_DOC_ID BIGINT UNSIGNED PRIMARY KEY)
|
||||
ENGINE=InnoDB;
|
||||
SET SESSION FOREIGN_KEY_CHECKS = OFF;
|
||||
ALTER TABLE t1 ADD FOREIGN KEY (f) REFERENCES non_existing_table (x);
|
||||
SET SESSION FOREIGN_KEY_CHECKS = ON;
|
||||
ALTER TABLE t1 ADD FULLTEXT INDEX ft1 (f);
|
||||
Warnings:
|
||||
Warning 1088 failed to load FOREIGN KEY constraints
|
||||
ALTER TABLE t1 ADD FULLTEXT INDEX ft2 (f);
|
||||
DROP TABLE t1;
|
||||
|
@ -104,3 +104,12 @@ SET SESSION FOREIGN_KEY_CHECKS = ON;
|
||||
ALTER TABLE t1 ADD FULLTEXT INDEX ft1 (f);
|
||||
ALTER TABLE t1 ADD FULLTEXT INDEX ft2 (f);
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1 (f VARCHAR(256), FTS_DOC_ID BIGINT UNSIGNED PRIMARY KEY)
|
||||
ENGINE=InnoDB;
|
||||
SET SESSION FOREIGN_KEY_CHECKS = OFF;
|
||||
ALTER TABLE t1 ADD FOREIGN KEY (f) REFERENCES non_existing_table (x);
|
||||
SET SESSION FOREIGN_KEY_CHECKS = ON;
|
||||
ALTER TABLE t1 ADD FULLTEXT INDEX ft1 (f);
|
||||
ALTER TABLE t1 ADD FULLTEXT INDEX ft2 (f);
|
||||
DROP TABLE t1;
|
||||
|
@ -6163,7 +6163,6 @@ foreign_fail:
|
||||
|
||||
if (!commit_cache_norebuild(ctx, table, trx)) {
|
||||
fk_fail = true;
|
||||
ut_ad(!prebuilt->trx->check_foreigns);
|
||||
}
|
||||
|
||||
innobase_rename_columns_cache(ha_alter_info, table,
|
||||
|
@ -6181,7 +6181,6 @@ foreign_fail:
|
||||
|
||||
if (!commit_cache_norebuild(ctx, table, trx)) {
|
||||
fk_fail = true;
|
||||
ut_ad(!prebuilt->trx->check_foreigns);
|
||||
}
|
||||
|
||||
innobase_rename_columns_cache(ha_alter_info, table,
|
||||
|
Loading…
x
Reference in New Issue
Block a user