diff options
author | unknown <msvensson@neptunus.(none)> | 2006-11-28 14:52:28 +0100 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-11-28 14:52:28 +0100 |
commit | db875c0c070d34c525f650b15912273d74d4f8aa (patch) | |
tree | 457a86bf1aaaec8df3dff3fb37d1b6b3373d7653 /sql/sql_base.cc | |
parent | 5a21c5273fc82b15ff96004656b306fbdaa60891 (diff) | |
parent | 0fa698ddba45bc80016ef38fe58c395e053866b1 (diff) | |
download | mariadb-git-db875c0c070d34c525f650b15912273d74d4f8aa.tar.gz |
Merge bk-internal:/home/bk/mysql-5.0-maint
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 0f6715fc078..053f6fcb845 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -519,7 +519,15 @@ void close_thread_tables(THD *thd, bool lock_in_use, bool skip_derived) DBUG_PRINT("info", ("thd->open_tables: %p", thd->open_tables)); - found_old_table= 0; + + /* + End open index scans and table scans and remove references to the tables + from the handler tables hash. After this preparation it is safe to close + the tables. + */ + mysql_ha_mark_tables_for_reopen(thd, thd->open_tables); + + found_old_table= 0; while (thd->open_tables) found_old_table|=close_thread_table(thd, &thd->open_tables); thd->some_tables_deleted=0; |