From 3f5a8cbe122847f9616231a82c448708bee5e10b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Sat, 6 May 2017 23:10:52 +0300 Subject: [PATCH] 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. --- storage/innobase/buf/buf0rea.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/storage/innobase/buf/buf0rea.cc b/storage/innobase/buf/buf0rea.cc index 53946dc1905..12775c74daf 100644 --- a/storage/innobase/buf/buf0rea.cc +++ b/storage/innobase/buf/buf0rea.cc @@ -368,6 +368,7 @@ read_ahead: switch (err) { case DB_SUCCESS: case DB_TABLESPACE_TRUNCATED: + case DB_ERROR: break; case DB_TABLESPACE_DELETED: ib::info() << "Random readahead trying to" @@ -470,6 +471,7 @@ buf_read_page_background( switch (err) { case DB_SUCCESS: case DB_TABLESPACE_TRUNCATED: + case DB_ERROR: break; case DB_TABLESPACE_DELETED: ib::info() << "trying to read page " << page_id @@ -750,6 +752,7 @@ buf_read_ahead_linear( switch (err) { case DB_SUCCESS: case DB_TABLESPACE_TRUNCATED: + case DB_ERROR: break; case DB_TABLESPACE_DELETED: ib::info() << "linear readahead trying to" @@ -848,6 +851,7 @@ tablespace_deleted: switch(err) { case DB_SUCCESS: case DB_TABLESPACE_TRUNCATED: + case DB_ERROR: break; case DB_TABLESPACE_DELETED: goto tablespace_deleted;