Commit d7349e20 authored by Jan Lindström's avatar Jan Lindström

MDEV-9663: InnoDB assertion failure: *cursor->index->name == TEMP_INDEX_PREFIX

MariaDB adjustments to test case innodb-replace-debug and
add missing instrumentation to row0ins.cc.

MariaDB 10.1 does not seem to be affected.
parent eeec64d7
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
create table t1 (f1 int primary key, f2 int, f3 int, unique key k1(f2), create table t1 (f1 int primary key, f2 int, f3 int, unique key k1(f2),
key k2(f3)) engine=innodb; key k2(f3)) engine=innodb;
insert into t1 values (14, 24, 34); insert into t1 values (14, 24, 34);
set debug = '+d,row_ins_sec_index_entry_timeout'; set @@debug_dbug = '+d,row_ins_sec_index_entry_timeout';
replace into t1 values (14, 25, 34); replace into t1 values (14, 25, 34);
select * from t1;
f1 f2 f3
14 25 34
drop table t1; drop table t1;
set @@debug_dbug = '-d,row_ins_sec_index_entry_timeout';
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
create table t1 (f1 int primary key, f2 int, f3 int, unique key k1(f2), create table t1 (f1 int primary key, f2 int, f3 int, unique key k1(f2),
key k2(f3)) engine=innodb; key k2(f3)) engine=innodb;
insert into t1 values (14, 24, 34); insert into t1 values (14, 24, 34);
set debug = '+d,row_ins_sec_index_entry_timeout'; set @@debug_dbug = '+d,row_ins_sec_index_entry_timeout';
replace into t1 values (14, 25, 34); replace into t1 values (14, 25, 34);
select * from t1;
drop table t1; drop table t1;
set @@debug_dbug = '-d,row_ins_sec_index_entry_timeout';
...@@ -2968,6 +2968,10 @@ row_ins_sec_index_entry( ...@@ -2968,6 +2968,10 @@ row_ins_sec_index_entry(
mem_heap_t* offsets_heap; mem_heap_t* offsets_heap;
mem_heap_t* heap; mem_heap_t* heap;
DBUG_EXECUTE_IF("row_ins_sec_index_entry_timeout", {
DBUG_SET("-d,row_ins_sec_index_entry_timeout");
return(DB_LOCK_WAIT);});
if (!index->table->foreign_set.empty()) { if (!index->table->foreign_set.empty()) {
err = row_ins_check_foreign_constraints(index->table, index, err = row_ins_check_foreign_constraints(index->table, index,
entry, thr); entry, thr);
......
...@@ -3041,6 +3041,10 @@ row_ins_sec_index_entry( ...@@ -3041,6 +3041,10 @@ row_ins_sec_index_entry(
mem_heap_t* offsets_heap; mem_heap_t* offsets_heap;
mem_heap_t* heap; mem_heap_t* heap;
DBUG_EXECUTE_IF("row_ins_sec_index_entry_timeout", {
DBUG_SET("-d,row_ins_sec_index_entry_timeout");
return(DB_LOCK_WAIT);});
if (!index->table->foreign_set.empty()) { if (!index->table->foreign_set.empty()) {
err = row_ins_check_foreign_constraints(index->table, index, err = row_ins_check_foreign_constraints(index->table, index,
entry, thr); entry, thr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment