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

Support SQL that does not contain table names, such as SELECT 1 #386

Closed
dexter9000 opened this issue Sep 22, 2017 · 1 comment
Closed

Support SQL that does not contain table names, such as SELECT 1 #386

dexter9000 opened this issue Sep 22, 2017 · 1 comment

Comments

@dexter9000
Copy link

Please answer these questions before submitting your issue. Thanks!

Which version of Sharding-Jdbc do you using?

1.5.3

Expected behavior

在spring boot注入数据源时,org.springframework.boot.actuate.health.DataSourceHealthIndicator会定时执行"SELECT 1"语言监测数据源的连通性
对于不指定表名的数据库访问能够直接访问默认数据源

Actual behavior

抛出异常Cannot find table rule and default data source with logic tables: '[]'
导致spring的健康检查认为失败

db: {
status: "DOWN",
primaryDataSource: {
status: "UP",
database: "H2",
hello: 1
},
multipleDS: {
status: "DOWN",
database: "H2",
error: "com.dangdang.ddframe.rdb.sharding.exception.ShardingJdbcException: Cannot find table rule and default data source with logic tables: '[]'"
}
}
@terrymanu terrymanu changed the title 不指定表名的语句无法查询 支持SELECT 1这种不包含表名称的SQL Oct 10, 2017
terrymanu added a commit that referenced this issue Oct 10, 2017
@terrymanu
Copy link
Member

fixed at 2.0.0.m1

@terrymanu terrymanu changed the title 支持SELECT 1这种不包含表名称的SQL Support SQL that does not contain table names, such as SELECT 1 Aug 8, 2018
@terrymanu terrymanu self-assigned this Aug 8, 2018
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