diff options
Diffstat (limited to 'sql/log.h')
-rw-r--r-- | sql/log.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sql/log.h b/sql/log.h index 391030db81f..0e6b2c895af 100644 --- a/sql/log.h +++ b/sql/log.h @@ -1,5 +1,5 @@ /* Copyright (c) 2005, 2016, Oracle and/or its affiliates. - Copyright (c) 2009, 2017, MariaDB Corporation. + Copyright (c) 2009, 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 @@ -589,7 +589,18 @@ public: long notify_count; /* For linking in requests to the binlog background thread. */ xid_count_per_binlog *next_in_queue; - xid_count_per_binlog(); /* Give link error if constructor used. */ + xid_count_per_binlog(char *log_file_name, uint log_file_name_len) + :binlog_id(0), xid_count(0), notify_count(0) + { + binlog_name_len= log_file_name_len; + binlog_name= (char *) my_malloc(binlog_name_len, MYF(MY_ZEROFILL)); + if (binlog_name) + memcpy(binlog_name, log_file_name, binlog_name_len); + } + ~xid_count_per_binlog() + { + my_free(binlog_name); + } }; I_List<xid_count_per_binlog> binlog_xid_count_list; mysql_mutex_t LOCK_binlog_background_thread; |