This is an automated email from the ASF dual-hosted git repository.

wuweijie pushed a commit to branch opengauss_adapt
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git

commit a93fadcb3e18a24d95b192ca10df947b95c19174
Author: 吴伟杰 <[email protected]>
AuthorDate: Mon Jul 12 10:40:39 2021 +0800

    Adapt #11261
---
 .../packet/command/query/binary/bind/OpenGaussComBatchBindPacket.java | 4 ++--
 .../proxy/frontend/postgresql/OpenGaussFrontendEngine.java            | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/binary/bind/OpenGaussComBatchBindPacket.java
 
b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/binary/bind/OpenGaussComBatchBindPacket.java
index b85ff35..e93f370 100644
--- 
a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/binary/bind/OpenGaussComBatchBindPacket.java
+++ 
b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/binary/bind/OpenGaussComBatchBindPacket.java
@@ -18,10 +18,10 @@
 package 
org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.bind;
 
 import lombok.Getter;
-import 
org.apache.shardingsphere.db.protocol.postgresql.constant.PostgreSQLBinaryColumnType;
 import 
org.apache.shardingsphere.db.protocol.postgresql.constant.PostgreSQLValueFormat;
 import 
org.apache.shardingsphere.db.protocol.postgresql.packet.command.PostgreSQLCommandPacket;
 import 
org.apache.shardingsphere.db.protocol.postgresql.packet.command.PostgreSQLCommandPacketType;
+import 
org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.PostgreSQLBinaryColumnType;
 import 
org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.PostgreSQLBinaryStatement;
 import 
org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.PostgreSQLBinaryStatementRegistry;
 import 
org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.bind.protocol.PostgreSQLBinaryProtocolValue;
@@ -72,7 +72,7 @@ public final class OpenGaussComBatchBindPacket extends 
PostgreSQLCommandPacket {
         for (int i = 0; i < resultFormatsLength; i++) {
             
resultFormats.add(PostgreSQLValueFormat.valueOf(payload.readInt2()));
         }
-        binaryStatement = 
PostgreSQLBinaryStatementRegistry.getInstance().get(connectionId).getBinaryStatement(statementId);
+        binaryStatement = 
PostgreSQLBinaryStatementRegistry.getInstance().getBinaryStatement(connectionId,
 statementId);
         sql = null == binaryStatement ? null : binaryStatement.getSql();
         eachGroupParametersCount = payload.readInt2();
     }
diff --git 
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/OpenGaussFrontendEngine.java
 
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/OpenGaussFrontendEngine.java
index 41090e1..e9b00ac 100644
--- 
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/OpenGaussFrontendEngine.java
+++ 
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/OpenGaussFrontendEngine.java
@@ -21,7 +21,6 @@ import lombok.Getter;
 import org.apache.shardingsphere.db.protocol.codec.DatabasePacketCodecEngine;
 import 
org.apache.shardingsphere.db.protocol.postgresql.codec.PostgreSQLPacketCodecEngine;
 import 
org.apache.shardingsphere.db.protocol.postgresql.packet.PostgreSQLPacket;
-import 
org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.PostgreSQLBinaryStatementRegistry;
 import 
org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
 import 
org.apache.shardingsphere.proxy.frontend.authentication.AuthenticationEngine;
 import org.apache.shardingsphere.proxy.frontend.command.CommandExecuteEngine;
@@ -46,7 +45,8 @@ public final class OpenGaussFrontendEngine implements 
DatabaseProtocolFrontendEn
     
     @Override
     public void release(final BackendConnection backendConnection) {
-        
PostgreSQLBinaryStatementRegistry.getInstance().unregister(backendConnection.getConnectionId());
+//        TODO unregister
+//        
PostgreSQLBinaryStatementRegistry.getInstance().unregister(backendConnection.getConnectionId());
     }
     
     @Override

Reply via email to