diff options
author | Pedro Gomes <pedro.gomes@oracle.com> | 2013-02-15 22:18:37 +0000 |
---|---|---|
committer | Pedro Gomes <pedro.gomes@oracle.com> | 2013-02-15 22:18:37 +0000 |
commit | 91e043c304065a5786218f343f08c433faf117b5 (patch) | |
tree | c0584d4690d763c4e4d28ce67c668124f3b79e07 /sql/log_event.h | |
parent | 776b5697958381d751bc8c45ab7413cece2ed7f7 (diff) | |
parent | 7e8c887786dc76c0057acb5a73ff4355a4ea87b1 (diff) | |
download | mariadb-git-91e043c304065a5786218f343f08c433faf117b5.tar.gz |
BUG#13545447: RPL_ROTATE_LOGS FAILS DUE TO CONCURRENCY ISSUES IN REP. CODE
Merge from mysql 5.1 to mysql 5.5
Diffstat (limited to 'sql/log_event.h')
-rw-r--r-- | sql/log_event.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/sql/log_event.h b/sql/log_event.h index 5b318463060..72a269304ca 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 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 @@ -997,8 +997,34 @@ public: mysql_mutex_t* log_lock, const Format_description_log_event *description_event); + + /** + 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); + mysql_mutex_t* log_lock, + const char *log_file_name_arg= NULL, + bool* is_binlog_active= false); /* init_show_field_list() prepares the column names and types for the output of SHOW BINLOG EVENTS; it is used only by SHOW BINLOG |