diff options
Diffstat (limited to 'mysql-test/suite/innodb/r/instant_alter_debug.result')
-rw-r--r-- | mysql-test/suite/innodb/r/instant_alter_debug.result | 66 |
1 files changed, 65 insertions, 1 deletions
diff --git a/mysql-test/suite/innodb/r/instant_alter_debug.result b/mysql-test/suite/innodb/r/instant_alter_debug.result index 62df17e066f..7ab24a7671b 100644 --- a/mysql-test/suite/innodb/r/instant_alter_debug.result +++ b/mysql-test/suite/innodb/r/instant_alter_debug.result @@ -1,5 +1,8 @@ SET @save_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency; SET GLOBAL innodb_purge_rseg_truncate_frequency=1; +SET @old_instant= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_instant_alter_column'); CREATE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY, c1 INT, @@ -197,7 +200,8 @@ DELETE FROM t1; connection ddl; SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged'; ALTER TABLE t1 FORCE; -disconnect stop_purge; +connection stop_purge; +COMMIT; connection default; SET DEBUG_SYNC = 'now WAIT_FOR copied'; InnoDB 1 transactions not purged @@ -211,6 +215,29 @@ SELECT * FROM t1; a b c 1 2 NULL 2 3 4 +ALTER TABLE t1 DROP b, ALGORITHM=INSTANT; +connection stop_purge; +START TRANSACTION WITH CONSISTENT SNAPSHOT; +connection default; +DELETE FROM t1; +connection ddl; +SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged'; +ALTER TABLE t1 ADD COLUMN b INT NOT NULL DEFAULT 2 AFTER a, FORCE; +disconnect stop_purge; +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR copied'; +InnoDB 1 transactions not purged +INSERT INTO t1 SET a=1; +INSERT INTO t1 SET a=2,c=4; +SET DEBUG_SYNC = 'now SIGNAL logged'; +connection ddl; +UPDATE t1 SET b = b + 1 WHERE a = 2; +connection default; +SET DEBUG_SYNC = RESET; +SELECT * FROM t1; +a b c +1 2 NULL +2 3 4 # # MDEV-15872 Crash in online ALTER TABLE...ADD PRIMARY KEY # after instant ADD COLUMN ... NULL @@ -263,4 +290,41 @@ a b vb 4 NULL NULL 5 NULL NULL 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'; +CREATE TABLE t1 (a int, b int) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,2); +ALTER TABLE t1 DROP COLUMN b; +ERROR HY000: Internal error: Injected error! +ALTER TABLE t1 DROP COLUMN b; +ERROR HY000: Internal error: Injected error! +ALTER TABLE t1 ADD COLUMN c INT; +ERROR HY000: Internal error: Injected error! +SELECT * FROM t1; +a b +1 2 +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 +22 SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency; |