From b91a6bd88b7ae0db674b60e9b0415f3656b7471d Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Fri, 11 Nov 2011 14:53:26 -0800 Subject: 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. --- mysql-test/r/myisam_icp.result | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'mysql-test/r/myisam_icp.result') diff --git a/mysql-test/r/myisam_icp.result b/mysql-test/r/myisam_icp.result index 6799682c273..b73e98e2aea 100644 --- a/mysql-test/r/myisam_icp.result +++ b/mysql-test/r/myisam_icp.result @@ -690,6 +690,21 @@ HAVING t1.c != 5 ORDER BY t1.c; b c 1 4 DROP TABLE t1,t2; +# +# Bug#879871: InnoDB: possible ICP + GROUP BY primary index +# +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; +a +SET SESSION optimizer_switch='index_condition_pushdown=on'; +SELECT a FROM t1 WHERE c IS NULL AND d IS NOT NULL GROUP BY 1; +a +DROP TABLE t1; drop table if exists t0, t1, t1i, t1m; # # BUG#826935 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed -- cgit v1.2.1