Commit 2f7a8770 authored by Konstantin Osipov's avatar Konstantin Osipov

Backport of:

 2630.16.14 Sergei Golubchik	2008-08-25
 fixed a crash in partition tests
 introduced by HA_EXTRA_PREPARE_FOR_DROP patch


sql/sql_base.cc:
  Don't call ::extra() for closed tables.
parent f8055175
...@@ -1318,6 +1318,10 @@ close_all_tables_for_name(THD *thd, TABLE_SHARE *share, ...@@ -1318,6 +1318,10 @@ close_all_tables_for_name(THD *thd, TABLE_SHARE *share,
if (table->s->table_cache_key.length == key_length && if (table->s->table_cache_key.length == key_length &&
!memcmp(table->s->table_cache_key.str, key, key_length)) !memcmp(table->s->table_cache_key.str, key, key_length))
{ {
/* Inform handler that table will be dropped after close */
if (table->db_stat)
table->file->extra(HA_EXTRA_PREPARE_FOR_DROP);
/* /*
Does nothing if the table is not locked. Does nothing if the table is not locked.
This allows one to use this function after a table This allows one to use this function after a table
......
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