From fff47f40f6588bf723e25d3c47f52bddac18a956 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2013 10:23:17 +0100 Subject: MDEV-26: Global Transaction ID - Fix that binlog_gtid_pos() (and hence slave connect) does not work correctly in the very first binlog file (due to not logging empty Gtid_list_log_event). - Remove one instance of the stupid domain_id-0-is-implicit. - Rename the confusing Gtid_Pos_Auto in SHOW SLAVE STATUS to Using_Gtid. - Fix memory leak. --- sql/sql_repl.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sql/sql_repl.cc') diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 62b7135641d..f4c902c5954 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -735,7 +735,7 @@ gtid_find_binlog_file(slave_connection_state *state, char *out_name) { MEM_ROOT memroot; binlog_file_entry *list; - Gtid_list_log_event *glev; + Gtid_list_log_event *glev= NULL; const char *errormsg= NULL; IO_CACHE cache; File file = (File)-1; @@ -780,6 +780,8 @@ gtid_find_binlog_file(slave_connection_state *state, char *out_name) strmake(out_name, buf, FN_REFLEN); goto end; } + delete glev; + glev= NULL; list= list->next; } @@ -789,6 +791,8 @@ gtid_find_binlog_file(slave_connection_state *state, char *out_name) "have been purged."; end: + if (glev) + delete glev; if (file != (File)-1) { end_io_cache(&cache); -- cgit v1.2.1