diff options
author | unknown <iggy@recycle.(none)> | 2007-03-21 13:43:03 -0400 |
---|---|---|
committer | unknown <iggy@recycle.(none)> | 2007-03-21 13:43:03 -0400 |
commit | 4390f7888908de6a4f308758ffccece1e2568fd5 (patch) | |
tree | 82fa052c6dafe8311c1549ee9bc7ea3b81db010f /client | |
parent | 2176fef44694e7980c39c536640a62b87517994d (diff) | |
parent | 6fb66342b36d0a5e3ed3aea53b86fc6d719a9cd9 (diff) | |
download | mariadb-git-4390f7888908de6a4f308758ffccece1e2568fd5.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into recycle.(none):/src/bug23736/my50-bug23736
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqlbinlog.cc | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 91fb5f2b99d..2a070d14f0d 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -155,11 +155,7 @@ class Load_log_processor public: Load_log_processor() {} - ~Load_log_processor() - { - destroy(); - delete_dynamic(&file_names); - } + ~Load_log_processor() {} int init() { @@ -179,20 +175,22 @@ public: target_dir_name_len= strlen(target_dir_name); } void destroy() + { + File_name_record *ptr= (File_name_record *)file_names.buffer; + File_name_record *end= ptr + file_names.elements; + for (; ptr < end; ptr++) { - File_name_record *ptr= (File_name_record *)file_names.buffer; - File_name_record *end= ptr + file_names.elements; - for (; ptr<end; ptr++) + if (ptr->fname) { - if (ptr->fname) - { - my_free(ptr->fname, MYF(MY_WME)); - delete ptr->event; - bzero((char *)ptr, sizeof(File_name_record)); - } + my_free(ptr->fname, MYF(MY_WME)); + delete ptr->event; + bzero((char *)ptr, sizeof(File_name_record)); } } + delete_dynamic(&file_names); + } + /* Obtain Create_file event for LOAD DATA statement by its file_id. @@ -1517,6 +1515,7 @@ int main(int argc, char** argv) cleanup(); free_defaults(defaults_argv); my_free_open_file_info(); + load_processor.destroy(); /* We cannot free DBUG, it is used in global destructors after exit(). */ my_end(MY_DONT_FREE_DBUG); exit(exit_value); |