diff options
author | holyfoot@mysql.com <> | 2006-02-20 18:01:59 +0400 |
---|---|---|
committer | holyfoot@mysql.com <> | 2006-02-20 18:01:59 +0400 |
commit | 78cc24e2845ebbf28ca06237dd3730c1dbbb1109 (patch) | |
tree | a38b7d9935d666cd014a9b417d35e6d3ec0a8614 /sql/sql_table.cc | |
parent | e75a62aeaee8d429d7e725bf8f2ac7399dc3cd8b (diff) | |
parent | 3994b2150e3f130c586742f76958db425c8da5d1 (diff) | |
download | mariadb-git-78cc24e2845ebbf28ca06237dd3730c1dbbb1109.tar.gz |
Merge bk@192.168.21.1:mysql-4.1
into mysql.com:/home/hf/work/mysql-4.1.15225
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 71cbc0be1e3..d57789585e2 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2141,10 +2141,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); } |