Details
-
Bug
-
Status: In Progress (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.4, 11.8
-
None
-
Q1/2026 Server Maintenance
Description
to reproduce:
docker run --name sds3 -d -p 4001:3306 --env MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 mariadb:11.4.7 --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --init-connect='SET NAMES utf8mb4 COLLATE utf8mb4_unicode_bin'
and
mysql -h127.0.0.1 -uroot -P4001 < init.sql
mysql -h127.0.0.1 -uroot -P4001 < query.sql
Expected result:
id select_type table type possible_keys key key_len ref rows Extra
|
1 SIMPLE TAB2 ref TAB2_IX4 TAB2_IX4 43 const 5 Using index condition; Using where |
comp_cd upr_brd_no brd_no
|
C1000 1000999 1004996 |
C1000 1000999 1004995 |
C1000 1000999 1004997 |
C1000 1000999 1004999 |
C1000 1000999 1004998 |
Wrong Result
id select_type table type possible_keys key key_len ref rows Extra
|
1 SIMPLE TAB2 index_merge|filter TAB2_IX2,TAB2_IX4 TAB2_IX2,TAB2_IX4|TAB2_IX4 5,43|43 NULL 1 (0%)Using sort_intersect(TAB2_IX2,TAB2_IX4); Using where; Using rowid filter |
comp_cd upr_brd_no brd_no
|
C1000 1000999 1004998 |
Wrong results started qwith 11.0, 10.10 and before are not affected.
Correct results with
set optimizer_switch='index_merge=off';
or !
set optimizer_switch='rowid_filter=off';
Seems i happens , if row_id filter and sort_intersect will be used in combination from optimizer
id select_type table type possible_keys key key_len ref rows Extra
|
1 SIMPLE TAB2 index_merge|filter TAB2_IX2,TAB2_IX4 TAB2_IX2,TAB2_IX4|TAB2_IX4 5,43|43 NULL 1 (0%)Using sort_intersect(TAB2_IX2,TAB2_IX4); Using where; Using rowid filter |
See also the sister issue TODO-5754 for updates relevant to this task.
Attachments
Issue Links
- relates to
-
MDEV-28878 Wrong result with index_merge_sort_intersection (and rowid_filter)
-
- Closed
-