mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-23675 Assertion `pos < table->n_def' fails in dict_table_get_nth_col
- During insertion of clustered inde, InnoDB does the check for foreign key constraints. It rebuild the tuple based on foreign column names when there is no foreign index. While rebuilding, InnoDB should ignore the dropped columns.
This commit is contained in:
@ -741,6 +741,20 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (a GEOMETRY, INDEX(a(8)),
|
||||
FOREIGN KEY (a) REFERENCES x (xx)) ENGINE=InnoDB;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-23675 Assertion `pos < table->n_def' in dict_table_get_nth_col
|
||||
--echo #
|
||||
CREATE TABLE t1 (pk int PRIMARY KEY, a INT, b INT, c INT, KEY(c),
|
||||
FOREIGN KEY fx (b) REFERENCES t1 (c))
|
||||
ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1,0,10,10);
|
||||
ALTER TABLE t1 DROP a, ALGORITHM=INSTANT;
|
||||
SET FOREIGN_KEY_CHECKS= 0;
|
||||
DROP INDEX fx ON t1;
|
||||
INSERT INTO t1 VALUES (2,11,11);
|
||||
DROP TABLE t1;
|
||||
SET FOREIGN_KEY_CHECKS=DEFAULT;
|
||||
|
||||
-- echo # End of 10.4 tests
|
||||
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
Reference in New Issue
Block a user