taojintianxia commented on a change in pull request #12749:
URL: https://github.com/apache/shardingsphere/pull/12749#discussion_r716203109
##########
File path:
shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/job/preparer/AbstractDataSourcePreparer.java
##########
@@ -113,9 +113,13 @@ protected void executeTargetTableSQL(final Connection
targetConnection, final St
try (Statement statement = targetConnection.createStatement()) {
statement.execute(sql);
} catch (final SQLException ex) {
- if (!ex.getMessage().contains("multiple primary keys for table")) {
- throw ex;
+ String[] ignoreMessages = {"multiple primary keys for table",
"already exists"};
Review comment:
why not extract the ignoreMessages as a static constant
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]