diff options
author | unknown <holyfoot@mysql.com> | 2006-05-03 15:51:19 +0500 |
---|---|---|
committer | unknown <holyfoot@mysql.com> | 2006-05-03 15:51:19 +0500 |
commit | bb95643f735a89941d76f3229c7f5be78f0f0b3b (patch) | |
tree | 82361510724ec21c3ea6d286986b88f40a172e7a /sql | |
parent | bb40065a1f418614ad530817ffc4f55be242c1f9 (diff) | |
parent | b23aa5c0bea3e8c3c0e9fdb3ef287628d0d8497b (diff) | |
download | mariadb-git-bb95643f735a89941d76f3229c7f5be78f0f0b3b.tar.gz |
Merge mysql.com:/home/hf/work/mysql-4.1.15225
into mysql.com:/home/hf/work/mysql-4.1.mrg
sql/sql_table.cc:
Auto merged
Diffstat (limited to 'sql')
-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 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); } |