Skip to content

Commit 3f5a8cb

Browse files
committed
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.
1 parent 8f05c84 commit 3f5a8cb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

storage/innobase/buf/buf0rea.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ buf_read_ahead_random(
368368
switch (err) {
369369
case DB_SUCCESS:
370370
case DB_TABLESPACE_TRUNCATED:
371+
case DB_ERROR:
371372
break;
372373
case DB_TABLESPACE_DELETED:
373374
ib::info() << "Random readahead trying to"
@@ -470,6 +471,7 @@ buf_read_page_background(
470471
switch (err) {
471472
case DB_SUCCESS:
472473
case DB_TABLESPACE_TRUNCATED:
474+
case DB_ERROR:
473475
break;
474476
case DB_TABLESPACE_DELETED:
475477
ib::info() << "trying to read page " << page_id
@@ -750,6 +752,7 @@ buf_read_ahead_linear(
750752
switch (err) {
751753
case DB_SUCCESS:
752754
case DB_TABLESPACE_TRUNCATED:
755+
case DB_ERROR:
753756
break;
754757
case DB_TABLESPACE_DELETED:
755758
ib::info() << "linear readahead trying to"
@@ -848,6 +851,7 @@ buf_read_ibuf_merge_pages(
848851
switch(err) {
849852
case DB_SUCCESS:
850853
case DB_TABLESPACE_TRUNCATED:
854+
case DB_ERROR:
851855
break;
852856
case DB_TABLESPACE_DELETED:
853857
goto tablespace_deleted;

0 commit comments

Comments
 (0)