diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-05-06 23:10:52 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-05-09 14:36:15 +0300 |
commit | 9d2c1d09aaa88a74bd8a823a2ef0492fd429c870 (patch) | |
tree | a39a6faaa5990864c82fe29d17fb2333df29a986 | |
parent | c92168fcd26aad35bd4cb5d65175e3545133f201 (diff) | |
download | mariadb-git-9d2c1d09aaa88a74bd8a823a2ef0492fd429c870.tar.gz |
MDEV-12253 post-push fix: buf_read_page_low() can return DB_ERROR
The function buf_read_page_low() invokes fil_io(), which can return
DB_ERROR when the requested page is out of bounds (such as when
restoring a buffer pool dump). The callers should be handling that.
-rw-r--r-- | storage/innobase/buf/buf0rea.cc | 6 | ||||
-rw-r--r-- | storage/xtradb/buf/buf0rea.cc | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/storage/innobase/buf/buf0rea.cc b/storage/innobase/buf/buf0rea.cc index e2c088c57e9..5525d8dd534 100644 --- a/storage/innobase/buf/buf0rea.cc +++ b/storage/innobase/buf/buf0rea.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2015, 2017, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2015, 2017, MariaDB Corporation. 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 the Free Software @@ -366,6 +366,7 @@ read_ahead: switch(err) { case DB_SUCCESS: + case DB_ERROR: break; case DB_TABLESPACE_DELETED: ib_logf(IB_LOG_LEVEL_WARN, @@ -503,6 +504,7 @@ buf_read_page_async( tablespace_version, offset); switch(err) { case DB_SUCCESS: + case DB_ERROR: break; case DB_TABLESPACE_DELETED: ib_logf(IB_LOG_LEVEL_ERROR, @@ -784,6 +786,7 @@ buf_read_ahead_linear( switch(err) { case DB_SUCCESS: + case DB_ERROR: break; case DB_TABLESPACE_DELETED: ib_logf(IB_LOG_LEVEL_WARN, @@ -885,6 +888,7 @@ buf_read_ibuf_merge_pages( switch(err) { case DB_SUCCESS: + case DB_ERROR: break; case DB_TABLESPACE_DELETED: diff --git a/storage/xtradb/buf/buf0rea.cc b/storage/xtradb/buf/buf0rea.cc index 85b04d37a08..b2b737b8d40 100644 --- a/storage/xtradb/buf/buf0rea.cc +++ b/storage/xtradb/buf/buf0rea.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. 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 the Free Software @@ -416,6 +416,7 @@ read_ahead: switch(err) { case DB_SUCCESS: + case DB_ERROR: break; case DB_TABLESPACE_DELETED: ib_logf(IB_LOG_LEVEL_WARN, @@ -557,6 +558,7 @@ buf_read_page_async( switch(err) { case DB_SUCCESS: + case DB_ERROR: break; case DB_TABLESPACE_DELETED: ib_logf(IB_LOG_LEVEL_ERROR, @@ -848,6 +850,7 @@ buf_read_ahead_linear( switch(err) { case DB_SUCCESS: + case DB_ERROR: break; case DB_TABLESPACE_DELETED: ib_logf(IB_LOG_LEVEL_WARN, @@ -950,6 +953,7 @@ buf_read_ibuf_merge_pages( switch(err) { case DB_SUCCESS: + case DB_ERROR: break; case DB_TABLESPACE_DELETED: |