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

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.
This commit is contained in:
Konstantin Osipov
2009-12-10 16:43:04 +03:00
parent f805517522
commit 2f7a8770a9

View File

@ -1318,6 +1318,10 @@ close_all_tables_for_name(THD *thd, TABLE_SHARE *share,
if (table->s->table_cache_key.length == 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.
This allows one to use this function after a table