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

Merge 10.5 into 10.6

This commit is contained in:
Marko Mäkelä
2023-06-26 17:11:38 +03:00
9 changed files with 60 additions and 11 deletions

View File

@ -3424,3 +3424,18 @@ COUNT(*)
2
DROP TABLE t1, t2, t3;
# End of 10.5 tests
#
# MDEV-31449: Assertion s->table->opt_range_condition_rows <= s->found_records
#
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,2),(3,4);
CREATE TABLE t2 (c INT);
INSERT INTO t2 VALUES (5),(6);
SET @tmp=@@OPTIMIZER_USE_CONDITION_SELECTIVITY, OPTIMIZER_USE_CONDITION_SELECTIVITY = 1;
SELECT * FROM
(SELECT t1.* FROM t1 WHERE t1.a IN (SELECT MAX(t2.c) FROM t2 JOIN t1)) AS sq1,
(SELECT t2.* FROM t2 JOIN t1 ON (t1.b IN (SELECT t1.b FROM t2 STRAIGHT_JOIN t1))) AS sq2;
a b c
SET OPTIMIZER_USE_CONDITION_SELECTIVITY=@tmp;
DROP TABLE t1,t2;
# End of 10.6 tests