support display the accurate min_restore_timestamp
This commit is contained in:
@ -1560,7 +1560,7 @@ int ObInnerTableSchema::dba_ob_backup_set_files_ora_schema(ObTableSchema &table_
|
||||
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 BACKUP_SET_ID, DEST_ID, INCARNATION, BACKUP_TYPE, PREV_FULL_BACKUP_SET_ID, PREV_INC_BACKUP_SET_ID, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN NULL ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, FILE_STATUS, CASE WHEN END_TS = 0 THEN 0 ELSE ROUND((END_TS - START_TS)/1000/1000,0) END AS ELAPSED_SECONDES, PLUS_ARCHIVELOG, START_REPLAY_SCN, SCN_TO_TIMESTAMP(START_REPLAY_SCN) AS START_REPLAY_SCN_DISPLAY, MIN_RESTORE_SCN, SCN_TO_TIMESTAMP(MIN_RESTORE_SCN) AS MIN_RESTORE_SCN_DISPLAY, INPUT_BYTES, OUTPUT_BYTES, CASE WHEN END_TS = 0 THEN 0 ELSE OUTPUT_BYTES / ((END_TS - START_TS)/1000/1000) END AS OUTPUT_RATE_BYTES, EXTRA_BYTES AS EXTRA_META_BYTES, TABLET_COUNT, FINISH_TABLET_COUNT, MACRO_BLOCK_COUNT, FINISH_MACRO_BLOCK_COUNT, FILE_COUNT, META_TURN_ID, DATA_TURN_ID, RESULT, "COMMENT", ENCRYPTION_MODE, PASSWD, TENANT_COMPATIBLE, BACKUP_COMPATIBLE, PATH, CLUSTER_VERSION, CONSISTENT_SCN, MINOR_TURN_ID, MAJOR_TURN_ID FROM SYS.ALL_VIRTUAL_BACKUP_SET_FILES WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT BACKUP_SET_ID, DEST_ID, INCARNATION, BACKUP_TYPE, PREV_FULL_BACKUP_SET_ID, PREV_INC_BACKUP_SET_ID, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN NULL ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, FILE_STATUS, CASE WHEN END_TS = 0 THEN 0 ELSE ROUND((END_TS - START_TS)/1000/1000,0) END AS ELAPSED_SECONDES, PLUS_ARCHIVELOG, START_REPLAY_SCN, SCN_TO_TIMESTAMP(START_REPLAY_SCN) AS START_REPLAY_SCN_DISPLAY, MIN_RESTORE_SCN, CASE WHEN MIN_RESTORE_SCN_DISPLAY != '' THEN MIN_RESTORE_SCN_DISPLAY WHEN MIN_RESTORE_SCN = 0 THEN NULL ELSE TO_CHAR(SCN_TO_TIMESTAMP(MIN_RESTORE_SCN),'YYYY-MM-DDHH24:MI:SS.FF9') END AS MIN_RESTORE_SCN_DISPLAY, INPUT_BYTES, OUTPUT_BYTES, CASE WHEN END_TS = 0 THEN 0 ELSE OUTPUT_BYTES / ((END_TS - START_TS)/1000/1000) END AS OUTPUT_RATE_BYTES, EXTRA_BYTES AS EXTRA_META_BYTES, TABLET_COUNT, FINISH_TABLET_COUNT, MACRO_BLOCK_COUNT, FINISH_MACRO_BLOCK_COUNT, FILE_COUNT, META_TURN_ID, DATA_TURN_ID, RESULT, "COMMENT", ENCRYPTION_MODE, PASSWD, TENANT_COMPATIBLE, BACKUP_COMPATIBLE, PATH, CLUSTER_VERSION, CONSISTENT_SCN, MINOR_TURN_ID, MAJOR_TURN_ID FROM SYS.ALL_VIRTUAL_BACKUP_SET_FILES WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user