[MDEV-30314] Wrong result with InnoDB when index merge is forced Created: 2022-12-28 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer, Storage Engine - InnoDB |
| Affects Version/s: | 10.3, 10.4 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Igor Babaev | Assignee: | Igor Babaev |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | not-10.5+ | ||
| Description |
|
When using dbt3_s001 (see mysql-test/main/dbt3_s001.inc) with InnoDB engine one gets:
The second result is incorrect.
It does not matter what settings are used for 'use_stat_tables' and 'optimizer_use_condition_selectivity'. |
| Comments |
| Comment by Igor Babaev [ 2022-12-28 ] | |||||||||||||
|
Checked with the last 5.5: when using InnoDB storage engine for dbt3_s001 correct results are returned and with the same execution plans as for 10.3. | |||||||||||||
| Comment by Elena Stepanova [ 2022-12-28 ] | |||||||||||||
|
Bisect points at this commit in 10.2.35:
| |||||||||||||
| Comment by Igor Babaev [ 2022-12-29 ] | |||||||||||||
|
With
This explains why for this query we have different results in InnoDB and MyISAM: MyISAM does not use extended keys while InnoDB may use them. Note that the primary key for lineitem has 2 components and extended keys for i_l_receiptdate in InnoDB potentially can have 3 components: (l_receipdate,l_orderkey,I_lineitem). | |||||||||||||
| Comment by Alice Sherepa [ 2023-01-18 ] | |||||||||||||
|
On 10.5+ (179c2833721292a9182) there are correct results in both cases |