summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorholyfoot@deer.(none) <>2005-12-10 18:02:36 +0400
committerholyfoot@deer.(none) <>2005-12-10 18:02:36 +0400
commit3994b2150e3f130c586742f76958db425c8da5d1 (patch)
tree96ccbb674d8c34c0478e7f113661dac8941cff38 /sql/sql_table.cc
parentdd7d2d0a115b2b0888a48bced42b2bd3eafcb957 (diff)
downloadmariadb-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.cc13
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);
}