Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大炮V587
oceanbase
提交
e01e4207
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,发现更多精彩内容 >>
提交
e01e4207
编写于
12月 06, 2022
作者:
O
obdev
提交者:
ob-robot
1月 12, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix remote execution error 4016
上级
196359d8
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
22 addition
and
5 deletion
+22
-5
src/sql/engine/ob_physical_plan_ctx.cpp
src/sql/engine/ob_physical_plan_ctx.cpp
+1
-0
src/sql/engine/ob_physical_plan_ctx.h
src/sql/engine/ob_physical_plan_ctx.h
+2
-0
src/sql/executor/ob_task.cpp
src/sql/executor/ob_task.cpp
+3
-0
src/sql/ob_sql.cpp
src/sql/ob_sql.cpp
+9
-1
src/sql/plan_cache/ob_plan_cache_struct.h
src/sql/plan_cache/ob_plan_cache_struct.h
+4
-1
src/sql/resolver/dml/ob_select_resolver.cpp
src/sql/resolver/dml/ob_select_resolver.cpp
+1
-1
src/sql/resolver/ob_resolver_define.h
src/sql/resolver/ob_resolver_define.h
+2
-2
未找到文件。
src/sql/engine/ob_physical_plan_ctx.cpp
浏览文件 @
e01e4207
...
...
@@ -35,6 +35,7 @@ DEF_TO_STRING(ObRemoteSqlInfo)
J_OBJ_START
();
J_KV
(
K_
(
use_ps
),
K_
(
is_batched_stmt
),
K_
(
is_original_ps_mode
),
K_
(
ps_param_cnt
),
K_
(
remote_sql
));
J_COMMA
();
...
...
src/sql/engine/ob_physical_plan_ctx.h
浏览文件 @
e01e4207
...
...
@@ -53,6 +53,7 @@ struct ObRemoteSqlInfo
ObRemoteSqlInfo
()
:
use_ps_
(
false
),
is_batched_stmt_
(
false
),
is_original_ps_mode_
(
false
),
ps_param_cnt_
(
0
),
remote_sql_
(),
ps_params_
(
nullptr
)
...
...
@@ -63,6 +64,7 @@ struct ObRemoteSqlInfo
bool
use_ps_
;
bool
is_batched_stmt_
;
bool
is_original_ps_mode_
;
int32_t
ps_param_cnt_
;
common
::
ObString
remote_sql_
;
ParamStore
*
ps_params_
;
...
...
src/sql/executor/ob_task.cpp
浏览文件 @
e01e4207
...
...
@@ -331,6 +331,7 @@ OB_DEF_SERIALIZE(ObRemoteTask)
for
(
int64_t
i
=
0
;
OB_SUCC
(
ret
)
&&
i
<
param_meta_count
;
++
i
)
{
OB_UNIS_ENCODE
(
ps_params
->
at
(
i
).
get_param_flag
());
}
OB_UNIS_ENCODE
(
remote_sql_info_
->
is_original_ps_mode_
);
return
ret
;
}
...
...
@@ -367,6 +368,7 @@ OB_DEF_SERIALIZE_SIZE(ObRemoteTask)
for
(
int64_t
i
=
0
;
i
<
param_meta_count
;
++
i
)
{
OB_UNIS_ADD_LEN
(
ps_params
->
at
(
i
).
get_param_flag
());
}
OB_UNIS_ADD_LEN
(
remote_sql_info_
->
is_original_ps_mode_
);
}
return
len
;
}
...
...
@@ -429,6 +431,7 @@ OB_DEF_DESERIALIZE(ObRemoteTask)
}
}
}
OB_UNIS_DECODE
(
remote_sql_info_
->
is_original_ps_mode_
);
}
return
ret
;
}
...
...
src/sql/ob_sql.cpp
浏览文件 @
e01e4207
...
...
@@ -1685,6 +1685,7 @@ int ObSql::handle_remote_query(const ObRemoteSqlInfo &remote_sql_info,
pc_ctx
->
fp_result_
.
pc_key_
.
key_id_
=
0
;
pc_ctx
->
fp_result_
.
pc_key_
.
name_
=
trimed_stmt
;
pc_ctx
->
normal_parse_const_cnt_
=
remote_sql_info
.
ps_params_
->
count
();
pc_ctx
->
is_original_ps_mode_
=
remote_sql_info
.
is_original_ps_mode_
;
pc_ctx
->
set_is_ps_execute_stage
();
if
(
OB_FAIL
(
construct_param_store
(
*
remote_sql_info
.
ps_params_
,
param_store
)))
{
LOG_WARN
(
"construct param store failed"
,
K
(
ret
));
...
...
@@ -2044,7 +2045,13 @@ int ObSql::generate_stmt(ParseResult &parse_result,
resolver_ctx
.
is_ddl_from_primary_
=
context
.
is_ddl_from_primary_
;
resolver_ctx
.
is_cursor_
=
context
.
is_cursor_
;
resolver_ctx
.
is_batch_stmt_
=
context
.
multi_stmt_item_
.
is_batched_multi_stmt
();
resolver_ctx
.
is_by_ordinal_
=
parse_result
.
question_mark_ctx_
.
by_ordinal_
;
if
(
NULL
!=
pc_ctx
&&
pc_ctx
->
is_remote_executor_
)
{
resolver_ctx
.
need_check_col_dup_
=
!
(
context
.
is_prepare_protocol_
&&
parse_result
.
question_mark_ctx_
.
by_ordinal_
&&
pc_ctx
->
is_original_ps_mode_
);
}
else
{
resolver_ctx
.
need_check_col_dup_
=
!
(
context
.
is_prepare_protocol_
&&
parse_result
.
question_mark_ctx_
.
by_ordinal_
);
}
resolver_ctx
.
external_param_info_
.
by_name_
=
parse_result
.
question_mark_ctx_
.
by_name_
||
NULL
!=
context
.
secondary_namespace_
;
//static sql in PL must be by name
resolver_ctx
.
outline_parse_result_
=
outline_parse_result
;
...
...
@@ -3577,6 +3584,7 @@ int ObSql::after_get_plan(ObPlanCacheCtx &pc_ctx,
param_store
.
pop_back
();
}
pctx
->
get_remote_sql_info
().
use_ps_
=
true
;
pctx
->
get_remote_sql_info
().
is_original_ps_mode_
=
true
;
//从ps sql info中取出要执行的sql
pctx
->
get_remote_sql_info
().
remote_sql_
=
pc_ctx
.
sql_ctx_
.
cur_sql_
;
pctx
->
get_remote_sql_info
().
ps_params_
=
&
param_store
;
...
...
src/sql/plan_cache/ob_plan_cache_struct.h
浏览文件 @
e01e4207
...
...
@@ -293,6 +293,7 @@ struct ObPlanCacheCtx : public ObILibCacheCtx
fixed_param_idx_
(
allocator
),
need_add_obj_stat_
(
true
),
is_inner_sql_
(
false
),
is_original_ps_mode_
(
false
),
ab_params_
(
NULL
)
{
fp_result_
.
pc_key_
.
is_ps_mode_
=
is_ps_mode_
;
...
...
@@ -351,7 +352,8 @@ struct ObPlanCacheCtx : public ObILibCacheCtx
K
(
ps_need_parameterized_
),
K
(
fixed_param_idx_
),
K
(
need_add_obj_stat_
),
K
(
is_inner_sql_
)
K
(
is_inner_sql_
),
K
(
is_original_ps_mode_
)
);
bool
is_ps_mode_
;
//control use which variables to do match
...
...
@@ -398,6 +400,7 @@ struct ObPlanCacheCtx : public ObILibCacheCtx
common
::
ObFixedArray
<
int64_t
,
common
::
ObIAllocator
>
fixed_param_idx_
;
bool
need_add_obj_stat_
;
bool
is_inner_sql_
;
bool
is_original_ps_mode_
;
ParamStore
*
ab_params_
;
// arraybinding batch parameters,
};
...
...
src/sql/resolver/dml/ob_select_resolver.cpp
浏览文件 @
e01e4207
...
...
@@ -2373,7 +2373,7 @@ int ObSelectResolver::is_need_check_col_dup(const ObRawExpr *expr, bool &need_ch
if
(
OB_ISNULL
(
expr
))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"is null"
,
K
(
ret
));
}
else
if
(
!
params_
.
is_prepare_protocol_
||
!
params_
.
is_by_ordinal
_
)
{
}
else
if
(
params_
.
need_check_col_dup
_
)
{
need_check
=
true
;
}
else
if
(
T_QUESTIONMARK
==
expr
->
get_expr_type
())
{
need_check
=
false
;
...
...
src/sql/resolver/ob_resolver_define.h
浏览文件 @
e01e4207
...
...
@@ -341,7 +341,7 @@ struct ObResolverParams
hidden_column_scope_
(
T_NONE_SCOPE
),
outline_parse_result_
(
NULL
),
is_execute_call_stmt_
(
false
),
is_by_ordinal_
(
fals
e
)
need_check_col_dup_
(
tru
e
)
{}
bool
is_force_trace_log
()
{
return
force_trace_log_
;
}
...
...
@@ -404,7 +404,7 @@ public:
ObStmtScope
hidden_column_scope_
;
// record scope for first hidden column which need check hidden_column_visable in opt_param hint
ParseResult
*
outline_parse_result_
;
bool
is_execute_call_stmt_
;
bool
is_by_ordinal
_
;
bool
need_check_col_dup
_
;
};
}
// end namespace sql
}
// end namespace oceanbase
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录