We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
String sql = "insert into user_info_shard(id,user_no,user_name) values(?,?,?)"; try { Connection conn = shardingDS.getConnection(); PreparedStatement pstmt = conn.prepareStatement(sql);
for (int i = 1; i <= 10000; i++) { pstmt.setInt(1, i); pstmt.setString(2, UUID.randomUUID().toString().replace("-", "")); pstmt.setString(3,"ZHANG"+i); pstmt.execute(); } } catch(Exception ex) { ex.printStackTrace(); }
单库、分表测试,只有一张逻辑表。 测试代码如上,该测试代码只有第一条记录插入成功,第二条记录插入时就出异常(主键冲突),原因是ShardingPreparedStatement的参数重新设置以后,cachedRoutedPreparedStatements未更新。
The text was updated successfully, but these errors were encountered:
将 #106 合并进来
Sorry, something went wrong.
1f7ed61
Merge pull request #36 from sharding-sphere/dev
0f230c5
update from origin
Merge pull request apache#36 from KomachiSion/master
1467fbb
Move package and rename package for apache#33
No branches or pull requests
String sql = "insert into user_info_shard(id,user_no,user_name) values(?,?,?)";
try {
Connection conn = shardingDS.getConnection();
PreparedStatement pstmt = conn.prepareStatement(sql);
单库、分表测试,只有一张逻辑表。
测试代码如上,该测试代码只有第一条记录插入成功,第二条记录插入时就出异常(主键冲突),原因是ShardingPreparedStatement的参数重新设置以后,cachedRoutedPreparedStatements未更新。
The text was updated successfully, but these errors were encountered: