From 4df53c69f41396343e19a1fe2452d109cccd7ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Sun, 18 Sep 2016 23:50:28 +0000 Subject: [PATCH] Two bug fixes related to mirroring: - default_hostgroup was not set: this causes multiplexing to always be disabled - fd in client_myds for mirror session was not initialized: this causes random crashes --- lib/MySQL_Session.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/MySQL_Session.cpp b/lib/MySQL_Session.cpp index b55caf281..375678747 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -783,6 +783,7 @@ __get_pkts_from_client: newsess->client_myds = new MySQL_Data_Stream(); newsess->client_myds->DSS=STATE_SLEEP; newsess->client_myds->sess=newsess; + newsess->client_myds->fd=0; newsess->client_myds->myds_type=MYDS_FRONTEND; newsess->client_myds->PSarrayOUT= new PtrSizeArray(); newsess->thread_session_id=__sync_fetch_and_add(&glovars.thread_id,1); @@ -793,6 +794,7 @@ __get_pkts_from_client: newsess->client_myds->attach_connection(myconn); newsess->client_myds->myprot.init(&newsess->client_myds, newsess->client_myds->myconn->userinfo, newsess); newsess->to_process=1; + newsess->default_hostgroup=default_hostgroup; if (qpo->mirror_hostgroup>= 0) { newsess->mirror_hostgroup=qpo->mirror_hostgroup; // in the new session we copy the mirror hostgroup } else {