diff options
author | Luis Soares <luis.soares@sun.com> | 2010-03-08 23:55:19 +0000 |
---|---|---|
committer | Luis Soares <luis.soares@sun.com> | 2010-03-08 23:55:19 +0000 |
commit | 17a30e02af67307de39ea50d8376163e7a0b7207 (patch) | |
tree | 0bf0bead1caec8c1798bdb7bfb5675433db040f2 /client | |
parent | 25a9f5e0941b879f1558579d4718ea5c747c7d12 (diff) | |
parent | f0b38904aaca492acb408aaf571758d9a8f9b83d (diff) | |
download | mariadb-git-17a30e02af67307de39ea50d8376163e7a0b7207.tar.gz |
Automerge: BUG 48993 bundle from bug report --> mysql-5.1-bugteam.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqlbinlog.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 8b78fc252fe..ada22f19a65 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -832,7 +832,11 @@ 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 @@ -1362,7 +1366,6 @@ static int parse_args(int *argc, char*** argv) int ho_error; result_file = stdout; - load_defaults("my",load_default_groups,argc,argv); if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option))) exit(ho_error); if (debug_info_flag) @@ -2019,8 +2022,10 @@ int main(int argc, char** argv) my_init_time(); // for time functions + if (load_defaults("my", load_default_groups, &argc, &argv)) + exit(1); + defaults_argv= argv; parse_args(&argc, (char***)&argv); - defaults_argv=argv; if (!argc) { |