Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Shardingsphere
提交
2e7bcedb
Shardingsphere
项目概览
apache
/
Shardingsphere
通知
56
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Shardingsphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
2e7bcedb
编写于
9月 18, 2017
作者:
T
terrymanu
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/1.5.4-SNAPSHOT' into 2.0.0.M1
上级
0b826197
d967f247
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
1 deletion
+5
-1
RELEASE-NOTES.md
RELEASE-NOTES.md
+1
-0
sharding-jdbc-core/src/main/java/com/dangdang/ddframe/rdb/sharding/jdbc/core/connection/MasterSlaveConnection.java
.../sharding/jdbc/core/connection/MasterSlaveConnection.java
+4
-1
未找到文件。
RELEASE-NOTES.md
浏览文件 @
2e7bcedb
...
...
@@ -6,6 +6,7 @@
1.
[
ISSUE #362
](
https://github.com/dangdangdotcom/sharding-jdbc/issues/362
)
读写分离使用PreparedStatement并未调用setParameter方法导致出错
1.
[
ISSUE #370
](
https://github.com/dangdangdotcom/sharding-jdbc/issues/370
)
使用原生自增主键调用getGeneratedKeys出错
1.
[
ISSUE #375
](
https://github.com/dangdangdotcom/sharding-jdbc/issues/375
)
路由至单节点的分页第二页以后的查询取不到数据
1.
[
ISSUE #379
](
https://github.com/dangdangdotcom/sharding-jdbc/issues/379
)
使用Mybatis时框架调用Connection.getMetaData()时释放连接不正确
## 1.5.3
...
...
sharding-jdbc-core/src/main/java/com/dangdang/ddframe/rdb/sharding/jdbc/core/connection/MasterSlaveConnection.java
浏览文件 @
2e7bcedb
...
...
@@ -46,6 +46,8 @@ public final class MasterSlaveConnection extends AbstractConnectionAdapter {
private
final
MasterSlaveDataSource
masterSlaveDataSource
;
private
SQLType
cachedSQLType
;
/**
* Get database connections via SQL type.
*
...
...
@@ -56,6 +58,7 @@ public final class MasterSlaveConnection extends AbstractConnectionAdapter {
* @throws SQLException SQL exception
*/
public
Collection
<
Connection
>
getConnections
(
final
SQLType
sqlType
)
throws
SQLException
{
cachedSQLType
=
sqlType
;
Map
<
String
,
DataSource
>
dataSources
=
SQLType
.
DDL
==
sqlType
?
masterSlaveDataSource
.
getAllDataSources
()
:
masterSlaveDataSource
.
getDataSource
(
sqlType
).
toMap
();
Collection
<
Connection
>
result
=
new
LinkedList
<>();
for
(
Entry
<
String
,
DataSource
>
each
:
dataSources
.
entrySet
())
{
...
...
@@ -74,7 +77,7 @@ public final class MasterSlaveConnection extends AbstractConnectionAdapter {
@Override
public
DatabaseMetaData
getMetaData
()
throws
SQLException
{
return
masterSlaveDataSource
.
getDataSource
(
SQLType
.
DML
).
getDataSource
().
getConnection
().
getMetaData
();
return
getConnections
(
null
==
cachedSQLType
?
SQLType
.
DML
:
cachedSQLType
).
iterator
().
next
().
getMetaData
();
}
@Override
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录