fix piece views
This commit is contained in:
@ -2360,7 +2360,7 @@ int ObInnerTableSchema::dba_ob_archivelog_piece_files_ora_schema(ObTableSchema &
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT DEST_ID, ROUND_ID, PIECE_ID, INCARNATION, DEST_NO, STATUS, START_SCN, SCN_TO_TIMESTAMP(START_SCN) AS START_SCN_DISPLAY, CHECKPOINT_SCN, SCN_TO_TIMESTAMP(CHECKPOINT_SCN) AS CHECKPOINT_SCN_DISPLAY, MAX_SCN, END_SCN, COMPATIBLE, UNIT_SIZE, COMPRESSION, INPUT_BYTES, CASE WHEN INPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN INPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN INPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(INPUT_BYTES/1024/1024,2), 'MB') END AS INPUT_BYTES_DISPLAY, OUTPUT_BYTES, CASE WHEN OUTPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN OUTPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN OUTPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(OUTPUT_BYTES/1024/1024,2), 'MB') END AS OUTPUT_BYTES_DISPLAY, CASE WHEN INPUT_BYTES = 0 THEN 0 ELSE ROUND(OUTPUT_BYTES / INPUT_BYTES, 2) END AS COMPRESSION_RATIO, FILE_STATUS, PATH FROM SYS.ALL_VIRTUAL_LOG_ARCHIVE_PIECE_FILES WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT DEST_ID, ROUND_ID, PIECE_ID, INCARNATION, DEST_NO, STATUS, START_SCN, SCN_TO_TIMESTAMP(START_SCN) AS START_SCN_DISPLAY, CHECKPOINT_SCN, SCN_TO_TIMESTAMP(CHECKPOINT_SCN) AS CHECKPOINT_SCN_DISPLAY, MAX_SCN, END_SCN, SCN_TO_TIMESTAMP(END_SCN) AS END_SCN_DISPLAY, COMPATIBLE, UNIT_SIZE, COMPRESSION, INPUT_BYTES, CASE WHEN INPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN INPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN INPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(INPUT_BYTES/1024/1024,2), 'MB') END AS INPUT_BYTES_DISPLAY, OUTPUT_BYTES, CASE WHEN OUTPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN OUTPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN OUTPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(OUTPUT_BYTES/1024/1024,2), 'MB') END AS OUTPUT_BYTES_DISPLAY, CASE WHEN INPUT_BYTES = 0 THEN 0 ELSE ROUND(OUTPUT_BYTES / INPUT_BYTES, 2) END AS COMPRESSION_RATIO, FILE_STATUS, PATH FROM SYS.ALL_VIRTUAL_LOG_ARCHIVE_PIECE_FILES WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user