Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
0b3eff25
O
oceanbase
项目概览
Metz
/
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,发现更多精彩内容 >>
提交
0b3eff25
编写于
2月 28, 2022
作者:
X
xy0
提交者:
LINGuanRen
2月 28, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
未use database的情况下创建outline,查询gv$outline时报-4016
上级
1b3e363d
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
363 addition
and
361 deletion
+363
-361
src/observer/virtual_table/ob_tenant_virtual_outline.cpp
src/observer/virtual_table/ob_tenant_virtual_outline.cpp
+14
-12
src/sql/ob_sql.cpp
src/sql/ob_sql.cpp
+264
-264
src/sql/plan_cache/ob_plan_cache.cpp
src/sql/plan_cache/ob_plan_cache.cpp
+85
-85
未找到文件。
src/observer/virtual_table/ob_tenant_virtual_outline.cpp
浏览文件 @
0b3eff25
...
@@ -48,13 +48,13 @@ int ObTenantVirtualOutlineBase::inner_open()
...
@@ -48,13 +48,13 @@ int ObTenantVirtualOutlineBase::inner_open()
return
ret
;
return
ret
;
}
}
int
ObTenantVirtualOutlineBase
::
set_database_infos_and_get_value
(
uint64_t
database_id
,
bool
&
is_recycle
)
int
ObTenantVirtualOutlineBase
::
set_database_infos_and_get_value
(
uint64_t
database_id
,
bool
&
is_recycle
)
{
{
int
ret
=
OB_SUCCESS
;
int
ret
=
OB_SUCCESS
;
is_recycle
=
false
;
is_recycle
=
false
;
DBInfo
db_info
;
DBInfo
db_info
;
ObString
db_name
;
ObString
db_name
;
const
ObDatabaseSchema
*
db_schema
=
NULL
;
const
ObDatabaseSchema
*
db_schema
=
NULL
;
if
(
OB_ISNULL
(
schema_guard_
)
||
OB_ISNULL
(
allocator_
))
{
if
(
OB_ISNULL
(
schema_guard_
)
||
OB_ISNULL
(
allocator_
))
{
ret
=
OB_ERR_UNEXPECTED
;
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"parameter is NULL"
,
K
(
ret
),
K
(
schema_guard_
),
K
(
allocator_
));
LOG_WARN
(
"parameter is NULL"
,
K
(
ret
),
K
(
schema_guard_
),
K
(
allocator_
));
...
@@ -75,7 +75,7 @@ int ObTenantVirtualOutlineBase::set_database_infos_and_get_value(uint64_t databa
...
@@ -75,7 +75,7 @@ int ObTenantVirtualOutlineBase::set_database_infos_and_get_value(uint64_t databa
return
ret
;
return
ret
;
}
}
int
ObTenantVirtualOutlineBase
::
is_database_recycle
(
uint64_t
database_id
,
bool
&
is_recycle
)
int
ObTenantVirtualOutlineBase
::
is_database_recycle
(
uint64_t
database_id
,
bool
&
is_recycle
)
{
{
int
ret
=
OB_SUCCESS
;
int
ret
=
OB_SUCCESS
;
DBInfo
db_info
;
DBInfo
db_info
;
...
@@ -104,10 +104,10 @@ void ObTenantVirtualOutline::reset()
...
@@ -104,10 +104,10 @@ void ObTenantVirtualOutline::reset()
ObTenantVirtualOutlineBase
::
reset
();
ObTenantVirtualOutlineBase
::
reset
();
}
}
int
ObTenantVirtualOutline
::
fill_cells
(
const
ObOutlineInfo
*
outline_info
)
int
ObTenantVirtualOutline
::
fill_cells
(
const
ObOutlineInfo
*
outline_info
)
{
{
int
ret
=
OB_SUCCESS
;
int
ret
=
OB_SUCCESS
;
ObObj
*
cells
=
NULL
;
ObObj
*
cells
=
NULL
;
if
(
OB_ISNULL
(
cells
=
cur_row_
.
cells_
)
||
OB_ISNULL
(
allocator_
)
||
OB_ISNULL
(
session_
)
||
OB_ISNULL
(
outline_info
))
{
if
(
OB_ISNULL
(
cells
=
cur_row_
.
cells_
)
||
OB_ISNULL
(
allocator_
)
||
OB_ISNULL
(
session_
)
||
OB_ISNULL
(
outline_info
))
{
ret
=
OB_ERR_UNEXPECTED
;
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"some data member is NULL"
,
K
(
ret
),
K
(
cells
),
K
(
allocator_
),
K
(
session_
),
K
(
outline_info
));
LOG_WARN
(
"some data member is NULL"
,
K
(
ret
),
K
(
cells
),
K
(
allocator_
),
K
(
session_
),
K
(
outline_info
));
...
@@ -156,7 +156,8 @@ int ObTenantVirtualOutline::fill_cells(const ObOutlineInfo* outline_info)
...
@@ -156,7 +156,8 @@ int ObTenantVirtualOutline::fill_cells(const ObOutlineInfo* outline_info)
}
}
case
DATABASE_NAME
:
{
case
DATABASE_NAME
:
{
DBInfo
db_info
;
DBInfo
db_info
;
if
(
outline_info
->
get_database_id
()
==
OB_OUTLINE_DEFAULT_DATABASE_ID
)
{
if
(
outline_info
->
get_database_id
()
==
combine_id
(
outline_info
->
get_tenant_id
(),
OB_OUTLINE_DEFAULT_DATABASE_ID
))
{
cells
[
cell_idx
].
set_varchar
(
OB_OUTLINE_DEFAULT_DATABASE_NAME
);
cells
[
cell_idx
].
set_varchar
(
OB_OUTLINE_DEFAULT_DATABASE_NAME
);
cells
[
cell_idx
].
set_collation_type
(
ObCharset
::
get_default_collation
(
ObCharset
::
get_default_charset
()));
cells
[
cell_idx
].
set_collation_type
(
ObCharset
::
get_default_collation
(
ObCharset
::
get_default_charset
()));
}
else
if
(
OB_FAIL
(
database_infos_
.
get_refactored
(
outline_info
->
get_database_id
(),
db_info
)))
{
}
else
if
(
OB_FAIL
(
database_infos_
.
get_refactored
(
outline_info
->
get_database_id
(),
db_info
)))
{
...
@@ -217,7 +218,7 @@ int ObTenantVirtualOutline::fill_cells(const ObOutlineInfo* outline_info)
...
@@ -217,7 +218,7 @@ int ObTenantVirtualOutline::fill_cells(const ObOutlineInfo* outline_info)
return
ret
;
return
ret
;
}
}
int
ObTenantVirtualOutline
::
is_output_outline
(
const
ObOutlineInfo
*
outline_info
,
bool
&
is_output
)
int
ObTenantVirtualOutline
::
is_output_outline
(
const
ObOutlineInfo
*
outline_info
,
bool
&
is_output
)
{
{
int
ret
=
OB_SUCCESS
;
int
ret
=
OB_SUCCESS
;
is_output
=
false
;
is_output
=
false
;
...
@@ -227,9 +228,10 @@ int ObTenantVirtualOutline::is_output_outline(const ObOutlineInfo* outline_info,
...
@@ -227,9 +228,10 @@ int ObTenantVirtualOutline::is_output_outline(const ObOutlineInfo* outline_info,
LOG_WARN
(
"parameter is NULL"
,
K
(
ret
),
K
(
outline_info
),
K
(
schema_guard_
));
LOG_WARN
(
"parameter is NULL"
,
K
(
ret
),
K
(
outline_info
),
K
(
schema_guard_
));
}
else
if
(
outline_info
->
get_outline_content_str
().
empty
())
{
}
else
if
(
outline_info
->
get_outline_content_str
().
empty
())
{
is_output
=
false
;
is_output
=
false
;
}
else
if
(
outline_info
->
get_database_id
()
==
OB_OUTLINE_DEFAULT_DATABASE_ID
)
{
}
else
if
(
outline_info
->
get_database_id
()
==
// __outline_default_db is a logical table and has no physical schema.
combine_id
(
outline_info
->
get_tenant_id
(),
OB_OUTLINE_DEFAULT_DATABASE_ID
))
{
// Therefore, always output this.
// __outline_default_db is a logical table and has no physical schema.
// Therefore, always output this.
is_output
=
true
;
is_output
=
true
;
}
else
if
(
OB_FAIL
(
is_database_recycle
(
outline_info
->
get_database_id
(),
is_recycle
)))
{
}
else
if
(
OB_FAIL
(
is_database_recycle
(
outline_info
->
get_database_id
(),
is_recycle
)))
{
LOG_WARN
(
"fail to judge database recycle"
,
K
(
ret
),
KPC
(
outline_info
));
LOG_WARN
(
"fail to judge database recycle"
,
K
(
ret
),
KPC
(
outline_info
));
...
@@ -238,10 +240,10 @@ int ObTenantVirtualOutline::is_output_outline(const ObOutlineInfo* outline_info,
...
@@ -238,10 +240,10 @@ int ObTenantVirtualOutline::is_output_outline(const ObOutlineInfo* outline_info,
}
}
return
ret
;
return
ret
;
}
}
int
ObTenantVirtualOutline
::
inner_get_next_row
(
common
::
ObNewRow
*&
row
)
int
ObTenantVirtualOutline
::
inner_get_next_row
(
common
::
ObNewRow
*&
row
)
{
{
int
ret
=
OB_SUCCESS
;
int
ret
=
OB_SUCCESS
;
const
ObOutlineInfo
*
outline_info
=
NULL
;
const
ObOutlineInfo
*
outline_info
=
NULL
;
bool
is_output
=
false
;
bool
is_output
=
false
;
if
(
outline_info_idx_
<
0
)
{
if
(
outline_info_idx_
<
0
)
{
ret
=
OB_ERR_UNEXPECTED
;
ret
=
OB_ERR_UNEXPECTED
;
...
...
src/sql/ob_sql.cpp
浏览文件 @
0b3eff25
此差异已折叠。
点击以展开。
src/sql/plan_cache/ob_plan_cache.cpp
浏览文件 @
0b3eff25
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录