[MDEV-19911] Regression in 10.4 with InnoDB: indexed SELECT with join results in wrong results. Created: 2019-06-30 Updated: 2019-07-01 Resolved: 2019-07-01 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.4 |
| Fix Version/s: | 10.4.7, 10.5.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Kris Karas | Assignee: | Varun Gupta (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | index, innodb, join, regression | ||
| Environment: |
GNU/Linux |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
Upgraded from 10.3.16 to 10.4.6, and SELECTs are returning wrong results with even fairly simple queries! Specifically, the same query with additional OR terms returns fewer items. MariaDB [maildb]> SELECT * FROM route JOIN imap USING (userid) I converted my database into a simple test script, attached below. Depending upon the order of INSERTs, the rows returned by SELECT are quite different. This will be immediately obvious when you read the test script. The regression occurs with InnoDB. It does not occur with Aria or MyISAM. I did not try other engine types. Regression occurs in both a fresh 10.4.6 database install as well as an upgrade from 10.3.16 Expected Result: We should expect one record with "One Of These": We should expect two records with "Two Of These": We should get one "One Of These" and two "Two Of These": Actual Results: We should expect one record with "One Of These": We should expect two records with "Two Of These": We should get one "One Of These" and two "Two Of These": |
| Comments |
| Comment by Varun Gupta (Inactive) [ 2019-07-01 ] | ||||||||||||||||||||||||||||||||
|
This issue is fixed by A workaround for 10.4.6 would be to turn off optimizer_switch for rowid_filter.
|