diff options
author | holyfoot@deer.(none) <> | 2005-12-10 18:02:36 +0400 |
---|---|---|
committer | holyfoot@deer.(none) <> | 2005-12-10 18:02:36 +0400 |
commit | 3994b2150e3f130c586742f76958db425c8da5d1 (patch) | |
tree | 96ccbb674d8c34c0478e7f113661dac8941cff38 /sql/sql_table.cc | |
parent | dd7d2d0a115b2b0888a48bced42b2bd3eafcb957 (diff) | |
download | mariadb-git-3994b2150e3f130c586742f76958db425c8da5d1.tar.gz |
Fix for bug #15225 (ANALYZE temporary has no effect)
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 294c59af90f..d582c36a4f4 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2140,10 +2140,15 @@ send_result_message: table->table->version=0; // Force close of table else if (open_for_modify) { - pthread_mutex_lock(&LOCK_open); - remove_table_from_cache(thd, table->table->table_cache_key, - table->table->real_name, RTFC_NO_FLAG); - pthread_mutex_unlock(&LOCK_open); + if (table->table->tmp_table) + table->table->file->info(HA_STATUS_CONST); + else + { + pthread_mutex_lock(&LOCK_open); + remove_table_from_cache(thd, table->table->table_cache_key, + table->table->real_name, RTFC_NO_FLAG); + pthread_mutex_unlock(&LOCK_open); + } /* May be something modified consequently we have to invalidate cache */ query_cache_invalidate3(thd, table->table, 0); } |