diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 7eca60417a1..a05f3715cb9 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -1124,6 +1124,7 @@ buf_block_init( block->frame = frame; block->page.buf_pool_index = buf_pool_index(buf_pool); + block->page.flush_type = BUF_FLUSH_LRU; block->page.state = BUF_BLOCK_NOT_USED; block->page.buf_fix_count = 0; block->page.io_fix = BUF_IO_NONE; @@ -3784,6 +3785,7 @@ buf_page_init_low( bpage->flush_type = BUF_FLUSH_LRU; bpage->io_fix = BUF_IO_NONE; bpage->buf_fix_count = 0; + bpage->old = 0; bpage->freed_page_clock = 0; bpage->access_time = 0; bpage->newest_modification = 0; diff --git a/storage/innobase/include/mach0data.ic b/storage/innobase/include/mach0data.ic index fe55adaf002..881b2b6055f 100644 --- a/storage/innobase/include/mach0data.ic +++ b/storage/innobase/include/mach0data.ic @@ -38,7 +38,7 @@ mach_write_to_1( ulint n) /*!< in: ulint integer to be stored, >= 0, < 256 */ { ut_ad(b); - ut_ad((n | 0xFFUL) <= 0xFFUL); + ut_ad((n & ~0xFFUL) == 0); b[0] = (byte) n; } @@ -68,7 +68,7 @@ mach_write_to_2( ulint n) /*!< in: ulint integer to be stored */ { ut_ad(b); - ut_ad((n | 0xFFFFUL) <= 0xFFFFUL); + ut_ad((n & ~0xFFFFUL) == 0); b[0] = (byte)(n >> 8); b[1] = (byte)(n); @@ -131,7 +131,7 @@ mach_write_to_3( ulint n) /*!< in: ulint integer to be stored */ { ut_ad(b); - ut_ad((n | 0xFFFFFFUL) <= 0xFFFFFFUL); + ut_ad((n & ~0xFFFFFFUL) == 0); b[0] = (byte)(n >> 16); b[1] = (byte)(n >> 8); diff --git a/storage/xtradb/buf/buf0buf.cc b/storage/xtradb/buf/buf0buf.cc index 50a13da262c..ebfc813f13d 100644 --- a/storage/xtradb/buf/buf0buf.cc +++ b/storage/xtradb/buf/buf0buf.cc @@ -1189,6 +1189,7 @@ buf_block_init( block->frame = frame; block->page.buf_pool_index = buf_pool_index(buf_pool); + block->page.flush_type = BUF_FLUSH_LRU; block->page.state = BUF_BLOCK_NOT_USED; block->page.buf_fix_count = 0; block->page.io_fix = BUF_IO_NONE; diff --git a/storage/xtradb/include/mach0data.ic b/storage/xtradb/include/mach0data.ic index 27b9f62b552..bf2c735b0da 100644 --- a/storage/xtradb/include/mach0data.ic +++ b/storage/xtradb/include/mach0data.ic @@ -38,7 +38,7 @@ mach_write_to_1( ulint n) /*!< in: ulint integer to be stored, >= 0, < 256 */ { ut_ad(b); - ut_ad((n | 0xFFUL) <= 0xFFUL); + ut_ad((n & ~0xFFUL) == 0); b[0] = (byte) n; } @@ -67,7 +67,7 @@ mach_write_to_2( ulint n) /*!< in: ulint integer to be stored */ { ut_ad(b); - ut_ad((n | 0xFFFFUL) <= 0xFFFFUL); + ut_ad((n & ~0xFFFFUL) == 0); b[0] = (byte)(n >> 8); b[1] = (byte)(n); @@ -115,7 +115,7 @@ mach_write_to_3( ulint n) /*!< in: ulint integer to be stored */ { ut_ad(b); - ut_ad((n | 0xFFFFFFUL) <= 0xFFFFFFUL); + ut_ad((n & ~0xFFFFFFUL) == 0); b[0] = (byte)(n >> 16); b[1] = (byte)(n >> 8);