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

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 5.5.28a
    • Component/s: None
    • Labels:
      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

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

              Dates

              • Due:
                Created:
                Updated:
                Resolved: