[MDEV-3812] Remove unneeded extra call to engine->exec() in Item_subselect::exec, remove enum store_key_result Created: 2012-10-18  Updated: 2012-10-26  Due: 2012-10-19  Resolved: 2012-10-26

Status: Closed
Project: MariaDB Server
Component/s: None
Fix Version/s: 5.5.28a

Type: Task Priority: Major
Reporter: Timour Katchaounov (Inactive) Assignee: Timour Katchaounov (Inactive)
Resolution: Fixed Votes: 0
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.



 Comments   
Comment by Oleksandr Byelkin [ 2012-10-26 ]

The patch is OK.

Comment by Timour Katchaounov (Inactive) [ 2012-10-26 ]

Pushed to MariaDB 5.5.29

Generated at Thu Feb 08 06:51:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.