From 92c693474e128ecb150e686b7cf30910b6a96161 Mon Sep 17 00:00:00 2001 From: obdev Date: Thu, 16 Apr 2026 16:24:48 +0800 Subject: [PATCH 1/2] fix rpc error Co-authored-by: footka <672528926@qq.com> --- .../installer/wix_launch_configurator.wxs | 34 ++++--------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/tools/windows/installer/wix_launch_configurator.wxs b/tools/windows/installer/wix_launch_configurator.wxs index 93ff8f3ce..f8692ff47 100644 --- a/tools/windows/installer/wix_launch_configurator.wxs +++ b/tools/windows/installer/wix_launch_configurator.wxs @@ -12,17 +12,6 @@ failed to link for some reason. --> - - - - - + - @@ -60,7 +42,7 @@ Only runs on full uninstall (not upgrades). --> + Condition="(REMOVE="ALL") AND (NOT UPGRADINGPRODUCTCODE)" /> @@ -70,10 +52,6 @@ Permanent="no" Part="last" Action="set" System="yes" /> - - From cb1a139f12c29487edc68e91fe3d970029305617 Mon Sep 17 00:00:00 2001 From: obdev Date: Thu, 16 Apr 2026 16:30:44 +0000 Subject: [PATCH 2/2] Fix the insecure comparison function Co-authored-by: footka --- .../engine/sort/ob_sort_compare_vec_op.ipp | 72 ++++++------------- 1 file changed, 23 insertions(+), 49 deletions(-) diff --git a/src/sql/engine/sort/ob_sort_compare_vec_op.ipp b/src/sql/engine/sort/ob_sort_compare_vec_op.ipp index 29ab44c9d..40646cee2 100644 --- a/src/sql/engine/sort/ob_sort_compare_vec_op.ipp +++ b/src/sql/engine/sort/ob_sort_compare_vec_op.ipp @@ -24,34 +24,24 @@ bool GeneralCompare::operator()(const Store_Row *l, const { bool less = false; int &ret = ret_; - if (OB_UNLIKELY(OB_SUCCESS != ret)) { - // Use pointer comparison as a consistent fallback to maintain strict weak ordering. - // Returning false for all pairs would cause introsort's right-scan loop - // (while !comp(pivot, *i)) to advance past array bounds, triggering abort(). - less = l < r; - } else if (OB_FAIL(fast_check_status())) { - SQL_ENG_LOG(WARN, "fast check failed", K(ret)); - less = l < r; + if (CompareBase::ENABLE == encode_sk_state_) { + ObLength l_len = 0; + ObLength r_len = 0; + const char *l_data = nullptr; + const char *r_data = nullptr; + l->get_cell_payload(*sk_row_meta_, 0, l_data, l_len); + r->get_cell_payload(*sk_row_meta_, 0, r_data, r_len); + int cmp = 0; + cmp = MEMCMP(l_data, r_data, min(l_len, r_len)); + less = cmp != 0 ? (cmp < 0) : (l_len - r_len) < 0; + } else if (CompareBase::FALLBACK_TO_DISABLE == encode_sk_state_ && has_addon) { + const Store_Row *l_real_cmp_row = l->get_addon_ptr(*sk_row_meta_); + const Store_Row *r_real_cmp_row = r->get_addon_ptr(*sk_row_meta_); + less = (compare(l_real_cmp_row, r_real_cmp_row, addon_row_meta_) > 0); } else { - if (CompareBase::ENABLE == encode_sk_state_) { - ObLength l_len = 0; - ObLength r_len = 0; - const char *l_data = nullptr; - const char *r_data = nullptr; - l->get_cell_payload(*sk_row_meta_, 0, l_data, l_len); - r->get_cell_payload(*sk_row_meta_, 0, r_data, r_len); - int cmp = 0; - cmp = MEMCMP(l_data, r_data, min(l_len, r_len)); - less = cmp != 0 ? (cmp < 0) : (l_len - r_len) < 0; - } else if (CompareBase::FALLBACK_TO_DISABLE == encode_sk_state_ && has_addon) { - const Store_Row *l_real_cmp_row = l->get_addon_ptr(*sk_row_meta_); - const Store_Row *r_real_cmp_row = r->get_addon_ptr(*sk_row_meta_); - less = (compare(l_real_cmp_row, r_real_cmp_row, addon_row_meta_) > 0); - } else { - __builtin_prefetch(l, 0 /* read */, 2 /*high temp locality*/); - __builtin_prefetch(r, 0 /* read */, 2 /*high temp locality*/); - less = (compare(l, r, sk_row_meta_) > 0); - } + __builtin_prefetch(l, 0 /* read */, 2 /*high temp locality*/); + __builtin_prefetch(r, 0 /* read */, 2 /*high temp locality*/); + less = (compare(l, r, sk_row_meta_) > 0); } return less; } @@ -263,17 +253,9 @@ template bool SingleColCompare::operator()(const Store_Row *l, const Store_Row *r) { bool less = false; - int &ret = ret_; - if (OB_UNLIKELY(OB_SUCCESS != ret)) { - less = l < r; - } else if (OB_FAIL(fast_check_status())) { - SQL_ENG_LOG(WARN, "fast check failed", K(ret)); - less = l < r; - } else { - __builtin_prefetch(l, 0 /* read */, 2 /*high temp locality*/); - __builtin_prefetch(r, 0 /* read */, 2 /*high temp locality*/); - less = (compare(l, r, sk_row_meta_) > 0); - } + __builtin_prefetch(l, 0 /* read */, 2 /*high temp locality*/); + __builtin_prefetch(r, 0 /* read */, 2 /*high temp locality*/); + less = (compare(l, r, sk_row_meta_) > 0); return less; } @@ -497,17 +479,9 @@ template bool FixedCompare::operator()(const Store_Row *l, const Store_Row *r) { bool less = false; - int &ret = ret_; - if (OB_UNLIKELY(OB_SUCCESS != ret)) { - less = l < r; - } else if (OB_FAIL(fast_check_status())) { - SQL_ENG_LOG(WARN, "fast check failed", K(ret)); - less = l < r; - } else { - __builtin_prefetch(l, 0 /* read */, 2 /*high temp locality*/); - __builtin_prefetch(r, 0 /* read */, 2 /*high temp locality*/); - less = (compare(l, r, sk_row_meta_) > 0); - } + __builtin_prefetch(l, 0 /* read */, 2 /*high temp locality*/); + __builtin_prefetch(r, 0 /* read */, 2 /*high temp locality*/); + less = (compare(l, r, sk_row_meta_) > 0); return less; }