diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-07-17 21:24:29 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-07-17 21:24:29 +0200 |
commit | 97e640b9ae83e07b444fceede6b0524256c7a3cc (patch) | |
tree | 8f48fbfaf88ea7895ce59fd3ac2fbe6184334387 /client/mysqlbinlog.cc | |
parent | 2f6a2494a5eb2cf3ab06fbedd2584eca85d90230 (diff) | |
parent | c7973615e723b13c6457b494b72be2fac35bfd18 (diff) | |
download | mariadb-git-97e640b9ae83e07b444fceede6b0524256c7a3cc.tar.gz |
5.5 merge
Diffstat (limited to 'client/mysqlbinlog.cc')
-rw-r--r-- | client/mysqlbinlog.cc | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index c099459f61e..d213467ef9e 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -1,6 +1,6 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. - Copyright (c) 2009, 2012, Monty Program Ab + Copyright (c) 2000, 2013, Oracle and/or its affiliates. + Copyright (c) 2009, 2013, Monty Program Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -206,10 +206,8 @@ void print_annotate_event(PRINT_EVENT_INFO *print_event_info) } } -static Exit_status dump_local_log_entries(PRINT_EVENT_INFO *print_event_info, - const char* logname); -static Exit_status dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info, - const char* logname); +static Exit_status dump_local_log_entries(PRINT_EVENT_INFO *, const char*); +static Exit_status dump_remote_log_entries(PRINT_EVENT_INFO *, const char*); static Exit_status dump_log_entries(const char* logname); static Exit_status safe_connect(); @@ -858,7 +856,11 @@ static bool print_row_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, /* end of statement check: i) destroy/free ignored maps - ii) if skip event, flush cache now + ii) if skip event + a) since we are skipping the last event, + append END-MARKER(') to body cache (if required) + + b) flush cache now */ if (is_stmt_end) { @@ -886,6 +888,12 @@ static bool print_row_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, */ if (skip_event) { + // append END-MARKER(') with delimiter + IO_CACHE *const body_cache= &print_event_info->body_cache; + if (my_b_tell(body_cache)) + my_b_printf(body_cache, "'%s\n", print_event_info->delimiter); + + // flush cache if ((copy_event_cache_to_file_and_reinit(&print_event_info->head_cache, result_file) || copy_event_cache_to_file_and_reinit(&print_event_info->body_cache, result_file))) return 1; |