mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-15937 Assertion failure 'key->flags & 1' on ALTER TABLE
While the test case crashes a MariaDB 10.2 debug build only, let us apply the fix to the earliest applicable MariaDB series (10.0) to avoid any data corruption on a table-rebuilding ALTER TABLE using ALGORITHM=INPLACE. innobase_create_key_defs(): Use altered_table->s->primary_key when a new primary key is being created.
This commit is contained in:
@@ -71,6 +71,11 @@ WHERE NAME='test/t';
|
||||
|
||||
DROP TABLE t;
|
||||
|
||||
CREATE TABLE t1(c1 INT) ENGINE=InnoDB;
|
||||
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1(c1);
|
||||
ALTER TABLE t1 CHANGE c1 c1 INT NOT NULL,ADD KEY(c1);
|
||||
DROP TABLE t1;
|
||||
|
||||
# Check that all connections opened by test cases in this file are really
|
||||
# gone so execution of other tests won't be affected by their presence.
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
Reference in New Issue
Block a user