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/01/29 02:26:10 UTC

[GitHub] [shardingsphere] RaigorJiang opened a new issue #15167: [DistSQL] Add a syntax `SHOW RULES USED RESOURCE`

RaigorJiang opened a new issue #15167:
URL: https://github.com/apache/shardingsphere/issues/15167


   Hi community,
   this issue is for a new DistSQL syntax.
   
   ### Background
   Currently, if a resource is used by any rule, an `ERROR` will occur when users try to execute `DROP RESOURCE`, and indicating what type of rules are using current resource.
   ```sql
   DROP RESOURCE ds_1;
   ERROR 1101 (C1101): Resource [ds_1] is still used by [ShardingRule, SingleTableRule].
   ```
   
   So, how do we know which rules a resource is used by?
   
   ### Aim
   Add a DistSQL to show all rules using the target resource, for example
   | type          |name           |                                                                                                                                                    
   |:----------|:------------|
   | sharding    | t_order       |
   | sharding    | t_order_item       |
   | readwrite_splitting    | readwrite_ds       |
   
   
   The syntax is as follows:
   ```sql
   SHOW RULES USED RESOURCE resourceName [FROM schemaName]
   ```


-- 
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] yx9o commented on issue #15167: [DistSQL] Add a syntax `SHOW RULES USED RESOURCE`

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


   I want.


-- 
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 issue #15167: [DistSQL] Add a syntax `SHOW RULES USED RESOURCE`

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


   Hi @yx9o , welcome to your help.


-- 
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 closed issue #15167: [DistSQL] Add a syntax `SHOW RULES USED RESOURCE`

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


   


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