From ce34ec8bc0eab578b907e796a9ae6f4212aa747d Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 16 May 2024 22:56:49 +0100 Subject: [PATCH] Fix for Bug#114800 (Bug#36576596), Wrong code by an old patch. Change-Id: Icaca71d10d591c837c87dee5f909954c1158e340 --- CHANGES | 2 ++ src/main/core-impl/java/com/mysql/cj/NativeSession.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 01af0a058..974f3c5db 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,8 @@ Version 9.0.0 + - Fix for Bug#114800 (Bug#36576596), Wrong code by an old patch. + - Fix for Bug#114846 (Bug#36574322), Auto-closeable X dev session. Thanks to Daniel Kec for his contribution. diff --git a/src/main/core-impl/java/com/mysql/cj/NativeSession.java b/src/main/core-impl/java/com/mysql/cj/NativeSession.java index 9f05a09c3..1513743b5 100644 --- a/src/main/core-impl/java/com/mysql/cj/NativeSession.java +++ b/src/main/core-impl/java/com/mysql/cj/NativeSession.java @@ -836,10 +836,10 @@ public T execSQL(Query callingQuery, String query, int max if (ex instanceof IOException) { // IO may be dirty or damaged beyond repair, force close it. this.protocol.getSocketConnection().forceClose(); - } else if (ex instanceof IOException) { - invokeCleanupListeners(ex); } this.needsPing = true; + } else if (ex instanceof IOException) { + invokeCleanupListeners(ex); } throw ExceptionFactory.createException(ex.getMessage(), ex, this.exceptionInterceptor);