summaryrefslogtreecommitdiff
path: root/sql/threadpool_win.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2015-12-04 18:16:04 +0100
committerVladislav Vaintroub <wlad@mariadb.com>2015-12-04 18:16:04 +0100
commit50160216eab066de7a71dd8e355f0c5cb29c8789 (patch)
tree1fa9274cc7cbb63b6f275bbcc3c849828437e4f5 /sql/threadpool_win.cc
parentba8e630d97af2b2ed3e527070f1cab05571911fd (diff)
downloadmariadb-git-50160216eab066de7a71dd8e355f0c5cb29c8789.tar.gz
MDEV-9156 : Fix tp_add_connection()'s error handling
Avoid possible my_thread_end() in the main polling thread.
Diffstat (limited to 'sql/threadpool_win.cc')
-rw-r--r--sql/threadpool_win.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/threadpool_win.cc b/sql/threadpool_win.cc
index 9cef1af272c..4be51f3d6e9 100644
--- a/sql/threadpool_win.cc
+++ b/sql/threadpool_win.cc
@@ -667,7 +667,7 @@ void tp_add_connection(THD *thd)
if(!con)
{
tp_log_warning("Allocation failed", "tp_add_connection");
- threadpool_remove_connection(thd);
+ threadpool_cleanup_connection(thd);
return;
}
@@ -685,7 +685,7 @@ void tp_add_connection(THD *thd)
else
{
/* Likely memory pressure */
- login_callback(NULL, con, NULL); /* deletes connection if something goes wrong */
+ threadpool_cleanup_connection(thd);
}
}