Merge of fix for bug#58553, "Queries with pushed conditions causes 'explain
extended' to crash mysqld" (see http://lists.mysql.com/commits/128409).
This commit is contained in:
commit
b7e3f45011
@ -4759,6 +4759,7 @@ int handler::ha_reset()
|
|||||||
free_io_cache(table);
|
free_io_cache(table);
|
||||||
/* reset the bitmaps to point to defaults */
|
/* reset the bitmaps to point to defaults */
|
||||||
table->default_column_bitmaps();
|
table->default_column_bitmaps();
|
||||||
|
pushed_cond= NULL;
|
||||||
DBUG_RETURN(reset());
|
DBUG_RETURN(reset());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3068,6 +3068,11 @@ retry_share:
|
|||||||
table->reginfo.lock_type=TL_READ; /* Assume read */
|
table->reginfo.lock_type=TL_READ; /* Assume read */
|
||||||
|
|
||||||
reset:
|
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->updatable= 1; // It is not derived table nor non-updatable VIEW
|
||||||
table_list->table= table;
|
table_list->table= table;
|
||||||
|
|
||||||
|
@ -6476,7 +6476,6 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
|
|||||||
tab->select_cond=sel->cond=tmp;
|
tab->select_cond=sel->cond=tmp;
|
||||||
/* Push condition to storage engine if this is enabled
|
/* Push condition to storage engine if this is enabled
|
||||||
and the condition is not guarded */
|
and the condition is not guarded */
|
||||||
tab->table->file->pushed_cond= NULL;
|
|
||||||
if (thd->variables.optimizer_switch &
|
if (thd->variables.optimizer_switch &
|
||||||
OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN)
|
OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user