summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorAndrei Elkin <aelkin@mysql.com>2009-11-20 15:30:35 +0200
committerAndrei Elkin <aelkin@mysql.com>2009-11-20 15:30:35 +0200
commit976e155985cb5868803eb8bd0b90fa2cf917e4e8 (patch)
tree6988dc0c6afc60b486352d2d210b8b06367312e1 /client
parent625ddcd5ec34905b23b0f0620d20747be335ad1a (diff)
downloadmariadb-git-976e155985cb5868803eb8bd0b90fa2cf917e4e8.tar.gz
Bug #48463 backporting from 6.0-rpl to celosia a set of bugs
The mentioned on the bug report set of bugs fixes have not be pushed to the main trees. Fixed with extracting commits done to 6.0-rpl tree and applying them to the main 5.1. Notes. 1. part of changes - the mtr's specific - were packported to the main 5.0 tree for mtr v1 as http://lists.mysql.com/commits/46562 However, there is no that fix anymore in the mtr v2. (This fact was mailed to mtr maintaining people). 2. Bug@36929 crash in kill_zombie_dump_threads-> THD::awake() with replication tests is not backported because the base code of the patch is libevent and that was removed from the main trees due to its instability. client/mysqlbinlog.cc: fixes for BUG#35546 mysql-test/suite/rpl/r/rpl_bug41902.result: the new tests result file is added. mysql-test/suite/rpl/t/rpl_bug41902-slave.opt: conf file for bug41902 testing is added. mysql-test/suite/rpl/t/rpl_bug41902.test: regression tests for Bug #41902 is added. sql/log.cc: collection of changes due to Bug #48463. sql/log.h: collection of changes due to Bug #48463. sql/rpl_rli.h: collection of changes due to Bug #48463. sql/slave.cc: collection of changes due to Bug #48463. sql/sql_repl.cc: collection of changes due to Bug #48463.
Diffstat (limited to 'client')
-rw-r--r--client/mysqlbinlog.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index a248ade353e..894a3ac9146 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -439,6 +439,7 @@ Exit_status Load_log_processor::process_first_event(const char *bname,
{
error("Could not construct local filename %s%s.",
target_dir_name,bname);
+ my_free(fname, MYF(0));
delete ce;
DBUG_RETURN(ERROR_STOP);
}
@@ -446,9 +447,15 @@ Exit_status Load_log_processor::process_first_event(const char *bname,
rec.fname= fname;
rec.event= ce;
+ /*
+ fname is freed in process_event()
+ after Execute_load_query_log_event or Execute_load_log_event
+ will have been processed, otherwise in Load_log_processor::destroy()
+ */
if (set_dynamic(&file_names, (uchar*)&rec, file_id))
{
error("Out of memory.");
+ my_free(fname, MYF(0));
delete ce;
DBUG_RETURN(ERROR_STOP);
}
@@ -828,7 +835,17 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
print_event_info->common_header_len=
glob_description_event->common_header_len;
ev->print(result_file, print_event_info);
- ev->temp_buf= 0; // as the event ref is zeroed
+ if (!remote_opt)
+ {
+ ev->free_temp_buf(); // free memory allocated in dump_local_log_entries
+ }
+ else
+ {
+ /*
+ disassociate but not free dump_remote_log_entries time memory
+ */
+ ev->temp_buf= 0;
+ }
/*
We don't want this event to be deleted now, so let's hide it (I
(Guilhem) should later see if this triggers a non-serious Valgrind