-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sharding-jdbc get different shardingValue between version 3.1.0 and version 2.0.3 when use a string type sharding column. #2101
Comments
duplicate #1754 |
@terrymanu I found the fix code, merge to version 3.1.0.1 . |
Please subscribe mail list, you can find the scheduler of release |
Thank you so much for your patience~ |
@terrymanu @codefairy08 I just try with version 4.0.0.M1-SNAPSHOT , also get different with version 2.0.3. |
@AlbertTao Please describe in detail, tell me where you get value "'abcd'" ? |
thanks , i will try it again using your code |
@AlbertTao this issue was fixed at 4.0.0-RC1, i use your code testing in 4.0.0-RC1 it is ok, but in 4.0.0.M1-SNAPSHOT has a wrong value , please have a try in 4.0.0-RC1. |
I had test this code in 4.0.0-RC1, and get the right value ! But I am not sure whether this problem was fix by the same code as #1754. #1754 fix code in version 4.0.0.M1-SNAPSHOT @RequiredArgsConstructor
@Getter
@Setter
public final class CommonExpressionSegment implements ExpressionSegment {
private final int startIndex;
private final int stopIndex;
private int index = -1;
private Number value;
private boolean text;
} This code had not be changed in version 4.0.0.RC1 . |
thanks so much for your reply. |
Use a string sharding column , suppose the sharding column value is "abcd";
When use sharding-jdbc 3.1.0 , found sharding value pass to ShardingStrategy.doSharding() was a integer value : -1 .
But use version 2.0.3 , the sharding value is original value : "abcd"。
The text was updated successfully, but these errors were encountered: