Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
aae19e1f
O
oceanbase
项目概览
Metz
/
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,发现更多精彩内容 >>
提交
aae19e1f
编写于
9月 13, 2022
作者:
O
obdev
提交者:
wangzelin.wzl
9月 13, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CP] [CP] Fix the core caused by accessing cur phy plan
上级
4e8d8231
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
11 deletion
+8
-11
src/observer/virtual_table/ob_virtual_open_cursor_table.cpp
src/observer/virtual_table/ob_virtual_open_cursor_table.cpp
+7
-3
src/sql/session/ob_basic_session_info.cpp
src/sql/session/ob_basic_session_info.cpp
+1
-6
src/sql/session/ob_basic_session_info.h
src/sql/session/ob_basic_session_info.h
+0
-2
未找到文件。
src/observer/virtual_table/ob_virtual_open_cursor_table.cpp
浏览文件 @
aae19e1f
...
...
@@ -59,13 +59,17 @@ bool ObVirtualOpenCursorTable::ObEachSessionId::operator()(
CK
(
OB_NOT_NULL
(
sess_info
));
CK
(
OB_NOT_NULL
(
allocator_
));
if
(
OB_SUCC
(
ret
))
{
char
*
sql_id
=
nullptr
;
sql
::
ObSQLSessionInfo
::
LockGuard
lock_guard
(
sess_info
->
get_thread_data_lock
());
if
(
OB_NOT_NULL
(
sess_info
->
get_cur_phy_plan
()))
{
vsp
.
version
=
sess_info
->
get_version
();
if
(
OB_ISNULL
(
sql_id
=
reinterpret_cast
<
char
*>
(
allocator_
->
alloc
(
common
::
OB_MAX_SQL_ID_LENGTH
+
1
))))
{
ret
=
OB_ALLOCATE_MEMORY_FAILED
;
SERVER_LOG
(
WARN
,
"failed to alloc buf"
,
K
(
ret
));
}
else
if
(
FALSE_IT
(
sess_info
->
get_cur_sql_id
(
sql_id
,
OB_MAX_SQL_ID_LENGTH
+
1
)))
{
}
else
if
(
sql_id
[
0
]
!=
'\0'
)
{
vsp
.
id
=
sess_info
->
get_sessid
();
vsp
.
addr
=
reinterpret_cast
<
uint64_t
>
(
sess_info
);
vsp
.
sql_id
.
assign
(
sql_id
,
common
::
OB_MAX_SQL_ID_LENGTH
);
OZ
(
ob_write_string
(
*
allocator_
,
sess_info
->
get_user_name
(),
vsp
.
user_name
));
OZ
(
ob_write_string
(
*
allocator_
,
sess_info
->
get_cur_phy_plan
()
->
stat_
.
sql_id_
,
vsp
.
sql_id
));
if
(
vsp
.
is_valid
())
{
SessionInfoArray
vsp_arr
;
OZ
(
sids_map_
.
get_refactored
(
vsp
.
sql_id
,
vsp_arr
));
...
...
src/sql/session/ob_basic_session_info.cpp
浏览文件 @
aae19e1f
...
...
@@ -1629,12 +1629,7 @@ int ObBasicSessionInfo::sys_variable_exists(const ObString& var, bool& is_exists
return
ret
;
}
ObPhysicalPlan
*
ObBasicSessionInfo
::
get_cur_phy_plan
()
const
{
return
cur_phy_plan_
;
}
int
ObBasicSessionInfo
::
set_cur_phy_plan
(
ObPhysicalPlan
*
cur_phy_plan
)
int
ObBasicSessionInfo
::
set_cur_phy_plan
(
ObPhysicalPlan
*
cur_phy_plan
)
{
int
ret
=
OB_SUCCESS
;
if
(
OB_ISNULL
(
cur_phy_plan
))
{
...
...
src/sql/session/ob_basic_session_info.h
浏览文件 @
aae19e1f
...
...
@@ -1030,8 +1030,6 @@ public:
int
clean_all_sys_vars
();
SysVarIncInfo
sys_var_inc_info_
;
// current executing physical plan
ObPhysicalPlan
*
get_cur_phy_plan
()
const
;
void
get_cur_sql_id
(
char
*
sql_id_buf
,
int64_t
sql_id_buf_size
)
const
;
int
set_cur_phy_plan
(
ObPhysicalPlan
*
cur_phy_plan
);
void
reset_cur_phy_plan_to_null
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录