1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-18098 Crash after rollback of instant DROP COLUMN

dict_table_t::rollback_instant(): Restore dict_index_t::n_core_fields.
This commit is contained in:
Marko Mäkelä
2018-12-28 15:23:42 +02:00
parent dc90234bda
commit 6639fc3fda
4 changed files with 34 additions and 5 deletions

View File

@ -265,6 +265,7 @@ a b c d
DROP TABLE t1;
#
# MDEV-17899 Assertion failures on rollback of instant ADD/DROP
# MDEV-18098 Crash after rollback of instant DROP COLUMN
#
SET @save_dbug = @@SESSION.debug_dbug;
SET debug_dbug='+d,ib_commit_inplace_fail_1';
@ -283,11 +284,20 @@ DROP TABLE t1;
CREATE TABLE t1 (a int, b int) ENGINE=InnoDB;
ALTER TABLE t1 ADD COLUMN c INT;
ERROR HY000: Internal error: Injected error!
BEGIN;
INSERT INTO t1 VALUES(1, 1);
ROLLBACK;
ALTER TABLE t1 DROP COLUMN b;
ERROR HY000: Internal error: Injected error!
INSERT INTO t1 values (1,1);
SELECT * FROM t1;
a b
1 1
DROP TABLE t1;
SET debug_dbug = @save_dbug;
SELECT variable_value-@old_instant instants
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
instants
20
21
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;