Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大炮V587
oceanbase
提交
8a787f0a
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,发现更多精彩内容 >>
提交
8a787f0a
编写于
3月 09, 2023
作者:
O
obdev
提交者:
ob-robot
3月 09, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix truncate tmp table
上级
eac32d47
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
56 addition
and
1 deletion
+56
-1
src/rootserver/ob_ddl_service.cpp
src/rootserver/ob_ddl_service.cpp
+1
-1
src/share/inner_table/ob_inner_table_schema.12051_12100.cpp
src/share/inner_table/ob_inner_table_schema.12051_12100.cpp
+19
-0
src/share/inner_table/ob_inner_table_schema.15101_15150.cpp
src/share/inner_table/ob_inner_table_schema.15101_15150.cpp
+15
-0
src/share/inner_table/ob_inner_table_schema.151_200.cpp
src/share/inner_table/ob_inner_table_schema.151_200.cpp
+19
-0
src/share/inner_table/ob_inner_table_schema_def.py
src/share/inner_table/ob_inner_table_schema_def.py
+1
-0
src/sql/engine/cmd/ob_table_executor.cpp
src/sql/engine/cmd/ob_table_executor.cpp
+1
-0
未找到文件。
src/rootserver/ob_ddl_service.cpp
浏览文件 @
8a787f0a
...
...
@@ -16504,7 +16504,7 @@ int ObDDLService::check_table_schema_is_legal(const ObDatabaseSchema & database_
}
} else if (0 != table_schema.get_autoinc_column_id()) {
ret = OB_ERR_PARALLEL_DDL_CONFLICT;
LOG_WARN("table with autoinc column should not get in new_truncate_table", KR(ret));
LOG_WARN("table with autoinc column should not get in new_truncate_table", KR(ret)
, K(table_id), K(table_name), K(database_name)
);
} else if (table_schema.is_sys_table()) {
ret = OB_NOT_SUPPORTED;
LOG_WARN("truncate table is not supported on system table", KR(ret), K(table_id), K(table_name));
src/share/inner_table/ob_inner_table_schema.12051_12100.cpp
浏览文件 @
8a787f0a
...
...
@@ -180,6 +180,25 @@ int ObInnerTableSchema::all_virtual_auto_increment_schema(ObTableSchema &table_s
false
,
//is_nullable
false
);
//is_autoincrement
}
if
(
OB_SUCC
(
ret
))
{
ObObj
truncate_version_default
;
truncate_version_default
.
set_int
(
-
1
);
ADD_COLUMN_SCHEMA_T
(
"truncate_version"
,
//column_name
++
column_id
,
//column_id
0
,
//rowkey_id
0
,
//index_id
0
,
//part_key_pos
ObIntType
,
//column_type
CS_TYPE_INVALID
,
//column_collation_type
sizeof
(
int64_t
),
//column_length
-
1
,
//column_precision
-
1
,
//column_scale
false
,
//is_nullable
false
,
//is_autoincrement
truncate_version_default
,
truncate_version_default
);
//default_value
}
table_schema
.
set_index_using_type
(
USING_BTREE
);
table_schema
.
set_row_store_type
(
ENCODING_ROW_STORE
);
table_schema
.
set_store_format
(
OB_STORE_FORMAT_DYNAMIC_MYSQL
);
...
...
src/share/inner_table/ob_inner_table_schema.15101_15150.cpp
浏览文件 @
8a787f0a
...
...
@@ -7055,6 +7055,21 @@ int ObInnerTableSchema::all_virtual_auto_increment_real_agent_ora_schema(ObTable
false
);
//is_autoincrement
}
if
(
OB_SUCC
(
ret
))
{
ADD_COLUMN_SCHEMA
(
"TRUNCATE_VERSION"
,
//column_name
++
column_id
,
//column_id
0
,
//rowkey_id
0
,
//index_id
0
,
//part_key_pos
ObNumberType
,
//column_type
CS_TYPE_INVALID
,
//column_collation_type
38
,
//column_length
38
,
//column_precision
0
,
//column_scale
false
,
//is_nullable
false
);
//is_autoincrement
}
if
(
OB_SUCC
(
ret
))
{
ADD_COLUMN_SCHEMA
(
"GMT_CREATE"
,
//column_name
++
column_id
,
//column_id
...
...
src/share/inner_table/ob_inner_table_schema.151_200.cpp
浏览文件 @
8a787f0a
...
...
@@ -5318,6 +5318,25 @@ int ObInnerTableSchema::all_auto_increment_schema(ObTableSchema &table_schema)
false
,
//is_nullable
false
);
//is_autoincrement
}
if
(
OB_SUCC
(
ret
))
{
ObObj
truncate_version_default
;
truncate_version_default
.
set_int
(
-
1
);
ADD_COLUMN_SCHEMA_T
(
"truncate_version"
,
//column_name
++
column_id
,
//column_id
0
,
//rowkey_id
0
,
//index_id
0
,
//part_key_pos
ObIntType
,
//column_type
CS_TYPE_INVALID
,
//column_collation_type
sizeof
(
int64_t
),
//column_length
-
1
,
//column_precision
-
1
,
//column_scale
false
,
//is_nullable
false
,
//is_autoincrement
truncate_version_default
,
truncate_version_default
);
//default_value
}
table_schema
.
set_index_using_type
(
USING_BTREE
);
table_schema
.
set_row_store_type
(
ENCODING_ROW_STORE
);
table_schema
.
set_store_format
(
OB_STORE_FORMAT_DYNAMIC_MYSQL
);
...
...
src/share/inner_table/ob_inner_table_schema_def.py
浏览文件 @
8a787f0a
...
...
@@ -1451,6 +1451,7 @@ def_table_schema(
('sequence_name', 'varchar:OB_MAX_SEQUENCE_NAME_LENGTH', 'true'),
('sequence_value', 'uint', 'true'),
('sync_value', 'uint'),
('truncate_version', 'int', 'false', '-1'),
],
)
src/sql/engine/cmd/ob_table_executor.cpp
浏览文件 @
8a787f0a
...
...
@@ -1713,6 +1713,7 @@ int ObTruncateTableExecutor::execute(ObExecContext &ctx, ObTruncateTableStmt &st
LOG_WARN
(
"GCTX schema_service not init"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
GCTX
.
schema_service_
->
get_tenant_schema_guard
(
tenant_id
,
schema_guard
)))
{
LOG_WARN
(
"fail to get tenant schema guard"
,
K
(
ret
),
K
(
tenant_id
));
}
else
if
(
FALSE_IT
(
schema_guard
.
set_session_id
(
truncate_table_arg
.
session_id_
)))
{
}
else
if
(
OB_FAIL
(
schema_guard
.
get_table_schema
(
tenant_id
,
database_name
,
table_name
,
false
,
table_schema
)))
{
LOG_WARN
(
"fail to get table schema"
,
K
(
ret
),
K
(
database_name
),
K
(
table_name
));
}
else
if
(
OB_ISNULL
(
table_schema
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录