Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
oceanbase
提交
366ee771
O
oceanbase
项目概览
oceanbase
/
oceanbase
9 个月 前同步成功
通知
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,体验更适合开发者的 AI 搜索 >>
提交
366ee771
编写于
12月 06, 2022
作者:
S
SanmuWangZJU
提交者:
OB-robot
12月 06, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[OBCDC] support mark partition_column and generate_dep_column
上级
0d186e59
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
28 addition
and
12 deletion
+28
-12
deps/init/oceanbase.el7.aarch64.deps
deps/init/oceanbase.el7.aarch64.deps
+1
-1
deps/init/oceanbase.el7.x86_64.deps
deps/init/oceanbase.el7.x86_64.deps
+1
-1
deps/init/oceanbase.el8.aarch64.deps
deps/init/oceanbase.el8.aarch64.deps
+1
-1
deps/init/oceanbase.el8.x86_64.deps
deps/init/oceanbase.el8.x86_64.deps
+1
-1
src/logservice/libobcdc/src/ob_log_meta_manager.cpp
src/logservice/libobcdc/src/ob_log_meta_manager.cpp
+10
-2
src/logservice/libobcdc/tests/ob_binlog_record_printer.cpp
src/logservice/libobcdc/tests/ob_binlog_record_printer.cpp
+14
-6
未找到文件。
deps/init/oceanbase.el7.aarch64.deps
浏览文件 @
366ee771
...
...
@@ -35,7 +35,7 @@ obdevtools-gcc9-9.3.0-52022092914.el7.aarch64.rpm
obdevtools-llvm-11.0.1-312022092921.el7.aarch64.rpm
[tools-deps]
devdeps-oblogmsg-1.0-
42022101823
.el7.aarch64.rpm
devdeps-oblogmsg-1.0-
52022113019
.el7.aarch64.rpm
devdeps-rocksdb-6.22.1.1-52022100420.el7.aarch64.rpm
[test-utils]
...
...
deps/init/oceanbase.el7.x86_64.deps
浏览文件 @
366ee771
...
...
@@ -36,7 +36,7 @@ obdevtools-gcc9-9.3.0-52022092914.el7.x86_64.rpm
obdevtools-llvm-11.0.1-312022092921.el7.x86_64.rpm
[tools-deps]
devdeps-oblogmsg-1.0-
42022101823
.el7.x86_64.rpm
devdeps-oblogmsg-1.0-
52022113019
.el7.x86_64.rpm
devdeps-rocksdb-6.22.1.1-52022100420.el7.x86_64.rpm
[test-utils]
...
...
deps/init/oceanbase.el8.aarch64.deps
浏览文件 @
366ee771
...
...
@@ -35,7 +35,7 @@ obdevtools-gcc9-9.3.0-52022092914.el8.aarch64.rpm
obdevtools-llvm-11.0.1-312022092921.el8.aarch64.rpm
[tools-deps]
devdeps-oblogmsg-1.0-
42022101823
.el8.aarch64.rpm
devdeps-oblogmsg-1.0-
52022113019
.el8.aarch64.rpm
devdeps-rocksdb-6.22.1.1-52022100420.el8.aarch64.rpm
[test-utils]
...
...
deps/init/oceanbase.el8.x86_64.deps
浏览文件 @
366ee771
...
...
@@ -36,7 +36,7 @@ obdevtools-gcc9-9.3.0-52022092914.el8.x86_64.rpm
obdevtools-llvm-11.0.1-312022092921.el8.x86_64.rpm
[tools-deps]
devdeps-oblogmsg-1.0-
42022101823
.el8.x86_64.rpm
devdeps-oblogmsg-1.0-
52022113019
.el8.x86_64.rpm
devdeps-rocksdb-6.22.1.1-52022100420.el8.x86_64.rpm
[test-utils]
...
...
src/logservice/libobcdc/src/ob_log_meta_manager.cpp
浏览文件 @
366ee771
...
...
@@ -795,11 +795,17 @@ int ObLogMetaManager::set_column_meta_(IColMeta *col_meta,
// the "length" of the BIT type is store in precision
col_meta
->
setLength
(
column_schema
.
get_data_precision
());
}
else
{
// for types with valid length(string\enumset\rowid\json\raw\lob\geo),
// for types with valid length(string\enumset\rowid\json\raw\lob\geo),
// get_data_length returns the valid length, returns 0 for other types.
col_meta
->
setLength
(
column_schema
.
get_data_length
());
}
if
(
column_schema
.
is_tbl_part_key_column
())
{
col_meta
->
setPartitioned
(
true
);
}
if
(
column_schema
.
has_generated_column_deps
())
{
col_meta
->
setDependent
(
true
);
}
col_meta
->
setName
(
column_schema
.
get_column_name
());
col_meta
->
setType
(
static_cast
<
int
>
(
mysql_type
));
col_meta
->
setSigned
(
signed_flag
);
...
...
@@ -826,7 +832,9 @@ int ObLogMetaManager::set_column_meta_(IColMeta *col_meta,
"encoding"
,
col_meta
->
getEncoding
(),
"default"
,
col_meta
->
getDefault
(),
"isHiddenRowKey"
,
col_meta
->
isHiddenRowKey
(),
"isGeneratedColumn"
,
col_meta
->
isGenerated
());
"isGeneratedColumn"
,
col_meta
->
isGenerated
(),
"isPartitionColumn"
,
col_meta
->
isPartitioned
(),
"isGenerateDepColumn"
,
col_meta
->
isDependent
());
// Do not need
//col_meta->setLength(data_length);
...
...
src/logservice/libobcdc/tests/ob_binlog_record_printer.cpp
浏览文件 @
366ee771
...
...
@@ -525,6 +525,8 @@ int ObBinlogRecordPrinter::output_data_file_column_data(IBinlogRecord *br,
const
long
col_data_length
=
col_meta
?
col_meta
->
getLength
()
:
0
;
bool
is_generated_column
=
col_meta
?
col_meta
->
isGenerated
()
:
false
;
bool
is_hidden_row_key_column
=
col_meta
?
col_meta
->
isHiddenRowKey
()
:
false
;
bool
is_partition_column
=
col_meta
?
col_meta
->
isPartitioned
()
:
false
;
bool
is_generate_dep_column
=
col_meta
?
col_meta
->
isDependent
()
:
false
;
bool
is_lob
=
is_lob_type
(
ctype
);
bool
is_json
=
is_json_type
(
ctype
);
std
::
string
enum_set_values_str
;
...
...
@@ -540,11 +542,17 @@ int ObBinlogRecordPrinter::output_data_file_column_data(IBinlogRecord *br,
if
(
is_hidden_row_key_column
)
{
ROW_PRINTF
(
ptr
,
size
,
pos
,
ri
,
"[C%ld] column_is_hidden_rowkey:%d"
,
column_index
,
is_hidden_row_key_column
);
}
// print the length of varchar only in print detail mode,
if
(
is_partition_column
)
{
ROW_PRINTF
(
ptr
,
size
,
pos
,
ri
,
"[C%ld] column_is_partition_col:true"
,
column_index
);
}
if
(
is_generate_dep_column
)
{
ROW_PRINTF
(
ptr
,
size
,
pos
,
ri
,
"[C%ld] column_is_dep_col_of_gen_col:true"
,
column_index
);
}
// print the length of varchar only in print detail mode,
// because there have been many test cases with varchar type before the varchar length info is added into column meta
if
(
oceanbase
::
obmysql
::
MYSQL_TYPE_VAR_STRING
==
ctype
||
oceanbase
::
obmysql
::
MYSQL_TYPE_BIT
==
ctype
)
{
ROW_PRINTF
(
ptr
,
size
,
pos
,
ri
,
"[C%ld] column_define_length:%ld"
,
column_index
,
col_data_length
);
}
}
else
if
((
oceanbase
::
obmysql
::
MYSQL_TYPE_ENUM
==
ctype
)
||
(
oceanbase
::
obmysql
::
MYSQL_TYPE_SET
==
ctype
))
{
const
std
::
string
delim
=
","
;
for
(
int
i
=
0
;
i
<
values_of_enum_set
->
size
();
i
++
)
{
...
...
@@ -554,10 +562,10 @@ int ObBinlogRecordPrinter::output_data_file_column_data(IBinlogRecord *br,
}
}
ROW_PRINTF
(
ptr
,
size
,
pos
,
ri
,
"[C%ld] column_extend_info:%s"
,
column_index
,
enum_set_values_str
.
c_str
());
}
// print precision & scale only in print detail mode, becacuse INT in oracle mode is also a kind of NUMBER(DECIMAL)
// whose precision is 38 and scale is 0, more importantly, the default precision(-1, PRECISION_UNKNOWN_YET)
// and scale(-85, ORA_NUMBER_SCALE_UNKNOWN_YET) of NUMBER in oracle mode is confusing, so we decide not to
}
// print precision & scale only in print detail mode, becacuse INT in oracle mode is also a kind of NUMBER(DECIMAL)
// whose precision is 38 and scale is 0, more importantly, the default precision(-1, PRECISION_UNKNOWN_YET)
// and scale(-85, ORA_NUMBER_SCALE_UNKNOWN_YET) of NUMBER in oracle mode is confusing, so we decide not to
// modify test results for oracle mode temporarily for convenience and efficiency.
// TODO
else
if
((
oceanbase
::
obmysql
::
MYSQL_TYPE_DECIMAL
==
ctype
)
||
(
oceanbase
::
obmysql
::
MYSQL_TYPE_NEWDECIMAL
==
ctype
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录