@ -3114,6 +3114,8 @@ MySQL_Connection * MySrvConnList::get_random_MyConn(MySQL_Session *sess, bool ff
// we must create a new connection
conn = new MySQL_Connection ( ) ;
conn - > parent = mysrvc ;
// if attributes.multiplex == true , STATUS_MYSQL_CONNECTION_NO_MULTIPLEX_HG is set to false. And vice-versa
conn - > set_status ( ! conn - > parent - > myhgc - > attributes . multiplex , STATUS_MYSQL_CONNECTION_NO_MULTIPLEX_HG ) ;
__sync_fetch_and_add ( & MyHGM - > status . server_connections_created , 1 ) ;
proxy_debug ( PROXY_DEBUG_MYSQL_CONNPOOL , 7 , " Returning MySQL Connection %p, server %s:%d \n " , conn , conn - > parent - > address , conn - > parent - > port ) ;
}
@ -3126,6 +3128,8 @@ MySQL_Connection * MySrvConnList::get_random_MyConn(MySQL_Session *sess, bool ff
if ( ( conns_used > conns_free ) & & ( mysrvc - > max_connections > ( conns_free / 2 + conns_used / 2 ) ) ) {
conn = new MySQL_Connection ( ) ;
conn - > parent = mysrvc ;
// if attributes.multiplex == true , STATUS_MYSQL_CONNECTION_NO_MULTIPLEX_HG is set to false. And vice-versa
conn - > set_status ( ! conn - > parent - > myhgc - > attributes . multiplex , STATUS_MYSQL_CONNECTION_NO_MULTIPLEX_HG ) ;
__sync_fetch_and_add ( & MyHGM - > status . server_connections_created , 1 ) ;
proxy_debug ( PROXY_DEBUG_MYSQL_CONNPOOL , 7 , " Returning MySQL Connection %p, server %s:%d \n " , conn , conn - > parent - > address , conn - > parent - > port ) ;
} else {
@ -3164,6 +3168,8 @@ MySQL_Connection * MySrvConnList::get_random_MyConn(MySQL_Session *sess, bool ff
} else {
conn = new MySQL_Connection ( ) ;
conn - > parent = mysrvc ;
// if attributes.multiplex == true , STATUS_MYSQL_CONNECTION_NO_MULTIPLEX_HG is set to false. And vice-versa
conn - > set_status ( ! conn - > parent - > myhgc - > attributes . multiplex , STATUS_MYSQL_CONNECTION_NO_MULTIPLEX_HG ) ;
__sync_fetch_and_add ( & MyHGM - > status . server_connections_created , 1 ) ;
proxy_debug ( PROXY_DEBUG_MYSQL_CONNPOOL , 7 , " Returning MySQL Connection %p, server %s:%d \n " , conn , conn - > parent - > address , conn - > parent - > port ) ;
return conn ;