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 2020/09/14 06:52:01 UTC
[GitHub] [shardingsphere] chana71 opened a new issue #7437: unconfigured table can not query with schema name because of missing rewrite
chana71 opened a new issue #7437:
URL: https://github.com/apache/shardingsphere/issues/7437
## Question
I wish to not configure every no sharding table's actual nodes to ds0. At version 4.1 there is one prop named `defaultDataSourceName`, after configuring it, if I query the table with its schema name `select * from schema.table` it will route to ds0 but not rewrite to ignore schema name and because of DB sharding, we actually have mapped schema to `schema{0...3}`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] chana71 commented on issue #7437: unconfigured table can not query with schema name because of missing rewrite
Posted by GitBox <gi...@apache.org>.
chana71 commented on issue #7437:
URL: https://github.com/apache/shardingsphere/issues/7437#issuecomment-691901414
@menghaoranss
Logic SQL: select count(*) from cust.SQL_BIZ_HIS
Actual SQL: ds0 ::: select count(*) from cust.SQL_BIZ_HIS
SQL_BIZ_HIS is unconfigured
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] kimmking commented on issue #7437: unconfigured table can not query with schema name because of missing rewrite
Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #7437:
URL: https://github.com/apache/shardingsphere/issues/7437#issuecomment-692001052
Just remove schema prefix for unconfigured tables.
In recent version of ShardingSphere, if we config some real datasources in a logic schema, then only use logic names for sharding tables, and real names for unconfigured tables. The original mysql schema does not exist for users.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] chana71 commented on issue #7437: unconfigured table can not query with schema name because of missing rewrite
Posted by GitBox <gi...@apache.org>.
chana71 commented on issue #7437:
URL: https://github.com/apache/shardingsphere/issues/7437#issuecomment-691876569
@menghaoranss Now I am testing on the master version. Please check.
```
schemaName: cust
dataSourceCommon:
...
dataSources:
ds0:
url: jdbc:mysql://192.168.1.175:3306/cust0?useSSL=false
ds1:
url: jdbc:mysql://192.168.1.175:3306/cust1?useSSL=false
ds2:
url: jdbc:mysql://192.168.1.186:3306/cust2?useSSL=false
ds3:
url: jdbc:mysql://192.168.1.186:3306/cust3?useSSL=false
rules:
- !SHARDING
tables:
sched_job_extend:
actualDataNodes: ds${0..3}.sched_job_extend
databaseStrategy:
standard:
shardingAlgorithmName: database_mod
shardingColumn: dbid
defaultDatabaseStrategy:
none:
shardingAlgorithms:
database_mod:
type: MOD
props:
sharding.count: 4
```
Thx
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] chana71 commented on issue #7437: unconfigured table can not query with schema name because of missing rewrite
Posted by GitBox <gi...@apache.org>.
chana71 commented on issue #7437:
URL: https://github.com/apache/shardingsphere/issues/7437#issuecomment-691880490
@menghaoranss This is 4.1 version configuration. We have some table sharding across ds0-4 and others only exist at ds0
```
defaultDataSourceName: ds0
tables:
t_order:
actualDataNodes: ds${0..3}.t_order
databaseStrategy:
inline:
algorithmExpression: ds${id% 4}
shardingColumn: id
logicTable: t_order
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] chana71 edited a comment on issue #7437: unconfigured table can not query with schema name because of missing rewrite
Posted by GitBox <gi...@apache.org>.
chana71 edited a comment on issue #7437:
URL: https://github.com/apache/shardingsphere/issues/7437#issuecomment-691901414
@menghaoranss
Logic SQL: select count(*) from cust.SQL_BIZ_HIS
Actual SQL: ds0 ::: select count(*) from cust.SQL_BIZ_HIS
SQL_BIZ_HIS is unconfigured
Thanks for your feedback, this is a Bug, just similer with #7342 , It's being solved now,you can pay attention.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] menghaoranss commented on issue #7437: unconfigured table can not query with schema name because of missing rewrite
Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #7437:
URL: https://github.com/apache/shardingsphere/issues/7437#issuecomment-691891105
> @menghaoranss This is 4.1 version configuration. We have some table sharding across ds0-4 and others only exist at ds0
>
> ```
> defaultDataSourceName: ds0
> tables:
>
> t_order:
> actualDataNodes: ds${0..3}.t_order
> databaseStrategy:
> inline:
> algorithmExpression: ds${id% 4}
> shardingColumn: id
> logicTable: t_order
> ```
what's your SQL and the actual SQL in the log?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] menghaoranss commented on issue #7437: unconfigured table can not query with schema name because of missing rewrite
Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #7437:
URL: https://github.com/apache/shardingsphere/issues/7437#issuecomment-691869450
@chana71 Please provide your configuration.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] kimmking closed issue #7437: unconfigured table can not query with schema name because of missing rewrite
Posted by GitBox <gi...@apache.org>.
kimmking closed issue #7437:
URL: https://github.com/apache/shardingsphere/issues/7437
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org