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

Remove unneeded extra call to engine->exec() in Item_subselect::exec, remove enum store_key_result

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5.28a
    • None
    • None

    Description

      In MariaDB 5.3 I introduced early subquery optimization. As a result the logic
      in Item_subselect::exec that calls engine->exec second time if the engine was
      changed is not needed. The reason is that in the past optimization and engine
      change was done lazily during the first call to engine->exec(). From 5.3 this is
      not true, the engine is changed before execution, so even the first execution is
      done with the right engine.

      We cannot simply remove this logic completely, because there are still few
      border cases when optimization is done lazily. However Item_subselect::exec
      should check if the engine was chosen within itself (and then re-execute),
      or if the engine was chosen before execution, and then do not re-execute.

      In addition, this task will change

      enum store_key_result

      { STORE_KEY_OK, STORE_KEY_FATAL, STORE_KEY_CONV }

      into a boolean because STORE_KEY_CONV is not used anywhere, and
      the above enum has only two values.

      Attachments

        Activity

          People

            timour Timour Katchaounov (Inactive)
            timour Timour Katchaounov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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