1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

MDEV-16222: Move the test to gcol.innodb_virtual_debug_purge

This commit is contained in:
Marko Mäkelä
2019-09-20 08:30:31 +03:00
parent c0db3fe6da
commit 4afe9d4b6d
6 changed files with 89 additions and 98 deletions

View File

@@ -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;

View File

@@ -1 +1,2 @@
--loose-innodb-safe-truncate=1
--innodb-purge-threads=1

View File

@@ -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;

View File

@@ -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";

View File

@@ -1 +0,0 @@
--innodb-purge-threads=1

View File

@@ -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";