Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-26583 SIGSEGV's in spider_get_select_limit_from_select_lex when …
…DELAYED INSERT is used Spider dereferences a freed select_lex and then results in SIGSEGV.
- Loading branch information
1 parent
e128d85
commit f8c3d59
Showing
4 changed files
with
86 additions
and
0 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
34 changes: 34 additions & 0 deletions
34
storage/spider/mysql-test/spider/bugfix/r/mdev_26583.result
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,34 @@ | ||
# | ||
# MDEV-26583 SIGSEGV's in spider_get_select_limit_from_select_lex when DELAYED INSERT is used | ||
# | ||
for master_1 | ||
for child2 | ||
child2_1 | ||
child2_2 | ||
child2_3 | ||
for child3 | ||
connection child2_1; | ||
CREATE DATABASE auto_test_remote; | ||
USE auto_test_remote; | ||
CREATE TABLE tbl_a ( | ||
a INT AUTO_INCREMENT KEY, | ||
b INT,INDEX i (b) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
connection master_1; | ||
CREATE DATABASE auto_test_local; | ||
USE auto_test_local; | ||
CREATE TABLE tbl_a ( | ||
a INT AUTO_INCREMENT KEY, | ||
b INT,INDEX i (b) | ||
) ENGINE=Spider DEFAULT CHARSET=utf8 COMMENT='srv "s_2_1", table "tbl_a"'; | ||
INSERT DELAYED INTO tbl_a VALUES (0,0),(0,0),(0,0); | ||
connection master_1; | ||
DROP DATABASE auto_test_local; | ||
connection child2_1; | ||
DROP DATABASE auto_test_remote; | ||
for master_1 | ||
for child2 | ||
child2_1 | ||
child2_2 | ||
child2_3 | ||
for child3 |
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,3 @@ | ||
!include include/default_mysqld.cnf | ||
!include ../my_1_1.cnf | ||
!include ../my_2_1.cnf |
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,44 @@ | ||
--echo # | ||
--echo # MDEV-26583 SIGSEGV's in spider_get_select_limit_from_select_lex when DELAYED INSERT is used | ||
--echo # | ||
|
||
--disable_query_log | ||
--disable_result_log | ||
--source ../../t/test_init.inc | ||
--enable_result_log | ||
--enable_query_log | ||
|
||
--connection child2_1 | ||
CREATE DATABASE auto_test_remote; | ||
USE auto_test_remote; | ||
|
||
eval CREATE TABLE tbl_a ( | ||
a INT AUTO_INCREMENT KEY, | ||
b INT,INDEX i (b) | ||
) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; | ||
|
||
--connection master_1 | ||
CREATE DATABASE auto_test_local; | ||
USE auto_test_local; | ||
|
||
eval CREATE TABLE tbl_a ( | ||
a INT AUTO_INCREMENT KEY, | ||
b INT,INDEX i (b) | ||
) $MASTER_1_ENGINE $MASTER_1_CHARSET COMMENT='srv "s_2_1", table "tbl_a"'; | ||
|
||
INSERT DELAYED INTO tbl_a VALUES (0,0),(0,0),(0,0); | ||
|
||
let $wait_condition=select count(*)=3 from tbl_a | ||
source include/wait_condition.inc; | ||
|
||
--connection master_1 | ||
DROP DATABASE auto_test_local; | ||
|
||
--connection child2_1 | ||
DROP DATABASE auto_test_remote; | ||
|
||
--disable_query_log | ||
--disable_result_log | ||
--source ../../t/test_deinit.inc | ||
--enable_result_log | ||
--enable_query_log |