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

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   
[b7294f7](https://github.com/apache/shardingsphere/commit/b7294f7d352dc25e63cf29a2ea5ebde8090a1218)
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy
   
   ### Expected behavior
   
   Execute merge statement successfully when I not config sharding generated 
key.
   
   ### Actual behavior
   
   <img width="1206" alt="image" 
src="https://github.com/user-attachments/assets/bbd71117-9d2e-4143-99a7-9a6d4a8f71b4";>
   
   ### Reason analyze (If you can)
   
   The generated in ShardingSphereColumn should indicate whether to use the 
distributed key, rather than the id generated in the underlying db. This logic 
is correct in earlier versions (such as 5.0.0). 
   
   
https://github.com/apache/shardingsphere/blob/d3409a2e36b4233372cfd048038634b7a518dc5d/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/metadata/ShardingTableMetaDataBuilder.java#L122
   
   The logic of the latest version is wrong. It will first determine whether it 
is a distributed ID. If not, it will use the ID generated in the db.
   
   <img width="1240" alt="image" 
src="https://github.com/user-attachments/assets/200f8c3c-c527-430a-be85-9572411ca88d";>
   
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
   ### Example codes for reproduce this issue (such as a github link).
   


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