Bug #4091 FailOverReadOnly flag doesn't work
Submitted: 10 Jun 2004 18:26 Modified: 23 Jun 2004 22:20
Reporter: Jing Zheng Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / J Severity:S2 (Serious)
Version:3.0.14 OS:Windows (Windows)
Assigned to: Mark Matthews CPU Architecture:Any

[10 Jun 2004 18:26] Jing Zheng
Description:
I am running jboss-3.2.3 on windows 2000. This is the jdbc settings I tried  for connection:
1.
<connection-property name="autoReconnect">true</connection-property> 
<connection-property name="failOverReadOnly">false</connection-property>
<connection-property name="secondsBeforeRetryMaster">900</connection-property>
<connection-property name="queriesBeforeRetryMaster">20</connection-property>
2.
<connection-property name="failOverReadOnly">false</connection-property>
<connection-property name="reconnectAtTxEnd">true</connection-property>
<connection-property name="secondsBeforeRetryMaster">900</connection-property>
<connection-property name="queriesBeforeRetryMaster">20</connection-property>

I even tried to set failOverReadOnly to true just in case it was interpreted. None of thm worked. I always got the exception msg saying:
An SQL error ocurred: Connection is read-only. Queries leading to data modification are not allowed

How to repeat:
use connection url as sth like 
jdbc:mysql://localhost,192.168.10.2:3306/test

plus the above properties set. start up two mysql servers, write a java insert program, then shutdown the master mysql server.
[23 Jun 2004 22:20] Mark Matthews
I am not able to repeat this on my end. Any chance you can demonstrate this issue _without_ using an application server like JBoss in a standalone class? There's a chance that the properties are not getting passed to the driver correctly.
[28 Feb 2008 21:33] Clint Goudie-Nice
I'm having this problem on 5.0.22-log with jdbc connector 5.1.5 with a mysql master-master pair where the first master is down. This is using only java/jdbc with the jdbc connect string below:

jdbc:mysql://serverThatIsDown.somedomain.com,serverThatIsUp.somedomain.com/fs?user=root&password=somepass&autoReconnect=true&roundRobinLoadBalance=true&failOverReadOnly=false&autoReconnectForPools=true&queriesBeforeRetryMaster=99999999999999999999&secondsBeforeRetryMaster=99999999999999999999&max-connections=30&min-connections=10&inactivity-timeout=60