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

Ignoring items instead of removing them.

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • N/A
    • Optimizer
    • None

    Description

      In the optimizer we sometimes remove items from a query and then later, when query is finished, we add the items back in their original position to be able to do re-execution of the original query (but possible with new parameters).

      Instead of removing top level items (that are always of type bool) that we may have to add back (not basic constants), we could wrap the original item with another item:
      Item_removeable(original_item) of type bool
      That would have 2 states: Active and true or false
      When state is active, it would execute the corresponding action val(), val_bool() on the original item (like Item_ref() is doing)

      • When state is 'true' then it would always return true
      • When state is 'false' then it would always return false

      This item would have the property:

      • When created it would have state 'removed' and always return true.
      • After query processing, during Item_removable->cleanup() it would change state to 'active'
      • Item_removable->set_state would set the state to true or false.

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              monty Michael Widenius
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.