summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/gcol/r/innodb_virtual_rebuild.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/gcol/r/innodb_virtual_rebuild.result')
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_rebuild.result98
1 files changed, 98 insertions, 0 deletions
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_rebuild.result b/mysql-test/suite/gcol/r/innodb_virtual_rebuild.result
new file mode 100644
index 00000000..35f37034
--- /dev/null
+++ b/mysql-test/suite/gcol/r/innodb_virtual_rebuild.result
@@ -0,0 +1,98 @@
+CREATE TABLE t1 (j SERIAL, i INT, v INT AS (i) VIRTUAL) ENGINE=InnoDB;
+CREATE TABLE t2 (j SERIAL, i INT, v INT AS (i) VIRTUAL) ENGINE=InnoDB
+ROW_FORMAT=REDUNDANT;
+CREATE TABLE t3 (i INT, v INT AS (i) VIRTUAL) ENGINE=InnoDB;
+CREATE TABLE t4 (i INT, v INT AS (i) VIRTUAL) ENGINE=InnoDB
+ROW_FORMAT=REDUNDANT;
+INSERT INTO t4 SET i=1;
+ALTER TABLE t4 ADD INDEX(v), LOCK=NONE;
+ALTER TABLE t4 ADD COLUMN k INT, LOCK=NONE;
+ERROR 0A000: LOCK=NONE is not supported. Reason: online rebuild with indexed virtual columns. Try LOCK=SHARED
+ALTER TABLE t4 DROP k, LOCK=NONE;
+ERROR 42000: Can't DROP COLUMN `k`; check that it exists
+ALTER TABLE t4 DROP INDEX v, LOCK=NONE;
+INSERT INTO t3 SET i=1;
+ALTER TABLE t3 ADD INDEX(v), LOCK=NONE;
+ALTER TABLE t3 ADD COLUMN k INT, LOCK=NONE;
+ERROR 0A000: LOCK=NONE is not supported. Reason: online rebuild with indexed virtual columns. Try LOCK=SHARED
+ALTER TABLE t3 DROP k, LOCK=NONE;
+ERROR 42000: Can't DROP COLUMN `k`; check that it exists
+ALTER TABLE t3 DROP INDEX v, LOCK=NONE;
+INSERT INTO t2 SET i=1;
+ALTER TABLE t2 ADD INDEX(v), LOCK=NONE;
+ALTER TABLE t2 ADD COLUMN k INT, LOCK=NONE;
+ERROR 0A000: LOCK=NONE is not supported. Reason: online rebuild with indexed virtual columns. Try LOCK=SHARED
+ALTER TABLE t2 DROP k, LOCK=NONE;
+ERROR 42000: Can't DROP COLUMN `k`; check that it exists
+ALTER TABLE t2 DROP INDEX v, LOCK=NONE;
+INSERT INTO t1 SET i=1;
+ALTER TABLE t1 ADD INDEX(v), LOCK=NONE;
+ALTER TABLE t1 ADD COLUMN k INT, LOCK=NONE;
+ERROR 0A000: LOCK=NONE is not supported. Reason: online rebuild with indexed virtual columns. Try LOCK=SHARED
+ALTER TABLE t1 DROP k, LOCK=NONE;
+ERROR 42000: Can't DROP COLUMN `k`; check that it exists
+ALTER TABLE t1 DROP INDEX v, LOCK=NONE;
+connect ddl,localhost,root,,test;
+connection default;
+connection ddl;
+SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL copied WAIT_FOR dml';
+ALTER TABLE t4 FORCE;
+connection default;
+SET DEBUG_SYNC = 'now WAIT_FOR copied';
+BEGIN;
+UPDATE t4 SET i = 0;
+ROLLBACK;
+SET DEBUG_SYNC = 'now SIGNAL dml';
+connection ddl;
+connection default;
+SELECT * FROM t4;
+i v
+1 1
+DROP TABLE t4;
+connection ddl;
+SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL copied WAIT_FOR dml';
+ALTER TABLE t3 FORCE;
+connection default;
+SET DEBUG_SYNC = 'now WAIT_FOR copied';
+BEGIN;
+UPDATE t3 SET i = 0;
+ROLLBACK;
+SET DEBUG_SYNC = 'now SIGNAL dml';
+connection ddl;
+connection default;
+SELECT * FROM t3;
+i v
+1 1
+DROP TABLE t3;
+connection ddl;
+SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL copied WAIT_FOR dml';
+ALTER TABLE t2 FORCE;
+connection default;
+SET DEBUG_SYNC = 'now WAIT_FOR copied';
+BEGIN;
+UPDATE t2 SET i = 0;
+ROLLBACK;
+SET DEBUG_SYNC = 'now SIGNAL dml';
+connection ddl;
+connection default;
+SELECT * FROM t2;
+j i v
+1 1 1
+DROP TABLE t2;
+connection ddl;
+SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL copied WAIT_FOR dml';
+ALTER TABLE t1 FORCE;
+connection default;
+SET DEBUG_SYNC = 'now WAIT_FOR copied';
+BEGIN;
+UPDATE t1 SET i = 0;
+ROLLBACK;
+SET DEBUG_SYNC = 'now SIGNAL dml';
+connection ddl;
+connection default;
+SELECT * FROM t1;
+j i v
+1 1 1
+DROP TABLE t1;
+disconnect ddl;
+SET DEBUG_SYNC = 'RESET';