summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorsvoj@mysql.com/june.mysql.com <>2008-03-07 18:41:50 +0400
committersvoj@mysql.com/june.mysql.com <>2008-03-07 18:41:50 +0400
commit553d70d0ee48ec077ad0c56f445964bb609bf47a (patch)
tree13e34f7c8b77b46abce848e37244196b67932b31 /sql/item_func.cc
parentf83cc8e6db90c96db1eb336f690b8a2af3d49e94 (diff)
downloadmariadb-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.cc2
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;