Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0.3, 5.5.32
-
None
Description
Note: It looks like other bugs we had with index_merge, but I don't remember (and can't find) a combination with Aria, so I'll file it in case it's different.
SET optimizer_switch = 'index_merge=on,index_merge_sort_union=on'; |
|
|
CREATE TABLE t1 (id INT, state VARCHAR(10), INDEX(state), PRIMARY KEY (id)) ENGINE=Aria; |
|
|
ALTER TABLE t1 DISABLE KEYS; |
INSERT INTO t1 VALUES (1,'California'),(2,'Ohio'); |
INSERT INTO t1 VALUES (3,'Alabama'),(4,'Jersey'); |
ALTER TABLE t1 ENABLE KEYS; |
|
|
SELECT * FROM t1 FORCE KEY (PRIMARY,state) WHERE state > 'H' OR id < 255 ; |
Actual result:
id state
|
1 California
|
2 Ohio
|
4 Jersey
|
Expected result:
id state
|
1 California
|
2 Ohio
|
3 Alabama
|
4 Jersey
|
bzr version-info
revision-id: sanja@montyprogram.com-20130718081618-6ax63urznfnqmzgt
|
revno: 3839
|
branch-nick: 5.5
|
Also reproducible on 10.0 and 10.0-base, but not on 5.3.
Not reproducible with MyISAM.
Minimal optimizer_switch: index_merge=on,index_merge_sort_union=on
Reproducible with the default optimizer_switch too.
EXPLAIN:
id select_type table type possible_keys key key_len ref rows filtered Extra
|
1 SIMPLE t1 index_merge PRIMARY,state state,PRIMARY 13,4 NULL 4 100.00 Using sort_union(state,PRIMARY); Using where
|
Warnings:
|
Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`state` AS `state` from `test`.`t1` FORCE INDEX (`state`) FORCE INDEX (PRIMARY) where ((`test`.`t1`.`state` > 'H') or (`test`.`t1`.`id` < 255))
|