Skip to content

Commit d5f301e

Browse files
committed
fix for ci test
1 parent 82bcbe9 commit d5f301e

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/main/java/com/alipay/oceanbase/rpc/location/LocationUtil.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -901,11 +901,18 @@ public static TableEntry getTableEntryLocationFromRemote(Connection connection,
901901
}
902902
try {
903903
ps = connection.prepareStatement(sql);
904-
ps.setString(1, key.getTenantName());
905-
ps.setLong(2, tabletId);
906-
ps.setString(3, key.getTenantName());
907-
ps.setString(4, key.getDatabaseName());
908-
ps.setString(5, key.getTableName());
904+
if (withLsId) {
905+
ps.setString(1, key.getTenantName());
906+
ps.setLong(2, tabletId);
907+
ps.setString(3, key.getTenantName());
908+
ps.setString(4, key.getDatabaseName());
909+
ps.setString(5, key.getTableName());
910+
} else {
911+
ps.setLong(1, tabletId);
912+
ps.setString(2, key.getTenantName());
913+
ps.setString(3, key.getDatabaseName());
914+
ps.setString(4, key.getTableName());
915+
}
909916
rs = ps.executeQuery();
910917
getPartitionLocationFromResultSetByTablet(tableEntry, rs, partitionEntry, tabletId, withLsId);
911918
} catch (Exception e) {

0 commit comments

Comments
 (0)