summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <holyfoot@mysql.com>2006-05-03 15:53:36 +0500
committerunknown <holyfoot@mysql.com>2006-05-03 15:53:36 +0500
commit050a9f3f3fdfaf166369264445d7540f4ea62df7 (patch)
tree55429cc5b88d492bf09af77aab47463ceade5cb1 /sql/sql_table.cc
parent651c0c18f04e5c6831402916b66777817dd57c75 (diff)
parentf4c6c0ed40ad7159b441810a1bf9bd014fdd0a2c (diff)
downloadmariadb-git-050a9f3f3fdfaf166369264445d7540f4ea62df7.tar.gz
Merge hf@192.168.21.28:work/mysql-4.1.16892
into mysql.com:/home/hf/work/mysql-4.1.mrg
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 c9513ec71ab..841a2f73847 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -2164,10 +2164,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);
}