diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-04-02 15:04:45 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-04-02 15:04:45 +0200 |
commit | 11fa88ef67bea74bd13ad688938a03d5b266db64 (patch) | |
tree | 7be3a6574ff43cfa6fe4d6e0ce2ded45a6fa2985 /sql | |
parent | a90622644c11568c2bf982492d2f47bc164ddfef (diff) | |
download | mariadb-git-bb-10.4-MDEV-17362.tar.gz |
MDEV-17362: SIGSEGV in JOIN::optimize_inner or Assertion `fixed == 0' failed in Item_equal::fix_fields, server crashes after 2nd execution of PSbb-10.4-MDEV-17362
Move reinitialisation of pushdown variables for every query, because it used now not only for derived tables.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_derived.cc | 5 | ||||
-rw-r--r-- | sql/sql_prepare.cc | 4 | ||||
-rw-r--r-- | sql/sql_select.cc | 6 |
3 files changed, 8 insertions, 7 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 1ad97e4244d..f694707578c 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -1294,11 +1294,6 @@ bool mysql_derived_reinit(THD *thd, LEX *lex, TABLE_LIST *derived) unit->types.empty(); /* for derived tables & PS (which can't be reset by Item_subselect) */ unit->reinit_exec_mechanism(); - for (st_select_lex *sl= unit->first_select(); sl; sl= sl->next_select()) - { - sl->cond_pushed_into_where= NULL; - sl->cond_pushed_into_having= NULL; - } unit->set_thd(thd); DBUG_RETURN(FALSE); } diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 8a722ad3952..c15f3a8c143 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -3026,6 +3026,10 @@ void reinit_stmt_before_use(THD *thd, LEX *lex) for (order= win_spec->order_list->first; order; order= order->next) order->item= &order->item_ptr; } + + // Reinit Pushdown + sl->cond_pushed_into_where= NULL; + sl->cond_pushed_into_having= NULL; } if (sl->changed_elements & TOUCHED_SEL_DERIVED) { diff --git a/sql/sql_select.cc b/sql/sql_select.cc index e8b092b1b23..197ead809eb 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -13445,8 +13445,10 @@ void JOIN::join_free() void JOIN::cleanup(bool full) { DBUG_ENTER("JOIN::cleanup"); - DBUG_PRINT("enter", ("full %u", (uint) full)); - + DBUG_PRINT("enter", ("select: %d (%p) join: %p full: %u", + select_lex->select_number, select_lex, this, + (uint) full)); + if (full) have_query_plan= QEP_DELETED; |