summaryrefslogtreecommitdiff
path: root/sql/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/log.h')
-rw-r--r--sql/log.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/sql/log.h b/sql/log.h
index 52bab149381..eef81c46ac4 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
@@ -593,7 +593,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;