From 128d5e3f48cb7518bba729ababb5c0f1b8ff3d7a Mon Sep 17 00:00:00 2001 From: VilhoRaatikka Date: Tue, 11 Nov 2014 14:25:34 +0200 Subject: [PATCH] Addition to previous fix --- server/modules/protocol/mysql_backend.c | 11 ++++------- server/modules/protocol/mysql_common.c | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/server/modules/protocol/mysql_backend.c b/server/modules/protocol/mysql_backend.c index ac36f34d8..462a77c48 100644 --- a/server/modules/protocol/mysql_backend.c +++ b/server/modules/protocol/mysql_backend.c @@ -392,13 +392,10 @@ static int gw_read_backend_event(DCB *dcb) { dcb, dcb->session))); - if (session != NULL) - { - spinlock_acquire(&session->ses_lock); - session->state = SESSION_STATE_STOPPING; - spinlock_release(&session->ses_lock); - } - ss_dassert(dcb->dcb_errhandle_called); + spinlock_acquire(&session->ses_lock); + session->state = SESSION_STATE_STOPPING; + spinlock_release(&session->ses_lock); + ss_dassert(dcb->dcb_errhandle_called); dcb_close(dcb); } rc = 1; diff --git a/server/modules/protocol/mysql_common.c b/server/modules/protocol/mysql_common.c index bfa45ed98..ce8d275b0 100644 --- a/server/modules/protocol/mysql_common.c +++ b/server/modules/protocol/mysql_common.c @@ -1767,7 +1767,7 @@ void protocol_archive_srv_command( } else /*< scan and count history commands */ { - len += 1; + len = 1; while (h1->scom_next != NULL) {