1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-27 05:41:41 +03:00

MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf on table with virtual columns and indexes

Cause
Stale thd->m_stmt_da->m_sql_errno which is from different invocation.

Fix
Reset error state before attempt to open table.
This commit is contained in:
Aleksey Midenkov
2019-06-25 10:53:33 +03:00
parent b27dc3d93c
commit 08baaa14b9
7 changed files with 118 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
#
# 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 * from t1 into outfile 'load.data';
Warnings:
Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
load data infile 'load.data' replace into table t1;
set debug_sync= "now WAIT_FOR latch_released";
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";
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 * from t1 into outfile 'load.data';
Warnings:
Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
load data infile 'load.data' replace into table t1;
set debug_sync= "now WAIT_FOR got_no_such_table";
set debug_sync= "RESET";
drop table t1;
set global innodb_purge_rseg_truncate_frequency= @saved_frequency;
set global debug_dbug= @saved_dbug;

View File

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

View File

@@ -0,0 +1,49 @@
--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 * from t1 into outfile 'load.data';
load data infile 'load.data' replace into table t1;
set debug_sync= "now WAIT_FOR latch_released";
set global debug_dbug= "-d,ib_purge_virtual_mdev_16222_1";
drop table t1;
--remove_file $datadir/test/load.data
set debug_sync= "now SIGNAL drop_started WAIT_FOR got_no_such_table";
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 * from t1 into outfile 'load.data';
load data infile 'load.data' replace into table t1;
set debug_sync= "now WAIT_FOR got_no_such_table";
set debug_sync= "RESET";
# cleanup
drop table t1;
--remove_file $datadir/test/load.data
set global innodb_purge_rseg_truncate_frequency= @saved_frequency;
set global debug_dbug= @saved_dbug;