You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/05/12 10:10:38 UTC
[GitHub] [shardingsphere] lanchengx opened a new pull request, #17611: Fix the exception when specifying schema when JDBC connects to Proxy
lanchengx opened a new pull request, #17611:
URL: https://github.com/apache/shardingsphere/pull/17611
Changes proposed in this pull request:
- Remove the judgment that the schema is not used
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang merged pull request #17611: Fix the exception when specifying schema when JDBC connects to Proxy
Posted by GitBox <gi...@apache.org>.
RaigorJiang merged PR #17611:
URL: https://github.com/apache/shardingsphere/pull/17611
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] lanchengx commented on a diff in pull request #17611: Fix the exception when specifying schema when JDBC connects to Proxy
Posted by GitBox <gi...@apache.org>.
lanchengx commented on code in PR #17611:
URL: https://github.com/apache/shardingsphere/pull/17611#discussion_r876800750
##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/mysql/MySQLAdminExecutorCreator.java:
##########
@@ -159,14 +159,12 @@ private boolean isQuerySpecialSchema(final SelectStatement sqlStatement, final S
private DatabaseAdminExecutor mockExecutor(final String schemaName, final SelectStatement sqlStatement, final String sql) {
boolean isNotUseSchema = !Optional.ofNullable(schemaName).isPresent() && sqlStatement.getFrom() == null;
+ if (!hasDatabases() || !hasResources()) {
+ return new NoResourceShowExecutor(sqlStatement);
+ }
+ String driverType = ProxyContext.getInstance().getContextManager().getMetaDataContexts().getProps().getValue(ConfigurationPropertyKey.PROXY_BACKEND_DRIVER_TYPE);
Review Comment:
I will adjust it in the next pr
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on a diff in pull request #17611: Fix the exception when specifying schema when JDBC connects to Proxy
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on code in PR #17611:
URL: https://github.com/apache/shardingsphere/pull/17611#discussion_r876798582
##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/mysql/MySQLAdminExecutorCreator.java:
##########
@@ -159,14 +159,12 @@ private boolean isQuerySpecialSchema(final SelectStatement sqlStatement, final S
private DatabaseAdminExecutor mockExecutor(final String schemaName, final SelectStatement sqlStatement, final String sql) {
boolean isNotUseSchema = !Optional.ofNullable(schemaName).isPresent() && sqlStatement.getFrom() == null;
+ if (!hasDatabases() || !hasResources()) {
+ return new NoResourceShowExecutor(sqlStatement);
+ }
+ String driverType = ProxyContext.getInstance().getContextManager().getMetaDataContexts().getProps().getValue(ConfigurationPropertyKey.PROXY_BACKEND_DRIVER_TYPE);
Review Comment:
Getting driver type can be moved into `if (isNotUseSchema)` block to reduce unnecessary overhead since `isNotUseSchema` is not always `true`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] lanchengx closed pull request #17611: Fix the exception when specifying schema when JDBC connects to Proxy
Posted by GitBox <gi...@apache.org>.
lanchengx closed pull request #17611: Fix the exception when specifying schema when JDBC connects to Proxy
URL: https://github.com/apache/shardingsphere/pull/17611
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] codecov-commenter commented on pull request #17611: Fix the exception when specifying schema when JDBC connects to Proxy
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #17611:
URL: https://github.com/apache/shardingsphere/pull/17611#issuecomment-1131162616
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/17611?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17611](https://codecov.io/gh/apache/shardingsphere/pull/17611?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (42be48b) into [master](https://codecov.io/gh/apache/shardingsphere/commit/800fcc898353f4218afb67a3e1b2c2eb589b8fc6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (800fcc8) will **increase** coverage by `0.00%`.
> The diff coverage is `25.00%`.
```diff
@@ Coverage Diff @@
## master #17611 +/- ##
=========================================
Coverage 59.13% 59.14%
Complexity 2131 2131
=========================================
Files 3594 3594
Lines 53384 53384
Branches 9113 9113
=========================================
+ Hits 31571 31572 +1
+ Misses 19142 19140 -2
- Partials 2671 2672 +1
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/17611?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...nd/text/admin/mysql/MySQLAdminExecutorCreator.java](https://codecov.io/gh/apache/shardingsphere/pull/17611/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2FkbWluL215c3FsL015U1FMQWRtaW5FeGVjdXRvckNyZWF0b3IuamF2YQ==) | `47.61% <25.00%> (+1.58%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/17611?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/17611?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [800fcc8...42be48b](https://codecov.io/gh/apache/shardingsphere/pull/17611?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org