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

panjuan 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 599a8eb  Refactor MySQLComQueryPacketExecutor & 
MySQLComStmtExecuteExecutor
     new e49780a  Merge pull request #7319 from terrymanu/dev
599a8eb is described below

commit 599a8ebfd2b2c0a3dac8823a37c03a2fa57ad1ac
Author: terrymanu <[email protected]>
AuthorDate: Tue Sep 8 14:29:21 2020 +0800

    Refactor MySQLComQueryPacketExecutor & MySQLComStmtExecuteExecutor
---
 .../command/query/binary/execute/MySQLComStmtExecuteExecutor.java   | 6 ++----
 .../mysql/command/query/text/query/MySQLComQueryPacketExecutor.java | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git 
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutor.java
 
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutor.java
index 2fe8129..af1ee89 100644
--- 
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutor.java
+++ 
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutor.java
@@ -94,15 +94,13 @@ public final class MySQLComStmtExecuteExecutor implements 
QueryCommandExecutor {
     }
     
     private BackendResponse getBackendResponse() {
-        BackendResponse result;
         try {
-            result = databaseCommunicationEngine.execute();
+            return databaseCommunicationEngine.execute();
         // CHECKSTYLE:OFF
         } catch (final Exception ex) {
         // CHECKSTYLE:OFF
-            result = new ErrorResponse(ex);
+            return new ErrorResponse(ex);
         }
-        return result;
     }
     
     private Collection<DatabasePacket<?>> createQueryPacket(final 
QueryResponse backendResponse) {
diff --git 
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLComQueryPacketExecutor.java
 
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLComQueryPacketExecutor.java
index 825c13d..7f14713 100644
--- 
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLComQueryPacketExecutor.java
+++ 
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLComQueryPacketExecutor.java
@@ -90,15 +90,13 @@ public final class MySQLComQueryPacketExecutor implements 
QueryCommandExecutor {
     }
     
     private BackendResponse getBackendResponse() {
-        BackendResponse result;
         try {
-            result = textProtocolBackendHandler.execute();
+            return textProtocolBackendHandler.execute();
         // CHECKSTYLE:OFF
         } catch (final Exception ex) {
         // CHECKSTYLE:OFF
-            result = new ErrorResponse(ex);
+            return new ErrorResponse(ex);
         }
-        return result;
     }
     
     private Collection<DatabasePacket<?>> createQueryPackets(final 
QueryResponse backendResponse) {

Reply via email to