Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-6480

Remove conditions for which range optimizer returned SEL_ARG::IMPOSSIBLE.

    Details

      Description

      This task is a "cut the Gordian Knot" approach to solving the problem described in two comments here:

      https://mariadb.atlassian.net/browse/MDEV-6454?focusedCommentId=55355&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-55355

      https://mariadb.atlassian.net/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?

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Show
              psergey Sergei Petrunia added a comment - The fix is pushed to https://github.com/MariaDB/server/tree/bb-10.1-orderby-fixes
              Hide
              psergey Sergei Petrunia added a comment -

              Pushed into 10.1 tree

              Show
              psergey Sergei Petrunia added a comment - Pushed into 10.1 tree

                People

                • Assignee:
                  psergey Sergei Petrunia
                  Reporter:
                  psergey Sergei Petrunia
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: