diff --git a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/util/YamlDatabaseConfigurationImportExecutor.java b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/util/YamlDatabaseConfigurationImportExecutor.java index d75ce1a56c99b..a8040701cac1d 100644 --- a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/util/YamlDatabaseConfigurationImportExecutor.java +++ b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/util/YamlDatabaseConfigurationImportExecutor.java @@ -289,10 +289,10 @@ private void addBroadcastRuleConfiguration(final BroadcastRuleConfiguration broa .collect(Collectors.toMap(Entry::getKey, entry -> entry.getValue().getStorageUnit().getDataSource(), (oldValue, currentValue) -> oldValue, LinkedHashMap::new)))); } - private void addSingleRuleConfiguration(final SingleRuleConfiguration broadcastRuleConfig, final Collection allRuleConfigs, final ShardingSphereDatabase database) { - allRuleConfigs.add(broadcastRuleConfig); + private void addSingleRuleConfiguration(final SingleRuleConfiguration singleRuleConfig, final Collection allRuleConfigs, final ShardingSphereDatabase database) { + allRuleConfigs.add(singleRuleConfig); database.getRuleMetaData().getRules().add( - new SingleRule(broadcastRuleConfig, database.getName(), + new SingleRule(singleRuleConfig, database.getName(), database.getResourceMetaData().getStorageUnitMetaDataMap().entrySet().stream() .collect(Collectors.toMap(Entry::getKey, entry -> entry.getValue().getStorageUnit().getDataSource(), (oldValue, currentValue) -> oldValue, LinkedHashMap::new)), database.getRuleMetaData().getRules()));