mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
MDEV-9040: 10.1.8 fails after upgrade from 10.0.21
Analysis: Lengths which are not UNIV_SQL_NULL, but bigger than the following number indicate that a field contains a reference to an externally stored part of the field in the tablespace. The length field then contains the sum of the following flag and the locally stored len. This was incorrectly set to define UNIV_EXTERN_STORAGE_FIELD (UNIV_SQL_NULL - UNIV_PAGE_SIZE_MAX) When it should be define UNIV_EXTERN_STORAGE_FIELD (UNIV_SQL_NULL - UNIV_PAGE_SIZE_DEF) Additionally, we need to disable support for > 16K page size for row compressed tables because a compressed page directory entry reserves 14 bits for the start offset and 2 bits for flags. This limits the uncompressed page size to 16k. To support larger pages page directory entry needs to be larger.
This commit is contained in:
parent
f9e320c82d
commit
25f8738112
27 changed files with 222 additions and 191 deletions
|
|
@ -747,9 +747,7 @@ fil_node_open_file(
|
|||
}
|
||||
|
||||
if (!fsp_flags_is_compressed(flags)) {
|
||||
node->size = (ulint)
|
||||
(size_bytes
|
||||
/ fsp_flags_get_page_size(flags));
|
||||
node->size = (ulint) (size_bytes / UNIV_PAGE_SIZE);
|
||||
} else {
|
||||
node->size = (ulint)
|
||||
(size_bytes
|
||||
|
|
@ -4138,8 +4136,11 @@ fil_user_tablespace_find_space_id(
|
|||
false, page, 0);
|
||||
}
|
||||
|
||||
bool compressed_ok = !buf_page_is_corrupted(
|
||||
false, page, page_size);
|
||||
bool compressed_ok = false;
|
||||
if (page_size <= UNIV_PAGE_SIZE_DEF) {
|
||||
compressed_ok = !buf_page_is_corrupted(
|
||||
false, page, page_size);
|
||||
}
|
||||
|
||||
if (uncompressed_ok || compressed_ok) {
|
||||
|
||||
|
|
@ -5876,6 +5877,8 @@ _fil_io(
|
|||
case 4096: zip_size_shift = 12; break;
|
||||
case 8192: zip_size_shift = 13; break;
|
||||
case 16384: zip_size_shift = 14; break;
|
||||
case 32768: zip_size_shift = 15; break;
|
||||
case 65536: zip_size_shift = 16; break;
|
||||
default: ut_error;
|
||||
}
|
||||
offset = ((os_offset_t) block_offset << zip_size_shift)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue