diff options
author | Jan Wedvik <jan.wedvik@sun.com> | 2011-01-11 12:09:54 +0100 |
---|---|---|
committer | Jan Wedvik <jan.wedvik@sun.com> | 2011-01-11 12:09:54 +0100 |
commit | 0a7cfad0804ab912d185c9478872b990783932bd (patch) | |
tree | 33efe1cbbdfd4e1197cf92445003f6cdfd580e51 /sql/sql_base.cc | |
parent | 2f4741667867accad41d6b2d2a9ac67851ad35c0 (diff) | |
download | mariadb-git-0a7cfad0804ab912d185c9478872b990783932bd.tar.gz |
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.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 13876b8b331..f609a073161 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -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); |