diff options
author | holyfoot@mysql.com <> | 2006-05-03 16:33:42 +0500 |
---|---|---|
committer | holyfoot@mysql.com <> | 2006-05-03 16:33:42 +0500 |
commit | 9de68b8122c4088b248d7b2c01cc3bdcec50bd3c (patch) | |
tree | e3564797fb0dc8dbca6b1ef64e64cdaccc2ea868 /sql/sql_table.cc | |
parent | c40f8557dce50aabccc2f1fc228c7a3ebdceb55f (diff) | |
parent | 8667344572a61a3b685cf87369a656db835540c8 (diff) | |
download | mariadb-git-9de68b8122c4088b248d7b2c01cc3bdcec50bd3c.tar.gz |
merging
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 073a847ad90..d93e79cdfde 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2564,11 +2564,16 @@ send_result_message: table->table->s->version=0; // Force close of table else if (open_for_modify) { - pthread_mutex_lock(&LOCK_open); - remove_table_from_cache(thd, table->table->s->db, - table->table->s->table_name, RTFC_NO_FLAG); - pthread_mutex_unlock(&LOCK_open); - /* Something may be modified, that's why we have to invalidate cache */ + 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->s->db, + table->table->s->table_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); } } |