diff options
author | lars/lthalmann@dl145h.mysql.com <> | 2007-02-24 11:52:08 +0100 |
---|---|---|
committer | lars/lthalmann@dl145h.mysql.com <> | 2007-02-24 11:52:08 +0100 |
commit | 8b39189ee487d64204e59b07afabdb45c099ed7b (patch) | |
tree | 74216a789ffa49f90ad3de222b70c50b2477b271 /client/mysqlbinlog.cc | |
parent | a5051aa4ebaf48fae5f7b6f52889c3c66a12dd23 (diff) | |
parent | ba2452f092acdb519043a23d72065d559a92ec21 (diff) | |
download | mariadb-git-8b39189ee487d64204e59b07afabdb45c099ed7b.tar.gz |
Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpl
into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge
Diffstat (limited to 'client/mysqlbinlog.cc')
-rw-r--r-- | client/mysqlbinlog.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 027cf2ea435..66f440ff048 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -486,18 +486,15 @@ write_event_header_and_base64(Log_event *ev, FILE *result_file, DBUG_ENTER("write_event_header_and_base64"); /* Write header and base64 output to cache */ IO_CACHE result_cache; - if (init_io_cache(&result_cache, -1, 0, WRITE_CACHE, 0L, FALSE, - MYF(MY_WME | MY_NABP))) - { + if (open_cached_file(&result_cache, NULL, NULL, 0, MYF(MY_WME | MY_NABP))) return 1; - } ev->print_header(&result_cache, print_event_info, FALSE); ev->print_base64(&result_cache, print_event_info, FALSE); /* Read data from cache and write to result file */ my_b_copy_to_file(&result_cache, result_file); - end_io_cache(&result_cache); + close_cached_file(&result_cache); DBUG_RETURN(0); } @@ -1016,6 +1013,9 @@ static int dump_log_entries(const char* logname) { int rc; PRINT_EVENT_INFO print_event_info; + + if (!print_event_info.init_ok()) + return 1; /* Set safe delimiter, to dump things like CREATE PROCEDURE safely |