Commit 109b8582 authored by Jan Lindström's avatar Jan Lindström

MDEV-13432: Assertion failure in buf0rea.cc line 577

Page read could return DB_PAGE_CORRUPTED error that should
be reported and passed to upper layer. In case of unknown
error code we should print both number and string.
parent 48fe8326
...@@ -378,13 +378,14 @@ buf_read_ahead_random( ...@@ -378,13 +378,14 @@ buf_read_ahead_random(
space, i); space, i);
break; break;
case DB_DECRYPTION_FAILED: case DB_DECRYPTION_FAILED:
case DB_PAGE_CORRUPTED:
ib_logf(IB_LOG_LEVEL_ERROR, ib_logf(IB_LOG_LEVEL_ERROR,
"Random readahead failed to decrypt page " "Random readahead failed to decrypt page or page corrupted "
ULINTPF "." ULINTPF " .", ULINTPF ":" ULINTPF " .",
space, i); space, i);
break; break;
default: default:
ut_error; ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in random readahead", err, ut_strerr(err));
} }
} }
} }
...@@ -514,15 +515,15 @@ buf_read_page_async( ...@@ -514,15 +515,15 @@ buf_read_page_async(
" in nonexisting or being-dropped tablespace", " in nonexisting or being-dropped tablespace",
space, offset); space, offset);
break; break;
case DB_DECRYPTION_FAILED: case DB_DECRYPTION_FAILED:
case DB_PAGE_CORRUPTED:
ib_logf(IB_LOG_LEVEL_ERROR, ib_logf(IB_LOG_LEVEL_ERROR,
"Async page read failed to decrypt page " "Async page read failed to decrypt page or page corrupted "
ULINTPF ":" ULINTPF ".", ULINTPF ":" ULINTPF ".",
space, offset); space, offset);
break; break;
default: default:
ut_error; ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in async page read", err, ut_strerr(err));
} }
srv_stats.buf_pool_reads.add(count); srv_stats.buf_pool_reads.add(count);
...@@ -798,13 +799,14 @@ buf_read_ahead_linear( ...@@ -798,13 +799,14 @@ buf_read_ahead_linear(
space, i); space, i);
break; break;
case DB_DECRYPTION_FAILED: case DB_DECRYPTION_FAILED:
case DB_PAGE_CORRUPTED:
ib_logf(IB_LOG_LEVEL_ERROR, ib_logf(IB_LOG_LEVEL_ERROR,
"Linear readahead failed to decrypt page " "Linear readahead failed to decrypt page or page corrupted"
ULINTPF ":" ULINTPF ".", ULINTPF ":" ULINTPF ".",
space, i); space, i);
break; break;
default: default:
ut_error; ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in linear readahead", err, ut_strerr(err));
} }
} }
} }
...@@ -901,13 +903,14 @@ buf_read_ibuf_merge_pages( ...@@ -901,13 +903,14 @@ buf_read_ibuf_merge_pages(
zip_size, FALSE); zip_size, FALSE);
break; break;
case DB_DECRYPTION_FAILED: case DB_DECRYPTION_FAILED:
case DB_PAGE_CORRUPTED:
ib_logf(IB_LOG_LEVEL_ERROR, ib_logf(IB_LOG_LEVEL_ERROR,
"Failed to decrypt insert buffer page " "Failed to decrypt insert buffer page or page corrupted "
ULINTPF ":" ULINTPF ".", ULINTPF ":" ULINTPF ".",
space_ids[i], page_nos[i]); space_ids[i], page_nos[i]);
break; break;
default: default:
ut_error; ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in insert buffer read", err, ut_strerr(err));
} }
} }
......
...@@ -428,13 +428,14 @@ buf_read_ahead_random( ...@@ -428,13 +428,14 @@ buf_read_ahead_random(
space, i); space, i);
break; break;
case DB_DECRYPTION_FAILED: case DB_DECRYPTION_FAILED:
case DB_PAGE_CORRUPTED:
ib_logf(IB_LOG_LEVEL_ERROR, ib_logf(IB_LOG_LEVEL_ERROR,
"Random readahead failed to decrypt page " "Random readahead failed to decrypt page or page corrupted "
ULINTPF ":" ULINTPF ".", ULINTPF ":" ULINTPF ".",
i, space); i, space);
break; break;
default: default:
ut_error; ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in random readahead", err, ut_strerr(err));
} }
} }
} }
...@@ -570,13 +571,14 @@ buf_read_page_async( ...@@ -570,13 +571,14 @@ buf_read_page_async(
break; break;
case DB_DECRYPTION_FAILED: case DB_DECRYPTION_FAILED:
case DB_PAGE_CORRUPTED:
ib_logf(IB_LOG_LEVEL_ERROR, ib_logf(IB_LOG_LEVEL_ERROR,
"Async page read failed to decrypt page " "Async page read failed to decrypt page or page corrupted "
ULINTPF ":" ULINTPF ".", ULINTPF ":" ULINTPF ".",
space, offset); space, offset);
break; break;
default: default:
ut_error; ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in async page read", err, ut_strerr(err));
} }
srv_stats.buf_pool_reads.add(count); srv_stats.buf_pool_reads.add(count);
...@@ -863,13 +865,14 @@ buf_read_ahead_linear( ...@@ -863,13 +865,14 @@ buf_read_ahead_linear(
break; break;
case DB_DECRYPTION_FAILED: case DB_DECRYPTION_FAILED:
case DB_PAGE_CORRUPTED:
ib_logf(IB_LOG_LEVEL_ERROR, ib_logf(IB_LOG_LEVEL_ERROR,
"Linear readahead failed to decrypt page " "Linear readahead failed to decrypt page or page corrupted"
ULINTPF ":" ULINTPF ".", ULINTPF ":" ULINTPF ".",
i, space); i, space);
break; break;
default: default:
ut_error; ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in linear readahead", err, ut_strerr(err));
} }
} }
} }
...@@ -963,13 +966,14 @@ buf_read_ibuf_merge_pages( ...@@ -963,13 +966,14 @@ buf_read_ibuf_merge_pages(
ibuf_delete_for_discarded_space(space_ids[i]); ibuf_delete_for_discarded_space(space_ids[i]);
break; break;
case DB_DECRYPTION_FAILED: case DB_DECRYPTION_FAILED:
case DB_PAGE_CORRUPTED:
ib_logf(IB_LOG_LEVEL_ERROR, ib_logf(IB_LOG_LEVEL_ERROR,
"Failed to decrypt insert buffer page " "Failed to decrypt insert buffer page or page corrupted "
ULINTPF ":" ULINTPF ".", ULINTPF ":" ULINTPF ".",
space_ids[i], page_nos[i]); space_ids[i], page_nos[i]);
break; break;
default: default:
ut_error; ib_logf(IB_LOG_LEVEL_FATAL, "Error %u (%s) in insert buffer read", err, ut_strerr(err));
} }
} }
......
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