Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大炮V587
oceanbase
提交
657b6b6f
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,发现更多精彩内容 >>
提交
657b6b6f
编写于
2月 06, 2023
作者:
S
simonjoylet
提交者:
ob-robot
2月 06, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
save schema pointer
上级
3878e7c0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
4 addition
and
4 deletion
+4
-4
src/sql/resolver/ddl/ob_alter_table_resolver.cpp
src/sql/resolver/ddl/ob_alter_table_resolver.cpp
+4
-4
未找到文件。
src/sql/resolver/ddl/ob_alter_table_resolver.cpp
浏览文件 @
657b6b6f
...
...
@@ -4435,7 +4435,7 @@ int ObAlterTableResolver::check_column_in_part_key(const ObTableSchema &table_sc
int
ret
=
OB_SUCCESS
;
// 1. to get all check table schemas, including main table schema and its' index schemas.
bool
is_same
=
false
;
ObSArray
<
ObTableSchema
>
check_table_schemas
;
ObSArray
<
const
ObTableSchema
*
>
check_table_schemas
;
ObSEArray
<
ObAuxTableMetaInfo
,
16
>
simple_index_infos
;
ObSchemaGetterGuard
*
schema_guard
=
schema_checker_
->
get_schema_guard
();
if
(
OB_ISNULL
(
schema_guard
))
{
...
...
@@ -4445,7 +4445,7 @@ int ObAlterTableResolver::check_column_in_part_key(const ObTableSchema &table_sc
dst_col_schema
,
is_same
)))
{
LOG_WARN
(
"check same type alter failed"
,
K
(
ret
));
}
else
if
(
table_schema
.
is_partitioned_table
()
&&
OB_FAIL
(
check_table_schemas
.
push_back
(
table_schema
)))
{
}
else
if
(
table_schema
.
is_partitioned_table
()
&&
OB_FAIL
(
check_table_schemas
.
push_back
(
&
table_schema
)))
{
LOG_WARN
(
"push back schema failed"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
table_schema
.
get_simple_index_infos
(
simple_index_infos
)))
{
LOG_WARN
(
"get simple index infos failed"
,
K
(
ret
),
K
(
table_schema
));
...
...
@@ -4459,7 +4459,7 @@ int ObAlterTableResolver::check_column_in_part_key(const ObTableSchema &table_sc
}
else
if
(
OB_ISNULL
(
index_schema
))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"unexpected null index schema"
,
K
(
ret
),
K
(
simple_index_infos
.
at
(
i
)));
}
else
if
(
index_schema
->
is_partitioned_table
()
&&
OB_FAIL
(
check_table_schemas
.
push_back
(
*
index_schema
)))
{
}
else
if
(
index_schema
->
is_partitioned_table
()
&&
OB_FAIL
(
check_table_schemas
.
push_back
(
index_schema
)))
{
LOG_WARN
(
"push back related index schema failed"
,
K
(
ret
));
}
}
...
...
@@ -4469,7 +4469,7 @@ int ObAlterTableResolver::check_column_in_part_key(const ObTableSchema &table_sc
if
(
OB_SUCC
(
ret
))
{
const
ObString
&
alter_column_name
=
src_col_schema
.
get_column_name_str
();
for
(
int64_t
i
=
0
;
OB_SUCC
(
ret
)
&&
i
<
check_table_schemas
.
count
();
i
++
)
{
const
ObTableSchema
&
cur_table_schema
=
check_table_schemas
.
at
(
i
);
const
ObTableSchema
&
cur_table_schema
=
*
check_table_schemas
.
at
(
i
);
const
ObColumnSchemaV2
*
column_schema
=
nullptr
;
if
(
OB_ISNULL
(
column_schema
=
cur_table_schema
.
get_column_schema
(
alter_column_name
)))
{
// do nothing, bacause the column does not exist in the schema.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录