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/08/25 06:44:26 UTC

[GitHub] [shardingsphere] seowen808 opened a new issue #7050: sql cannot be sharded using Group BY

seowen808 opened a new issue #7050:
URL: https://github.com/apache/shardingsphere/issues/7050


    用springBoot2.3+mybatis+mysql8 集成sharding 4.1.1,
   使用读写分离+分片。当sql语句中 有 group by 时,就会分片失败,无法路由到具体的物理表。  去掉 group by后。就可以路由到具体表,并执行成功.
   SpringBoot2.3 +mybatis+mysql8 integration sharding 4.1.1,
   Use read/write separation + sharding.When there is Group BY in the SQL statement, sharding fails and cannot be routed to a specific physical table.After removing Group BY.You can route to a specific table and execute successfully.
   
   springboot yaml 配置如下:
   ![image](https://user-images.githubusercontent.com/46375421/91130850-e3f78880-e6de-11ea-955e-b5db43dea7f4.png)
   **核心代码(带gruop by)如下:**
   ![image](https://user-images.githubusercontent.com/46375421/91132986-ec03f800-e6df-11ea-97c8-9eab9b93032b.png)
   
   执行的输出日志如下(无法路由到consumer_link_8和 consumer_link_9):
   ![image](https://user-images.githubusercontent.com/46375421/91131531-8283e980-e6df-11ea-8c48-75f9b60656af.png)
   
   **核心代码(不带gruop by)如下:**
   ![image](https://user-images.githubusercontent.com/46375421/91133235-fde59b00-e6df-11ea-92e6-366a2667340d.png)
   
   执行的输出日志如下(成功路由到consumer_link_8和 consumer_link_9):
   ![image](https://user-images.githubusercontent.com/46375421/91138017-61bc9380-e6e1-11ea-8eaf-f1d7a6bbf875.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



[GitHub] [shardingsphere] terrymanu commented on issue #7050: sql cannot be sharded using Group BY

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #7050:
URL: https://github.com/apache/shardingsphere/issues/7050#issuecomment-679842329


   **For English only**, other languages will not accept.


----------------------------------------------------------------
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] terrymanu closed issue #7050: sql cannot be sharded using Group BY

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #7050:
URL: https://github.com/apache/shardingsphere/issues/7050


   


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