This is an automated email from the ASF dual-hosted git repository.
terrymanu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new e752f032747 Release Firebird batch of statement on op_free_statement
with DSQL_close (#40101)
e752f032747 is described below
commit e752f032747acfe61b5ed753c1d062c8fed8d897
Author: Maxim Igoshin <[email protected]>
AuthorDate: Sat Oct 10 19:05:07 2026 +0300
Release Firebird batch of statement on op_free_statement with DSQL_close
(#40101)
The server releases the batch of the statement on DSQL_drop, DSQL_unprepare
and DSQL_close, so op_batch_create after DSQL_close succeeds again.
---
.../query/statement/free/FirebirdFreeStatementCommandExecutor.java | 1 +
.../statement/free/FirebirdFreeStatementCommandExecutorTest.java | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git
a/proxy/frontend/dialect/firebird/src/main/java/org/apache/shardingsphere/proxy/frontend/firebird/command/query/statement/free/FirebirdFreeStatementCommandExecutor.java
b/proxy/frontend/dialect/firebird/src/main/java/org/apache/shardingsphere/proxy/frontend/firebird/command/query/statement/free/FirebirdFreeStatementCommandExecutor.java
index e2dabb8ca33..8f3ff4526d7 100644
---
a/proxy/frontend/dialect/firebird/src/main/java/org/apache/shardingsphere/proxy/frontend/firebird/command/query/statement/free/FirebirdFreeStatementCommandExecutor.java
+++
b/proxy/frontend/dialect/firebird/src/main/java/org/apache/shardingsphere/proxy/frontend/firebird/command/query/statement/free/FirebirdFreeStatementCommandExecutor.java
@@ -51,6 +51,7 @@ public final class FirebirdFreeStatementCommandExecutor
implements CommandExecut
FirebirdStatementResourceCleaner.clean(connectionSession,
packet.getStatementId(), true);
break;
case FirebirdFreeStatementPacket.CLOSE:
+
FirebirdBatchStatementManager.getInstance().unregisterBatchStatement(connectionSession.getConnectionId(),
packet.getStatementId());
FirebirdStatementResourceCleaner.clean(connectionSession,
packet.getStatementId(), false);
break;
default:
diff --git
a/proxy/frontend/dialect/firebird/src/test/java/org/apache/shardingsphere/proxy/frontend/firebird/command/query/statement/free/FirebirdFreeStatementCommandExecutorTest.java
b/proxy/frontend/dialect/firebird/src/test/java/org/apache/shardingsphere/proxy/frontend/firebird/command/query/statement/free/FirebirdFreeStatementCommandExecutorTest.java
index 238c1f743ed..fab349d0d58 100644
---
a/proxy/frontend/dialect/firebird/src/test/java/org/apache/shardingsphere/proxy/frontend/firebird/command/query/statement/free/FirebirdFreeStatementCommandExecutorTest.java
+++
b/proxy/frontend/dialect/firebird/src/test/java/org/apache/shardingsphere/proxy/frontend/firebird/command/query/statement/free/FirebirdFreeStatementCommandExecutorTest.java
@@ -46,7 +46,6 @@ import java.util.stream.Stream;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.isA;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.ArgumentMatchers.any;
@@ -110,8 +109,9 @@ class FirebirdFreeStatementCommandExecutorTest {
when(packet.getOption()).thenReturn(FirebirdFreeStatementPacket.CLOSE);
new FirebirdFreeStatementCommandExecutor(packet,
connectionSession).execute();
verify(connectionSession,
never()).invalidatePreparedStatementCache(any());
+ verify(registry, never()).removePreparedStatement(STATEMENT_ID);
assertNull(FirebirdFetchStatementCache.getInstance().getFetchBackendHandler(CONNECTION_ID,
STATEMENT_ID));
-
assertNotNull(FirebirdBatchRegistry.getInstance().getBatchStatement(CONNECTION_ID,
STATEMENT_ID));
+
assertNull(FirebirdBatchRegistry.getInstance().getBatchStatement(CONNECTION_ID,
STATEMENT_ID));
}
@ParameterizedTest(name = "{0}")