Select for update should return on read-only database
Date: August 24, 2015 12:49AM

I am using mysql-connector-java version 5.1.25. I have a scenario in which my application is expected to run against a read-only MySQL DB. And so tt is also expected that any write against this DB will result in a SQL Exception and all reads will succeed.

Given the above, all my reads succeed and writes fail except for one case where I do a locking read. I do a SELECT ... FOR UPDATE (Hibernate is the framework that I use, so changing it to something else for a pessimistic write may not be an option).
This call actually hangs infinitely. I would expect it to throw a SQLException similar to the other writes. Am I missing any setting ? I would really like for this to return a SQLException to me similar to the other reads,

(From my MySQLWorkbench atleast am getting an Error Code : 1223)

Options: ReplyQuote

Written By
Select for update should return on read-only database
August 24, 2015 12:49AM

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.