summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-02-22 10:23:17 +0100
committerunknown <knielsen@knielsen-hq.org>2013-02-22 10:23:17 +0100
commitfff47f40f6588bf723e25d3c47f52bddac18a956 (patch)
tree49830b95fef6825c932cedaf9f57ec78ff348cb9 /sql/sql_repl.cc
parentcb46c333861a281d45ece73ae777389ca0357f75 (diff)
downloadmariadb-git-fff47f40f6588bf723e25d3c47f52bddac18a956.tar.gz
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.
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc6
1 files changed, 5 insertions, 1 deletions
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);