Commit 61b5b3e4 authored by Jan Wedvik's avatar Jan Wedvik

Merge of fix for bug#58553, "Queries with pushed conditions causes 'explain

extended' to crash mysqld" (see http://lists.mysql.com/commits/128409).
parents 8ede0759 0a7cfad0
......@@ -4759,6 +4759,7 @@ int handler::ha_reset()
free_io_cache(table);
/* reset the bitmaps to point to defaults */
table->default_column_bitmaps();
pushed_cond= NULL;
DBUG_RETURN(reset());
}
......
......@@ -3068,6 +3068,11 @@ retry_share:
table->reginfo.lock_type=TL_READ; /* Assume read */
reset:
/*
Check that there is no reference to a condtion from an earlier query
(cf. Bug#58553).
*/
DBUG_ASSERT(table->file->pushed_cond == NULL);
table_list->updatable= 1; // It is not derived table nor non-updatable VIEW
table_list->table= table;
......
......@@ -6476,7 +6476,6 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
tab->select_cond=sel->cond=tmp;
/* Push condition to storage engine if this is enabled
and the condition is not guarded */
tab->table->file->pushed_cond= NULL;
if (thd->variables.optimizer_switch &
OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment