From a745383956e2de9d0c865aab0b60b34ad17eb75d Mon Sep 17 00:00:00 2001 From: VilhoRaatikka Date: Fri, 2 Jan 2015 09:53:24 +0200 Subject: [PATCH] Added debug log to mysql_backend.c:gw_read_backend_event to tracm the case where less than 5 bytes is read from backend. This is potential issue with long result sets. --- server/modules/protocol/mysql_backend.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/modules/protocol/mysql_backend.c b/server/modules/protocol/mysql_backend.c index 639379f56..4d377dd02 100644 --- a/server/modules/protocol/mysql_backend.c +++ b/server/modules/protocol/mysql_backend.c @@ -510,6 +510,16 @@ static int gw_read_backend_event(DCB *dcb) { if (nbytes_read < 5) /*< read at least command type */ { rc = 0; + LOGIF(LD, (skygw_log_write_flush( + LOGFILE_DEBUG, + "%p [gw_read_backend_event] Read %d bytes " + "from DCB %p, fd %d, session %s. " + "Returning to poll wait.\n", + pthread_self(), + nbytes_read, + dcb, + dcb->fd, + dsc->session))); goto return_rc; } /** There is at least length and command type. */