diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-06-06 17:51:28 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-06-06 17:51:28 +0200 |
commit | 4749d40c635634e25e07d28ce1a04e9263bcc375 (patch) | |
tree | c5bb3287675cd8676d76c8ee42ef2d79cc599e25 /sql/log_event.h | |
parent | 1ff1cb10fc236010b5969058cab934c2b306c931 (diff) | |
parent | 33ef993773449cb3917665b188f6b6575d399bd0 (diff) | |
download | mariadb-git-4749d40c635634e25e07d28ce1a04e9263bcc375.tar.gz |
5.5 merge
Diffstat (limited to 'sql/log_event.h')
-rw-r--r-- | sql/log_event.h | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/sql/log_event.h b/sql/log_event.h index b5b488f320d..b54e2028ef2 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. +/* 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 @@ -1121,8 +1121,35 @@ public: const Format_description_log_event *description_event, my_bool crc_check); + + /** + Reads an event from a binlog or relay log. Used by the dump thread + this method reads the event into a raw buffer without parsing it. + + @Note If mutex is 0, the read will proceed without mutex. + + @Note If a log name is given than the method will check if the + given binlog is still active. + + @param[in] file log file to be read + @param[out] packet packet to hold the event + @param[in] lock the lock to be used upon read + @param[in] log_file_name_arg the log's file name + @param[out] is_binlog_active is the current log still active + + @retval 0 success + @retval LOG_READ_EOF end of file, nothing was read + @retval LOG_READ_BOGUS malformed event + @retval LOG_READ_IO io error while reading + @retval LOG_READ_MEM packet memory allocation failed + @retval LOG_READ_TRUNC only a partial event could be read + @retval LOG_READ_TOO_LARGE event too large + */ static int read_log_event(IO_CACHE* file, String* packet, - mysql_mutex_t* log_lock, uint8 checksum_alg_arg); + mysql_mutex_t* log_lock, + uint8 checksum_alg_arg, + const char *log_file_name_arg = NULL, + bool* is_binlog_active = NULL); /* init_show_field_list() prepares the column names and types for the output of SHOW BINLOG EVENTS; it is used only by SHOW BINLOG |