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/02/25 08:02:18 UTC

[GitHub] [incubator-shardingsphere] lklkxcxc opened a new issue #4460: SQL exec `order by` and `desc`

lklkxcxc opened a new issue #4460: SQL exec `order by` and `desc` 
URL: https://github.com/apache/incubator-shardingsphere/issues/4460
 
 
   Sharding-proxy version: 4.0.0-RC3
   
   Problems encountered:Query SQL `select association,rounds,election_time as electionTime,title from zhyxh where doctor_id = 848224 order by association,election_time desc` feedback results hung. Query SQL `select association,rounds,election_time as electionTime,title from zhyxh where doctor_id = 848224` feedback results ok.
   logs:  no error in logs

----------------------------------------------------------------
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] lklkxcxc commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung

Posted by GitBox <gi...@apache.org>.
lklkxcxc commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung
URL: https://github.com/apache/incubator-shardingsphere/issues/4460#issuecomment-591251402
 
 
   @tuohai666 Three rows return for Problem 1. The same problem when I used  the version 4.0.0.

----------------------------------------------------------------
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] lklkxcxc edited a comment on issue #4460: SQL exec `order by` and `desc` feedback result may hung

Posted by GitBox <gi...@apache.org>.
lklkxcxc edited a comment on issue #4460: SQL exec `order by` and `desc` feedback result may hung
URL: https://github.com/apache/incubator-shardingsphere/issues/4460#issuecomment-598574977
 
 
   @tuohai666 Looking forward to your reply.When sharding to support order two items ?
   

----------------------------------------------------------------
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] lklkxcxc closed issue #4460: SQL exec `order by` and `desc` feedback result may hung

Posted by GitBox <gi...@apache.org>.
lklkxcxc closed issue #4460: SQL exec `order by` and `desc` feedback result may hung
URL: https://github.com/apache/incubator-shardingsphere/issues/4460
 
 
   

----------------------------------------------------------------
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] lklkxcxc commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung

Posted by GitBox <gi...@apache.org>.
lklkxcxc commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung
URL: https://github.com/apache/incubator-shardingsphere/issues/4460#issuecomment-600387104
 
 
   @tuohai666 The problem was sloved that add up parm to JDBC connect .

----------------------------------------------------------------
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] tuohai666 commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung
URL: https://github.com/apache/incubator-shardingsphere/issues/4460#issuecomment-600405527
 
 
   @lklkxcxc set useDynamicCharsetInfo = false is a work around, I will submit a pr to resolve this problem. After that we don't need to set the parameter any more.

----------------------------------------------------------------
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] tuohai666 commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung
URL: https://github.com/apache/incubator-shardingsphere/issues/4460#issuecomment-599421325
 
 
   @lklkxcxc The root cause of this problem is an exception fired when query via a existing stream resultset. A stream resultset must be closed before a new query.
   
   This problem only occur when order by a String column, because the String order by clause need the collation which is obtained by a SQL query.
   
   To avoid the additional SQL query I set useDynamicCharsetInfo = false, and Connector/J will cache the collation instead of send a query to the MySQL server.

----------------------------------------------------------------
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] lklkxcxc commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung

Posted by GitBox <gi...@apache.org>.
lklkxcxc commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung
URL: https://github.com/apache/incubator-shardingsphere/issues/4460#issuecomment-593180892
 
 
   @tuohai666 Can you help me in this situation? We are using sharding at present

----------------------------------------------------------------
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] lklkxcxc commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung

Posted by GitBox <gi...@apache.org>.
lklkxcxc commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung
URL: https://github.com/apache/incubator-shardingsphere/issues/4460#issuecomment-593243426
 
 
   @tuohai666 When sharding to support order two items ?

----------------------------------------------------------------
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] lklkxcxc closed issue #4460: SQL exec `order by` and `desc` feedback result may hung

Posted by GitBox <gi...@apache.org>.
lklkxcxc closed issue #4460: SQL exec `order by` and `desc` feedback result may hung
URL: https://github.com/apache/incubator-shardingsphere/issues/4460
 
 
   

----------------------------------------------------------------
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] tuohai666 commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung
URL: https://github.com/apache/incubator-shardingsphere/issues/4460#issuecomment-593229989
 
 
   @lklkxcxc For Problem 1, I think we don't support order two items. Can you change SQL to:
    select association,rounds,election_time as electionTime,title from zhyxh where doctor_id = 848224 order by association desc ?
   For Problem 2, I think Id is the sharding key, please change where id in ( '2443' , '2615' ) to where id in ( 2443 , 2615 )

----------------------------------------------------------------
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 #4460: SQL exec `order by` and `desc` feedback result may hung

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung
URL: https://github.com/apache/incubator-shardingsphere/issues/4460#issuecomment-600386238
 
 
   Test is a sharding table.
   5.x support order two items as follow.
   
   ![image](https://user-images.githubusercontent.com/807508/76917769-6180c680-68ff-11ea-82d2-eb1e6b2b95ad.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] lklkxcxc commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung

Posted by GitBox <gi...@apache.org>.
lklkxcxc commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung
URL: https://github.com/apache/incubator-shardingsphere/issues/4460#issuecomment-598574977
 
 
   @tuohai666 Looking forward to your reply.
   

----------------------------------------------------------------
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] tuohai666 commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung
URL: https://github.com/apache/incubator-shardingsphere/issues/4460#issuecomment-591213401
 
 
   @lklkxcxc How many rows will be return for the Problem 1?
   
   Can you have a try with the version 4.0.0?

----------------------------------------------------------------
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] lklkxcxc commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung

Posted by GitBox <gi...@apache.org>.
lklkxcxc commented on issue #4460: SQL exec `order by` and `desc` feedback result may hung
URL: https://github.com/apache/incubator-shardingsphere/issues/4460#issuecomment-593243126
 
 
   @tuohai666 Thanks! For problem 2 ,It is ok that number removed single quotation marks.

----------------------------------------------------------------
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] lklkxcxc opened a new issue #4460: SQL exec `order by` and `desc` feedback result may hung

Posted by GitBox <gi...@apache.org>.
lklkxcxc opened a new issue #4460: SQL exec `order by` and `desc` feedback result may hung
URL: https://github.com/apache/incubator-shardingsphere/issues/4460
 
 
   Sharding-proxy version: 4.0.0-RC3
   
   - Problems encountered 1:Query SQL `select association,rounds,election_time as electionTime,title from zhyxh where doctor_id = 848224 order by association,election_time desc` feedback results hung. 
   
       Query SQL `select association,rounds,election_time as electionTime,title from zhyxh where doctor_id = 848224` feedback results ok.
   
   
     logs:  no error in logs
   
   - Problems encountered 2:Query SQL `select rtitle_ch,rn_ch,r_data,rstatus_ch,rtype_ch,researcher_ch,researcher_phone,researcher_email,researcher_addr_ch,researcher_unit_ch,exp_org_ch,applicant_ch,applicant_unit_ch,study_disease_ch from chictr where id in
                    (  
                           '2443'
                    , 
                           '2615'
                    ) 
                   order by r_data desc` feedback results error `10002 - 2Unknown exception: [No signature of method: java.lang.String.mod() is applicable for argument types: (java.lang.Integer) values: [2]`.
   
   
     logs: `[DEBUG] 16:12:04.484 [ShardingSphere-Command-3] o.a.s.s.f.m.c.MySQLCommandExecutorFactory - Execute packet type: COM_QUERY, value: MySQLComQueryPacket(sql=select rtitle_ch,rn_ch,r_data,rstatus_ch,rtype_ch,researcher_ch,researcher_phone,researcher_email,researcher_addr_ch,researcher_unit_ch,exp_org_ch,applicant_ch,applicant_unit_ch,study_disease_ch from chictr where id in
                    (  
                           '2443'
                    , 
                           '2615'
                    ) 
                   order by r_data desc)
   [ERROR] 16:12:04.536 [ShardingSphere-Command-3] o.a.s.s.f.c.CommandExecutorTask - Exception occur: 
   groovy.lang.MissingMethodException: No signature of method: java.lang.String.mod() is applicable for argument types: (java.lang.Integer) values: [2]
   Possible solutions: drop(int), find(), any(), take(int), use([Ljava.lang.Object;), find(groovy.lang.Closure)
           at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
           at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49)
           at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
           at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:58)
           at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
           at Script109$_run_closure1.doCall(Script109.groovy:1)
           at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
           at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
           at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
           at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)
           at groovy.lang.Closure.call(Closure.java:426)
           at groovy.lang.Closure.call(Closure.java:420)
           at org.apache.shardingsphere.core.strategy.route.inline.InlineShardingStrategy.execute(InlineShardingStrategy.java:90)
           at org.apache.shardingsphere.core.strategy.route.inline.InlineShardingStrategy.doSharding(InlineShardingStrategy.java:72)
           at org.apache.shardingsphere.core.strategy.route.inline.InlineShardingStrategy.doSharding(InlineShardingStrategy.java:59)
           at org.apache.shardingsphere.core.route.type.standard.StandardRoutingEngine.routeDataSources(StandardRoutingEngine.java:200)
           at org.apache.shardingsphere.core.route.type.standard.StandardRoutingEngine.route0(StandardRoutingEngine.java:188)
           at org.apache.shardingsphere.core.route.type.standard.StandardRoutingEngine.routeByShardingConditionsWithCondition(StandardRoutingEngine.java:118)
           at org.apache.shardingsphere.core.route.type.standard.StandardRoutingEngine.routeByShardingConditions(StandardRoutingEngine.java:112)
           at org.apache.shardingsphere.core.route.type.standard.StandardRoutingEngine.getDataNodes(StandardRoutingEngine.java:97)
           at org.apache.shardingsphere.core.route.type.standard.StandardRoutingEngine.route(StandardRoutingEngine.java:75)
           at org.apache.shardingsphere.core.route.router.sharding.ShardingRouter.route(ShardingRouter.java:107)
           at org.apache.shardingsphere.core.route.StatementRoutingEngine.route(StatementRoutingEngine.java:54)
           at org.apache.shardingsphere.core.SimpleQueryShardingEngine.route(SimpleQueryShardingEngine.java:58)
           at org.apache.shardingsphere.core.BaseShardingEngine.executeRoute(BaseShardingEngine.java:91)
           at org.apache.shardingsphere.core.BaseShardingEngine.shard(BaseShardingEngine.java:74)
           at org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.wrapper.StatementExecutorWrapper.doShardingRoute(StatementExecutorWrapper.java:78)
           at org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.wrapper.StatementExecutorWrapper.route(StatementExecutorWrapper.java:64)
           at org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:77)
           at org.apache.shardingsphere.shardingproxy.backend.text.query.QueryBackendHandler.execute(QueryBackendHandler.java:54)
           at org.apache.shardingsphere.shardingproxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:73)
           at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:86)
           at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:66)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
           at java.lang.Thread.run(Thread.java:745)`
   

----------------------------------------------------------------
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