1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Revert "MDEV-14786 Server crashes in Item_cond::transform on 2nd execution of SP querying from a view [fixes #436]"

This reverts commit 7069071d7d

And add a test to show that optimization steps that
a) are repeated for every execution
b) create new items
cannot be done on the statement arena
This commit is contained in:
Sergei Golubchik
2018-01-14 12:37:55 +01:00
parent edb6375910
commit 1ea2b2956b
3 changed files with 62 additions and 11 deletions

View File

@ -14677,8 +14677,6 @@ static COND* substitute_for_best_equal_field(THD *thd, JOIN_TAB *context_tab,
Item_equal *item_equal;
COND *org_cond= cond; // Return this in case of fatal error
Query_arena_stmt on_stmt_arena(thd);
if (cond->type() == Item::COND_ITEM)
{
List<Item> *cond_list= ((Item_cond*) cond)->argument_list();
@ -15800,8 +15798,6 @@ optimize_cond(JOIN *join, COND *conds,
THD *thd= join->thd;
DBUG_ENTER("optimize_cond");
Query_arena_stmt on_stmt_arena(thd);
if (!conds)
{
*cond_value= Item::COND_TRUE;