[to #46843562] use new request_type to record sql from pl

This commit is contained in:
LiuYoung00
2022-12-26 05:08:03 +00:00
committed by ob-robot
parent 8a48ba190b
commit 7562ea53d7
3 changed files with 6 additions and 5 deletions

View File

@ -580,9 +580,8 @@ int ObInnerSQLConnection::process_record(ObInnerSQLResult &res,
} }
record_stat(session, result_set.get_stmt_type(), is_from_pl); record_stat(session, result_set.get_stmt_type(), is_from_pl);
ObSQLUtils::handle_audit_record(false, sql::PSCursor == exec_timestamp.exec_type_ ObSQLUtils::handle_audit_record(false, sql::PSCursor == exec_timestamp.exec_type_ ? EXECUTE_PS_EXECUTE
? EXECUTE_PS_EXECUTE : EXECUTE_INNER, : is_from_pl ? EXECUTE_PL_EXECUTE : EXECUTE_INNER, session);
session);
} }
return ret; return ret;
} }

View File

@ -443,7 +443,8 @@ enum ObExecuteMode
EXECUTE_PS_FETCH, EXECUTE_PS_FETCH,
EXECUTE_PS_SEND_PIECE, EXECUTE_PS_SEND_PIECE,
EXECUTE_PS_GET_PIECE, EXECUTE_PS_GET_PIECE,
EXECUTE_PS_SEND_LONG_DATA EXECUTE_PS_SEND_LONG_DATA,
EXECUTE_PL_EXECUTE
}; };

View File

@ -1624,7 +1624,8 @@ const ObAuditRecordData &ObSQLSessionInfo::get_final_audit_record(
|| EXECUTE_PS_SEND_PIECE == mode || EXECUTE_PS_SEND_PIECE == mode
|| EXECUTE_PS_GET_PIECE == mode || EXECUTE_PS_GET_PIECE == mode
|| EXECUTE_PS_SEND_LONG_DATA == mode || EXECUTE_PS_SEND_LONG_DATA == mode
|| EXECUTE_PS_FETCH == mode) { || EXECUTE_PS_FETCH == mode
|| EXECUTE_PL_EXECUTE == mode) {
audit_record_.tenant_name_ = const_cast<char *>(get_tenant_name().ptr()); audit_record_.tenant_name_ = const_cast<char *>(get_tenant_name().ptr());
audit_record_.tenant_name_len_ = min(get_tenant_name().length(), audit_record_.tenant_name_len_ = min(get_tenant_name().length(),
OB_MAX_TENANT_NAME_LENGTH); OB_MAX_TENANT_NAME_LENGTH);