1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

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)
This commit is contained in:
unknown
2003-11-18 22:06:47 +01:00
parent 069ec78c80
commit a36145a8f2
3 changed files with 43 additions and 0 deletions

View File

@ -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;