mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Work around MDEV-24813 in main.rowid_filter_innodb_debug
Let us avoid excessive allocation of explicit record locks.
This commit is contained in:
@@ -1,17 +1,14 @@
|
|||||||
--source include/have_debug.inc
|
--source include/have_debug.inc
|
||||||
--source include/have_debug_sync.inc
|
--source include/have_debug_sync.inc
|
||||||
|
--source include/have_sequence.inc
|
||||||
--source include/count_sessions.inc
|
--source include/count_sessions.inc
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-22761 KILL QUERY during rowid_filter, crashes
|
--echo # MDEV-22761 KILL QUERY during rowid_filter, crashes
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
create table t0(a int);
|
|
||||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
|
||||||
|
|
||||||
# 100 rows
|
|
||||||
create table t2(a int);
|
create table t2(a int);
|
||||||
insert into t2 select A.a + B.a* 10 from t0 A, t0 B;
|
insert into t2 select * from seq_0_to_99;
|
||||||
|
|
||||||
# 10K rows
|
# 10K rows
|
||||||
CREATE TABLE t3 (
|
CREATE TABLE t3 (
|
||||||
@@ -26,11 +23,10 @@ where table_schema=database() and table_name='t3';
|
|||||||
|
|
||||||
insert into t3
|
insert into t3
|
||||||
select
|
select
|
||||||
A.a,
|
A.seq,
|
||||||
B.a,
|
B.seq,
|
||||||
'filler-data-filler-data'
|
'filler-data-filler-data'
|
||||||
from
|
from seq_0_to_99 A, seq_0_to_99 B;
|
||||||
t2 A, t2 B;
|
|
||||||
|
|
||||||
analyze table t2,t3;
|
analyze table t2,t3;
|
||||||
|
|
||||||
@@ -48,7 +44,6 @@ where
|
|||||||
t3.key1=t2.a and t3.key2 in (2,3);
|
t3.key1=t2.a and t3.key2 in (2,3);
|
||||||
|
|
||||||
connect (con1, localhost, root,,);
|
connect (con1, localhost, root,,);
|
||||||
connection con1;
|
|
||||||
set debug_sync='now WAIT_FOR at_rowid_filter_check';
|
set debug_sync='now WAIT_FOR at_rowid_filter_check';
|
||||||
evalp kill query $target_id;
|
evalp kill query $target_id;
|
||||||
set debug_sync='now SIGNAL go';
|
set debug_sync='now SIGNAL go';
|
||||||
@@ -60,6 +55,5 @@ disconnect con1;
|
|||||||
reap;
|
reap;
|
||||||
set debug_sync='RESET';
|
set debug_sync='RESET';
|
||||||
|
|
||||||
drop table t0,t2,t3;
|
drop table t2,t3;
|
||||||
--source include/wait_until_count_sessions.inc
|
--source include/wait_until_count_sessions.inc
|
||||||
|
|
||||||
|
@@ -2,10 +2,8 @@ set default_storage_engine=innodb;
|
|||||||
#
|
#
|
||||||
# MDEV-22761 KILL QUERY during rowid_filter, crashes
|
# MDEV-22761 KILL QUERY during rowid_filter, crashes
|
||||||
#
|
#
|
||||||
create table t0(a int);
|
|
||||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
|
||||||
create table t2(a int);
|
create table t2(a int);
|
||||||
insert into t2 select A.a + B.a* 10 from t0 A, t0 B;
|
insert into t2 select * from seq_0_to_99;
|
||||||
CREATE TABLE t3 (
|
CREATE TABLE t3 (
|
||||||
key1 int ,
|
key1 int ,
|
||||||
key2 int,
|
key2 int,
|
||||||
@@ -19,11 +17,10 @@ engine
|
|||||||
InnoDB
|
InnoDB
|
||||||
insert into t3
|
insert into t3
|
||||||
select
|
select
|
||||||
A.a,
|
A.seq,
|
||||||
B.a,
|
B.seq,
|
||||||
'filler-data-filler-data'
|
'filler-data-filler-data'
|
||||||
from
|
from seq_0_to_99 A, seq_0_to_99 B;
|
||||||
t2 A, t2 B;
|
|
||||||
analyze table t2,t3;
|
analyze table t2,t3;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t2 analyze status Engine-independent statistics collected
|
test.t2 analyze status Engine-independent statistics collected
|
||||||
@@ -42,7 +39,6 @@ select * from t2, t3
|
|||||||
where
|
where
|
||||||
t3.key1=t2.a and t3.key2 in (2,3);
|
t3.key1=t2.a and t3.key2 in (2,3);
|
||||||
connect con1, localhost, root,,;
|
connect con1, localhost, root,,;
|
||||||
connection con1;
|
|
||||||
set debug_sync='now WAIT_FOR at_rowid_filter_check';
|
set debug_sync='now WAIT_FOR at_rowid_filter_check';
|
||||||
kill query $target_id;
|
kill query $target_id;
|
||||||
set debug_sync='now SIGNAL go';
|
set debug_sync='now SIGNAL go';
|
||||||
@@ -50,7 +46,7 @@ connection default;
|
|||||||
disconnect con1;
|
disconnect con1;
|
||||||
ERROR 70100: Query execution was interrupted
|
ERROR 70100: Query execution was interrupted
|
||||||
set debug_sync='RESET';
|
set debug_sync='RESET';
|
||||||
drop table t0,t2,t3;
|
drop table t2,t3;
|
||||||
set default_storage_engine=default;
|
set default_storage_engine=default;
|
||||||
set @save_optimizer_switch= @@optimizer_switch;
|
set @save_optimizer_switch= @@optimizer_switch;
|
||||||
set @save_use_stat_tables= @@use_stat_tables;
|
set @save_use_stat_tables= @@use_stat_tables;
|
||||||
@@ -77,7 +73,6 @@ test.t1 analyze status OK
|
|||||||
set debug_sync='handler_rowid_filter_check SIGNAL killme WAIT_FOR go';
|
set debug_sync='handler_rowid_filter_check SIGNAL killme WAIT_FOR go';
|
||||||
SELECT * FROM t1 WHERE a > 0 AND b=0;
|
SELECT * FROM t1 WHERE a > 0 AND b=0;
|
||||||
connect con1, localhost, root,,;
|
connect con1, localhost, root,,;
|
||||||
connection con1;
|
|
||||||
set debug_sync='now WAIT_FOR killme';
|
set debug_sync='now WAIT_FOR killme';
|
||||||
kill query @id;
|
kill query @id;
|
||||||
set debug_sync='now SIGNAL go';
|
set debug_sync='now SIGNAL go';
|
||||||
|
@@ -39,7 +39,6 @@ set debug_sync='handler_rowid_filter_check SIGNAL killme WAIT_FOR go';
|
|||||||
send SELECT * FROM t1 WHERE a > 0 AND b=0;
|
send SELECT * FROM t1 WHERE a > 0 AND b=0;
|
||||||
|
|
||||||
connect (con1, localhost, root,,);
|
connect (con1, localhost, root,,);
|
||||||
connection con1;
|
|
||||||
let $ignore= `SELECT @id := $ID`;
|
let $ignore= `SELECT @id := $ID`;
|
||||||
set debug_sync='now WAIT_FOR killme';
|
set debug_sync='now WAIT_FOR killme';
|
||||||
kill query @id;
|
kill query @id;
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
#
|
#
|
||||||
# MDEV-22761 KILL QUERY during rowid_filter, crashes
|
# MDEV-22761 KILL QUERY during rowid_filter, crashes
|
||||||
#
|
#
|
||||||
create table t0(a int);
|
|
||||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
|
||||||
create table t2(a int);
|
create table t2(a int);
|
||||||
insert into t2 select A.a + B.a* 10 from t0 A, t0 B;
|
insert into t2 select * from seq_0_to_99;
|
||||||
CREATE TABLE t3 (
|
CREATE TABLE t3 (
|
||||||
key1 int ,
|
key1 int ,
|
||||||
key2 int,
|
key2 int,
|
||||||
@@ -18,11 +16,10 @@ engine
|
|||||||
MyISAM
|
MyISAM
|
||||||
insert into t3
|
insert into t3
|
||||||
select
|
select
|
||||||
A.a,
|
A.seq,
|
||||||
B.a,
|
B.seq,
|
||||||
'filler-data-filler-data'
|
'filler-data-filler-data'
|
||||||
from
|
from seq_0_to_99 A, seq_0_to_99 B;
|
||||||
t2 A, t2 B;
|
|
||||||
analyze table t2,t3;
|
analyze table t2,t3;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t2 analyze status Engine-independent statistics collected
|
test.t2 analyze status Engine-independent statistics collected
|
||||||
@@ -41,7 +38,6 @@ select * from t2, t3
|
|||||||
where
|
where
|
||||||
t3.key1=t2.a and t3.key2 in (2,3);
|
t3.key1=t2.a and t3.key2 in (2,3);
|
||||||
connect con1, localhost, root,,;
|
connect con1, localhost, root,,;
|
||||||
connection con1;
|
|
||||||
set debug_sync='now WAIT_FOR at_rowid_filter_check';
|
set debug_sync='now WAIT_FOR at_rowid_filter_check';
|
||||||
kill query $target_id;
|
kill query $target_id;
|
||||||
set debug_sync='now SIGNAL go';
|
set debug_sync='now SIGNAL go';
|
||||||
@@ -49,4 +45,4 @@ connection default;
|
|||||||
disconnect con1;
|
disconnect con1;
|
||||||
ERROR 70100: Query execution was interrupted
|
ERROR 70100: Query execution was interrupted
|
||||||
set debug_sync='RESET';
|
set debug_sync='RESET';
|
||||||
drop table t0,t2,t3;
|
drop table t2,t3;
|
||||||
|
Reference in New Issue
Block a user