Commit 3c27db22 authored by terrymanu's avatar terrymanu
Browse files

fix #452

parent bce237f1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
### 缺陷修正

1. [ISSUE #436](https://github.com/shardingjdbc/sharding-jdbc/issues/436) 读写分离多从库配置RoundRobin算法并使用MyBatis时,只能路由到同一从库
1. [ISSUE #452](https://github.com/shardingjdbc/sharding-jdbc/issues/452) DDL语句分片至多个表会造成连接泄漏的问题

## 2.0.0.M2

+1 −2
Original line number Diff line number Diff line
@@ -72,10 +72,9 @@ public final class ShardingConnection extends AbstractConnectionAdapter {
            dataSources = new HashMap<>(1, 1);
            dataSources.put(dataSourceName, dataSource);
        }
        
        Collection<Connection> result = new LinkedList<>();
        for (Entry<String, DataSource> entry : dataSources.entrySet()) {
            Connection connection = entry.getValue().getConnection();
            Connection connection = getCachedConnections().containsKey(entry.getKey()) ? getCachedConnections().get(entry.getKey()) : entry.getValue().getConnection();
            replayMethodsInvocation(connection);
            getCachedConnections().put(entry.getKey(), connection);
            result.add(connection);