summaryrefslogtreecommitdiff
path: root/storage/innobase/buf
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/buf')
-rw-r--r--storage/innobase/buf/buf0buf.cc13
-rw-r--r--storage/innobase/buf/buf0checksum.cc7
-rw-r--r--storage/innobase/buf/buf0flu.cc9
-rw-r--r--storage/innobase/buf/buf0rea.cc6
4 files changed, 15 insertions, 20 deletions
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index d9af896e5c0..ae13e5790d5 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -1580,6 +1580,7 @@ buf_block_init(
block->page.io_fix = BUF_IO_NONE;
block->page.flush_observer = NULL;
block->page.encrypted = false;
+ block->page.init_on_flush = false;
block->page.real_size = 0;
block->page.write_size = 0;
block->modify_clock = 0;
@@ -3156,7 +3157,7 @@ calc_buf_pool_size:
" dictionary.";
}
- /* normalize ibuf->max_size */
+ /* normalize ibuf.max_size */
ibuf_max_size_update(srv_change_buffer_max_size);
if (srv_buf_pool_old_size != srv_buf_pool_size) {
@@ -5545,6 +5546,7 @@ buf_page_init_for_read(
bpage->state = BUF_BLOCK_ZIP_PAGE;
bpage->id = page_id;
bpage->flush_observer = NULL;
+ bpage->init_on_flush = false;
ut_d(bpage->in_page_hash = FALSE);
ut_d(bpage->in_zip_hash = FALSE);
@@ -7006,7 +7008,7 @@ void
buf_stats_get_pool_info(
/*====================*/
buf_pool_t* buf_pool, /*!< in: buffer pool */
- ulint pool_id, /*!< in: buffer pool ID */
+ uint pool_id, /*!< in: buffer pool ID */
buf_pool_info_t* all_pool_info) /*!< in/out: buffer pool info
to fill */
{
@@ -7235,7 +7237,6 @@ buf_print_io(
/*=========*/
FILE* file) /*!< in/out: buffer where to print */
{
- ulint i;
buf_pool_info_t* pool_info;
buf_pool_info_t* pool_info_total;
@@ -7255,7 +7256,7 @@ buf_print_io(
ut_zalloc_nokey(sizeof *pool_info));
}
- for (i = 0; i < srv_buf_pool_instances; i++) {
+ for (uint i = 0; i < srv_buf_pool_instances; i++) {
buf_pool_t* buf_pool;
buf_pool = buf_pool_from_array(i);
@@ -7282,8 +7283,8 @@ buf_print_io(
"INDIVIDUAL BUFFER POOL INFO\n"
"----------------------\n", file);
- for (i = 0; i < srv_buf_pool_instances; i++) {
- fprintf(file, "---BUFFER POOL " ULINTPF "\n", i);
+ for (uint i = 0; i < srv_buf_pool_instances; i++) {
+ fprintf(file, "---BUFFER POOL %u\n", i);
buf_print_io_instance(&pool_info[i], file);
}
}
diff --git a/storage/innobase/buf/buf0checksum.cc b/storage/innobase/buf/buf0checksum.cc
index 2b2a74dd736..e98dc18452e 100644
--- a/storage/innobase/buf/buf0checksum.cc
+++ b/storage/innobase/buf/buf0checksum.cc
@@ -33,11 +33,8 @@ Created Aug 11, 2011 Vasil Dimov
#include "srv0srv.h"
#endif /* !UNIV_INNOCHECKSUM */
-/** the macro MYSQL_SYSVAR_ENUM() requires "long unsigned int" and if we
-use srv_checksum_algorithm_t here then we get a compiler error:
-ha_innodb.cc:12251: error: cannot convert 'srv_checksum_algorithm_t*' to
- 'long unsigned int*' in initialization */
-ulong srv_checksum_algorithm = SRV_CHECKSUM_ALGORITHM_INNODB;
+/** the value of innodb_checksum_algorithm */
+ulong srv_checksum_algorithm;
/** Calculate the CRC32 checksum of a page. The value is stored to the page
when it is written to a file and also checked for a match when reading from
diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc
index 65febb14a76..658d023c9c7 100644
--- a/storage/innobase/buf/buf0flu.cc
+++ b/storage/innobase/buf/buf0flu.cc
@@ -63,7 +63,7 @@ static const ulint buf_flush_wait_flushed_sleep_time = 10000;
#include <my_service_manager.h>
/** Number of pages flushed through non flush_list flushes. */
-static ulint buf_lru_flush_page_count = 0;
+ulint buf_lru_flush_page_count;
/** Flag indicating if the page_cleaner is in active state. This flag
is set to TRUE by the page_cleaner thread when it is spawned and is set
@@ -1040,7 +1040,10 @@ buf_flush_write_block_low(
ut_ad(space->purpose == FIL_TYPE_TABLESPACE
|| space->atomic_write_supported);
- if (!space->use_doublewrite()) {
+ const bool use_doublewrite = !bpage->init_on_flush
+ && space->use_doublewrite();
+
+ if (!use_doublewrite) {
ulint type = IORequest::WRITE | IORequest::DO_NOT_WAKE;
IORequest request(type, bpage);
@@ -1081,7 +1084,7 @@ buf_flush_write_block_low(
#endif
/* true means we want to evict this page from the
LRU list as well. */
- buf_page_io_complete(bpage, space->use_doublewrite(), true);
+ buf_page_io_complete(bpage, use_doublewrite, true);
ut_ad(err == DB_SUCCESS);
}
diff --git a/storage/innobase/buf/buf0rea.cc b/storage/innobase/buf/buf0rea.cc
index 0f67584fe4d..e2e93e2d0bb 100644
--- a/storage/innobase/buf/buf0rea.cc
+++ b/storage/innobase/buf/buf0rea.cc
@@ -703,12 +703,6 @@ buf_read_ahead_linear(const page_id_t page_id, ulint zip_size, bool ibuf)
ulint ibuf_mode = ibuf ? BUF_READ_IBUF_PAGES_ONLY : BUF_READ_ANY_PAGE;
- /* Since Windows XP seems to schedule the i/o handler thread
- very eagerly, and consequently it does not wait for the
- full read batch to be posted, we use special heuristics here */
-
- os_aio_simulated_put_read_threads_to_sleep();
-
for (i = low; i < high; i++) {
/* It is only sensible to do read-ahead in the non-sync
aio mode: hence FALSE as the first parameter */