MySQLConnector 5.1.39 - connection.getSlavesConnection() returning masterConnection
Posted by: Sebastián Ariel Cortés
Date: June 28, 2016 10:43PM

Hi,i have a problem with the new 5.1.39 driver.

The function connection.getSlavesConnection() is returning the master connection.

I compared it with version 5.1.24 and:

URL replication config: jdbc:mysql:replication://localhost:3308,

Driver 5.1.24:
masterCon.getMetaData().getURL(): returns: jdbc:mysql://localhost/database
masterCon.getSlavesConnection().getMetaData().getURL(): returns: jdbc:mysql://

Driver 5.1.39: Is always returning master:
masterCon.getMetaData().getURL(): returns: jdbc:mysql://localhost:3308/
masterCon.getSlavesConnection().getMetaData().getURL(): jdbc:mysql://localhost:3308/

There is some way to obtain the real slaveConnection from the ReplicationConnection interface in the 5.1.39 driver version?

I'm using Statement st = slaveConn.createStatement() because i need to force an internal query to the slave server.

Thanks in advance,

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.