mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed LP bug #879871.
The function add_ref_to_table_cond missed updating the value of join_tab->pre_idx_push_select_cond after having updated the value of join_tab->select->pre_idx_push_select_cond.
This commit is contained in:
@ -724,3 +724,23 @@ SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
|
||||
HAVING t1.c != 5 ORDER BY t1.c;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#879871: InnoDB: possible ICP + GROUP BY primary index
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a int NOT NULL, b int, c varchar(1), d varchar(1),
|
||||
PRIMARY KEY (a), KEY c (c,b)
|
||||
);
|
||||
INSERT INTO t1 VALUES (10,8,'g','g');
|
||||
|
||||
SET SESSION optimizer_switch='index_condition_pushdown=off';
|
||||
SELECT a FROM t1 WHERE c IS NULL AND d IS NOT NULL GROUP BY 1;
|
||||
|
||||
SET SESSION optimizer_switch='index_condition_pushdown=on';
|
||||
SELECT a FROM t1 WHERE c IS NULL AND d IS NOT NULL GROUP BY 1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user