Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
知世而放
oceanbase
提交
3750fc40
O
oceanbase
项目概览
知世而放
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3750fc40
编写于
10月 26, 2022
作者:
O
obdev
提交者:
wangzelin.wzl
10月 26, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[to #45700625] open_cursor deep copy
上级
82be6c8d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
4 deletion
+6
-4
src/observer/virtual_table/ob_virtual_open_cursor_table.cpp
src/observer/virtual_table/ob_virtual_open_cursor_table.cpp
+2
-2
src/sql/ob_result_set.cpp
src/sql/ob_result_set.cpp
+3
-1
src/sql/ob_sql.cpp
src/sql/ob_sql.cpp
+1
-1
未找到文件。
src/observer/virtual_table/ob_virtual_open_cursor_table.cpp
浏览文件 @
3750fc40
...
...
@@ -169,6 +169,7 @@ int ObVirtualOpenCursorTable::FillScanner::fill_session_cursor_cell(ObSQLSession
const
int64_t
col_count
=
output_column_ids_
.
count
();
ObCharsetType
default_charset
=
ObCharset
::
get_default_charset
();
ObCollationType
default_collation
=
ObCharset
::
get_default_collation
(
default_charset
);
char
sql_id
[
common
::
OB_MAX_SQL_ID_LENGTH
+
1
];
for
(
int64_t
i
=
0
;
OB_SUCC
(
ret
)
&&
i
<
col_count
;
++
i
)
{
const
uint64_t
col_id
=
output_column_ids_
.
at
(
i
);
switch
(
col_id
)
{
...
...
@@ -220,7 +221,6 @@ int ObVirtualOpenCursorTable::FillScanner::fill_session_cursor_cell(ObSQLSession
break
;
}
case
SQL_ID
:
{
char
sql_id
[
common
::
OB_MAX_SQL_ID_LENGTH
+
1
];
if
(
obmysql
::
COM_QUERY
==
sess_info
.
get_mysql_cmd
()
||
obmysql
::
COM_STMT_EXECUTE
==
sess_info
.
get_mysql_cmd
()
||
obmysql
::
COM_STMT_PREPARE
==
sess_info
.
get_mysql_cmd
()
||
...
...
@@ -303,6 +303,7 @@ int ObVirtualOpenCursorTable::FillScanner::fill_cur_plan_cell(ObSQLSessionInfo &
const
int64_t
col_count
=
output_column_ids_
.
count
();
ObCharsetType
default_charset
=
ObCharset
::
get_default_charset
();
ObCollationType
default_collation
=
ObCharset
::
get_default_collation
(
default_charset
);
char
sql_id
[
common
::
OB_MAX_SQL_ID_LENGTH
+
1
];
for
(
int64_t
i
=
0
;
OB_SUCC
(
ret
)
&&
i
<
col_count
;
++
i
)
{
const
uint64_t
col_id
=
output_column_ids_
.
at
(
i
);
switch
(
col_id
)
{
...
...
@@ -354,7 +355,6 @@ int ObVirtualOpenCursorTable::FillScanner::fill_cur_plan_cell(ObSQLSessionInfo &
break
;
}
case
SQL_ID
:
{
char
sql_id
[
common
::
OB_MAX_SQL_ID_LENGTH
+
1
];
if
(
obmysql
::
COM_QUERY
==
sess_info
.
get_mysql_cmd
()
||
obmysql
::
COM_STMT_EXECUTE
==
sess_info
.
get_mysql_cmd
()
||
obmysql
::
COM_STMT_PREPARE
==
sess_info
.
get_mysql_cmd
()
||
...
...
src/sql/ob_result_set.cpp
浏览文件 @
3750fc40
...
...
@@ -902,7 +902,7 @@ int ObResultSet::from_plan(const ObPhysicalPlan &phy_plan, const ObIArray<ObPCPa
literal_stmt_type_
=
phy_plan
.
get_literal_stmt_type
();
is_returning_
=
phy_plan
.
is_returning
();
plan_ctx
->
set_is_affect_found_row
(
phy_plan
.
is_affect_found_row
());
if
(
plan_ctx
->
is_ps_protocol
()
&&
ps_param_count
!=
phy_plan
.
get_param_fields
().
count
())
{
if
(
is_ps_protocol
()
&&
ps_param_count
!=
phy_plan
.
get_param_fields
().
count
())
{
if
(
OB_FAIL
(
reserve_param_columns
(
ps_param_count
)))
{
LOG_WARN
(
"reserve param columns failed"
,
K
(
ret
),
K
(
ps_param_count
));
}
...
...
@@ -912,6 +912,8 @@ int ObResultSet::from_plan(const ObPhysicalPlan &phy_plan, const ObIArray<ObPCPa
param_field
.
cname_
=
ObString
::
make_string
(
"?"
);
OZ
(
add_param_column
(
param_field
),
K
(
param_field
),
K
(
i
),
K
(
ps_param_count
));
}
LOG_DEBUG
(
"reset param count "
,
K
(
ps_param_count
),
K
(
plan_ctx
->
get_orig_question_mark_cnt
()),
K
(
phy_plan
.
get_returning_param_fields
().
count
()),
K
(
phy_plan
.
get_param_fields
().
count
()));
}
else
{
p_param_columns_
=
&
phy_plan
.
get_param_fields
();
}
...
...
src/sql/ob_sql.cpp
浏览文件 @
3750fc40
...
...
@@ -1502,6 +1502,7 @@ int ObSql::handle_ps_execute(const ObPsStmtId client_stmt_id,
ObPsStmtInfoGuard
guard
;
ObPsStmtInfo
*
ps_info
=
NULL
;
pctx
->
set_original_param_cnt
(
origin_params_count
);
pctx
->
set_orig_question_mark_cnt
(
origin_params_count
);
if
(
OB_FAIL
(
ps_cache
->
get_stmt_info_guard
(
inner_stmt_id
,
guard
)))
{
LOG_WARN
(
"get stmt info guard failed"
,
K
(
ret
),
K
(
inner_stmt_id
));
}
else
if
(
OB_ISNULL
(
ps_info
=
guard
.
get_stmt_info
()))
{
...
...
@@ -1539,7 +1540,6 @@ int ObSql::handle_ps_execute(const ObPsStmtId client_stmt_id,
#endif
if
(
!
ps_info
->
get_fixed_raw_params
().
empty
())
{
pctx
->
set_is_ps_rewrite_sql
();
pctx
->
set_orig_question_mark_cnt
(
origin_params_count
);
}
if
(
OB_FAIL
(
session
.
store_query_string
(
sql
)))
{
LOG_WARN
(
"store query string fail"
,
K
(
ret
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录