diff --git a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptRule.java b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptRule.java index 75e1f88d2531d..19992b809fea1 100644 --- a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptRule.java +++ b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptRule.java @@ -135,8 +135,8 @@ public void updateConfiguration(final EncryptRuleConfiguration toBeUpdatedRuleCo @Override public boolean partialUpdate(final EncryptRuleConfiguration toBeUpdatedRuleConfig) { - Collection toBeAddedTableNames = toBeUpdatedRuleConfig.getTables().stream().map(EncryptTableRuleConfiguration::getName).collect(Collectors.toList()); - toBeAddedTableNames.removeAll(tables.keySet()); + Collection toBeAddedTableNames = toBeUpdatedRuleConfig.getTables().stream().map(EncryptTableRuleConfiguration::getName).filter(each -> !tables.containsKey(each.toLowerCase())) + .collect(Collectors.toList()); if (!toBeAddedTableNames.isEmpty()) { toBeAddedTableNames.forEach(each -> addTableRule(each, toBeUpdatedRuleConfig)); attributes.set(new RuleAttributes(new EncryptTableMapperRuleAttribute(tables.keySet())));