Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
糖糖糖糖糖糖糖糖糖糖糖糖糖糖糖糖糖糖
oceanbase
提交
d1138322
O
oceanbase
项目概览
糖糖糖糖糖糖糖糖糖糖糖糖糖糖糖糖糖糖
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d1138322
编写于
6月 16, 2021
作者:
B
bf
提交者:
MizuhaHimuraki
6月 16, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix charset log print bug
上级
d1a8226c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
20 addition
and
21 deletion
+20
-21
deps/oblib/src/lib/charset/ob_charset.cpp
deps/oblib/src/lib/charset/ob_charset.cpp
+20
-21
未找到文件。
deps/oblib/src/lib/charset/ob_charset.cpp
浏览文件 @
d1138322
...
...
@@ -898,7 +898,6 @@ int ObCharset::like_range(ObCollationType collation_type, const ObString& like_s
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
),
K
(
ObCharset
::
charset_arr
[
collation_type
]),
K
(
max_str
),
K
(
max_str_len
),
K
(
min_str
),
...
...
@@ -937,7 +936,7 @@ size_t ObCharset::strlen_char(const ObCollationType collation_type, const char*
size_t
ret
=
0
;
if
(
OB_UNLIKELY
(
collation_type
<=
CS_TYPE_INVALID
||
collation_type
>=
CS_TYPE_MAX
)
||
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
]));
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
collation_type
)
);
}
else
{
ObCharsetInfo
*
cs
=
static_cast
<
ObCharsetInfo
*>
(
ObCharset
::
charset_arr
[
collation_type
]);
if
(
OB_ISNULL
(
cs
->
cset
))
{
...
...
@@ -954,7 +953,7 @@ size_t ObCharset::strlen_byte_no_sp(const ObCollationType collation_type, const
size_t
ret
=
0
;
if
(
OB_UNLIKELY
(
collation_type
<=
CS_TYPE_INVALID
||
collation_type
>=
CS_TYPE_MAX
)
||
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
collation_type
));
}
else
{
ObCharsetInfo
*
cs
=
static_cast
<
ObCharsetInfo
*>
(
ObCharset
::
charset_arr
[
collation_type
]);
if
(
OB_ISNULL
(
cs
->
cset
))
{
...
...
@@ -973,7 +972,7 @@ int ObCharset::well_formed_len(
if
(
OB_UNLIKELY
(
collation_type
<=
CS_TYPE_INVALID
||
collation_type
>=
CS_TYPE_MAX
)
||
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
collation_type
));
}
else
if
(
OB_UNLIKELY
(
NULL
==
str
&&
0
!=
str_len
))
{
ret
=
OB_INVALID_ARGUMENT
;
LOG_WARN
(
"invalid argument, str is null and str_len is nonzero"
,
KP
(
str
),
K
(
str_len
),
K
(
ret
));
...
...
@@ -1003,7 +1002,7 @@ int ObCharset::well_formed_len(ObCollationType collation_type, const char* str,
if
(
OB_UNLIKELY
(
collation_type
<=
CS_TYPE_INVALID
||
collation_type
>=
CS_TYPE_MAX
)
||
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
collation_type
));
}
else
if
(
OB_UNLIKELY
(
NULL
==
str
&&
0
!=
str_len
))
{
ret
=
OB_INVALID_ARGUMENT
;
LOG_WARN
(
"invalid argument, str is null and str_len is nonzero"
,
KP
(
str
),
K
(
str_len
),
K
(
ret
));
...
...
@@ -1024,7 +1023,7 @@ size_t ObCharset::charpos(
size_t
ret
=
0
;
if
(
OB_UNLIKELY
(
collation_type
<=
CS_TYPE_INVALID
||
collation_type
>=
CS_TYPE_MAX
)
||
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
collation_type
));
}
else
{
ObCharsetInfo
*
cs
=
static_cast
<
ObCharsetInfo
*>
(
ObCharset
::
charset_arr
[
collation_type
]);
if
(
OB_ISNULL
(
cs
->
cset
))
{
...
...
@@ -1042,7 +1041,7 @@ size_t ObCharset::max_bytes_charpos(const ObCollationType collation_type, const
size_t
ret
=
0
;
if
(
OB_UNLIKELY
(
collation_type
<=
CS_TYPE_INVALID
||
collation_type
>=
CS_TYPE_MAX
)
||
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
collation_type
));
}
else
{
ObCharsetInfo
*
cs
=
static_cast
<
ObCharsetInfo
*>
(
ObCharset
::
charset_arr
[
collation_type
]);
if
(
OB_ISNULL
(
cs
->
cset
))
{
...
...
@@ -1062,7 +1061,7 @@ bool ObCharset::wildcmp(ObCollationType collation_type, const ObString& str, con
bool
ret
=
false
;
if
(
OB_UNLIKELY
(
collation_type
<=
CS_TYPE_INVALID
||
collation_type
>=
CS_TYPE_MAX
)
||
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
collation_type
));
}
else
{
ObCharsetInfo
*
cs
=
static_cast
<
ObCharsetInfo
*>
(
ObCharset
::
charset_arr
[
collation_type
]);
if
(
OB_ISNULL
(
cs
->
coll
))
{
...
...
@@ -1094,7 +1093,7 @@ int ObCharset::mb_wc(ObCollationType collation_type, const ObString& mb, int32_t
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
));
}
else
{
ObCharsetInfo
*
cs
=
static_cast
<
ObCharsetInfo
*>
(
ObCharset
::
charset_arr
[
collation_type
]);
ob_wc_t
res_wc
;
...
...
@@ -1124,7 +1123,7 @@ int ObCharset::mb_wc(
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
));
}
else
{
ObCharsetInfo
*
cs
=
static_cast
<
ObCharsetInfo
*>
(
ObCharset
::
charset_arr
[
collation_type
]);
ob_wc_t
res_wc
;
...
...
@@ -1154,7 +1153,7 @@ int ObCharset::display_len(ObCollationType collation_type, const ObString& mb, i
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
));
}
else
{
ObCharsetInfo
*
cs
=
static_cast
<
ObCharsetInfo
*>
(
ObCharset
::
charset_arr
[
collation_type
]);
if
(
OB_ISNULL
(
cs
->
cset
))
{
...
...
@@ -1199,7 +1198,7 @@ int ObCharset::max_display_width_charpos(ObCollationType collation_type, const c
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
));
}
else
{
ObCharsetInfo
*
cs
=
static_cast
<
ObCharsetInfo
*>
(
ObCharset
::
charset_arr
[
collation_type
]);
if
(
OB_ISNULL
(
cs
->
cset
))
{
...
...
@@ -1675,7 +1674,7 @@ bool ObCharset::is_bin_sort(ObCollationType collation_type)
if
(
OB_UNLIKELY
(
collation_type
<=
CS_TYPE_INVALID
||
collation_type
>=
CS_TYPE_MAX
)
||
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
));
}
else
{
ObCharsetInfo
*
cs
=
static_cast
<
ObCharsetInfo
*>
(
ObCharset
::
charset_arr
[
collation_type
]);
ret
=
(
0
!=
(
cs
->
state
&
OB_CS_BINSORT
));
...
...
@@ -1803,7 +1802,7 @@ int ObCharset::first_valid_char(
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
));
}
else
if
(
OB_UNLIKELY
(
NULL
==
buf
))
{
ret
=
OB_NOT_INIT
;
LOG_ERROR
(
"Null buffer passed in"
,
K
(
ret
),
K
(
buf
));
...
...
@@ -1994,7 +1993,7 @@ bool ObCharset::is_space(const ObCollationType collation_type, char c)
if
(
OB_UNLIKELY
(
collation_type
<=
CS_TYPE_INVALID
||
collation_type
>=
CS_TYPE_MAX
)
||
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
));
}
else
{
ObCharsetInfo
*
cs
=
static_cast
<
ObCharsetInfo
*>
(
ObCharset
::
charset_arr
[
collation_type
]);
ret
=
(
' '
==
c
);
...
...
@@ -2008,7 +2007,7 @@ bool ObCharset::is_graph(const ObCollationType collation_type, char c)
if
(
OB_UNLIKELY
(
collation_type
<=
CS_TYPE_INVALID
||
collation_type
>=
CS_TYPE_MAX
)
||
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
));
}
else
{
ObCharsetInfo
*
cs
=
static_cast
<
ObCharsetInfo
*>
(
ObCharset
::
charset_arr
[
collation_type
]);
ret
=
!!
(((
cs
)
->
ctype
+
1
)[(
unsigned
char
)(
c
)]
&
(
_MY_PNT
|
_MY_U
|
_MY_L
|
_MY_NMR
));
...
...
@@ -2022,7 +2021,7 @@ bool ObCharset::usemb(const ObCollationType collation_type)
if
(
OB_UNLIKELY
(
collation_type
<=
CS_TYPE_INVALID
||
collation_type
>=
CS_TYPE_MAX
)
||
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
));
}
else
{
ObCharsetInfo
*
cs
=
static_cast
<
ObCharsetInfo
*>
(
ObCharset
::
charset_arr
[
collation_type
]);
ret
=
(
NULL
!=
cs
->
cset
->
ismbchar
);
...
...
@@ -2036,7 +2035,7 @@ int ObCharset::is_mbchar(const ObCollationType collation_type, const char* str,
if
(
OB_UNLIKELY
(
collation_type
<=
CS_TYPE_INVALID
||
collation_type
>=
CS_TYPE_MAX
)
||
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
));
}
else
{
ObCharsetInfo
*
cs
=
static_cast
<
ObCharsetInfo
*>
(
ObCharset
::
charset_arr
[
collation_type
]);
if
(
NULL
!=
cs
->
cset
->
ismbchar
)
{
...
...
@@ -2064,7 +2063,7 @@ int ObCharset::get_mbmaxlen_by_coll(const ObCollationType collation_type, int64_
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
));
}
else
{
ObCharsetInfo
*
cs
=
static_cast
<
ObCharsetInfo
*>
(
ObCharset
::
charset_arr
[
collation_type
]);
mbmaxlen
=
cs
->
mbmaxlen
;
...
...
@@ -2079,7 +2078,7 @@ int ObCharset::get_mbminlen_by_coll(const ObCollationType collation_type, int64_
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
"unexpected error. invalid argument(s)"
,
K
(
ret
),
K
(
collation_type
));
}
else
{
ObCharsetInfo
*
cs
=
static_cast
<
ObCharsetInfo
*>
(
ObCharset
::
charset_arr
[
collation_type
]);
mbminlen
=
cs
->
mbminlen
;
...
...
@@ -2335,7 +2334,7 @@ bool ObCharset::is_cs_nonascii(ObCollationType collation_type)
bool
is_cs_nonascii
=
false
;
if
(
OB_UNLIKELY
(
collation_type
<=
CS_TYPE_INVALID
||
collation_type
>=
CS_TYPE_MAX
)
||
OB_ISNULL
(
ObCharset
::
charset_arr
[
collation_type
]))
{
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
collation_type
)
,
K
(
ObCharset
::
charset_arr
[
collation_type
])
);
LOG_ERROR
(
"unexpected error. invalid argument(s)"
,
K
(
collation_type
));
}
else
{
ObCharsetInfo
*
cs
=
static_cast
<
ObCharsetInfo
*>
(
ObCharset
::
charset_arr
[
collation_type
]);
is_cs_nonascii
=
!!
(
cs
->
state
&
OB_CS_NONASCII
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录