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 8a4870a412a Refactor exception package of mysql-dialect-exception
module (#20694)
8a4870a412a is described below
commit 8a4870a412a24f8dc34f289d202fe3fc64333eb5
Author: Liang Zhang <[email protected]>
AuthorDate: Wed Aug 31 20:58:17 2022 +0800
Refactor exception package of mysql-dialect-exception module (#20694)
---
.../db/protocol/mysql/constant/MySQLCharacterSet.java | 2 +-
.../db/protocol/mysql/constant/MySQLCharacterSetTest.java | 2 +-
.../dialect/mysql/exception}/UnknownCharsetException.java | 2 +-
.../dialect/mysql/exception}/UnknownCollationException.java | 2 +-
.../mysql/exception}/UnsupportedPreparedStatementException.java | 2 +-
.../dialect/mysql/mapper/MySQLDialectExceptionMapper.java | 6 +++---
.../dialect/mysql/mapper/MySQLDialectExceptionMapperTest.java | 4 ++--
.../handler/admin/mysql/executor/MySQLSetCharsetExecutor.java | 2 +-
.../command/query/binary/prepare/MySQLComStmtPrepareExecutor.java | 2 +-
.../query/binary/prepare/MySQLComStmtPrepareExecutorTest.java | 2 +-
10 files changed, 13 insertions(+), 13 deletions(-)
diff --git
a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLCharacterSet.java
b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLCharacterSet.java
index 1883ca7628f..ca246e334ac 100644
---
a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLCharacterSet.java
+++
b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLCharacterSet.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.db.protocol.mysql.constant;
import lombok.Getter;
-import
org.apache.shardingsphere.dialect.exception.connection.UnknownCollationException;
+import
org.apache.shardingsphere.dialect.mysql.exception.UnknownCollationException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
diff --git
a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLCharacterSetTest.java
b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLCharacterSetTest.java
index abe62ad7944..4b6c5d4a05e 100644
---
a/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLCharacterSetTest.java
+++
b/shardingsphere-db-protocol/shardingsphere-db-protocol-mysql/src/test/java/org/apache/shardingsphere/db/protocol/mysql/constant/MySQLCharacterSetTest.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.db.protocol.mysql.constant;
-import
org.apache.shardingsphere.dialect.exception.connection.UnknownCollationException;
+import
org.apache.shardingsphere.dialect.mysql.exception.UnknownCollationException;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
diff --git
a/shardingsphere-dialect-exception/shardingsphere-dialect-exception-core/src/main/java/org/apache/shardingsphere/dialect/exception/connection/UnknownCharsetException.java
b/shardingsphere-dialect-exception/shardingsphere-mysql-dialect-exception/src/main/java/org/apache/shardingsphere/dialect/mysql/exception/UnknownCharsetException.java
similarity index 94%
rename from
shardingsphere-dialect-exception/shardingsphere-dialect-exception-core/src/main/java/org/apache/shardingsphere/dialect/exception/connection/UnknownCharsetException.java
rename to
shardingsphere-dialect-exception/shardingsphere-mysql-dialect-exception/src/main/java/org/apache/shardingsphere/dialect/mysql/exception/UnknownCharsetException.java
index d8eb42a87dd..062e83d59ed 100644
---
a/shardingsphere-dialect-exception/shardingsphere-dialect-exception-core/src/main/java/org/apache/shardingsphere/dialect/exception/connection/UnknownCharsetException.java
+++
b/shardingsphere-dialect-exception/shardingsphere-mysql-dialect-exception/src/main/java/org/apache/shardingsphere/dialect/mysql/exception/UnknownCharsetException.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dialect.exception.connection;
+package org.apache.shardingsphere.dialect.mysql.exception;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
diff --git
a/shardingsphere-dialect-exception/shardingsphere-dialect-exception-core/src/main/java/org/apache/shardingsphere/dialect/exception/connection/UnknownCollationException.java
b/shardingsphere-dialect-exception/shardingsphere-mysql-dialect-exception/src/main/java/org/apache/shardingsphere/dialect/mysql/exception/UnknownCollationException.java
similarity index 94%
rename from
shardingsphere-dialect-exception/shardingsphere-dialect-exception-core/src/main/java/org/apache/shardingsphere/dialect/exception/connection/UnknownCollationException.java
rename to
shardingsphere-dialect-exception/shardingsphere-mysql-dialect-exception/src/main/java/org/apache/shardingsphere/dialect/mysql/exception/UnknownCollationException.java
index 165b4deb47f..d9becc9a6f1 100644
---
a/shardingsphere-dialect-exception/shardingsphere-dialect-exception-core/src/main/java/org/apache/shardingsphere/dialect/exception/connection/UnknownCollationException.java
+++
b/shardingsphere-dialect-exception/shardingsphere-mysql-dialect-exception/src/main/java/org/apache/shardingsphere/dialect/mysql/exception/UnknownCollationException.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dialect.exception.connection;
+package org.apache.shardingsphere.dialect.mysql.exception;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
diff --git
a/shardingsphere-dialect-exception/shardingsphere-dialect-exception-core/src/main/java/org/apache/shardingsphere/dialect/exception/connection/UnsupportedPreparedStatementException.java
b/shardingsphere-dialect-exception/shardingsphere-mysql-dialect-exception/src/main/java/org/apache/shardingsphere/dialect/mysql/exception/UnsupportedPreparedStatementException.java
similarity index 94%
rename from
shardingsphere-dialect-exception/shardingsphere-dialect-exception-core/src/main/java/org/apache/shardingsphere/dialect/exception/connection/UnsupportedPreparedStatementException.java
rename to
shardingsphere-dialect-exception/shardingsphere-mysql-dialect-exception/src/main/java/org/apache/shardingsphere/dialect/mysql/exception/UnsupportedPreparedStatementException.java
index 9312ac5c2f9..ddafc1139ff 100644
---
a/shardingsphere-dialect-exception/shardingsphere-dialect-exception-core/src/main/java/org/apache/shardingsphere/dialect/exception/connection/UnsupportedPreparedStatementException.java
+++
b/shardingsphere-dialect-exception/shardingsphere-mysql-dialect-exception/src/main/java/org/apache/shardingsphere/dialect/mysql/exception/UnsupportedPreparedStatementException.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.dialect.exception.connection;
+package org.apache.shardingsphere.dialect.mysql.exception;
import org.apache.shardingsphere.dialect.exception.SQLDialectException;
diff --git
a/shardingsphere-dialect-exception/shardingsphere-mysql-dialect-exception/src/main/java/org/apache/shardingsphere/dialect/mysql/mapper/MySQLDialectExceptionMapper.java
b/shardingsphere-dialect-exception/shardingsphere-mysql-dialect-exception/src/main/java/org/apache/shardingsphere/dialect/mysql/mapper/MySQLDialectExceptionMapper.java
index 9e95248e33e..7df101fe1ae 100644
---
a/shardingsphere-dialect-exception/shardingsphere-mysql-dialect-exception/src/main/java/org/apache/shardingsphere/dialect/mysql/mapper/MySQLDialectExceptionMapper.java
+++
b/shardingsphere-dialect-exception/shardingsphere-mysql-dialect-exception/src/main/java/org/apache/shardingsphere/dialect/mysql/mapper/MySQLDialectExceptionMapper.java
@@ -19,9 +19,9 @@ package org.apache.shardingsphere.dialect.mysql.mapper;
import org.apache.shardingsphere.dialect.exception.SQLDialectException;
import
org.apache.shardingsphere.dialect.exception.connection.TooManyConnectionsException;
-import
org.apache.shardingsphere.dialect.exception.connection.UnknownCharsetException;
-import
org.apache.shardingsphere.dialect.exception.connection.UnknownCollationException;
-import
org.apache.shardingsphere.dialect.exception.connection.UnsupportedPreparedStatementException;
+import
org.apache.shardingsphere.dialect.mysql.exception.UnknownCharsetException;
+import
org.apache.shardingsphere.dialect.mysql.exception.UnknownCollationException;
+import
org.apache.shardingsphere.dialect.mysql.exception.UnsupportedPreparedStatementException;
import
org.apache.shardingsphere.dialect.exception.data.InsertColumnsAndValuesMismatchedException;
import
org.apache.shardingsphere.dialect.exception.syntax.database.DatabaseCreateExistsException;
import
org.apache.shardingsphere.dialect.exception.syntax.database.DatabaseDropNotExistsException;
diff --git
a/shardingsphere-dialect-exception/shardingsphere-mysql-dialect-exception/src/test/java/org/apache/shardingsphere/dialect/mysql/mapper/MySQLDialectExceptionMapperTest.java
b/shardingsphere-dialect-exception/shardingsphere-mysql-dialect-exception/src/test/java/org/apache/shardingsphere/dialect/mysql/mapper/MySQLDialectExceptionMapperTest.java
index 599deb8155e..d9f301b948d 100644
---
a/shardingsphere-dialect-exception/shardingsphere-mysql-dialect-exception/src/test/java/org/apache/shardingsphere/dialect/mysql/mapper/MySQLDialectExceptionMapperTest.java
+++
b/shardingsphere-dialect-exception/shardingsphere-mysql-dialect-exception/src/test/java/org/apache/shardingsphere/dialect/mysql/mapper/MySQLDialectExceptionMapperTest.java
@@ -19,8 +19,8 @@ package org.apache.shardingsphere.dialect.mysql.mapper;
import org.apache.shardingsphere.dialect.exception.SQLDialectException;
import
org.apache.shardingsphere.dialect.exception.connection.TooManyConnectionsException;
-import
org.apache.shardingsphere.dialect.exception.connection.UnknownCollationException;
-import
org.apache.shardingsphere.dialect.exception.connection.UnsupportedPreparedStatementException;
+import
org.apache.shardingsphere.dialect.mysql.exception.UnknownCollationException;
+import
org.apache.shardingsphere.dialect.mysql.exception.UnsupportedPreparedStatementException;
import
org.apache.shardingsphere.dialect.exception.data.InsertColumnsAndValuesMismatchedException;
import
org.apache.shardingsphere.dialect.exception.syntax.database.DatabaseCreateExistsException;
import
org.apache.shardingsphere.dialect.exception.syntax.database.DatabaseDropNotExistsException;
diff --git
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/MySQLSetCharsetExecutor.java
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/MySQLSetCharsetExecutor.java
index da023cbb2ea..8949ce50ffd 100644
---
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/MySQLSetCharsetExecutor.java
+++
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/MySQLSetCharsetExecutor.java
@@ -19,7 +19,7 @@ package
org.apache.shardingsphere.proxy.backend.handler.admin.mysql.executor;
import org.apache.shardingsphere.db.protocol.CommonConstants;
import org.apache.shardingsphere.db.protocol.mysql.constant.MySQLServerInfo;
-import
org.apache.shardingsphere.dialect.exception.connection.UnknownCharsetException;
+import
org.apache.shardingsphere.dialect.mysql.exception.UnknownCharsetException;
import
org.apache.shardingsphere.proxy.backend.handler.admin.mysql.MySQLSessionVariableHandler;
import org.apache.shardingsphere.proxy.backend.session.ConnectionSession;
diff --git
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareExecutor.java
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareExecutor.java
index 81795966531..8284a0ee128 100644
---
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareExecutor.java
+++
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareExecutor.java
@@ -37,7 +37,7 @@ import org.apache.shardingsphere.parser.rule.SQLParserRule;
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
import org.apache.shardingsphere.proxy.backend.session.ConnectionSession;
import
org.apache.shardingsphere.proxy.frontend.command.executor.CommandExecutor;
-import
org.apache.shardingsphere.dialect.exception.connection.UnsupportedPreparedStatementException;
+import
org.apache.shardingsphere.dialect.mysql.exception.UnsupportedPreparedStatementException;
import
org.apache.shardingsphere.proxy.frontend.mysql.command.ServerStatusFlagCalculator;
import
org.apache.shardingsphere.proxy.frontend.mysql.command.query.binary.MySQLPreparedStatement;
import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
diff --git
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareExecutorTest.java
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareExecutorTest.java
index c383cd609c5..be0da838b44 100644
---
a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareExecutorTest.java
+++
b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareExecutorTest.java
@@ -36,7 +36,7 @@ import org.apache.shardingsphere.parser.rule.SQLParserRule;
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
import org.apache.shardingsphere.proxy.backend.session.ConnectionSession;
import
org.apache.shardingsphere.proxy.backend.session.PreparedStatementRegistry;
-import
org.apache.shardingsphere.dialect.exception.connection.UnsupportedPreparedStatementException;
+import
org.apache.shardingsphere.dialect.mysql.exception.UnsupportedPreparedStatementException;
import org.apache.shardingsphere.proxy.frontend.mysql.ProxyContextRestorer;
import
org.apache.shardingsphere.proxy.frontend.mysql.command.query.binary.MySQLPreparedStatement;
import org.apache.shardingsphere.sql.parser.api.CacheOption;