Commit 0e2cc47c authored by Luis Soares's avatar Luis Soares

Automerge: BUG 48993 bundle from bug report --> mysql-5.1-bugteam.

parents 75ac6234 fbf595d0
...@@ -832,7 +832,11 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, ...@@ -832,7 +832,11 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
print_event_info->common_header_len= print_event_info->common_header_len=
glob_description_event->common_header_len; glob_description_event->common_header_len;
ev->print(result_file, print_event_info); 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 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 (Guilhem) should later see if this triggers a non-serious Valgrind
...@@ -1362,7 +1366,6 @@ static int parse_args(int *argc, char*** argv) ...@@ -1362,7 +1366,6 @@ static int parse_args(int *argc, char*** argv)
int ho_error; int ho_error;
result_file = stdout; result_file = stdout;
load_defaults("my",load_default_groups,argc,argv);
if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option))) if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
exit(ho_error); exit(ho_error);
if (debug_info_flag) if (debug_info_flag)
...@@ -2019,8 +2022,10 @@ int main(int argc, char** argv) ...@@ -2019,8 +2022,10 @@ int main(int argc, char** argv)
my_init_time(); // for time functions 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); parse_args(&argc, (char***)&argv);
defaults_argv=argv;
if (!argc) if (!argc)
{ {
......
...@@ -443,3 +443,27 @@ FLUSH LOGS; ...@@ -443,3 +443,27 @@ FLUSH LOGS;
--echo End of 5.0 tests --echo End of 5.0 tests
--echo End of 5.1 tests --echo End of 5.1 tests
#
# BUG#38468 Memory leak detected when using mysqlbinlog utility;
#
disable_query_log;
RESET MASTER;
CREATE TABLE t1 SELECT 1;
FLUSH LOGS;
DROP TABLE t1;
enable_query_log;
# Write an empty file for comparison
write_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn.empty;
EOF
# Before fix of BUG#38468, this would generate some warnings
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 >/dev/null 2> $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn
# Make sure the command above does not generate any error or warnings
diff_files $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn.empty;
# Cleanup for this part of test
remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn.empty;
remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn;
...@@ -9478,7 +9478,7 @@ Incident_log_event::write_data_body(IO_CACHE *file) ...@@ -9478,7 +9478,7 @@ Incident_log_event::write_data_body(IO_CACHE *file)
they will always be printed for the first event. they will always be printed for the first event.
*/ */
st_print_event_info::st_print_event_info() st_print_event_info::st_print_event_info()
:flags2_inited(0), sql_mode_inited(0), :flags2_inited(0), sql_mode_inited(0), sql_mode(0),
auto_increment_increment(0),auto_increment_offset(0), charset_inited(0), auto_increment_increment(0),auto_increment_offset(0), charset_inited(0),
lc_time_names_number(~0), lc_time_names_number(~0),
charset_database_number(ILLEGAL_CHARSET_INFO_NUMBER), charset_database_number(ILLEGAL_CHARSET_INFO_NUMBER),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment