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-unsubscr...@shardingsphere.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org