diff options
author | serg@serg.mylan <> | 2003-11-18 22:06:47 +0100 |
---|---|---|
committer | serg@serg.mylan <> | 2003-11-18 22:06:47 +0100 |
commit | 11f70bdfc41561e36d2eee288ce4dc5715ab622a (patch) | |
tree | 9ee74815557ed503bffb422a3398fb7d9b59ccf5 /sql/sql_handler.cc | |
parent | 60d60a299e9b8a4b99d83b99b1cde4634f95e20c (diff) | |
download | mariadb-git-11f70bdfc41561e36d2eee288ce4dc5715ab622a.tar.gz |
Bug#1826, HANDLER+ALTER TABLE=crash (unfortunately, it cannot be tested in mysql-test suite)
more user variable tests
Diffstat (limited to 'sql/sql_handler.cc')
-rw-r--r-- | sql/sql_handler.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index dd8dfb31163..208545a435b 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -285,7 +285,20 @@ static TABLE **find_table_ptr_by_name(THD *thd, const char *db, { if (!memcmp(table->table_cache_key, db, dblen) && !my_strcasecmp((is_alias ? table->table_name : table->real_name),table_name)) + { + if (table->version != refresh_version) + { + VOID(pthread_mutex_lock(&LOCK_open)); + 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)); + continue; + } break; + } ptr=&(table->next); } return ptr; |