diff options
author | Andrei Elkin <andrei.elkin@mariadb.com> | 2021-12-27 18:13:37 +0200 |
---|---|---|
committer | Andrei Elkin <andrei.elkin@mariadb.com> | 2022-01-03 15:09:30 +0200 |
commit | 87c2019bb2f7ac4adb1b5333a4d11c2b833d89da (patch) | |
tree | 84459e3dae5fb4f6e82ff4b7988b45ea4240bd0a | |
parent | 8fc5d21de2530bf7ca9edd0577f8566eda5d512c (diff) | |
download | mariadb-git-87c2019bb2f7ac4adb1b5333a4d11c2b833d89da.tar.gz |
MDEV-27349 ASAN use-after-poison in Query_log_event
The poisoning comaplaint was caused by that
Rollback ALTER does not assign anything to its THD::lex::sql_command,
so it found the value from a previous event and 'cos it was not
ALTER, an inmpropriate branch of ctor was attempted to be
executed.
Fixed with forcing THD::lex::sql_command to denote ALTER indeed.
-rw-r--r-- | sql/log_event_server.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/log_event_server.cc b/sql/log_event_server.cc index 02805d317ce..fa929837e74 100644 --- a/sql/log_event_server.cc +++ b/sql/log_event_server.cc @@ -1824,6 +1824,7 @@ write_binlog: { Write_log_with_flags wlwf(thd, is_CA ? Gtid_log_event::FL_COMMIT_ALTER_E1 : Gtid_log_event::FL_ROLLBACK_ALTER_E1); + thd->lex->sql_command= SQLCOM_ALTER_TABLE; if (write_bin_log(thd, false, thd->query(), thd->query_length())) rc= -1; } |