Replace ps inner stmt id calculated position in sql audit

This commit is contained in:
obdev
2023-04-04 03:41:57 +00:00
committed by ob-robot
parent d223aa2f28
commit 2ad78b0e63
10 changed files with 26 additions and 15 deletions

View File

@ -234,6 +234,7 @@ int ObMPStmtFetch::do_process(ObSQLSessionInfo &session)
if (OB_SUCC(session.get_inner_ps_stmt_id(cursor_id_, inner_stmt_id))
&& OB_SUCC(session.get_ps_cache()->get_stmt_info_guard(inner_stmt_id, guard))
&& OB_NOT_NULL(ps_info = guard.get_stmt_info())) {
audit_record.ps_inner_stmt_id_ = inner_stmt_id;
audit_record.sql_ = const_cast<char *>(ps_info->get_ps_sql().ptr());
audit_record.sql_len_ = min(ps_info->get_ps_sql().length(), OB_MAX_SQL_LENGTH);
} else {