summaryrefslogtreecommitdiff
path: root/sql/ddl_log.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2022-11-09 19:11:08 +0200
committerSergei Petrunia <sergey@mariadb.com>2023-02-03 10:34:49 +0300
commit6418c24c9498a28b3320d26309964203327ae66e (patch)
tree0403eb51fb12be2c45d2608421e625dd3b4efe9f /sql/ddl_log.cc
parent0ba47126f1f28d4731b6774d8c526d9d8e55652f (diff)
downloadmariadb-git-6418c24c9498a28b3320d26309964203327ae66e.tar.gz
Set thd->query() for internal (startup) transactions
This helps with debugging as 'Query: ' in DBUG traces will show something useful, for internal transactions, instead of just "".
Diffstat (limited to 'sql/ddl_log.cc')
-rw-r--r--sql/ddl_log.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/ddl_log.cc b/sql/ddl_log.cc
index 67c8a8bca4f..a7920ade939 100644
--- a/sql/ddl_log.cc
+++ b/sql/ddl_log.cc
@@ -2741,6 +2741,8 @@ int ddl_log_execute_recovery()
thd->thread_stack= (char*) &thd;
thd->store_globals();
thd->init(); // Needed for error messages
+ thd->set_query_inner((char*) STRING_WITH_LEN("intern:ddl_log_execute_recovery"),
+ default_charset_info);
thd->log_all_errors= (global_system_variables.log_warnings >= 3);
recovery_state.drop_table.free();