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/09/20 10:55:13 UTC

[GitHub] [shardingsphere] RaigorJiang opened a new pull request, #21093: For #19102, check duplicate write resource & read resources in RDL.

RaigorJiang opened a new pull request, #21093:
URL: https://github.com/apache/shardingsphere/pull/21093

   For #19102. 
   
   Check duplicate write resource & read resources when execute `CREATE READWRITE_SPLITTING RULE` and `ALTER READWRITE_SPLITTING RULE`
   
   Changes proposed in this pull request:
     - add check methods
     - add test cases
   
   
   ### Sample
   #### CREATE
   ```sql
   mysql> CREATE READWRITE_SPLITTING RULE ms_group_1(
       -> WRITE_RESOURCE=ds_3,
       -> READ_RESOURCES(ds_1),
       -> TYPE(NAME="random")
       -> );
   ERROR 1117 (C1117): Invalid readwrite splitting rule ms_group_1, error message is: Can not config duplicate read resource `ds_1` in database `sharding_db`.
   ```
   
   #### ALTER
   ```sql
   mysql> ALTER READWRITE_SPLITTING RULE ms_group_1(
       -> WRITE_RESOURCE=ds_0,
       -> READ_RESOURCES(ds_2),
       -> TYPE(NAME="random")
       -> );
   ERROR 1117 (C1117): Invalid readwrite splitting rule ms_group_1, error message is: Can not config duplicate write resource `ds_0` in database `sharding_db`.
   ```
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [x] I have self-reviewed the commit code.
   - [x] I have triggered maven check: `mvn clean install -B -T2C -DskipTests -Dmaven.javadoc.skip=true -e`.
   - [x] I have made corresponding changes to the documentation.
   - [x] I have added corresponding unit tests for my changes.
   


-- 
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] wsm12138 commented on pull request #21093: For #19102, check duplicate write resource & read resources in RDL.

Posted by GitBox <gi...@apache.org>.
wsm12138 commented on PR #21093:
URL: https://github.com/apache/shardingsphere/pull/21093#issuecomment-1253171058

   <img width="923" alt="image" src="https://user-images.githubusercontent.com/86462784/191410518-7b32e0d0-5324-4784-8950-737f7f7a7e98.png">
   
   /bin/java
   we find java version: java8, full_version=1.8.0_312, full_path=/bin/java
   ShardingSphere-5.2.1-SNAPSHOT
   Commit ID: 80f86d10dba6aef3dd2a76d2a6a16a7f26d9634e
   Commit Message: For #19102, check duplicate write resource & read resources in RDL. (#21093)
   Branch: master
   Build time: 2022-09-21T11:27:03+0800
   
   


-- 
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] RaigorJiang commented on pull request #21093: For #19102, check duplicate write resource & read resources in RDL.

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on PR #21093:
URL: https://github.com/apache/shardingsphere/pull/21093#issuecomment-1253247235

   > <img alt="image" width="923" src="https://user-images.githubusercontent.com/86462784/191410518-7b32e0d0-5324-4784-8950-737f7f7a7e98.png">
   > 
   > /bin/java we find java version: java8, full_version=1.8.0_312, full_path=/bin/java ShardingSphere-5.2.1-SNAPSHOT Commit ID: [80f86d1](https://github.com/apache/shardingsphere/commit/80f86d10dba6aef3dd2a76d2a6a16a7f26d9634e) Commit Message: For #19102, check duplicate write resource & read resources in RDL. (#21093) Branch: master Build time: 2022-09-21T11:27:03+0800
   
   Hi @wsm12138,
   Please notice `TYPE(NAME="random")`, "random" is a string with quote.
   


-- 
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] zhaojinchao95 merged pull request #21093: For #19102, check duplicate write resource & read resources in RDL.

Posted by GitBox <gi...@apache.org>.
zhaojinchao95 merged PR #21093:
URL: https://github.com/apache/shardingsphere/pull/21093


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