diff options
author | Vlad Lesin <vlad_lesin@mail.ru> | 2020-05-13 14:32:12 +0300 |
---|---|---|
committer | Vlad Lesin <vlad_lesin@mail.ru> | 2020-05-19 11:25:56 +0300 |
commit | 0f9bfcc323f76389eab23220d757e1cdfacb0543 (patch) | |
tree | 0df3910f96c0d0f51c3f27c8d3596c1506fcdeaf /storage/innobase/include | |
parent | a84060567c1b9c3f1efd94fabc99a40b3f91b598 (diff) | |
download | mariadb-git-0f9bfcc323f76389eab23220d757e1cdfacb0543.tar.gz |
MDEV-22554: "mariabackup --prepare" exits with code 0 even though innodb
error is logged
The fix is to set flag in ib::error::~error() and check it in
mariabackup.
ib::error::error() is replaced with ib::warn::warn() in
AIO::linux_create_io_ctx() because of two reasons:
1) if we leave it as is, then mariabackup MTR tests will fail with --mem
option, because Linux AIO can not be used on tmpfs,
2) when Linux AIO can not be initialized, InnoDB falls back to simulated
AIO, so such sutiation is not fatal error, it should be treated as warning.
Diffstat (limited to 'storage/innobase/include')
-rw-r--r-- | storage/innobase/include/ut0ut.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/storage/innobase/include/ut0ut.h b/storage/innobase/include/ut0ut.h index 000d8b6b379..741687c07d7 100644 --- a/storage/innobase/include/ut0ut.h +++ b/storage/innobase/include/ut0ut.h @@ -464,6 +464,14 @@ class error : public logger { public: ATTRIBUTE_COLD ~error(); + /** Indicates that error::~error() was invoked. Can be used to + determine if error messages were logged during innodb code execution. + @return true if there were error messages, false otherwise. */ + static bool was_logged() { return logged; } + +private: + /** true if error::~error() was invoked, false otherwise */ + static bool logged; }; /** The class fatal is used to emit an error message and stop the server |