Commit 3f5a8cbe 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 8f05c848
...@@ -368,6 +368,7 @@ buf_read_ahead_random( ...@@ -368,6 +368,7 @@ buf_read_ahead_random(
switch (err) { switch (err) {
case DB_SUCCESS: case DB_SUCCESS:
case DB_TABLESPACE_TRUNCATED: case DB_TABLESPACE_TRUNCATED:
case DB_ERROR:
break; break;
case DB_TABLESPACE_DELETED: case DB_TABLESPACE_DELETED:
ib::info() << "Random readahead trying to" ib::info() << "Random readahead trying to"
...@@ -470,6 +471,7 @@ buf_read_page_background( ...@@ -470,6 +471,7 @@ buf_read_page_background(
switch (err) { switch (err) {
case DB_SUCCESS: case DB_SUCCESS:
case DB_TABLESPACE_TRUNCATED: case DB_TABLESPACE_TRUNCATED:
case DB_ERROR:
break; break;
case DB_TABLESPACE_DELETED: case DB_TABLESPACE_DELETED:
ib::info() << "trying to read page " << page_id ib::info() << "trying to read page " << page_id
...@@ -750,6 +752,7 @@ buf_read_ahead_linear( ...@@ -750,6 +752,7 @@ buf_read_ahead_linear(
switch (err) { switch (err) {
case DB_SUCCESS: case DB_SUCCESS:
case DB_TABLESPACE_TRUNCATED: case DB_TABLESPACE_TRUNCATED:
case DB_ERROR:
break; break;
case DB_TABLESPACE_DELETED: case DB_TABLESPACE_DELETED:
ib::info() << "linear readahead trying to" ib::info() << "linear readahead trying to"
...@@ -848,6 +851,7 @@ buf_read_ibuf_merge_pages( ...@@ -848,6 +851,7 @@ buf_read_ibuf_merge_pages(
switch(err) { switch(err) {
case DB_SUCCESS: case DB_SUCCESS:
case DB_TABLESPACE_TRUNCATED: case DB_TABLESPACE_TRUNCATED:
case DB_ERROR:
break; break;
case DB_TABLESPACE_DELETED: case DB_TABLESPACE_DELETED:
goto tablespace_deleted; goto 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