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/03/07 03:37:36 UTC
[GitHub] [incubator-shardingsphere] xiaoxiong581 opened a new issue #4639:
order by not support string column when cross database query
xiaoxiong581 opened a new issue #4639: order by not support string column when cross database query
URL: https://github.com/apache/incubator-shardingsphere/issues/4639
## Bug Report
**For English only**, other languages will not accept.
Before report a bug, make sure you have:
- Searched open and closed [GitHub issues](https://github.com/apache/incubator-shardingsphere/issues).
- Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
Please pay attention on issues you submitted, because we maybe need more details.
If no response **more than 7 days** and we cannot reproduce it on current information, we will **close it**.
Please answer these questions before submitting your issue. Thanks!
### Which version of ShardingSphere did you use?
4.0.0
### Which project did you use? Sharding-JDBC or Sharding-Proxy?
Sharding-Proxy
### Expected behavior
cross database query support order by use string column, query sql is always executing, cann't get result or error
### Actual behavior
not support, only support when route one database, cross database support i test is int、datetime etc
### Reason analyze (If you can)
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
create table sql:
CREATE TABLE t_cluster(
clusterId VARCHAR(64) NOT NULL COMMENT '数据库集群ID' ,
clusterName VARCHAR(128) NOT NULL COMMENT '数据库集群名称' ,
projectId VARCHAR(64) NOT NULL COMMENT '项目ID' ,
createTime DATETIME NOT NULL COMMENT '创建时间' ,
updateTime DATETIME NOT NULL COMMENT '更新时间' ,
PRIMARY KEY (clusterId)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT = '数据库集群信息表';
ALTER TABLE t_cluster ADD UNIQUE index_cluster_unique_name(clusterName);
server.yaml
authentication:
users:
root:
password: xxxxx
migu:
password: xxxxx
authorizedSchemas: databasemanager
props:
sql.show: true
config-databasemanager.yaml:
schemaName: databasemanager
dataSources:
ds_0:
url: jdbc:mysql://192.168.137.102:3306/databasemanager?serverTimezone=UTC&useSSL=false
username: root
password: xxxxx
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
ds_1:
url: jdbc:mysql://192.168.137.102:3306/databasemanager?serverTimezone=UTC&useSSL=false
username: root
password: xxxx
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
shardingRule:
tables:
t_cluster:
actualDataNodes: ds_${0..1}.t_cluster
tableStrategy:
none:
databaseStrategy:
inline:
shardingColumn: clusterId
algorithmExpression: ds_${clusterId.hashCode().abs() % 2}
t_cluster_instance:
actualDataNodes: ds_${0..1}.t_cluster_instance
tableStrategy:
none:
databaseStrategy:
inline:
shardingColumn: clusterId
algorithmExpression: ds_${clusterId.hashCode().abs() % 2}
bindingTables:
- t_cluster,t_cluster_instance
defaultDatabaseStrategy:
none:
defaultTableStrategy:
none:
### Example codes for reproduce this issue (such as a github link).
test sql:
select * from t_cluster order by clusterId;
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] xiaoxiong581 edited a comment on issue
#4639: order by not support string column when cross database query
Posted by GitBox <gi...@apache.org>.
xiaoxiong581 edited a comment on issue #4639: order by not support string column when cross database query
URL: https://github.com/apache/incubator-shardingsphere/issues/4639#issuecomment-596188662
> Cannot support cross database query for any SQL
What you mean query sql must route one database, cann't query more than one database data?
I see document in https://shardingsphere.apache.org/document/current/cn/features/sharding/use-norms/sql/, it support order by query in more than one database, please check again
![image](https://user-images.githubusercontent.com/19368482/76180146-1af0e500-61f8-11ea-9d57-16753a1396ff.png)
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking commented on issue #4639: order
by not support string column when cross database query
Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #4639: order by not support string column when cross database query
URL: https://github.com/apache/incubator-shardingsphere/issues/4639#issuecomment-596055067
could you show your actual result and expected result, actual sql of all tables.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] xiaoxiong581 commented on issue #4639:
order by not support string column when cross database query
Posted by GitBox <gi...@apache.org>.
xiaoxiong581 commented on issue #4639: order by not support string column when cross database query
URL: https://github.com/apache/incubator-shardingsphere/issues/4639#issuecomment-596057058
> could you show your actual result and expected result, actual sql of all tables.
table t_cluster no data
#### expected result
`return no data`
#### actual result
`cann't get result, query is executing, no response`
![image](https://user-images.githubusercontent.com/19368482/76139087-068dda80-6088-11ea-8e35-20010140bbf8.png)
#### log
##### sharding-proxy
![image](https://user-images.githubusercontent.com/19368482/76139104-2c1ae400-6088-11ea-8e45-84f053695108.png)
##### mysql
![image](https://user-images.githubusercontent.com/19368482/76139114-3dfc8700-6088-11ea-9753-7608fdd8f76a.png)
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] terrymanu commented on issue #4639:
order by not support string column when cross database query
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #4639: order by not support string column when cross database query
URL: https://github.com/apache/incubator-shardingsphere/issues/4639#issuecomment-596181522
Cannot support cross database query for any SQL
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] terrymanu closed issue #4639: order by
not support string column when cross database query
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #4639: order by not support string column when cross database query
URL: https://github.com/apache/incubator-shardingsphere/issues/4639
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] xiaoxiong581 commented on issue #4639:
order by not support string column when cross database query
Posted by GitBox <gi...@apache.org>.
xiaoxiong581 commented on issue #4639: order by not support string column when cross database query
URL: https://github.com/apache/incubator-shardingsphere/issues/4639#issuecomment-596188662
> Cannot support cross database query for any SQL
what you mean query sql must route one database, cann't query more than one database data?
----------------------------------------------------------------
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
With regards,
Apache Git Services