diff options
author | unknown <serg@serg.mylan> | 2003-10-06 09:24:12 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2003-10-06 09:24:12 +0200 |
commit | 08504cfe276a2ff53ab34a13250220c28702e03c (patch) | |
tree | de0da0e25a789198ff97b62cfa201858bbf38a10 /sql | |
parent | b2fd8218168925cec6c623e855fc3c1d58df5ce9 (diff) | |
parent | 907e0555834de14fa1aec538b217dd1f1c3ff23f (diff) | |
download | mariadb-git-08504cfe276a2ff53ab34a13250220c28702e03c.tar.gz |
Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
scripts/mysql_config.sh:
Auto merged
sql/mysqld.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysqld.cc | 2 | ||||
-rw-r--r-- | sql/sql_handler.cc | 15 |
2 files changed, 12 insertions, 5 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 1bb51ea8e91..b544a70f741 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3134,7 +3134,7 @@ extern "C" pthread_handler_decl(handle_connections_namedpipes,arg) ** handle start options ******************************************************************************/ -enum options { +enum options_mysqld { OPT_ISAM_LOG=256, OPT_SKIP_NEW, OPT_SKIP_GRANT, OPT_SKIP_LOCK, OPT_ENABLE_LOCK, OPT_USE_LOCKING, diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index b0d8b18dd17..a19fcdc2d73 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -34,7 +34,7 @@ The second is to be freeed only on thread end. mysql_ha_open should then do { handler_items=concat(handler_items, free_list); free_list=0; } - But !!! do_cammand calls free_root at the end of every query and frees up + But !!! do_command calls free_root at the end of every query and frees up all the sql_alloc'ed memory. It's harder to work around... */ @@ -73,7 +73,11 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables, bool dont_send_ok) if (*ptr) { VOID(pthread_mutex_lock(&LOCK_open)); - close_thread_table(thd, ptr); + if (close_thread_table(thd, ptr)) + { + /* Tell threads waiting for refresh that something has happened */ + VOID(pthread_cond_broadcast(&COND_refresh)); + } VOID(pthread_mutex_unlock(&LOCK_open)); } else @@ -90,8 +94,11 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables, bool dont_send_ok) int mysql_ha_closeall(THD *thd, TABLE_LIST *tables) { TABLE **ptr=find_table_ptr_by_name(thd, tables->db, tables->real_name, 0); - if (*ptr) - close_thread_table(thd, ptr); + if (*ptr && close_thread_table(thd, ptr)) + { + /* Tell threads waiting for refresh that something has happened */ + VOID(pthread_cond_broadcast(&COND_refresh)); + } return 0; } |