Bug #83834 Typo in Connector/J error message
Submitted: 15 Nov 2016 22:40 Modified: 20 Apr 2017 20:46
Reporter: David Phillips Email Updates:
Status: Closed Impact on me:
Category:Connector / J Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Filipe Silva CPU Architecture:Any

[15 Nov 2016 22:40] David Phillips
The ConnectionImpl.isReadOnly() method throws this error message: "Could not retrieve transation read-only status server"

I believe the message is trying to say "Could not retrieve status from server"

(There is also a typo in the word "transation")

The message is confusing because the phrase "read-only status server" indicates that the server is in a read-only state. This is especially true if the message is copy/pasted or the context is otherwise lost.

We've lost quite a lot of time trying to figure out why the server might be read-only when in reality the problem is a connection error.

Additionally, this method is called internally by the driver in several places, such as in PreparedStatement.executeBatch(), so the "read-only status" part even more unexpected and confusing.

How to repeat:
Interrupt the socket connection before/while calling isReadOnly().

Suggested fix:
Update the message to be "Could not retrieve transaction read-only status from server"
[16 Nov 2016 5:37] Chiranjeevi Battula
Hello  David Phillips,

Thank you for the bug report.

[20 Apr 2017 20:46] Daniel So
Posted by developer:
Added the following entry to the C/J 5.1.42 changelog:

"The ConnectionImpl.isReadOnly() method returned a confusing error message when it could not retrieve the read-only status of the server. The message has now been changed to 'Could not retrieve transaction read-only status from server.'"