summaryrefslogtreecommitdiff
path: root/sql/sql_connect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_connect.cc')
-rw-r--r--sql/sql_connect.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc
index d8ac571b578..168814bcc81 100644
--- a/sql/sql_connect.cc
+++ b/sql/sql_connect.cc
@@ -1462,7 +1462,7 @@ THD *CONNECT::create_thd(THD *thd)
res= my_net_init(&thd->net, vio, thd, MYF(MY_THREAD_SPECIFIC));
vio= 0; // Vio now handled by thd
- if (res)
+ if (res || thd->is_error())
{
if (!thd_reused)
delete thd;