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

chengzhang 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 5c3d2368804 Add DriverConnectionException (#30749)
5c3d2368804 is described below

commit 5c3d23688049259a1297a862deb6afe60225db41
Author: Liang Zhang <[email protected]>
AuthorDate: Wed Apr 3 00:15:36 2024 +0800

    Add DriverConnectionException (#30749)
---
 .../user-manual/error-code/sql-error-code.cn.md    |  7 +++---
 .../user-manual/error-code/sql-error-code.en.md    |  7 +++---
 .../connection}/CircuitBreakException.java         |  2 +-
 .../exception/connection}/ReadOnlyException.java   |  2 +-
 .../SQLExecutionInterruptedException.java          |  2 +-
 .../connection}/UnavailableException.java          |  2 +-
 .../executor/sql/process/ProcessRegistry.java      |  2 +-
 .../driver/ShardingSphereDriver.java               |  1 +
 .../ConnectionClosedException.java                 |  7 +++---
 .../DriverConnectionException.java}                | 28 +++++++++++++++-------
 .../{ => exception}/DriverRegisterException.java   |  7 +++---
 .../ResultSetClosedException.java                  |  7 +++---
 .../core/connection/ShardingSphereConnection.java  |  2 +-
 .../core/resultset/DatabaseMetaDataResultSet.java  |  2 +-
 .../enumerable/EnumerableScanExecutor.java         |  2 +-
 .../backend/state/impl/ReadOnlyProxyState.java     |  2 +-
 .../backend/state/impl/UnavailableProxyState.java  |  2 +-
 .../backend/state/impl/ReadOnlyProxyStateTest.java |  2 +-
 .../state/impl/UnavailableProxyStateTest.java      |  2 +-
 .../state/impl/CircuitBreakProxyState.java         |  2 +-
 .../state/impl/CircuitBreakProxyStateTest.java     |  2 +-
 21 files changed, 49 insertions(+), 43 deletions(-)

diff --git a/docs/document/content/user-manual/error-code/sql-error-code.cn.md 
b/docs/document/content/user-manual/error-code/sql-error-code.cn.md
index bea2e001140..17372bad8d4 100644
--- a/docs/document/content/user-manual/error-code/sql-error-code.cn.md
+++ b/docs/document/content/user-manual/error-code/sql-error-code.cn.md
@@ -67,18 +67,17 @@ SQL 错误码以标准的 SQL State,Vendor Code 和详细错误信息提供,
 
 | SQL State | Vendor Code | 错误信息                                               
                                                                                
                                                                                
         |
 
|-----------|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| 08000     | 13000       | Can not register driver, reason is: %s             
                                                                                
                                                                                
         |
-| 08000     | 13001       | Can not register SQL federation driver, reason is: 
%s                                                                              
                                                                                
         |
 | 08000     | 13002       | The URL '%s' is not recognized, please refer to 
the pattern '%s'.                                                               
                                                                                
            |
 | 0A000     | 13003       | Unsupported storage type of URL '%s'.              
                                                                                
                                                                                
         |
 | 01000     | 13010       | Circuit break open, the request has been ignored.  
                                                                                
                                                                                
         |
 | 01000     | 13011       | The cluster status is read-only.                   
                                                                                
                                                                                
         |
 | 01000     | 13012       | The cluster status is unavailable.                 
                                                                                
                                                                                
         |
 | 08000     | 13020       | Can not get %d connections one time, partition 
succeed connection(%d) have released. Please consider increasing the 
\`maxPoolSize\` of the data sources or decreasing the 
\`max-connections-size-per-query\` in properties. |
-| 08000     | 13030       | Connection has been closed.                        
                                                                                
                                                                                
         |
-| 08000     | 13031       | Result set has been closed.                        
                                                                                
                                                                                
         |
 | 08000     | 13032       | SQL execution has been interrupted.                
                                                                                
                                                                                
         |
 | HY000     | 13090       | Load datetime from database failed, reason: %s     
                                                                                
                                                                                
         |
+| 08000     | 13100       | Can not register driver.                           
                                                                                
                                                                                
         |
+| 08000     | 13101       | Connection has been closed.                        
                                                                                
                                                                                
         |
+| 08000     | 13102       | Result set has been closed.                        
                                                                                
                                                                                
         |
 
 ### 事务
 
diff --git a/docs/document/content/user-manual/error-code/sql-error-code.en.md 
b/docs/document/content/user-manual/error-code/sql-error-code.en.md
index 3aae7c4bbb8..e1169f81a9e 100644
--- a/docs/document/content/user-manual/error-code/sql-error-code.en.md
+++ b/docs/document/content/user-manual/error-code/sql-error-code.en.md
@@ -67,18 +67,17 @@ SQL error codes provide by standard `SQL State`, `Vendor 
Code` and `Reason`, whi
 
 | SQL State | Vendor Code | Reason                                             
                                                                                
                                                                                
         |
 
|-----------|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| 08000     | 13000       | Can not register driver, reason is: %s             
                                                                                
                                                                                
         |
-| 08000     | 13001       | Can not register SQL federation driver, reason is: 
%s                                                                              
                                                                                
         |
 | 08000     | 13002       | The URL '%s' is not recognized, please refer to 
the pattern '%s'.                                                               
                                                                                
            |
 | 0A000     | 13003       | Unsupported storage type of URL '%s'.              
                                                                                
                                                                                
         |
 | 01000     | 13010       | Circuit break open, the request has been ignored.  
                                                                                
                                                                                
         |
 | 01000     | 13011       | The cluster status is read-only.                   
                                                                                
                                                                                
         |
 | 01000     | 13012       | The cluster status is unavailable.                 
                                                                                
                                                                                
         |
 | 08000     | 13020       | Can not get %d connections one time, partition 
succeed connection(%d) have released. Please consider increasing the 
\`maxPoolSize\` of the data sources or decreasing the 
\`max-connections-size-per-query\` in properties. |
-| 08000     | 13030       | Connection has been closed.                        
                                                                                
                                                                                
         |
-| 08000     | 13031       | Result set has been closed.                        
                                                                                
                                                                                
         |
 | 08000     | 13032       | SQL execution has been interrupted.                
                                                                                
                                                                                
         |
 | HY000     | 13090       | Load datetime from database failed, reason: %s     
                                                                                
                                                                                
         |
+| 08000     | 13100       | Can not register driver.                           
                                                                                
                                                                                
         |
+| 08000     | 13101       | Connection has been closed.                        
                                                                                
                                                                                
         |
+| 08000     | 13102       | Result set has been closed.                        
                                                                                
                                                                                
         |
 
 ### Transaction
 
diff --git 
a/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/exception/CircuitBreakException.java
 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/connection/CircuitBreakException.java
similarity index 95%
rename from 
proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/exception/CircuitBreakException.java
rename to 
infra/common/src/main/java/org/apache/shardingsphere/infra/exception/connection/CircuitBreakException.java
index 3141ea788ad..b95f5831909 100644
--- 
a/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/exception/CircuitBreakException.java
+++ 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/connection/CircuitBreakException.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.proxy.frontend.exception;
+package org.apache.shardingsphere.infra.exception.connection;
 
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.type.kernel.category.ConnectionSQLException;
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
diff --git 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/exception/ReadOnlyException.java
 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/connection/ReadOnlyException.java
similarity index 95%
rename from 
proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/exception/ReadOnlyException.java
rename to 
infra/common/src/main/java/org/apache/shardingsphere/infra/exception/connection/ReadOnlyException.java
index bb410072db8..6490bd1ae44 100644
--- 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/exception/ReadOnlyException.java
+++ 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/connection/ReadOnlyException.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.proxy.backend.exception;
+package org.apache.shardingsphere.infra.exception.connection;
 
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.type.kernel.category.ConnectionSQLException;
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
diff --git 
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/exception/SQLExecutionInterruptedException.java
 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/connection/SQLExecutionInterruptedException.java
similarity index 95%
rename from 
infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/exception/SQLExecutionInterruptedException.java
rename to 
infra/common/src/main/java/org/apache/shardingsphere/infra/exception/connection/SQLExecutionInterruptedException.java
index b576f338ef8..a0a53948f17 100644
--- 
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/exception/SQLExecutionInterruptedException.java
+++ 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/connection/SQLExecutionInterruptedException.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.infra.executor.exception;
+package org.apache.shardingsphere.infra.exception.connection;
 
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.type.kernel.category.ConnectionSQLException;
diff --git 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/exception/UnavailableException.java
 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/connection/UnavailableException.java
similarity index 95%
rename from 
proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/exception/UnavailableException.java
rename to 
infra/common/src/main/java/org/apache/shardingsphere/infra/exception/connection/UnavailableException.java
index d29fd14ec04..50b0baf4a02 100644
--- 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/exception/UnavailableException.java
+++ 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/connection/UnavailableException.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.proxy.backend.exception;
+package org.apache.shardingsphere.infra.exception.connection;
 
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.type.kernel.category.ConnectionSQLException;
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
diff --git 
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ProcessRegistry.java
 
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ProcessRegistry.java
index fcad368fa8c..a13edebf9fe 100644
--- 
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ProcessRegistry.java
+++ 
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ProcessRegistry.java
@@ -21,7 +21,7 @@ import com.google.common.base.Strings;
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import 
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
-import 
org.apache.shardingsphere.infra.executor.exception.SQLExecutionInterruptedException;
+import 
org.apache.shardingsphere.infra.exception.connection.SQLExecutionInterruptedException;
 
 import java.util.Collection;
 import java.util.Map;
diff --git 
a/jdbc/src/main/java/org/apache/shardingsphere/driver/ShardingSphereDriver.java 
b/jdbc/src/main/java/org/apache/shardingsphere/driver/ShardingSphereDriver.java
index 024204a35f9..059e31a533f 100644
--- 
a/jdbc/src/main/java/org/apache/shardingsphere/driver/ShardingSphereDriver.java
+++ 
b/jdbc/src/main/java/org/apache/shardingsphere/driver/ShardingSphereDriver.java
@@ -17,6 +17,7 @@
 
 package org.apache.shardingsphere.driver;
 
+import org.apache.shardingsphere.driver.exception.DriverRegisterException;
 import org.apache.shardingsphere.driver.jdbc.core.driver.DriverDataSourceCache;
 import org.apache.shardingsphere.infra.annotation.HighFrequencyInvocation;
 
diff --git 
a/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/connection/ConnectionClosedException.java
 
b/jdbc/src/main/java/org/apache/shardingsphere/driver/exception/ConnectionClosedException.java
similarity index 75%
rename from 
jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/connection/ConnectionClosedException.java
rename to 
jdbc/src/main/java/org/apache/shardingsphere/driver/exception/ConnectionClosedException.java
index 23ec499f641..7f7cfac5659 100644
--- 
a/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/connection/ConnectionClosedException.java
+++ 
b/jdbc/src/main/java/org/apache/shardingsphere/driver/exception/ConnectionClosedException.java
@@ -15,19 +15,18 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.driver.jdbc.exception.connection;
+package org.apache.shardingsphere.driver.exception;
 
-import 
org.apache.shardingsphere.infra.exception.core.external.sql.type.kernel.category.ConnectionSQLException;
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
 
 /**
  * Connection closed exception.
  */
-public final class ConnectionClosedException extends ConnectionSQLException {
+public final class ConnectionClosedException extends DriverConnectionException 
{
     
     private static final long serialVersionUID = 8667898851939815681L;
     
     public ConnectionClosedException() {
-        super(XOpenSQLState.CONNECTION_EXCEPTION, 30, "Connection has been 
closed.");
+        super(XOpenSQLState.CONNECTION_EXCEPTION, 1, "Connection has been 
closed.");
     }
 }
diff --git 
a/jdbc/src/main/java/org/apache/shardingsphere/driver/DriverRegisterException.java
 
b/jdbc/src/main/java/org/apache/shardingsphere/driver/exception/DriverConnectionException.java
similarity index 50%
copy from 
jdbc/src/main/java/org/apache/shardingsphere/driver/DriverRegisterException.java
copy to 
jdbc/src/main/java/org/apache/shardingsphere/driver/exception/DriverConnectionException.java
index 5093dd7474d..e6e9c0ebeb1 100644
--- 
a/jdbc/src/main/java/org/apache/shardingsphere/driver/DriverRegisterException.java
+++ 
b/jdbc/src/main/java/org/apache/shardingsphere/driver/exception/DriverConnectionException.java
@@ -15,21 +15,31 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.driver;
+package org.apache.shardingsphere.driver.exception;
 
+import com.google.common.base.Preconditions;
+import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.SQLState;
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.type.kernel.category.ConnectionSQLException;
-import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
-
-import java.sql.SQLException;
 
 /**
- * Driver register exception.
+ * Driver connection exception.
  */
-public final class DriverRegisterException extends ConnectionSQLException {
+public class DriverConnectionException extends ConnectionSQLException {
+    
+    private static final long serialVersionUID = -4543547821709772632L;
+    
+    private static final int DRIVER_CODE = 1;
     
-    private static final long serialVersionUID = -8091239932993280564L;
+    protected DriverConnectionException(final SQLState sqlState, final int 
errorCode, final String reason, final Object... messageArgs) {
+        super(sqlState, getErrorCode(errorCode), reason, messageArgs);
+    }
+    
+    protected DriverConnectionException(final SQLState sqlState, final int 
errorCode, final String reason, final Exception cause) {
+        super(sqlState, getErrorCode(errorCode), reason, cause);
+    }
     
-    public DriverRegisterException(final SQLException cause) {
-        super(XOpenSQLState.CONNECTION_EXCEPTION, 0, "Can not register driver, 
reason is: %s", cause.getMessage());
+    private static int getErrorCode(final int errorCode) {
+        Preconditions.checkArgument(errorCode >= 0 && errorCode < 100, "The 
value range of error code should be [0, 100).");
+        return DRIVER_CODE * 100 + errorCode;
     }
 }
diff --git 
a/jdbc/src/main/java/org/apache/shardingsphere/driver/DriverRegisterException.java
 
b/jdbc/src/main/java/org/apache/shardingsphere/driver/exception/DriverRegisterException.java
similarity index 80%
rename from 
jdbc/src/main/java/org/apache/shardingsphere/driver/DriverRegisterException.java
rename to 
jdbc/src/main/java/org/apache/shardingsphere/driver/exception/DriverRegisterException.java
index 5093dd7474d..1a08a4284f1 100644
--- 
a/jdbc/src/main/java/org/apache/shardingsphere/driver/DriverRegisterException.java
+++ 
b/jdbc/src/main/java/org/apache/shardingsphere/driver/exception/DriverRegisterException.java
@@ -15,9 +15,8 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.driver;
+package org.apache.shardingsphere.driver.exception;
 
-import 
org.apache.shardingsphere.infra.exception.core.external.sql.type.kernel.category.ConnectionSQLException;
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
 
 import java.sql.SQLException;
@@ -25,11 +24,11 @@ import java.sql.SQLException;
 /**
  * Driver register exception.
  */
-public final class DriverRegisterException extends ConnectionSQLException {
+public final class DriverRegisterException extends DriverConnectionException {
     
     private static final long serialVersionUID = -8091239932993280564L;
     
     public DriverRegisterException(final SQLException cause) {
-        super(XOpenSQLState.CONNECTION_EXCEPTION, 0, "Can not register driver, 
reason is: %s", cause.getMessage());
+        super(XOpenSQLState.CONNECTION_EXCEPTION, 0, "Can not register 
driver.", cause);
     }
 }
diff --git 
a/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/connection/ResultSetClosedException.java
 
b/jdbc/src/main/java/org/apache/shardingsphere/driver/exception/ResultSetClosedException.java
similarity index 75%
rename from 
jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/connection/ResultSetClosedException.java
rename to 
jdbc/src/main/java/org/apache/shardingsphere/driver/exception/ResultSetClosedException.java
index e5b8affb2a5..aad2f77374a 100644
--- 
a/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/exception/connection/ResultSetClosedException.java
+++ 
b/jdbc/src/main/java/org/apache/shardingsphere/driver/exception/ResultSetClosedException.java
@@ -15,19 +15,18 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.driver.jdbc.exception.connection;
+package org.apache.shardingsphere.driver.exception;
 
-import 
org.apache.shardingsphere.infra.exception.core.external.sql.type.kernel.category.ConnectionSQLException;
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
 
 /**
  * Result set closed exception.
  */
-public final class ResultSetClosedException extends ConnectionSQLException {
+public final class ResultSetClosedException extends DriverConnectionException {
     
     private static final long serialVersionUID = 3931974854134322934L;
     
     public ResultSetClosedException() {
-        super(XOpenSQLState.CONNECTION_EXCEPTION, 31, "Result set has been 
closed.");
+        super(XOpenSQLState.CONNECTION_EXCEPTION, 2, "Result set has been 
closed.");
     }
 }
diff --git 
a/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/core/connection/ShardingSphereConnection.java
 
b/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/core/connection/ShardingSphereConnection.java
index 7f63560040f..07ca9d48590 100644
--- 
a/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/core/connection/ShardingSphereConnection.java
+++ 
b/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/core/connection/ShardingSphereConnection.java
@@ -22,7 +22,7 @@ import 
org.apache.shardingsphere.driver.jdbc.adapter.AbstractConnectionAdapter;
 import 
org.apache.shardingsphere.driver.jdbc.core.datasource.metadata.ShardingSphereDatabaseMetaData;
 import 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement;
 import 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement;
-import 
org.apache.shardingsphere.driver.jdbc.exception.connection.ConnectionClosedException;
+import org.apache.shardingsphere.driver.exception.ConnectionClosedException;
 import org.apache.shardingsphere.infra.annotation.HighFrequencyInvocation;
 import 
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
 import org.apache.shardingsphere.infra.executor.sql.process.ProcessEngine;
diff --git 
a/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/DatabaseMetaDataResultSet.java
 
b/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/DatabaseMetaDataResultSet.java
index b26e6831a97..cb8bc82264a 100644
--- 
a/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/DatabaseMetaDataResultSet.java
+++ 
b/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/DatabaseMetaDataResultSet.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.driver.jdbc.core.resultset;
 
 import com.cedarsoftware.util.CaseInsensitiveMap;
 import lombok.EqualsAndHashCode;
-import 
org.apache.shardingsphere.driver.jdbc.exception.connection.ResultSetClosedException;
+import org.apache.shardingsphere.driver.exception.ResultSetClosedException;
 import 
org.apache.shardingsphere.infra.exception.syntax.ColumnIndexOutOfRangeException;
 import 
org.apache.shardingsphere.infra.exception.syntax.ColumnLabelNotFoundException;
 import 
org.apache.shardingsphere.driver.jdbc.unsupported.AbstractUnsupportedDatabaseMetaDataResultSet;
diff --git 
a/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/EnumerableScanExecutor.java
 
b/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/EnumerableScanExecutor.java
index ae139ca86aa..49ae7fa9fc1 100644
--- 
a/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/EnumerableScanExecutor.java
+++ 
b/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/EnumerableScanExecutor.java
@@ -29,7 +29,7 @@ import 
org.apache.shardingsphere.infra.database.core.metadata.database.system.Sy
 import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
 import 
org.apache.shardingsphere.infra.database.opengauss.type.OpenGaussDatabaseType;
 import 
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
-import 
org.apache.shardingsphere.infra.executor.exception.SQLExecutionInterruptedException;
+import 
org.apache.shardingsphere.infra.exception.connection.SQLExecutionInterruptedException;
 import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
 import 
org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupContext;
 import 
org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupReportContext;
diff --git 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/state/impl/ReadOnlyProxyState.java
 
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/state/impl/ReadOnlyProxyState.java
index bbb6b5c55c3..8df582e2057 100644
--- 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/state/impl/ReadOnlyProxyState.java
+++ 
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/state/impl/ReadOnlyProxyState.java
@@ -21,7 +21,7 @@ import 
org.apache.shardingsphere.distsql.statement.ral.updatable.UpdatableRALSta
 import 
org.apache.shardingsphere.distsql.statement.ral.updatable.UnlockClusterStatement;
 import org.apache.shardingsphere.distsql.statement.rdl.RDLStatement;
 import 
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
-import org.apache.shardingsphere.proxy.backend.exception.ReadOnlyException;
+import org.apache.shardingsphere.infra.exception.connection.ReadOnlyException;
 import org.apache.shardingsphere.proxy.backend.state.ProxyClusterState;
 import 
org.apache.shardingsphere.proxy.backend.state.SupportedSQLStatementJudgeEngine;
 import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
diff --git 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/state/impl/UnavailableProxyState.java
 
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/state/impl/UnavailableProxyState.java
index e223ad1d0d0..25d00bec20c 100644
--- 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/state/impl/UnavailableProxyState.java
+++ 
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/state/impl/UnavailableProxyState.java
@@ -22,7 +22,7 @@ import 
org.apache.shardingsphere.distsql.statement.ral.updatable.ImportMetaDataS
 import 
org.apache.shardingsphere.distsql.statement.ral.updatable.UnlockClusterStatement;
 import org.apache.shardingsphere.distsql.statement.rql.RQLStatement;
 import 
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
-import org.apache.shardingsphere.proxy.backend.exception.UnavailableException;
+import 
org.apache.shardingsphere.infra.exception.connection.UnavailableException;
 import org.apache.shardingsphere.proxy.backend.state.ProxyClusterState;
 import 
org.apache.shardingsphere.proxy.backend.state.SupportedSQLStatementJudgeEngine;
 import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
diff --git 
a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/state/impl/ReadOnlyProxyStateTest.java
 
b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/state/impl/ReadOnlyProxyStateTest.java
index 82a21ac61bc..af084fd8dc9 100644
--- 
a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/state/impl/ReadOnlyProxyStateTest.java
+++ 
b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/state/impl/ReadOnlyProxyStateTest.java
@@ -17,7 +17,7 @@
 
 package org.apache.shardingsphere.proxy.backend.state.impl;
 
-import org.apache.shardingsphere.proxy.backend.exception.ReadOnlyException;
+import org.apache.shardingsphere.infra.exception.connection.ReadOnlyException;
 import 
org.apache.shardingsphere.sql.parser.sql.common.statement.dml.InsertStatement;
 import 
org.apache.shardingsphere.sql.parser.sql.common.statement.dml.SelectStatement;
 import org.junit.jupiter.api.Test;
diff --git 
a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/state/impl/UnavailableProxyStateTest.java
 
b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/state/impl/UnavailableProxyStateTest.java
index 427f5c0c227..94d5f2bfc3d 100644
--- 
a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/state/impl/UnavailableProxyStateTest.java
+++ 
b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/state/impl/UnavailableProxyStateTest.java
@@ -18,7 +18,7 @@
 package org.apache.shardingsphere.proxy.backend.state.impl;
 
 import 
org.apache.shardingsphere.distsql.statement.ral.updatable.ImportMetaDataStatement;
-import org.apache.shardingsphere.proxy.backend.exception.UnavailableException;
+import 
org.apache.shardingsphere.infra.exception.connection.UnavailableException;
 import 
org.apache.shardingsphere.sql.parser.sql.common.statement.dml.DMLStatement;
 import org.junit.jupiter.api.Test;
 
diff --git 
a/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/state/impl/CircuitBreakProxyState.java
 
b/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/state/impl/CircuitBreakProxyState.java
index c76808eb3af..455a10bbafa 100644
--- 
a/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/state/impl/CircuitBreakProxyState.java
+++ 
b/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/state/impl/CircuitBreakProxyState.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.proxy.frontend.state.impl;
 
 import io.netty.channel.ChannelHandlerContext;
 import org.apache.shardingsphere.proxy.backend.session.ConnectionSession;
-import 
org.apache.shardingsphere.proxy.frontend.exception.CircuitBreakException;
+import 
org.apache.shardingsphere.infra.exception.connection.CircuitBreakException;
 import 
org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine;
 import org.apache.shardingsphere.proxy.frontend.state.ProxyState;
 
diff --git 
a/proxy/frontend/core/src/test/java/org/apache/shardingsphere/proxy/frontend/state/impl/CircuitBreakProxyStateTest.java
 
b/proxy/frontend/core/src/test/java/org/apache/shardingsphere/proxy/frontend/state/impl/CircuitBreakProxyStateTest.java
index 3f6390d1993..c9d7835319f 100644
--- 
a/proxy/frontend/core/src/test/java/org/apache/shardingsphere/proxy/frontend/state/impl/CircuitBreakProxyStateTest.java
+++ 
b/proxy/frontend/core/src/test/java/org/apache/shardingsphere/proxy/frontend/state/impl/CircuitBreakProxyStateTest.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.proxy.frontend.state.impl;
 
 import io.netty.channel.ChannelHandlerContext;
 import org.apache.shardingsphere.db.protocol.packet.DatabasePacket;
-import 
org.apache.shardingsphere.proxy.frontend.exception.CircuitBreakException;
+import 
org.apache.shardingsphere.infra.exception.connection.CircuitBreakException;
 import org.apache.shardingsphere.proxy.backend.session.ConnectionSession;
 import 
org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine;
 import org.junit.jupiter.api.Test;

Reply via email to