Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
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.