diff options
Diffstat (limited to 'mysql-test/suite/innodb/r/instant_alter_rollback.result')
-rw-r--r-- | mysql-test/suite/innodb/r/instant_alter_rollback.result | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/mysql-test/suite/innodb/r/instant_alter_rollback.result b/mysql-test/suite/innodb/r/instant_alter_rollback.result index 2c2083adc46..b51e067c647 100644 --- a/mysql-test/suite/innodb/r/instant_alter_rollback.result +++ b/mysql-test/suite/innodb/r/instant_alter_rollback.result @@ -1,29 +1,52 @@ FLUSH TABLES; # # MDEV-11369: Instant ADD COLUMN for InnoDB +# MDEV-15562: Instant DROP COLUMN or changing the order of columns # connect to_be_killed, localhost, root; +SET @old_instant= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_instant_alter_column'); CREATE TABLE empty (id INT PRIMARY KEY, c2 INT UNIQUE) ENGINE=InnoDB; CREATE TABLE once LIKE empty; CREATE TABLE twice LIKE empty; +CREATE TABLE thrice LIKE empty; INSERT INTO once SET id=1,c2=1; INSERT INTO twice SET id=1,c2=1; +INSERT INTO thrice SET id=1,c2=1; ALTER TABLE empty ADD COLUMN (d1 INT DEFAULT 15); ALTER TABLE once ADD COLUMN (d1 INT DEFAULT 20); ALTER TABLE twice ADD COLUMN (d1 INT DEFAULT 20); +ALTER TABLE thrice ADD COLUMN (d1 INT DEFAULT 20); ALTER TABLE twice ADD COLUMN (d2 INT NOT NULL DEFAULT 10, d3 VARCHAR(15) NOT NULL DEFAULT 'var och en char'); +ALTER TABLE thrice ADD COLUMN +(d2 INT NOT NULL DEFAULT 10, +d3 TEXT NOT NULL DEFAULT 'con'); +ALTER TABLE thrice DROP c2, DROP d3, CHANGE d2 d3 INT NOT NULL FIRST; +SELECT variable_value-@old_instant instants +FROM information_schema.global_status +WHERE variable_name = 'innodb_instant_alter_column'; +instants +7 BEGIN; INSERT INTO empty set id=0,c2=42; UPDATE once set c2=c2+1; UPDATE twice set c2=c2+1; +UPDATE thrice set d3=d3+1; INSERT INTO twice SET id=2,c2=0,d3=''; +INSERT INTO thrice SET id=2,d3=0; +DELETE FROM empty; +DELETE FROM once; +DELETE FROM twice; +DELETE FROM thrice; connection default; SET GLOBAL innodb_flush_log_at_trx_commit=1; CREATE TABLE foo(a INT PRIMARY KEY) ENGINE=InnoDB; # Kill the server disconnect to_be_killed; +# restart SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency; SET GLOBAL innodb_purge_rseg_truncate_frequency=1; DROP TABLE foo; @@ -37,4 +60,7 @@ id c2 d1 SELECT * FROM twice; id c2 d1 d2 d3 1 1 20 10 var och en char -DROP TABLE empty, once, twice; +SELECT * FROM thrice; +d3 id d1 +10 1 20 +DROP TABLE empty, once, twice, thrice; |