There was an error while loading. Please reload this page.
1 parent 361cf71 commit baae3dbCopy full SHA for baae3db
src/main/java/org/mariadb/jdbc/client/impl/StandardClient.java
@@ -295,10 +295,9 @@ private void postConnectionQueries() throws SQLException {
295
commands.add("show status like 'wsrep_local_state'");
296
}
297
298
- if (context.getVersion().versionGreaterOrEqual(5, 6, 5)) {
299
- commands.add(
300
- "SET SESSION TRANSACTION "
301
- + ((hostAddress != null && !hostAddress.primary) ? "READ ONLY" : "READ WRITE"));
+ if (!hostAddress.primary
+ && context.getVersion().versionGreaterOrEqual(5, 6, 5)) {
+ commands.add("SET SESSION TRANSACTION READ ONLY");
302
303
304
try {
0 commit comments