Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
oceanbase
提交
10499651
O
oceanbase
项目概览
oceanbase
/
oceanbase
2 年多 前同步成功
通知
262
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看板
提交
10499651
编写于
11月 12, 2025
作者:
H
Hongqin-Li
提交者:
ob-robot
11月 12, 2025
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix presplit global index with null high bound
上级
e2eb969a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
24 addition
and
0 deletion
+24
-0
src/share/scheduler/ob_partition_auto_split_helper.cpp
src/share/scheduler/ob_partition_auto_split_helper.cpp
+6
-0
src/share/schema/ob_partition_sql_helper.cpp
src/share/schema/ob_partition_sql_helper.cpp
+4
-0
src/share/schema/ob_schema_struct.cpp
src/share/schema/ob_schema_struct.cpp
+11
-0
src/share/schema/ob_schema_struct.h
src/share/schema/ob_schema_struct.h
+3
-0
未找到文件。
src/share/scheduler/ob_partition_auto_split_helper.cpp
浏览文件 @
10499651
...
...
@@ -2923,6 +2923,7 @@ int ObSplitSampler::query_ranges_(const uint64_t tenant_id, const ObString &db_n
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"invalid column count"
,
KR
(
ret
),
K
(
column_count
),
K
(
sql
));
}
else
{
bool
has_null
=
false
;
// build start_row_key
if
(
ranges
.
size
()
==
0
)
{
// copy low_bound_val to range.start_key_
...
...
@@ -2938,6 +2939,9 @@ int ObSplitSampler::query_ranges_(const uint64_t tenant_id, const ObString &db_n
if
(
OB_FAIL
(
ret
))
{
}
else
{
for
(
int64_t
i
=
0
;
i
<
column_count
;
i
++
)
{
if
(
row
->
get_cell
(
i
).
is_null
())
{
has_null
=
true
;
}
objs
[
i
]
=
row
->
get_cell
(
i
);
}
...
...
@@ -2951,6 +2955,8 @@ int ObSplitSampler::query_ranges_(const uint64_t tenant_id, const ObString &db_n
}
if
(
OB_FAIL
(
ret
))
{
}
else
if
(
has_null
)
{
// null values are not allowed in range high bound
}
else
if
(
OB_FAIL
(
ranges
.
push_back
(
range
)))
{
LOG_WARN
(
"range push back failed"
,
KR
(
ret
));
}
...
...
src/share/schema/ob_partition_sql_helper.cpp
浏览文件 @
10499651
...
...
@@ -762,6 +762,8 @@ int ObAddPartInfoHelper::add_high_bound_val_column(const P &part_option,
LOG_WARN
(
"get tenant timezone map failed"
,
K
(
ret
),
K
(
table_
->
get_tenant_id
()));
}
else
if
(
OB_FAIL
(
table_
->
check_if_oracle_compat_mode
(
is_oracle_mode
)))
{
LOG_WARN
(
"fail to get compat mode"
,
KR
(
ret
),
KPC_
(
table
));
}
else
if
(
OB_FAIL
(
ObPartitionUtils
::
check_range_high_bound_val
(
part_option
.
get_high_bound_val
())))
{
LOG_WARN
(
"Failed to check range high bound val"
,
K
(
ret
),
K
(
part_option
.
get_high_bound_val
()));
}
else
if
(
OB_FAIL
(
ObPartitionUtils
::
convert_rowkey_to_sql_literal
(
is_oracle_mode
,
part_option
.
get_high_bound_val
(),
high_bound_val_
,
OB_MAX_B_HIGH_BOUND_VAL_LENGTH
,
pos
,
false
,
&
tz_info
)))
{
...
...
@@ -1400,6 +1402,8 @@ int ObAddSplitIncPartHelper::add_split_partition_info()
if
(
OB_ISNULL
(
part
))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"part array is null"
,
KR
(
ret
),
K
(
index
),
K
(
inc_table_
));
}
else
if
(
inc_table_
->
is_range_part
()
&&
OB_FAIL
(
ObPartitionUtils
::
check_range_high_bound_val
(
part
->
get_high_bound_val
())))
{
LOG_WARN
(
"failed to check range high bound val"
,
KR
(
ret
),
KPC
(
part
));
}
else
{
HEAP_VAR
(
ObAddIncPartDMLGenerator
,
part_dml_gen
,
ori_table_
,
*
part
,
part_array_size
,
index
,
schema_version_
)
{
...
...
src/share/schema/ob_schema_struct.cpp
浏览文件 @
10499651
...
...
@@ -8077,6 +8077,17 @@ int ObPartitionUtils::convert_rows_to_sql_literal(
return ret;
}
int ObPartitionUtils::check_range_high_bound_val(const ObRowkey &high_bound_val)
{
int ret = OB_SUCCESS;
for (int64_t i = 0; OB_SUCC(ret) && i < high_bound_val.get_obj_cnt(); i++) {
if (OB_UNLIKELY(high_bound_val.get_obj_ptr()[i].is_null())) {
ret = OB_EER_NULL_IN_VALUES_LESS_THAN;
LOG_WARN("null value is not allowed in range high bound", K(ret), K(i), K(high_bound_val));
}
}
return ret;
}
int ObPartitionUtils::convert_rowkey_to_sql_literal(
const bool is_oracle_mode,
...
...
src/share/schema/ob_schema_struct.h
浏览文件 @
10499651
...
...
@@ -3509,6 +3509,9 @@ public:
bool
print_collation
,
const
common
::
ObTimeZoneInfo
*
tz_info
);
// Check range partition's high_bound_val before write to inner table
static
int
check_range_high_bound_val
(
const
common
::
ObRowkey
&
high_bound_val
);
// Used to display the defined value of the LIST partition
static
int
convert_rows_to_sql_literal
(
const
bool
is_oracle_mode
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录