@@ -168,21 +168,7 @@ public class LocationUtil {
168168 + " WHERE C.tenant_name = ? "
169169 + ") AS right_table ON left_table.tablet__id = right_table.tablet_id;" ;
170170
171- private static final String PROXY_LOCATION_SQL_PARTITION_BY_TABLETID_V4 = "SELECT /*+READ_CONSISTENCY(WEAK)*/ * FROM ( "
172- + " SELECT A.tablet_id as tablet__id, A.svr_ip as svr_ip, A.sql_port as sql_port, A.table_id as table_id, "
173- + " A.role as role, A.replica_num as replica_num, A.part_num as part_num, B.svr_port as svr_port, B.status as status, "
174- + " B.stop_time as stop_time, A.spare1 as replica_type "
175- + " FROM oceanbase.__all_virtual_proxy_schema A "
176- + " INNER JOIN oceanbase.__all_server B ON A.svr_ip = B.svr_ip AND A.sql_port = B.inner_port "
177- + " WHERE A.tablet_id = ? AND A.tenant_name = ? AND A.database_name = ? AND A.table_name = ?) AS left_table "
178- + "LEFT JOIN ("
179- + " SELECT D.ls_id, D.tablet_id "
180- + " FROM oceanbase.__all_virtual_tablet_to_ls D "
181- + " INNER JOIN oceanbase.DBA_OB_TENANTS C ON D.tenant_id = C.tenant_id "
182- + " WHERE C.tenant_name = ? "
183- + ") AS right_table ON left_table.tablet__id = right_table.tablet_id;" ;
184-
185- private static final String PROXY_LOCATION_SQL_PARTITION_BY_TABLETID_V4_2 = "SELECT /*+READ_CONSISTENCY(WEAK)*/ "
171+ private static final String PROXY_LOCATION_SQL_PARTITION_BY_TABLETID_V4 = "SELECT /*+READ_CONSISTENCY(WEAK)*/ "
186172 + " A.tablet_id as tablet_id, "
187173 + " A.svr_ip as svr_ip, "
188174 + " A.sql_port as sql_port, "
@@ -805,7 +791,7 @@ private static TableEntry getTableEntryFromRemote(Connection connection, TableEn
805791 private static String genLocationSQLByTabletId () {
806792 String sql = null ;
807793 if (ObGlobal .obVsnMajor () >= 4 ) {
808- sql = PROXY_LOCATION_SQL_PARTITION_BY_TABLETID_V4_2 ;
794+ sql = PROXY_LOCATION_SQL_PARTITION_BY_TABLETID_V4 ;
809795 } else {
810796 throw new FeatureNotSupportedException ("not support ob version less than 4" );
811797 }
0 commit comments