Commit 64b5e942 authored by Sergei Golubchik's avatar Sergei Golubchik

mysqlbinlog memory leaks

that failed main.mysqlbinlog
parent 30ba3100
...@@ -2877,9 +2877,6 @@ int main(int argc, char** argv) ...@@ -2877,9 +2877,6 @@ int main(int argc, char** argv)
DBUG_ENTER("main"); DBUG_ENTER("main");
DBUG_PROCESS(argv[0]); DBUG_PROCESS(argv[0]);
(void) my_init_dynamic_array(&binlog_events, sizeof(LEX_STRING), 1024, 1024,
MYF(0));
my_init_time(); // for time functions my_init_time(); // for time functions
tzset(); // set tzname tzset(); // set tzname
...@@ -2917,6 +2914,10 @@ int main(int argc, char** argv) ...@@ -2917,6 +2914,10 @@ int main(int argc, char** argv)
my_set_max_open_files(open_files_limit); my_set_max_open_files(open_files_limit);
if (opt_flashback)
my_init_dynamic_array(&binlog_events, sizeof(LEX_STRING), 1024, 1024,
MYF(0));
if (opt_stop_never) if (opt_stop_never)
to_last_remote_log= TRUE; to_last_remote_log= TRUE;
...@@ -3029,8 +3030,8 @@ int main(int argc, char** argv) ...@@ -3029,8 +3030,8 @@ int main(int argc, char** argv)
my_free(event_str->str); my_free(event_str->str);
} }
fprintf(result_file, "COMMIT\n/*!*/;\n"); fprintf(result_file, "COMMIT\n/*!*/;\n");
delete_dynamic(&binlog_events);
} }
delete_dynamic(&binlog_events);
/* Set delimiter back to semicolon */ /* Set delimiter back to semicolon */
if (!stop_event_string.is_empty()) if (!stop_event_string.is_empty())
......
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