forked from MariaDB/server
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-22761: innodb row_search_idx_cond_check handle CHECK_ABORTED_BY_…
…USER handler_rowid_filter_check can return CHECK_ABORTED_BY_USER. All the functions that call row_search_idx_cond_check handle the CHECK_ABORTED_BY_USER return value. So return it rather than generating an error. This incorrect handling was introduced in MDEV-21794 (8d85715). Reviewer: Marko Mäkelä
- Loading branch information
1 parent
bd64c2e
commit e8b9afa
Showing
4 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
set @save_optimizer_switch= @@optimizer_switch; | ||
set @save_use_stat_tables= @@use_stat_tables; | ||
set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity; | ||
set @@use_stat_tables=preferably; | ||
set optimizer_use_condition_selectivity=2; | ||
set optimizer_switch='rowid_filter=on'; | ||
# | ||
# MDEV-22761 KILL QUERY during rowid_filter, crashes | ||
# | ||
CREATE TABLE t1 (a INT, b INT, INDEX(a), INDEX(b)) ENGINE=InnoDB; | ||
INSERT INTO t1 VALUES (0,0),(1,0),(-1,1), (-2,1), (-2,3), (-3,4), (-2,4); | ||
set debug_sync='row_search_pre_rowid_filter_check SIGNAL killme WAIT_FOR go'; | ||
SELECT * FROM t1 WHERE a > 0 AND b=0; | ||
connect con1, localhost, root,,; | ||
connection con1; | ||
set debug_sync='now WAIT_FOR killme'; | ||
kill query @id; | ||
set debug_sync='now SIGNAL go'; | ||
connection default; | ||
a b | ||
set debug_sync='RESET'; | ||
disconnect con1; | ||
drop table t1; | ||
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; | ||
set @@optimizer_switch=@save_optimizer_switch; | ||
set @@use_stat_tables=@save_use_stat_tables; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--source include/have_debug.inc | ||
--source include/have_debug_sync.inc | ||
--source include/have_innodb.inc | ||
--source include/default_optimizer_switch.inc | ||
--source include/count_sessions.inc | ||
|
||
set @save_optimizer_switch= @@optimizer_switch; | ||
set @save_use_stat_tables= @@use_stat_tables; | ||
set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity; | ||
|
||
set @@use_stat_tables=preferably; | ||
|
||
set optimizer_use_condition_selectivity=2; | ||
set optimizer_switch='rowid_filter=on'; | ||
|
||
--echo # | ||
--echo # MDEV-22761 KILL QUERY during rowid_filter, crashes | ||
--echo # | ||
|
||
CREATE TABLE t1 (a INT, b INT, INDEX(a), INDEX(b)) ENGINE=InnoDB; | ||
INSERT INTO t1 VALUES (0,0),(1,0),(-1,1), (-2,1), (-2,3), (-3,4), (-2,4); | ||
|
||
let $ID= `SELECT @id := CONNECTION_ID()`; | ||
|
||
set debug_sync='row_search_pre_rowid_filter_check SIGNAL killme WAIT_FOR go'; | ||
send SELECT * FROM t1 WHERE a > 0 AND b=0; | ||
|
||
connect (con1, localhost, root,,); | ||
connection con1; | ||
let $ignore= `SELECT @id := $ID`; | ||
set debug_sync='now WAIT_FOR killme'; | ||
kill query @id; | ||
set debug_sync='now SIGNAL go'; | ||
|
||
connection default; | ||
reap; | ||
set debug_sync='RESET'; | ||
|
||
disconnect con1; | ||
drop table t1; | ||
|
||
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; | ||
set @@optimizer_switch=@save_optimizer_switch; | ||
set @@use_stat_tables=@save_use_stat_tables; | ||
|
||
--source include/wait_until_count_sessions.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters