Commit 9d2c1d09 authored by Marko Mäkelä's avatar Marko Mäkelä

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.
parent c92168fc
/***************************************************************************** /*****************************************************************************
Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. 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 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 the terms of the GNU General Public License as published by the Free Software
...@@ -366,6 +366,7 @@ buf_read_ahead_random( ...@@ -366,6 +366,7 @@ buf_read_ahead_random(
switch(err) { switch(err) {
case DB_SUCCESS: case DB_SUCCESS:
case DB_ERROR:
break; break;
case DB_TABLESPACE_DELETED: case DB_TABLESPACE_DELETED:
ib_logf(IB_LOG_LEVEL_WARN, ib_logf(IB_LOG_LEVEL_WARN,
...@@ -503,6 +504,7 @@ buf_read_page_async( ...@@ -503,6 +504,7 @@ buf_read_page_async(
tablespace_version, offset); tablespace_version, offset);
switch(err) { switch(err) {
case DB_SUCCESS: case DB_SUCCESS:
case DB_ERROR:
break; break;
case DB_TABLESPACE_DELETED: case DB_TABLESPACE_DELETED:
ib_logf(IB_LOG_LEVEL_ERROR, ib_logf(IB_LOG_LEVEL_ERROR,
...@@ -784,6 +786,7 @@ buf_read_ahead_linear( ...@@ -784,6 +786,7 @@ buf_read_ahead_linear(
switch(err) { switch(err) {
case DB_SUCCESS: case DB_SUCCESS:
case DB_ERROR:
break; break;
case DB_TABLESPACE_DELETED: case DB_TABLESPACE_DELETED:
ib_logf(IB_LOG_LEVEL_WARN, ib_logf(IB_LOG_LEVEL_WARN,
...@@ -885,6 +888,7 @@ buf_read_ibuf_merge_pages( ...@@ -885,6 +888,7 @@ buf_read_ibuf_merge_pages(
switch(err) { switch(err) {
case DB_SUCCESS: case DB_SUCCESS:
case DB_ERROR:
break; break;
case DB_TABLESPACE_DELETED: case DB_TABLESPACE_DELETED:
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. 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 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 the terms of the GNU General Public License as published by the Free Software
...@@ -416,6 +416,7 @@ buf_read_ahead_random( ...@@ -416,6 +416,7 @@ buf_read_ahead_random(
switch(err) { switch(err) {
case DB_SUCCESS: case DB_SUCCESS:
case DB_ERROR:
break; break;
case DB_TABLESPACE_DELETED: case DB_TABLESPACE_DELETED:
ib_logf(IB_LOG_LEVEL_WARN, ib_logf(IB_LOG_LEVEL_WARN,
...@@ -557,6 +558,7 @@ buf_read_page_async( ...@@ -557,6 +558,7 @@ buf_read_page_async(
switch(err) { switch(err) {
case DB_SUCCESS: case DB_SUCCESS:
case DB_ERROR:
break; break;
case DB_TABLESPACE_DELETED: case DB_TABLESPACE_DELETED:
ib_logf(IB_LOG_LEVEL_ERROR, ib_logf(IB_LOG_LEVEL_ERROR,
...@@ -848,6 +850,7 @@ buf_read_ahead_linear( ...@@ -848,6 +850,7 @@ buf_read_ahead_linear(
switch(err) { switch(err) {
case DB_SUCCESS: case DB_SUCCESS:
case DB_ERROR:
break; break;
case DB_TABLESPACE_DELETED: case DB_TABLESPACE_DELETED:
ib_logf(IB_LOG_LEVEL_WARN, ib_logf(IB_LOG_LEVEL_WARN,
...@@ -950,6 +953,7 @@ buf_read_ibuf_merge_pages( ...@@ -950,6 +953,7 @@ buf_read_ibuf_merge_pages(
switch(err) { switch(err) {
case DB_SUCCESS: case DB_SUCCESS:
case DB_ERROR:
break; break;
case DB_TABLESPACE_DELETED: case DB_TABLESPACE_DELETED:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment