Fix bug lp:889744
MariaDB 5.5 merges changes from MySQL 5.5 where all constant expressions are wrapped into an Item_cache. As a result, constant single-row subqueries were also wrapped in an Item_cache. When analyzing the where clause for constant expressions that can be evaluated during optimization, subqueries wrapped into an Item_cache did not appear as expensive, and were therefore evaluated during optimization. Such evaluation is against the current architecture of MariaDB 5.3 where subquries are executed during the execute phase. The patch adds the is_expensive() predicate to Item_cache. This makes Item_cache consistent with other wrapping Item classes that need to look at the properties of the wrapped object.
Showing
Please register or sign in to comment