diff options
author | unknown <serg@serg.mylan> | 2003-11-18 22:06:47 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2003-11-18 22:06:47 +0100 |
commit | a36145a8f2ba164bffe513c887697548b38955df (patch) | |
tree | 9ee74815557ed503bffb422a3398fb7d9b59ccf5 /sql/sql_handler.cc | |
parent | 069ec78c803516363e91c550624032d1b622dec9 (diff) | |
download | mariadb-git-a36145a8f2ba164bffe513c887697548b38955df.tar.gz |
Bug#1826, HANDLER+ALTER TABLE=crash (unfortunately, it cannot be tested in mysql-test suite)
more user variable tests
mysql-test/r/user_var.result:
more user variable tests (just to have this behaviour written down somewhere)
mysql-test/t/user_var.test:
more user variable tests (just to have this behaviour written down somewhere)
sql/sql_handler.cc:
Bug#1826, HANDLER+ALTER TABLE=crash
(unfortunately, it cannot be tested in mysql-test suite)
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; |