1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-31116 SIGSEGV in test_if_skip_sort_order|JOIN::optimize_stage2

test_if_skip_sort_order() should check that the 'select' pointer
(=tab->select) is not NULL before dereferencing it when invoking
the test_quick_select method.

The check was erroneously removed by:
1c88ac60cf Simple cleanup of removing QQ comments from sql_select.cc
This commit is contained in:
Dave Gosselin
2023-10-31 14:17:24 -04:00
committed by Dave Gosselin
parent 9cc179cc7e
commit 1f7ab85644
3 changed files with 20 additions and 1 deletions

View File

@ -296,3 +296,13 @@ a b c
6 2 26
6 3 36
drop table t1;
#
# MDEV-31116: SIGSEGV in test_if_skip_sort_order|JOIN::optimize_stage2
#
CREATE TABLE t1 (a BINARY (2),b BINARY (1),KEY(a)) ENGINE=innodb;
INSERT INTO t1 select 'ab', NULL from seq_1_to_14;
SELECT * FROM t1 WHERE a IN (SELECT a FROM t1 WHERE a >'') ORDER BY a LIMIT 1;
a b
ab NULL
DROP TABLE t1;
# End of 11.0 tests