Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
oceanbase
提交
42115c7d
O
oceanbase
项目概览
oceanbase
/
oceanbase
大约 1 年 前同步成功
通知
261
Star
6084
Fork
1301
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
42115c7d
编写于
4月 29, 2024
作者:
O
obdev
提交者:
ob-robot
4月 29, 2024
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CP] FIX: fix the core induced by foreign key handle overwrite the datum pointer of expr in DML op
上级
e6d29d0b
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
15 addition
and
11 deletion
+15
-11
src/observer/ob_inner_sql_connection.h
src/observer/ob_inner_sql_connection.h
+0
-4
src/sql/engine/dml/ob_dml_service.cpp
src/sql/engine/dml/ob_dml_service.cpp
+12
-3
src/sql/engine/dml/ob_table_modify_op.cpp
src/sql/engine/dml/ob_table_modify_op.cpp
+1
-0
src/sql/engine/dml/ob_table_modify_op.h
src/sql/engine/dml/ob_table_modify_op.h
+2
-4
未找到文件。
src/observer/ob_inner_sql_connection.h
浏览文件 @
42115c7d
...
@@ -263,10 +263,6 @@ public:
...
@@ -263,10 +263,6 @@ public:
SavedValue
&
saved_conn
,
bool
skip_cur_stmt_tables
);
SavedValue
&
saved_conn
,
bool
skip_cur_stmt_tables
);
int
end_nested_session
(
sql
::
ObSQLSessionInfo
::
StmtSavedValue
&
saved_session
,
int
end_nested_session
(
sql
::
ObSQLSessionInfo
::
StmtSavedValue
&
saved_session
,
SavedValue
&
saved_conn
);
SavedValue
&
saved_conn
);
int
set_foreign_key_cascade
(
bool
is_cascade
);
int
get_foreign_key_cascade
(
bool
&
is_cascade
)
const
;
int
set_foreign_key_check_exist
(
bool
is_check_exist
);
int
get_foreign_key_check_exist
(
bool
&
is_check_exist
)
const
;
bool
is_extern_session
()
const
{
return
NULL
!=
extern_session_
;
}
bool
is_extern_session
()
const
{
return
NULL
!=
extern_session_
;
}
bool
is_inner_session
()
const
{
return
NULL
==
extern_session_
;
}
bool
is_inner_session
()
const
{
return
NULL
==
extern_session_
;
}
bool
is_spi_conn
()
const
{
return
is_spi_conn_
;
}
bool
is_spi_conn
()
const
{
return
is_spi_conn_
;
}
...
...
src/sql/engine/dml/ob_dml_service.cpp
浏览文件 @
42115c7d
...
@@ -2198,9 +2198,14 @@ int ObDMLService::handle_after_processing_multi_row(ObDMLModifyRowsList *dml_mod
...
@@ -2198,9 +2198,14 @@ int ObDMLService::handle_after_processing_multi_row(ObDMLModifyRowsList *dml_mod
const
ObDmlEventType
t_insert
=
ObDmlEventType
::
DE_INSERTING
;
const
ObDmlEventType
t_insert
=
ObDmlEventType
::
DE_INSERTING
;
const
ObDmlEventType
t_update
=
ObDmlEventType
::
DE_UPDATING
;
const
ObDmlEventType
t_update
=
ObDmlEventType
::
DE_UPDATING
;
const
ObDmlEventType
t_delete
=
ObDmlEventType
::
DE_DELETING
;
const
ObDmlEventType
t_delete
=
ObDmlEventType
::
DE_DELETING
;
if
(
OB_ISNULL
(
dml_modify_rows
)
||
OB_ISNULL
(
dml_op
))
{
if
(
OB_ISNULL
(
dml_modify_rows
)
||
OB_ISNULL
(
dml_op
)
||
OB_ISNULL
(
dml_op
->
get_child
())
)
{
ret
=
OB_ERR_UNEXPECTED
;
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"dml operator or modify rows list is null"
,
K
(
dml_modify_rows
),
K
(
dml_op
));
LOG_WARN
(
"dml operator or modify rows list is null"
,
K
(
dml_modify_rows
),
K
(
dml_op
));
}
else
if
(
OB_ISNULL
(
dml_op
->
last_store_row_
.
get_store_row
())
&&
OB_FAIL
(
dml_op
->
last_store_row_
.
init
(
dml_op
->
get_exec_ctx
().
get_allocator
(),
dml_op
->
get_child
()
->
get_spec
().
output_
.
count
())))
{
LOG_WARN
(
"failed to init shadow stored row"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
dml_op
->
last_store_row_
.
shadow_copy
(
dml_op
->
get_child
()
->
get_spec
().
output_
,
dml_op
->
get_eval_ctx
())))
{
LOG_WARN
(
"failed to backup the datum ptr of child operator"
,
K
(
ret
));
}
else
{
}
else
{
ObDMLModifyRowsList
::
iterator
row_iter
=
dml_modify_rows
->
begin
();
ObDMLModifyRowsList
::
iterator
row_iter
=
dml_modify_rows
->
begin
();
for
(;
OB_SUCC
(
ret
)
&&
row_iter
!=
dml_modify_rows
->
end
();
row_iter
++
)
{
for
(;
OB_SUCC
(
ret
)
&&
row_iter
!=
dml_modify_rows
->
end
();
row_iter
++
)
{
...
@@ -2260,8 +2265,12 @@ int ObDMLService::handle_after_processing_multi_row(ObDMLModifyRowsList *dml_mod
...
@@ -2260,8 +2265,12 @@ int ObDMLService::handle_after_processing_multi_row(ObDMLModifyRowsList *dml_mod
}
}
// check the result of batch foreign key check results
// check the result of batch foreign key check results
if
(
OB_SUCC
(
ret
)
&&
dml_op
->
get_spec
().
check_fk_batch_
&&
OB_FAIL
(
dml_op
->
perform_batch_fk_check
()))
{
if
(
OB_SUCC
(
ret
))
{
if
(
dml_op
->
get_spec
().
check_fk_batch_
&&
OB_FAIL
(
dml_op
->
perform_batch_fk_check
()))
{
LOG_WARN
(
"failed to perform batch foreign key check"
,
K
(
ret
));
LOG_WARN
(
"failed to perform batch foreign key check"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
dml_op
->
last_store_row_
.
restore
(
dml_op
->
get_child
()
->
get_spec
().
output_
,
dml_op
->
get_eval_ctx
())))
{
LOG_WARN
(
"failed to restore the datum ptr"
,
K
(
ret
));
}
}
}
}
}
return
ret
;
return
ret
;
...
...
src/sql/engine/dml/ob_table_modify_op.cpp
浏览文件 @
42115c7d
...
@@ -675,6 +675,7 @@ ObTableModifyOp::ObTableModifyOp(ObExecContext &ctx,
...
@@ -675,6 +675,7 @@ ObTableModifyOp::ObTableModifyOp(ObExecContext &ctx,
execute_single_row_
(
false
),
execute_single_row_
(
false
),
err_log_rt_def_
(),
err_log_rt_def_
(),
dml_modify_rows_
(
ctx
.
get_allocator
()),
dml_modify_rows_
(
ctx
.
get_allocator
()),
last_store_row_
(),
saved_session_
(
NULL
)
saved_session_
(
NULL
)
{
{
obj_print_params_
=
CREATE_OBJ_PRINT_PARAM
(
ctx_
.
get_my_session
());
obj_print_params_
=
CREATE_OBJ_PRINT_PARAM
(
ctx_
.
get_my_session
());
...
...
src/sql/engine/dml/ob_table_modify_op.h
浏览文件 @
42115c7d
...
@@ -206,6 +206,7 @@ public:
...
@@ -206,6 +206,7 @@ public:
dml_rtctx_
.
cleanup
();
dml_rtctx_
.
cleanup
();
trigger_clear_exprs_
.
reset
();
trigger_clear_exprs_
.
reset
();
fk_checkers_
.
reset
();
fk_checkers_
.
reset
();
last_store_row_
.
reset
();
ObOperator
::
destroy
();
ObOperator
::
destroy
();
}
}
...
@@ -214,10 +215,6 @@ public:
...
@@ -214,10 +215,6 @@ public:
int
close_inner_conn
();
int
close_inner_conn
();
int
begin_nested_session
(
bool
skip_cur_stmt_tables
);
int
begin_nested_session
(
bool
skip_cur_stmt_tables
);
int
end_nested_session
();
int
end_nested_session
();
int
set_foreign_key_cascade
(
bool
is_cascade
);
int
get_foreign_key_cascade
(
bool
&
is_cascade
)
const
;
int
set_foreign_key_check_exist
(
bool
is_check_exist
);
int
get_foreign_key_check_exist
(
bool
&
is_check_exist
)
const
;
int
execute_write
(
const
char
*
sql
);
int
execute_write
(
const
char
*
sql
);
int
execute_read
(
const
char
*
sql
,
common
::
ObMySQLProxy
::
MySQLResult
&
res
);
int
execute_read
(
const
char
*
sql
,
common
::
ObMySQLProxy
::
MySQLResult
&
res
);
int
check_stack
();
int
check_stack
();
...
@@ -292,6 +289,7 @@ public:
...
@@ -292,6 +289,7 @@ public:
ObSEArray
<
ObExpr
*
,
4
>
trigger_clear_exprs_
;
ObSEArray
<
ObExpr
*
,
4
>
trigger_clear_exprs_
;
ObDMLModifyRowsList
dml_modify_rows_
;
ObDMLModifyRowsList
dml_modify_rows_
;
ObSEArray
<
ObForeignKeyChecker
*
,
4
>
fk_checkers_
;
ObSEArray
<
ObForeignKeyChecker
*
,
4
>
fk_checkers_
;
ObChunkDatumStore
::
ShadowStoredRow
last_store_row_
;
private:
private:
ObSQLSessionInfo
::
StmtSavedValue
*
saved_session_
;
ObSQLSessionInfo
::
StmtSavedValue
*
saved_session_
;
char
saved_session_buf_
[
sizeof
(
ObSQLSessionInfo
::
StmtSavedValue
)]
__attribute__
((
aligned
(
16
)));;
char
saved_session_buf_
[
sizeof
(
ObSQLSessionInfo
::
StmtSavedValue
)]
__attribute__
((
aligned
(
16
)));;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录