From 9419d3462ea7eb96d3a092fcdc837d891205b978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Sun, 18 Sep 2016 23:57:56 +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 828f6ddab..4736caad6 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -649,6 +649,7 @@ void MySQL_Session::handler___status_WAITING_CLIENT_DATA___STATE_SLEEP___MYSQL_C 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); @@ -659,6 +660,7 @@ void MySQL_Session::handler___status_WAITING_CLIENT_DATA___STATE_SLEEP___MYSQL_C 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 {