Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all articles
Browse latest Browse all 884

MySQLConnector 5.1.39 - connection.getSlavesConnection() returning masterConnection (4 replies)

$
0
0
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,127.0.0.1:3307/database

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

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,
Sebastian

Viewing all articles
Browse latest Browse all 884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>