Skip to content

Commit b9f177f

Browse files
committed
MDEV-11254 cleanup: Remove buf_page_t::write_size
commit 6495806 removed all reads of buf_page_t::write_size. Let us remove the field altogether.
1 parent 1cccd3c commit b9f177f

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

storage/innobase/buf/buf0buf.cc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -547,13 +547,13 @@ static bool buf_page_decrypt_after_read(buf_page_t* bpage, fil_space_t* space)
547547
decompress_with_slot:
548548
ut_d(fil_page_type_validate(dst_frame));
549549

550-
bpage->write_size = fil_page_decompress(slot->crypt_buf,
551-
dst_frame);
550+
ulint write_size = fil_page_decompress(slot->crypt_buf,
551+
dst_frame);
552552
slot->release();
553553

554-
ut_ad(!bpage->write_size || fil_page_type_validate(dst_frame));
554+
ut_ad(!write_size || fil_page_type_validate(dst_frame));
555555
ut_ad(space->n_pending_ios > 0);
556-
return bpage->write_size != 0;
556+
return write_size != 0;
557557
}
558558

559559
if (space->crypt_data
@@ -1502,7 +1502,6 @@ buf_block_init(
15021502
block->page.io_fix = BUF_IO_NONE;
15031503
block->page.flush_observer = NULL;
15041504
block->page.real_size = 0;
1505-
block->page.write_size = 0;
15061505
block->modify_clock = 0;
15071506
block->page.slot = NULL;
15081507

@@ -5244,7 +5243,6 @@ buf_page_init_low(
52445243
bpage->access_time = 0;
52455244
bpage->newest_modification = 0;
52465245
bpage->oldest_modification = 0;
5247-
bpage->write_size = 0;
52485246
bpage->real_size = 0;
52495247
bpage->slot = NULL;
52505248

storage/innobase/include/buf0buf.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*****************************************************************************
22
33
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
4-
Copyright (c) 2013, 2020 MariaDB Corporation.
4+
Copyright (c) 2013, 2020, MariaDB Corporation.
55
66
This program is free software; you can redistribute it and/or modify it under
77
the terms of the GNU General Public License as published by the Free Software
@@ -1508,11 +1508,6 @@ class buf_page_t {
15081508
zip.data == NULL means an active
15091509
buf_pool->watch */
15101510

1511-
ulint write_size;/* Write size is set when this
1512-
page is first time written and then
1513-
if written again we check is TRIM
1514-
operation needed. */
1515-
15161511
ulint real_size;/*!< Real size of the page
15171512
Normal pages == UNIV_PAGE_SIZE
15181513
page compressed pages, payload

0 commit comments

Comments
 (0)