summaryrefslogtreecommitdiff
path: root/sql/sql_prepare.cc
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2021-08-11 23:00:37 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2021-08-11 23:00:37 +0400
commit38b79d7295e7a9ed2e4fdd72e6a63505a32c806f (patch)
tree5469e83c89f728054a784643a3c33e463422c03c /sql/sql_prepare.cc
parent582cf12f949d462073b01aea4dc61628880d6d60 (diff)
downloadmariadb-git-38b79d7295e7a9ed2e4fdd72e6a63505a32c806f.tar.gz
MENT-1019.bb-10.4-hf
Audit-plugin related fixes.
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r--sql/sql_prepare.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index a3027ea52fd..06e7921c90d 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -3442,6 +3442,11 @@ static void mysql_stmt_execute_common(THD *thd,
stmt_id == LAST_STMT_ID, read_types))
{
my_error(ER_MALFORMED_PACKET, MYF(0));
+ /*
+ Let's set the thd->query_string so the audit plugin
+ can report the executed query that failed.
+ */
+ thd->set_query_inner(stmt->query_string);
DBUG_VOID_RETURN;
}