[CP] ocp requires double quote for restore scn display
This commit is contained in:
22
deps/oblib/src/lib/oblog/ob_log_print_kv.h
vendored
22
deps/oblib/src/lib/oblog/ob_log_print_kv.h
vendored
@ -90,6 +90,28 @@ private:
|
||||
const char *str_;
|
||||
};
|
||||
|
||||
class ObQuoteSzString
|
||||
{
|
||||
public:
|
||||
explicit ObQuoteSzString(const char *s) : str_(s)
|
||||
{}
|
||||
~ObQuoteSzString()
|
||||
{}
|
||||
|
||||
int64_t to_string(char *buf, const int64_t len) const
|
||||
{
|
||||
int64_t pos = 0;
|
||||
if (OB_ISNULL(str_)) {
|
||||
(void)logdata_printf(buf, len, pos, "NULL");
|
||||
} else {
|
||||
(void)logdata_printf(buf, len, pos, "\"%s\"", str_);
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
private:
|
||||
const char *str_;
|
||||
};
|
||||
|
||||
/**
|
||||
* used to print string that maybe not terminated by zero and has a max lenght
|
||||
*/
|
||||
|
||||
@ -4088,7 +4088,7 @@ int64_t ObBackupSetFileDesc::to_string(char *min_restore_scn_str_buf, char *buf,
|
||||
// do nothing
|
||||
} else {
|
||||
J_OBJ_START();
|
||||
ObSzString min_restore_scn_display(min_restore_scn_str_buf);
|
||||
ObQuoteSzString min_restore_scn_display(min_restore_scn_str_buf);
|
||||
J_KV(K_(backup_set_id), K_(incarnation), K_(tenant_id), K_(dest_id), K_(backup_type), K_(plus_archivelog),
|
||||
K_(date), K_(prev_full_backup_set_id), K_(prev_inc_backup_set_id), K_(stats), K_(start_time), K_(end_time),
|
||||
K_(status), K_(result), K_(encryption_mode), K_(passwd), K_(file_status), K_(backup_path), K_(start_replay_scn),
|
||||
|
||||
Reference in New Issue
Block a user