Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

聚合查询如果第一个分库查询返回null,merge结果不对 #100

Closed
koaal opened this issue Jun 3, 2016 · 4 comments
Closed

Comments

@koaal
Copy link

koaal commented Jun 3, 2016

应用场景:
两个分库,db0和db1,只分库不分表
查询语句:select min(id) from table where datatime >= xxxx

当第一个分库查询返回结果为null,第二个分库查询返回结果不为null时(比如101),merge后返回的结果为null,正确返回结果应该为101

问题分析:
该sql会被改写为两条sql执行并返回两个ResultSet,其中第一个resultset的wasNull为true,第二个为false。AbstractResultSetAdapter里重载的wasNull函数直接返回getCurrentResultSet().wasNull(),而currentResultSet被指定为第一个ResultSet,所以wasNull返回true

@koaal
Copy link
Author

koaal commented Jun 3, 2016

版本1.1.0

@terrymanu
Copy link
Member

在1.3.0版本已对结果归并模块做出重大调整,请使用1.3.0尝试,如还有问题,请反馈,多谢

@terrymanu
Copy link
Member

长时间无反馈。如有问题,请跟进,如无问题,我们将于三天后以不能重现为由关闭此bug

@terrymanu
Copy link
Member

不能重现

@terrymanu terrymanu changed the title 聚合查询如果第一个分库查询返回null,merge结果不对 [CannotReproduce]聚合查询如果第一个分库查询返回null,merge结果不对 Jun 17, 2016
@terrymanu terrymanu changed the title [CannotReproduce]聚合查询如果第一个分库查询返回null,merge结果不对 聚合查询如果第一个分库查询返回null,merge结果不对 Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants