Loading RELEASE-NOTES.md +1 −0 Original line number Diff line number Diff line Loading @@ -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 Loading sharding-jdbc-core/src/main/java/io/shardingjdbc/core/jdbc/core/connection/ShardingConnection.java +1 −2 Original line number Diff line number Diff line Loading @@ -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); Loading Loading
RELEASE-NOTES.md +1 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
sharding-jdbc-core/src/main/java/io/shardingjdbc/core/jdbc/core/connection/ShardingConnection.java +1 −2 Original line number Diff line number Diff line Loading @@ -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); Loading