summaryrefslogtreecommitdiff
path: root/sql/protocol.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2005-03-07 13:59:28 +0100
committerunknown <serg@serg.mylan>2005-03-07 13:59:28 +0100
commitba05aef9306f3cac9a7280c8197b7eda5fda29c6 (patch)
tree6d90dbdfe675389c5a5253b3edad4d9497c91495 /sql/protocol.cc
parent9019ea07fd8da26fdfca8693bf60dfddca7e674c (diff)
downloadmariadb-git-ba05aef9306f3cac9a7280c8197b7eda5fda29c6.tar.gz
Fixed crash if max_connections is exceeded. BUG#8996
sql/mysqld.cc: mark the thread as killed in close_connection sql/protocol.cc: don't bother remembering warnings if the thread is dying
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r--sql/protocol.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc
index 4cecd016553..6bec4dbe47f 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -122,8 +122,9 @@ void send_error(THD *thd, uint sql_errno, const char *err)
}
VOID(net_write_command(net,(uchar) 255, "", 0, (char*) err,length));
#endif /* EMBEDDED_LIBRARY*/
- push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, sql_errno,
- orig_err ? orig_err : ER(sql_errno));
+ if (!thd->killed)
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, sql_errno,
+ orig_err ? orig_err : ER(sql_errno));
thd->is_fatal_error=0; // Error message is given
thd->net.report_error= 0;