diff options
author | Andrei Elkin <andrei.elkin@mariadb.com> | 2020-09-29 19:12:00 +0300 |
---|---|---|
committer | Andrei Elkin <andrei.elkin@mariadb.com> | 2020-10-07 12:09:00 +0300 |
commit | 65c632cb9cf44aea8132b65cc7a08253ec4282af (patch) | |
tree | 3437bdfcab973b02945d657f350a7c9d9c9356ad /sql/log_event.cc | |
parent | 82301aea4f2e1cdbcee5bb40d3235afc6b9bc468 (diff) | |
download | mariadb-git-65c632cb9cf44aea8132b65cc7a08253ec4282af.tar.gz |
MDEV-23832 Crash at startup in Log_event::read_log_event
The crash was caused by improper raising of an error or replication checksum
verification at time of the server initialization. As there is no THD object
associated with the main initializing thread yet the error text should be
assigned with calling a respective macro that is aware of that possibility.
Fixed accordingly.
[At merging to 10.4 the new test result file needs
+# restart: --master_verify_checksum=ON --debug_dbug=+d,corrupt_read_log_event_char
that mtr run will hint on.]
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 3d28c249e21..146d8bd5dbe 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1632,7 +1632,7 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len, else DBUG_RETURN(NULL); #else - *error= ER(ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE); + *error= ER_THD_OR_DEFAULT(current_thd, ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE); sql_print_error("%s", *error); DBUG_RETURN(NULL); #endif |