diff options
author | unknown <monty@hundin.mysql.fi> | 2001-11-26 03:24:13 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-11-26 03:24:13 +0200 |
commit | 22e34307afbbd33b8100bf26f5a012a9f0fb7d7b (patch) | |
tree | e4ffb08ed54eba722fd2c38cb0feb47899439f01 /sql/sql_table.cc | |
parent | 4615e50093d635f07f2940bb9fbe7e1c327b8ebb (diff) | |
download | mariadb-git-22e34307afbbd33b8100bf26f5a012a9f0fb7d7b.tar.gz |
A fix for ANALYZE TABLE
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index f4735df5451..aa54f325ebb 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -982,6 +982,7 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables, pthread_mutex_unlock(&LOCK_open); if (thd->killed) goto err; + open_for_modify=0; } int result_code = (table->table->file->*operator_func)(thd, check_opt); @@ -1029,6 +1030,9 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables, } if (fatal_error) table->table->version=0; // Force close of table + else if (open_for_modify) + remove_table_from_cache(thd, table->table->table_cache_key, + table->table->real_name); close_thread_tables(thd); if (my_net_write(&thd->net, (char*) packet->ptr(), packet->length())) |