diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-09-16 09:36:21 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-09-16 09:45:38 +0000 |
commit | ad17e8e518c85a156d05f091874dd5c2ddfafa32 (patch) | |
tree | 15f1adbbe8f8f32077e84039406867d33043edf7 /extra/mariabackup/xtrabackup.cc | |
parent | 93087d5fe74b0078e0b6db4233710648c79043cc (diff) | |
download | mariadb-git-ad17e8e518c85a156d05f091874dd5c2ddfafa32.tar.gz |
MDEV-13821 : mariabackup sometimes could lose ib_logf(FATAL) messages,
The messages are getting lost because they are written with fprintf()
but without fflush(), so abort() would lose buffered text.
Applied fix from 10.2, which makes in_logf() use
sql_print_information(), which in turn does proper flush after each message
Diffstat (limited to 'extra/mariabackup/xtrabackup.cc')
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index c746b469329..c42a282e203 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -95,6 +95,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include <sql_plugin.h> #include <srv0srv.h> #include <crc_glue.h> +#include <log.h> /* TODO: replace with appropriate macros used in InnoDB 5.6 */ #define PAGE_ZIP_MIN_SIZE_SHIFT 10 @@ -6483,6 +6484,11 @@ int main(int argc, char **argv) system_charset_info = &my_charset_utf8_general_ci; key_map_full.set_all(); + logger.init_base(); + logger.set_handlers(LOG_FILE, LOG_NONE, LOG_NONE); + mysql_mutex_init(key_LOCK_error_log, &LOCK_error_log, + MY_MUTEX_INIT_FAST); + handle_options(argc, argv, &client_defaults, &server_defaults); int argc_server; |