Fix show full table return TABLE type for view

This commit is contained in:
lf0 2021-12-01 16:28:16 +08:00 committed by LINxiansheng
parent 0fac1dd0b9
commit 0a7656fd42
2 changed files with 4 additions and 2 deletions

View File

@ -443,7 +443,8 @@ int ObTenantAllTables::inner_get_next_row()
}
case TABLE_TYPE: {
if (OB_MYSQL_SCHEMA_ID == extract_pure_id(table_schema->get_database_id())) {
cells[cell_idx].set_varchar(ObString::make_string("BASE TABLE"));
cells[cell_idx].set_varchar(table_schema->is_user_view() ?
ObString::make_string("VIEW") : ObString::make_string("BASE TABLE"));
} else {
cells[cell_idx].set_varchar(
ObString::make_string(ob_mysql_table_type_str(table_schema->get_table_type())));

View File

@ -157,7 +157,8 @@ int ObTenantShowTables::inner_get_next_row()
}
case TABLE_TYPE: {
if (OB_MYSQL_SCHEMA_ID == extract_pure_id(table_schema->get_database_id())) {
cells[cell_idx].set_varchar(ObString::make_string("BASE TABLE"));
cells[cell_idx].set_varchar(table_schema->is_user_view() ?
ObString::make_string("VIEW") : ObString::make_string("BASE TABLE"));
} else {
cells[cell_idx].set_varchar(
ObString::make_string(ob_mysql_table_type_str(table_schema->get_table_type())));