shardingsphere
shardingsphere copied to clipboard
shard key parse fail: when uid is shard key, parse shard value fail
Which version of ShardingSphere did you use?
5.5.3-SNAPSHOT
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
Expected behavior
select * from table_xx where uid=123 uid is configured shard column, shardingsphere will get shard value=123.
Actual behavior
sharding could not find sharding value 123.
Reason
ColumnSegmentBinder.java
private static final Collection<String> EXCLUDE_BIND_COLUMNS = new CaseInsensitiveSet<>(Arrays.asList(
"ROWNUM", "ROW_NUMBER", "ROWNUM_", "ROWID", "SYSDATE", "SYSTIMESTAMP", "CURRENT_TIMESTAMP", "LOCALTIMESTAMP", "UID", "USER", "NEXTVAL", "LEVEL"));
UID is excluded. (why do this?)