From 2062c9a65acc660c03ab07b1358f6bf8aab4488f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 13 Aug 2014 09:03:28 +0300 Subject: [PATCH] MDEV-6567: Raw debug output in the error log. Removed raw debug output when no error on OS operation has not happened. --- storage/innobase/os/os0file.cc | 9 ++++++--- storage/xtradb/os/os0file.cc | 7 +++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 45ca07bc7c4..c70a3206910 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -802,6 +802,12 @@ os_file_handle_error_cond_exit( is better to ignore on_error_silent and print an error message to the log. */ + if (should_exit || !on_error_silent) { + fprintf(stderr, + " InnoDB: Operation %s to file %s and at line %ld\n", + operation, file, line); + } + if (should_exit || !on_error_silent) { ib_logf(IB_LOG_LEVEL_ERROR, "File %s: '%s' returned OS " "error " ULINTPF ".%s", name ? name : "(unknown)", @@ -809,9 +815,6 @@ os_file_handle_error_cond_exit( ? " Cannot continue operation" : ""); } - fprintf(stderr, - " InnoDB: at file %s and at line %ld\n", file, line); - if (should_exit) { exit(1); } diff --git a/storage/xtradb/os/os0file.cc b/storage/xtradb/os/os0file.cc index 394c3199f76..f29e5e07385 100644 --- a/storage/xtradb/os/os0file.cc +++ b/storage/xtradb/os/os0file.cc @@ -871,8 +871,11 @@ os_file_handle_error_cond_exit( is better to ignore on_error_silent and print an error message to the log. */ - fprintf(stderr, - " InnoDB: at file %s and at line %ld\n", file, line); + if (should_exit || !on_error_silent) { + fprintf(stderr, + " InnoDB: Operation %s to file %s and at line %ld\n", + operation, file, line); + } if (should_exit || !on_error_silent) { ib_logf(IB_LOG_LEVEL_ERROR, "File %s: '%s' returned OS "