|
This task is a "cut the Gordian Knot" approach to solving the problem described in two comments here:
https://jira.mariadb.org/browse/MDEV-6454?focusedCommentId=55355&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-55355
https://jira.mariadb.org/browse/MDEV-6454?focusedCommentId=55358&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-55358
The idea is that as soon as range optimizer concludes that some for Item* (possibly inside an OR) we have produced a tree of type SEL_ARG::IMPOSSIBLE, that Item* should be removed from the WHERE condition.
The will solve the problem described in the above two comments, and also will open additional optimization possibilities.
Challenges to explore
- How does one remove Item* from the WHERE in a PS-safe way (call thd->change_item_tree() or ... ?)
- Do we need to do AND/OR flattening after such conversion?
|