thswlsqls opened a new issue, #39199:
URL: https://github.com/apache/shardingsphere/issues/39199

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   master @ 66216875464
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   Both
   
   ### Expected behavior
   Broadcast table names are matched case-insensitively (core 
`BroadcastRule.tables` is a `CaseInsensitiveSet`). Creating a broadcast rule 
for `T_ORDER` when `t_order` exists should raise `DuplicateRuleException`, and 
dropping `T_ORDER` should remove `t_order`.
   
   ### Actual behavior
   The DistSQL create and drop executors compare table names case-sensitively:
   - CREATE: the duplicate check misses `T_ORDER` vs `t_order`, no 
`DuplicateRuleException` is thrown, and both cases get stored.
   - DROP: the existence check (case-insensitive) passes, but 
`hasAnyOneToBeDropped` (case-sensitive) reports nothing to drop, a silent no-op.
   
   ### Reason analyze (If you can)
   `CreateBroadcastTableRuleExecutor.getDuplicatedRuleNames()` copies rule 
tables into a case-sensitive `HashSet` before `retainAll`. 
`DropBroadcastTableRuleExecutor.hasAnyOneToBeDropped()` runs 
`Collections.disjoint` on the raw case-sensitive collection. Its own existence 
check and the sibling `DropMaskRuleExecutor` already wrap current tables in 
`CaseInsensitiveSet` (drop path partially fixed in #30180).
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   1. `CREATE BROADCAST TABLE RULE t_order;`
   2. `CREATE BROADCAST TABLE RULE T_ORDER;`
   3. `DROP BROADCAST TABLE RULE T_ORDER;`
   
   ### Example codes for reproduce this issue (such as a github link).
   N/A
   
   


-- 
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: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to