1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for bug#58553, "Queries with pushed conditions causes 'explain extended'

to crash mysqld". 
      
handler::pushed_cond was not always properly reset when table objects where
recycled via the table cache.
      
handler::pushed_cond is now set to NULL in handler::ha_reset(). This should 
prevent pushed conditions from (incorrectly) re-apperaring in later queries.
This commit is contained in:
Jan Wedvik
2011-01-11 12:09:54 +01:00
parent 99e95e8dab
commit f4adb7c6e4
3 changed files with 6 additions and 1 deletions

View File

@ -2993,6 +2993,11 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
table->insert_values= 0;
table->fulltext_searched= 0;
table->file->ft_handler= 0;
/*
Check that there is no reference to a condtion from an earlier query
(cf. Bug#58553).
*/
DBUG_ASSERT(table->file->pushed_cond == NULL);
table->reginfo.impossible_range= 0;
/* Catch wrong handling of the auto_increment_field_not_null. */
DBUG_ASSERT(!table->auto_increment_field_not_null);