summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-09-20 08:30:31 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-09-20 08:30:31 +0300
commit4afe9d4b6dbffcebe8f9e5842fb79f0ff22b5aa0 (patch)
tree01d089d4e83be0f216aff337f7a87cf51aeeb3e2
parentc0db3fe6dabd2cb0df9bf532f54f9e8d233fa499 (diff)
downloadmariadb-git-4afe9d4b6dbffcebe8f9e5842fb79f0ff22b5aa0.tar.gz
MDEV-16222: Move the test to gcol.innodb_virtual_debug_purge
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result27
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_debug_purge.opt1
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test61
-rw-r--r--mysql-test/suite/innodb/r/purge_secondary_mdev-16222.result30
-rw-r--r--mysql-test/suite/innodb/t/purge_secondary_mdev-16222.opt1
-rw-r--r--mysql-test/suite/innodb/t/purge_secondary_mdev-16222.test67
6 files changed, 89 insertions, 98 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 08f8d2098f6..647ba47a880 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
@@ -204,5 +204,32 @@ connection truncate;
disconnect truncate;
connection default;
DROP TABLE t1, t2;
+#
+# MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf
+# on table with virtual columns and indexes
+#
+set @saved_dbug= @@global.debug_dbug;
+set global debug_dbug= "+d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2";
+create table t1 (
+pk serial, vb tinyblob as (b) virtual, b tinyblob,
+primary key(pk), index (vb(64)))
+engine innodb;
+insert ignore into t1 (b) values ('foo');
+select * into outfile 'load.data' from t1;
+load data infile 'load.data' replace into table t1;
+set debug_sync= "now WAIT_FOR latch_released TIMEOUT 1";
+set global debug_dbug= "-d,ib_purge_virtual_mdev_16222_1";
+drop table t1;
+set debug_sync= "now SIGNAL drop_started WAIT_FOR got_no_such_table TIMEOUT 1";
+create table t1 (
+pk serial, vb tinyblob as (b) virtual, b tinyblob,
+primary key(pk), index (vb(64)))
+engine innodb;
+insert ignore into t1 (b) values ('foo');
+select * into outfile 'load.data' from t1;
+load data infile 'load.data' replace into table t1;
+set debug_sync= "now WAIT_FOR got_no_such_table TIMEOUT 1";
+set global debug_dbug= @saved_dbug;
+drop table t1;
set debug_sync=reset;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.opt b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.opt
index 9622465d71f..98a5a463ce4 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.opt
+++ b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.opt
@@ -1 +1,2 @@
--loose-innodb-safe-truncate=1
+--innodb-purge-threads=1
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 1541920d3ae..ee88789dec4 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
@@ -259,6 +259,67 @@ disconnect truncate;
connection default;
DROP TABLE t1, t2;
+--echo #
+--echo # MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf
+--echo # on table with virtual columns and indexes
+--echo #
+
+--let $datadir= `select @@datadir`
+set @saved_dbug= @@global.debug_dbug;
+set global debug_dbug= "+d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2";
+
+create table t1 (
+ pk serial, vb tinyblob as (b) virtual, b tinyblob,
+ primary key(pk), index (vb(64)))
+engine innodb;
+
+insert ignore into t1 (b) values ('foo');
+
+select * into outfile 'load.data' from t1;
+load data infile 'load.data' replace into table t1;
+
+# FIXME: case does not work on 10.2 as it does not pass this condition:
+#
+# if (!*table)
+# *table= innodb_find_table_for_vc(thd, index->table);
+#
+# in innobase_allocate_row_for_vcol()
+
+--disable_warnings
+set debug_sync= "now WAIT_FOR latch_released TIMEOUT 1";
+--enable_warnings
+set global debug_dbug= "-d,ib_purge_virtual_mdev_16222_1";
+drop table t1;
+--remove_file $datadir/test/load.data
+
+--disable_warnings
+set debug_sync= "now SIGNAL drop_started WAIT_FOR got_no_such_table TIMEOUT 1";
+--enable_warnings
+
+create table t1 (
+ pk serial, vb tinyblob as (b) virtual, b tinyblob,
+ primary key(pk), index (vb(64)))
+engine innodb;
+
+insert ignore into t1 (b) values ('foo');
+
+select * into outfile 'load.data' from t1;
+load data infile 'load.data' replace into table t1;
+
+--disable_warnings
+set debug_sync= "now WAIT_FOR got_no_such_table TIMEOUT 1";
+--enable_warnings
+
+# FIXME: Race condition here:
+# 1. purge thread goes into sending got_no_such_table
+# 2. test thread finishes debug_sync= "RESET" below
+# 3. purge thread sends got_no_such_table
+set global debug_dbug= @saved_dbug;
+
+# cleanup
+drop table t1;
+--remove_file $datadir/test/load.data
+
--source include/wait_until_count_sessions.inc
set debug_sync=reset;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
diff --git a/mysql-test/suite/innodb/r/purge_secondary_mdev-16222.result b/mysql-test/suite/innodb/r/purge_secondary_mdev-16222.result
deleted file mode 100644
index 6efadc16792..00000000000
--- a/mysql-test/suite/innodb/r/purge_secondary_mdev-16222.result
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf on table with virtual columns and indexes
-#
-set @saved_frequency= @@global.innodb_purge_rseg_truncate_frequency;
-set global innodb_purge_rseg_truncate_frequency= 1;
-set @saved_dbug= @@global.debug_dbug;
-set global debug_dbug= "+d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2";
-create table t1 (
-pk serial, vb tinyblob as (b) virtual, b tinyblob,
-primary key(pk), index (vb(64)))
-engine innodb;
-insert ignore into t1 (b) values ('foo');
-select * into outfile 'load.data' from t1;
-load data infile 'load.data' replace into table t1;
-set debug_sync= "now WAIT_FOR latch_released TIMEOUT 1";
-set global debug_dbug= "-d,ib_purge_virtual_mdev_16222_1";
-drop table t1;
-set debug_sync= "now SIGNAL drop_started WAIT_FOR got_no_such_table TIMEOUT 1";
-create table t1 (
-pk serial, vb tinyblob as (b) virtual, b tinyblob,
-primary key(pk), index (vb(64)))
-engine innodb;
-insert ignore into t1 (b) values ('foo');
-select * into outfile 'load.data' from t1;
-load data infile 'load.data' replace into table t1;
-set debug_sync= "now WAIT_FOR got_no_such_table TIMEOUT 1";
-set global debug_dbug= @saved_dbug;
-drop table t1;
-set global innodb_purge_rseg_truncate_frequency= @saved_frequency;
-set debug_sync= "RESET";
diff --git a/mysql-test/suite/innodb/t/purge_secondary_mdev-16222.opt b/mysql-test/suite/innodb/t/purge_secondary_mdev-16222.opt
deleted file mode 100644
index a1207721427..00000000000
--- a/mysql-test/suite/innodb/t/purge_secondary_mdev-16222.opt
+++ /dev/null
@@ -1 +0,0 @@
---innodb-purge-threads=1
diff --git a/mysql-test/suite/innodb/t/purge_secondary_mdev-16222.test b/mysql-test/suite/innodb/t/purge_secondary_mdev-16222.test
deleted file mode 100644
index ca0e4fad133..00000000000
--- a/mysql-test/suite/innodb/t/purge_secondary_mdev-16222.test
+++ /dev/null
@@ -1,67 +0,0 @@
---source include/have_debug.inc
---source include/have_innodb.inc
-
---echo #
---echo # MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf on table with virtual columns and indexes
---echo #
-
---let $datadir= `select @@datadir`
-set @saved_frequency= @@global.innodb_purge_rseg_truncate_frequency;
-set global innodb_purge_rseg_truncate_frequency= 1;
-set @saved_dbug= @@global.debug_dbug;
-set global debug_dbug= "+d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2";
-
-create table t1 (
- pk serial, vb tinyblob as (b) virtual, b tinyblob,
- primary key(pk), index (vb(64)))
-engine innodb;
-
-insert ignore into t1 (b) values ('foo');
-
-select * into outfile 'load.data' from t1;
-load data infile 'load.data' replace into table t1;
-
-# FIXME: case does not work on 10.2 as it does not pass this condition:
-#
-# if (!*table)
-# *table= innodb_find_table_for_vc(thd, index->table);
-#
-# in innobase_allocate_row_for_vcol()
-
---disable_warnings
-set debug_sync= "now WAIT_FOR latch_released TIMEOUT 1";
---enable_warnings
-set global debug_dbug= "-d,ib_purge_virtual_mdev_16222_1";
-drop table t1;
---remove_file $datadir/test/load.data
-
---disable_warnings
-set debug_sync= "now SIGNAL drop_started WAIT_FOR got_no_such_table TIMEOUT 1";
---enable_warnings
-
-create table t1 (
- pk serial, vb tinyblob as (b) virtual, b tinyblob,
- primary key(pk), index (vb(64)))
-engine innodb;
-
-insert ignore into t1 (b) values ('foo');
-
-select * into outfile 'load.data' from t1;
-load data infile 'load.data' replace into table t1;
-
---disable_warnings
-set debug_sync= "now WAIT_FOR got_no_such_table TIMEOUT 1";
---enable_warnings
-
-# FIXME: Racing condition here:
-# 1. purge thread goes into sending got_no_such_table
-# 2. test thread finishes debug_sync= "RESET" below
-# 3. purge thread sends got_no_such_table
-set global debug_dbug= @saved_dbug;
-
-# cleanup
-drop table t1;
---remove_file $datadir/test/load.data
-
-set global innodb_purge_rseg_truncate_frequency= @saved_frequency;
-set debug_sync= "RESET";