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/02/21 09:29:15 UTC

[GitHub] [shardingsphere] wallacezhou opened a new issue #15546: create auto table sharding rule using DistSQL is not working in 5.1.0

wallacezhou opened a new issue #15546:
URL: https://github.com/apache/shardingsphere/issues/15546


   ## 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/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 anymore 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?
    5.1.0
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
   ShardingSphere-Proxy can create auto table sharding rule using DistSQL successfully 
   
   ### Actual behavior
   ShardingSphere-Proxy create auto table sharding rule using DistSQL with error
   
   ### Reason analyze (If you can)
   
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   the same auto table sharding rule create by DistSQL which works fine in version 5.0.0 with mysql 8.0
   when update proxy to version 5.1.0, the DistSQL execute with error msg:
   This version of ShardingSphere-Proxy doesn't yet support this SQL. 'You have an error in your SQL syntax'
   
   ### Example codes for reproduce this issue (such as a github link).
   
   below dist sql can work in proxy 5.0.0, but fail in proxy 5.1.0
   
   CREATE SHARDING TABLE RULE tb_test_info (
   RESOURCES(ds0,ds1),
   SHARDING_COLUMN=id,
   TYPE(NAME=MOD,PROPERTIES("sharding-count"=10)),
   GENERATED_KEY(COLUMN=id,TYPE(NAME=SNOWFLAKE, PROPERTIES("worker-id"=1,"max-vibration-offset"=9)))
   );
   
   the demo auto table create DistSQL in verions 5.1.0 document can not work either
   
   https://shardingsphere.apache.org/document/5.1.0/cn/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/
   
   CREATE SHARDING TABLE RULE t_order (
   RESOURCES(resource_0,resource_1),
   SHARDING_COLUMN=order_id,TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=4)),
   GENERATED_KEY(COLUMN=another_id,TYPE(NAME=snowflake,PROPERTIES("worker-id"=123)))
   );
   
   by the way, if the DistSQL  without key generate declaration, then it's run success
   below DistSQL is ok
   
   CREATE SHARDING TABLE RULE tb_test_info (
   RESOURCES(ds0,ds1),
   SHARDING_COLUMN=id,TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=198))
   );
   


-- 
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] wallacezhou commented on issue #15546: create auto table sharding rule using DistSQL is not working in 5.1.0

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


   @lanchengx 


-- 
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] wallacezhou edited a comment on issue #15546: create auto table sharding rule using DistSQL is not working in 5.1.0

Posted by GitBox <gi...@apache.org>.
wallacezhou edited a comment on issue #15546:
URL: https://github.com/apache/shardingsphere/issues/15546#issuecomment-1046690623


   @lanchengx 
   thanks for you quick response
    KEY_GENERATE_STRATEGY works in 5.1.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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] wallacezhou closed issue #15546: create auto table sharding rule using DistSQL is not working in 5.1.0

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


   


-- 
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 issue #15546: create auto table sharding rule using DistSQL is not working in 5.1.0

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


   @wallacezhou Thanks your feedback. `GENERATED_KEY` was adjusted to `KEY_GENERATE_STRATEGY`,
   There was a problem with the documentation when the version was released, and it is being adjusted; 
   you can refer to the documentation of the master branch first. https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/


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