From 323fb8164eb4ce6b710ec3f9f8a1802471400f02 Mon Sep 17 00:00:00 2001 From: vraatikka Date: Thu, 21 Nov 2013 15:35:55 +0200 Subject: [PATCH] mysql_send_auth_error didn't check whether dcb is in DCB_STATE_POLLING state. If it is, function now returns. --- server/modules/protocol/mysql_common.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/server/modules/protocol/mysql_common.c b/server/modules/protocol/mysql_common.c index ee415b7a0..5c9cdc229 100644 --- a/server/modules/protocol/mysql_common.c +++ b/server/modules/protocol/mysql_common.c @@ -1172,6 +1172,17 @@ mysql_send_auth_error (DCB *dcb, int packet_number, int in_affected_rows, const GWBUF *buf; + if (dcb->state != DCB_STATE_POLLING) + { + skygw_log_write( + LOGFILE_DEBUG, + "%lu [mysql_send_auth_error] dcb %p is in a state %s, " + "and it is not in epoll set anymore. Skip error sending.", + pthread_self(), + dcb, + STRDCBSTATE(dcb->state)); + return 0; + } mysql_errno = 1045; mysql_error_msg = "Access denied!"; mysql_state = "2800";