add more info to sql audit snapshot source field
This commit is contained in:
@ -332,7 +332,7 @@ struct ObAuditRecordData {
|
||||
|
||||
ObString get_snapshot_source() const
|
||||
{
|
||||
return ObString(snapshot_.source_);
|
||||
return ObString(snapshot_source_);
|
||||
}
|
||||
|
||||
int16_t seq_; //packet->get_packet_header().seq_; always 0 currently
|
||||
@ -404,6 +404,7 @@ struct ObAuditRecordData {
|
||||
bool partition_hit_;// flag for need das partition route or not
|
||||
bool is_perf_event_closed_;
|
||||
char flt_trace_id_[OB_MAX_UUID_STR_LENGTH + 1];
|
||||
char snapshot_source_[OB_MAX_SNAPSHOT_SOURCE_LENGTH + 1];
|
||||
};
|
||||
|
||||
} //namespace sql
|
||||
|
||||
@ -560,7 +560,8 @@ int ObSqlTransControl::start_stmt(ObExecContext &exec_ctx)
|
||||
ar_snapshot.version_ = snapshot.core_.version_;
|
||||
ar_snapshot.tx_id_ = snapshot.core_.tx_id_.get_id();
|
||||
ar_snapshot.scn_ = snapshot.core_.scn_.cast_to_int();
|
||||
ar_snapshot.source_ = snapshot.get_source_name().ptr();
|
||||
(void)snapshot.generate_snapshot_source(audit_record.snapshot_source_, sizeof(audit_record.snapshot_source_));
|
||||
ar_snapshot.source_ = audit_record.snapshot_source_;
|
||||
}
|
||||
if (OB_SUCC(ret) && !session->has_start_stmt()) {
|
||||
OZ (session->set_start_stmt());
|
||||
|
||||
Reference in New Issue
Block a user