Details
Description
CREATE TABLE t1 (a INT, b VARCHAR(1), KEY (a), KEY(b,a)) ENGINE=InnoDB; |
INSERT INTO t1 VALUES (4,'n'),(1,'h'),(NULL,'w'); |
|
SELECT b, a FROM t1 WHERE b <> 'p' OR a = 4 GROUP BY b, a HAVING a <= 7; |
Condition pushdown from HAVING into WHERE puts "t1.a <=7" into the WHERE:
$6 = 0x555557aff480 <dbug_item_print_buf> "(t1.b <> 'p' or multiple equal(4, t1.a)) and t1.a <= 7"
|
But this is not visible in the optimizer trace.
Observed on 10.5 but probably affects other versions as well.
Attachments
Issue Links
- relates to
-
MDEV-24819 Wrong result or ASAN use-after-poison errors upon SELECT with GROUP BY
- In Review