Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大炮V587
oceanbase
提交
29ee4001
O
oceanbase
项目概览
大炮V587
/
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,发现更多精彩内容 >>
提交
29ee4001
编写于
6月 30, 2022
作者:
O
obdev
提交者:
wangzelin.wzl
6月 30, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CP] [CP] fix ps with timestamp parameter bug
上级
dffd24c7
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
21 addition
and
8 deletion
+21
-8
src/observer/mysql/obmp_stmt_execute.cpp
src/observer/mysql/obmp_stmt_execute.cpp
+9
-3
src/observer/mysql/obmp_stmt_execute.h
src/observer/mysql/obmp_stmt_execute.h
+5
-4
src/sql/code_generator/ob_static_engine_cg.cpp
src/sql/code_generator/ob_static_engine_cg.cpp
+1
-1
src/sql/engine/px/ob_px_coord.cpp
src/sql/engine/px/ob_px_coord.cpp
+3
-0
src/sql/engine/px/ob_px_coord_op.cpp
src/sql/engine/px/ob_px_coord_op.cpp
+3
-0
未找到文件。
src/observer/mysql/obmp_stmt_execute.cpp
浏览文件 @
29ee4001
...
...
@@ -1160,7 +1160,7 @@ int ObMPStmtExecute::parse_basic_param_value(ObIAllocator& allocator, const uint
case
MYSQL_TYPE_DATE
:
case
MYSQL_TYPE_DATETIME
:
case
MYSQL_TYPE_TIMESTAMP
:
{
if
(
OB_FAIL
(
parse_mysql_timestamp_value
(
static_cast
<
EMySQLFieldType
>
(
type
),
data
,
param
)))
{
if
(
OB_FAIL
(
parse_mysql_timestamp_value
(
static_cast
<
EMySQLFieldType
>
(
type
),
data
,
param
,
tz_info
)))
{
LOG_WARN
(
"parse timestamp value from client failed"
,
K
(
ret
));
}
break
;
...
...
@@ -1453,7 +1453,8 @@ int ObMPStmtExecute::copy_or_convert_str(common::ObIAllocator& allocator, const
return
ret
;
}
int
ObMPStmtExecute
::
parse_mysql_timestamp_value
(
const
EMySQLFieldType
field_type
,
const
char
*&
data
,
ObObj
&
param
)
int
ObMPStmtExecute
::
parse_mysql_timestamp_value
(
const
EMySQLFieldType
field_type
,
const
char
*&
data
,
ObObj
&
param
,
const
common
::
ObTimeZoneInfo
*
tz_info
)
{
int
ret
=
OB_SUCCESS
;
int8_t
length
=
0
;
...
...
@@ -1524,7 +1525,12 @@ int ObMPStmtExecute::parse_mysql_timestamp_value(const EMySQLFieldType field_typ
}
if
(
OB_SUCC
(
ret
))
{
if
(
field_type
==
MYSQL_TYPE_TIMESTAMP
)
{
param
.
set_timestamp
(
value
);
int64_t
ts_value
=
0
;
if
(
OB_FAIL
(
ObTimeConverter
::
datetime_to_timestamp
(
value
,
tz_info
,
ts_value
)))
{
LOG_WARN
(
"datetime to timestamp failed"
,
K
(
ret
));
}
else
{
param
.
set_timestamp
(
ts_value
);
}
}
else
if
(
field_type
==
MYSQL_TYPE_DATETIME
)
{
param
.
set_datetime
(
value
);
}
else
if
(
field_type
==
MYSQL_TYPE_DATE
)
{
...
...
src/observer/mysql/obmp_stmt_execute.h
浏览文件 @
29ee4001
...
...
@@ -42,10 +42,11 @@ public:
// Parse basic param value, no MYSQL_TYPE_COMPLEX or MYSQL_TYPE_CURSOR.
// see parse_param_value()
static
int
parse_basic_param_value
(
ObIAllocator
&
allocator
,
const
uint32_t
type
,
const
ObCharsetType
charset
,
const
ObCollationType
cs_type
,
const
ObCollationType
ncs_type
,
const
char
*&
data
,
const
common
::
ObTimeZoneInfo
*
tz_info
,
ObObj
&
param
);
static
int
parse_mysql_timestamp_value
(
const
obmysql
::
EMySQLFieldType
field_type
,
const
char
*&
data
,
ObObj
&
param
);
static
int
parse_basic_param_value
(
ObIAllocator
&
allocator
,
const
uint32_t
type
,
const
ObCharsetType
charset
,
const
ObCollationType
cs_type
,
const
ObCollationType
ncs_type
,
const
char
*&
data
,
const
common
::
ObTimeZoneInfo
*
tz_info
,
ObObj
&
param
);
static
int
parse_mysql_timestamp_value
(
const
obmysql
::
EMySQLFieldType
field_type
,
const
char
*&
data
,
ObObj
&
param
,
const
common
::
ObTimeZoneInfo
*
tz_info
);
static
int
parse_oracle_timestamp_value
(
const
obmysql
::
EMySQLFieldType
field_type
,
const
char
*&
data
,
const
ObTimeConvertCtx
&
cvrt_ctx
,
ObObj
&
param
);
static
int
parse_mysql_time_value
(
const
char
*&
data
,
ObObj
&
param
);
...
...
src/sql/code_generator/ob_static_engine_cg.cpp
浏览文件 @
29ee4001
...
...
@@ -1156,7 +1156,7 @@ int ObStaticEngineCG::fill_sort_funcs(
if
(
OB_FAIL
(
sort_funcs
.
init
(
collations
.
count
())))
{
LOG_WARN
(
"failed to init sort functions"
,
K
(
ret
));
}
else
{
for
(
int64_t
i
=
0
;
i
<
collations
.
count
();
++
i
)
{
for
(
int64_t
i
=
0
;
i
<
collations
.
count
()
&&
OB_SUCC
(
ret
)
;
++
i
)
{
const
ObSortFieldCollation
&
sort_collation
=
collations
.
at
(
i
);
ObExpr
*
expr
=
nullptr
;
if
(
OB_FAIL
(
sort_exprs
.
at
(
sort_collation
.
field_idx_
,
expr
)))
{
...
...
src/sql/engine/px/ob_px_coord.cpp
浏览文件 @
29ee4001
...
...
@@ -158,6 +158,7 @@ int ObPxCoord::rescan(ObExecContext& ctx) const
LOG_WARN
(
"get physical operator context failed"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
terminate_running_dfos
(
ctx
,
px_ctx
->
coord_info_
.
dfo_mgr_
)))
{
LOG_WARN
(
"fail to release px resources in QC inner_close"
,
K
(
ret
));
}
else
if
(
FALSE_IT
(
clear_interrupt
(
px_ctx
)))
{
}
else
if
(
OB_FAIL
(
destroy_all_channel
(
*
px_ctx
)))
{
LOG_WARN
(
"release dtl channel failed"
,
K
(
ret
));
}
else
if
(
FALSE_IT
(
unregister_first_buffer_cache
(
ctx
,
*
px_ctx
)))
{
...
...
@@ -166,6 +167,8 @@ int ObPxCoord::rescan(ObExecContext& ctx) const
LOG_WARN
(
"failed to free allocator"
,
K
(
ret
));
}
else
if
(
FALSE_IT
(
px_ctx
->
reset_for_rescan
()))
{
// nop
}
else
if
(
OB_FAIL
(
register_interrupt
(
px_ctx
)))
{
LOG_WARN
(
"fail to register interrupt"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
init_dfo_mgr
(
ObDfoInterruptIdGen
(
px_ctx
->
interrupt_id_
,
(
uint32_t
)
GCTX
.
server_id_
,
(
uint32_t
)
px_ctx
->
qc_id_
,
...
...
src/sql/engine/px/ob_px_coord_op.cpp
浏览文件 @
29ee4001
...
...
@@ -147,6 +147,7 @@ int ObPxCoordOp::rescan()
ObDfo
*
root_dfo
=
NULL
;
if
(
OB_FAIL
(
terminate_running_dfos
(
coord_info_
.
dfo_mgr_
)))
{
LOG_WARN
(
"fail to release px resources in QC inner_close"
,
K
(
ret
));
}
else
if
(
FALSE_IT
(
clear_interrupt
()))
{
}
else
if
(
OB_FAIL
(
destroy_all_channel
()))
{
LOG_WARN
(
"release dtl channel failed"
,
K
(
ret
));
}
else
if
(
FALSE_IT
(
unregister_first_buffer_cache
()))
{
...
...
@@ -155,6 +156,8 @@ int ObPxCoordOp::rescan()
LOG_WARN
(
"failed to free allocator"
,
K
(
ret
));
}
else
if
(
FALSE_IT
(
reset_for_rescan
()))
{
// nop
}
else
if
(
OB_FAIL
(
register_interrupt
()))
{
LOG_WARN
(
"fail to register interrupt"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
init_dfo_mgr
(
ObDfoInterruptIdGen
(
interrupt_id_
,
(
uint32_t
)
GCTX
.
server_id_
,
(
uint32_t
)(
static_cast
<
const
ObPxCoordSpec
*>
(
&
get_spec
()))
->
qc_id_
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录