summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Malyavin <nikitamalyavin@gmail.com>2022-04-26 04:38:14 +0300
committerNikita Malyavin <nikitamalyavin@gmail.com>2022-04-27 15:33:51 +0300
commit4d3dd8befeebfc2069fbf9c6b4cdb8c5b76f52f1 (patch)
tree8b651d25f49af2ffd1f2a71b3d9f6280e5413dc2
parentfc2c125c3e79b105d388844114d1bb816ee9154a (diff)
downloadmariadb-git-bb-10.4-nikita.tar.gz
add deterministic testsbb-10.4-nikita
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result36
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test50
2 files changed, 86 insertions, 0 deletions
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
index 5dee4572b54..4bca51a407e 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
@@ -281,4 +281,40 @@ pk b v
DROP TABLE t1;
SET debug_sync= reset;
set global debug_dbug= @old_dbug;
+# MDEV-26951 gcol.innodb_virtual_basic fails
+# BUG 1
+CREATE TABLE t (a INT, b INT AS(a), m INT AS(b), INDEX idx1(b), INDEX idx2 (m));
+INSERT INTO t VALUES(11, DEFAULT, DEFAULT),
+(12, DEFAULT, DEFAULT);
+set global innodb_debug_sync= "ib_purge_parse WAIT_FOR flush";
+set global innodb_debug_sync= "ib_purge_virtual_latch_released"
+ " SIGNAL purge WAIT_FOR reached";
+update t set a = 13 where a =11;
+delete from t where a =13;
+set debug_sync = "alter_table_inplace_after_commit"
+ " SIGNAL flush WAIT_FOR purge";
+DROP INDEX idx1 ON t;
+# Second ALTER TABLE call causes free of uninitialized momory
+DROP INDEX idx2 ON t;
+DROP TABLE t;
+set debug_sync= "now SIGNAL reached";
+set debug_sync=reset;
+set global innodb_debug_sync= reset;
+# BUG 2
+CREATE TABLE t (a INT, b INT AS(a), m INT AS(b), INDEX idx1(b), INDEX idx2 (m));
+INSERT INTO t VALUES(11, DEFAULT, DEFAULT),
+(12, DEFAULT, DEFAULT);
+set global innodb_debug_sync= "ib_purge_parse WAIT_FOR flush";
+set global innodb_debug_sync= "ib_purge_virtual_latch_released"
+ " SIGNAL purge WAIT_FOR reached";
+update t set a = 13 where a =11;
+delete from t where a =13;
+set debug_sync = "alter_table_inplace_after_commit"
+ " SIGNAL flush WAIT_FOR purge";
+DROP INDEX idx1 ON t;
+# DROP TABLE causes rename and triggers missing maria_table
+DROP TABLE t;
+set debug_sync= "now SIGNAL reached";
+set debug_sync=reset;
+set global innodb_debug_sync= reset;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
index 915ba7be4e3..ed916517666 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
@@ -379,4 +379,54 @@ DROP TABLE t1;
SET debug_sync= reset;
set global debug_dbug= @old_dbug;
+
+--echo # MDEV-26951 gcol.innodb_virtual_basic fails
+
+--echo # BUG 1
+CREATE TABLE t (a INT, b INT AS(a), m INT AS(b), INDEX idx1(b), INDEX idx2 (m));
+
+INSERT INTO t VALUES(11, DEFAULT, DEFAULT),
+ (12, DEFAULT, DEFAULT);
+
+set global innodb_debug_sync= "ib_purge_parse WAIT_FOR flush";
+set global innodb_debug_sync= "ib_purge_virtual_latch_released"
+ " SIGNAL purge WAIT_FOR reached";
+
+update t set a = 13 where a =11;
+delete from t where a =13;
+
+set debug_sync = "alter_table_inplace_after_commit"
+ " SIGNAL flush WAIT_FOR purge";
+DROP INDEX idx1 ON t;
+--echo # Second ALTER TABLE call causes free of uninitialized momory
+DROP INDEX idx2 ON t;
+DROP TABLE t;
+set debug_sync= "now SIGNAL reached";
+
+set debug_sync=reset;
+set global innodb_debug_sync= reset;
+
+--echo # BUG 2
+CREATE TABLE t (a INT, b INT AS(a), m INT AS(b), INDEX idx1(b), INDEX idx2 (m));
+
+INSERT INTO t VALUES(11, DEFAULT, DEFAULT),
+ (12, DEFAULT, DEFAULT);
+
+set global innodb_debug_sync= "ib_purge_parse WAIT_FOR flush";
+set global innodb_debug_sync= "ib_purge_virtual_latch_released"
+ " SIGNAL purge WAIT_FOR reached";
+
+update t set a = 13 where a =11;
+delete from t where a =13;
+
+set debug_sync = "alter_table_inplace_after_commit"
+ " SIGNAL flush WAIT_FOR purge";
+DROP INDEX idx1 ON t;
+--echo # DROP TABLE causes rename and triggers missing maria_table
+DROP TABLE t;
+set debug_sync= "now SIGNAL reached";
+
+set debug_sync=reset;
+set global innodb_debug_sync= reset;
+
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;