Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Messij2001
oceanbase
提交
490ce0a9
O
oceanbase
项目概览
Messij2001
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
2
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,发现更多精彩内容 >>
提交
490ce0a9
编写于
10月 13, 2021
作者:
X
xf0
提交者:
wangzelin.wzl
10月 13, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bugs of INET expr
上级
72122fbe
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
10 addition
and
11 deletion
+10
-11
src/sql/engine/expr/ob_expr_case.cpp
src/sql/engine/expr/ob_expr_case.cpp
+1
-1
src/sql/engine/expr/ob_expr_export_set.cpp
src/sql/engine/expr/ob_expr_export_set.cpp
+2
-2
src/sql/engine/expr/ob_expr_inet.cpp
src/sql/engine/expr/ob_expr_inet.cpp
+1
-1
src/sql/engine/expr/ob_expr_int2ip.h
src/sql/engine/expr/ob_expr_int2ip.h
+5
-6
src/sql/rewrite/ob_transform_pre_process.cpp
src/sql/rewrite/ob_transform_pre_process.cpp
+1
-1
未找到文件。
src/sql/engine/expr/ob_expr_case.cpp
浏览文件 @
490ce0a9
...
...
@@ -49,7 +49,7 @@ int ObExprCase::calc_result_typeN(
}
else
{
// param_num >=3 and param_num is odd
/* in order to be compatible with mysql
* both in ob_expr_cae.cpp and ob_expr_arg_case.cpp
* both in ob_expr_ca
s
e.cpp and ob_expr_arg_case.cpp
* types_stack includes the condition exprs.
* In expr_case, there is no arg param expr compared with expr_arg_case
*/
...
...
src/sql/engine/expr/ob_expr_export_set.cpp
浏览文件 @
490ce0a9
...
...
@@ -52,7 +52,7 @@ int ObExprExportSet::calc_result_typeN(ObExprResType& type, ObExprResType* types
int64_t
str_num
=
2
;
const
uint64_t
max_len
=
std
::
max
(
on_len
,
off_len
);
// when bits exceed uint_max or int_min, ob is not compatible to mysql.
types_array
[
0
].
set_calc_type
(
common
::
Ob
BitType
);
types_array
[
0
].
set_calc_type
(
common
::
Ob
UInt64Type
);
types_array
[
1
].
set_calc_type
(
common
::
ObVarcharType
);
types_array
[
2
].
set_calc_type
(
common
::
ObVarcharType
);
if
(
3
<
param_num
)
{
...
...
@@ -130,7 +130,7 @@ int ObExprExportSet::calc_export_set(ObObj& result, const ObObj& bits, const ObO
local_on
=
on
.
get_string
();
local_off
=
off
.
get_string
();
local_sep
=
sep
.
get_string
();
if
(
OB_FAIL
(
bits
.
get_
bit
(
local_bits
)))
{
if
(
OB_FAIL
(
bits
.
get_
uint64
(
local_bits
)))
{
LOG_WARN
(
"fail to get bit"
,
K
(
ret
),
K
(
bits
));
}
else
if
(
OB_FAIL
(
n_bits
.
get_int
(
local_n_bits
)))
{
LOG_WARN
(
"fail to get int"
,
K
(
ret
),
K
(
n_bits
));
...
...
src/sql/engine/expr/ob_expr_inet.cpp
浏览文件 @
490ce0a9
...
...
@@ -468,7 +468,7 @@ inline int ObExprInet6Ntoa::calc_result_type1(
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"session is null"
,
K
(
ret
));
}
else
{
type
.
set_collation_type
(
session
->
get_nls_collation
(
));
type
.
set_collation_type
(
get_default_collation_type
(
type
.
get_type
(),
*
type_ctx
.
get_session
()
));
}
return
ret
;
}
...
...
src/sql/engine/expr/ob_expr_int2ip.h
浏览文件 @
490ce0a9
...
...
@@ -39,16 +39,15 @@ private:
inline
int
ObExprInt2ip
::
calc_result_type1
(
ObExprResType
&
type
,
ObExprResType
&
text
,
common
::
ObExprTypeCtx
&
type_ctx
)
const
{
UNUSED
(
type_ctx
);
UNUSED
(
text
);
type_ctx
.
set_cast_mode
(
type_ctx
.
get_cast_mode
()
|
CM_STRING_INTEGER_TRUNC
);
text
.
set_calc_type
(
common
::
ObIntType
);
type
.
set_varchar
();
type
.
set_length
(
common
::
MAX_IP_ADDR_LENGTH
);
type
.
set_collation_level
(
common
::
CS_LEVEL_COERCIBLE
);
type
.
set_default_collation_type
();
// set calc type
text
.
set_calc_type
(
common
::
ObIntType
);
return
common
::
OB_SUCCESS
;
}
}
// namespace sql
}
// namespace oceanbase
}
}
#endif
/* OCEANBASE_SQL_ENGINE_EXPR_OB_EXPR_INT2IP_ */
src/sql/rewrite/ob_transform_pre_process.cpp
浏览文件 @
490ce0a9
...
...
@@ -3362,7 +3362,7 @@ int ObTransformPreProcess::create_equal_expr_for_case_expr(ObRawExprFactory& exp
int
ret
=
OB_SUCCESS
;
ObObjType
obj_type
=
ObMaxType
;
const
ObExprResType
&
arg_type
=
arg_expr
->
get_result_type
();
const
ObExprResType
&
when_type
=
arg
_expr
->
get_result_type
();
const
ObExprResType
&
when_type
=
when
_expr
->
get_result_type
();
ObRawExpr
*
new_when_expr
=
NULL
;
// cast expr may added
ObRawExpr
*
new_arg_expr
=
NULL
;
if
(
OB_ISNULL
(
arg_expr
)
||
OB_ISNULL
(
when_expr
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录