提交 4c044554 编写于 作者: O obdev 提交者: wangzelin.wzl

fix collation free compare with rowkey helper

上级 025f70b8
...@@ -120,7 +120,12 @@ int ObRowkeyObjComparer::sstable_oracle_collation_free_cmp_func( ...@@ -120,7 +120,12 @@ int ObRowkeyObjComparer::sstable_oracle_collation_free_cmp_func(
// int32_t is always capable of stroing the max lenth of varchar or char // int32_t is always capable of stroing the max lenth of varchar or char
for (int32_t i = 0; i < left_len; ++i) { for (int32_t i = 0; i < left_len; ++i) {
if (*(uptr + i) != ' ') { if (*(uptr + i) != ' ') {
cmp = lhs_len > cmp_len ? ObObjCmpFuncs::CR_GT : ObObjCmpFuncs::CR_LT; // mysql特殊行为:a\1 < a,但ab > a
if (*(uptr + i) < ' ') {
cmp = lhs_len > cmp_len ? ObObjCmpFuncs::CR_LT : ObObjCmpFuncs::CR_GT;
} else {
cmp = lhs_len > cmp_len ? ObObjCmpFuncs::CR_GT : ObObjCmpFuncs::CR_LT;
}
break; break;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册