From 1e6be6938059d230903029fa99ad6504c53d90ea Mon Sep 17 00:00:00 2001 From: Eugene Kosov Date: Mon, 23 Mar 2020 01:38:11 +0300 Subject: [PATCH] MDEV-19658 UBSAN: runtime error: load of value 2779096485, which is not a valid value for type 'enum_binlog_format' This is an uninitialized read. THD::THD: initialize current_stmt_binlog_format member --- sql/sql_class.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 5cb788296c4..97d609d6f1f 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2015, Oracle and/or its affiliates. - Copyright (c) 2008, 2018, MariaDB Corporation. + Copyright (c) 2008, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -604,6 +604,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier) m_current_stage_key(0), in_sub_stmt(0), log_all_errors(0), binlog_unsafe_warning_flags(0), + current_stmt_binlog_format(BINLOG_FORMAT_MIXED), binlog_table_maps(0), bulk_param(0), table_map_for_update(0),