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.
This commit is contained in:
Marko Mäkelä 2017-05-06 23:10:52 +03:00
parent 8f05c848c5
commit 3f5a8cbe12

View file

@ -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;