diff options
author | svoj@mysql.com/june.mysql.com <> | 2008-03-07 18:41:50 +0400 |
---|---|---|
committer | svoj@mysql.com/june.mysql.com <> | 2008-03-07 18:41:50 +0400 |
commit | 553d70d0ee48ec077ad0c56f445964bb609bf47a (patch) | |
tree | 13e34f7c8b77b46abce848e37244196b67932b31 /sql/item_func.cc | |
parent | f83cc8e6db90c96db1eb336f690b8a2af3d49e94 (diff) | |
download | mariadb-git-553d70d0ee48ec077ad0c56f445964bb609bf47a.tar.gz |
BUG#34656 - KILL a query = Assertion failed: m_status == DA_ERROR ||
m_status == DA_OK
Reading from information_scema.tables or information_schema.columns
may cause assertion failure in debug builds. This may happen under
rare circumstances when information_schema fails to get information
about a table (e.g. when a connection is killed).
This happens because open_normal_and_derived_tables() can return an
error without setting an error message in THD. But information_schema
attempts to get an error message from THD unconditionally.
With this fix information_schema attempts to get an error message
from THD only in case error message is set in THD.
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 65d3a627d2d..b61f683ae9f 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -3722,6 +3722,7 @@ longlong Item_func_sleep::val_int() pthread_cond_init(&cond, NULL); pthread_mutex_lock(&LOCK_user_locks); + thd_proc_info(thd, "User sleep"); thd->mysys_var->current_mutex= &LOCK_user_locks; thd->mysys_var->current_cond= &cond; @@ -3733,6 +3734,7 @@ longlong Item_func_sleep::val_int() break; error= 0; } + thd_proc_info(thd, 0); pthread_mutex_unlock(&LOCK_user_locks); pthread_mutex_lock(&thd->mysys_var->mutex); thd->mysys_var->current_mutex= 0; |