diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-15 13:49:18 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-15 13:49:18 +0200 |
commit | 1cdddcef7e6e28a914c7d09168aafc72afcad69f (patch) | |
tree | ed51b66e1315652e1f3c841cf85223ac2736a40f | |
parent | 2e34a031f846dbfee547e304328b6450cd61aaee (diff) | |
parent | 938889a7bc6210784e944ba1679637dfc19c38b2 (diff) | |
download | mariadb-git-bb-10.4-MDEV-18726.tar.gz |
Merge branch '10.4-MDEV-18726-large-page-overallocate' of https://github.com/grooverdan/mariadb-server into HEADbb-10.4-MDEV-18726
-rw-r--r-- | mysql-test/suite/innodb/r/innodb.result | 6 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/innodb.test | 3 | ||||
-rw-r--r-- | storage/innobase/buf/buf0buf.cc | 14 |
3 files changed, 8 insertions, 15 deletions
diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result index 100845a081b..39130049c33 100644 --- a/mysql-test/suite/innodb/r/innodb.result +++ b/mysql-test/suite/innodb/r/innodb.result @@ -1688,9 +1688,9 @@ select count(*) from t1 where x = 18446744073709551601; count(*) 1 drop table t1; -SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total'; -variable_value -ok +SELECT IF(variable_value BETWEEN 488 AND 512, 'OK', variable_value) FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total'; +IF(variable_value BETWEEN 488 AND 512, 'OK', variable_value) +OK SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size'; variable_value 16384 diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test index dd8a67eeec2..985376446c3 100644 --- a/mysql-test/suite/innodb/t/innodb.test +++ b/mysql-test/suite/innodb/t/innodb.test @@ -1321,8 +1321,7 @@ drop table t1; # Test for testable InnoDB status variables. This test # uses previous ones(pages_created, rows_deleted, ...). ---replace_result 511 ok 512 ok 2047 ok 513 ok 514 ok 515 ok -SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total'; +SELECT IF(variable_value BETWEEN 488 AND 512, 'OK', variable_value) FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total'; SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size'; SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted'; SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted'; diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index b1f158525af..5d41a8e22f2 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -1565,11 +1565,6 @@ buf_chunk_init( /* Round down to a multiple of page size, although it already should be. */ mem_size = ut_2pow_round(mem_size, ulint(srv_page_size)); - /* Reserve space for the block descriptors. */ - mem_size += ut_2pow_round((mem_size >> srv_page_size_shift) - * (sizeof *block) - + (srv_page_size - 1), - ulint(srv_page_size)); DBUG_EXECUTE_IF("ib_buf_chunk_init_fails", return(NULL);); @@ -1891,8 +1886,7 @@ buf_pool_init_instance( ut_min(BUF_READ_AHEAD_PAGES, ut_2_power_up(buf_pool->curr_size / BUF_READ_AHEAD_PORTION)); - buf_pool->curr_pool_size = buf_pool->curr_size - << srv_page_size_shift; + buf_pool->curr_pool_size = buf_pool_size; buf_pool->old_size = buf_pool->curr_size; buf_pool->n_chunks_new = buf_pool->n_chunks; @@ -2696,12 +2690,12 @@ buf_pool_resize() ut_ad(UT_LIST_GET_LEN(buf_pool->withdraw) == 0); ut_ad(buf_pool->flush_rbt == NULL); - buf_pool->curr_size = new_instance_size; - buf_pool->n_chunks_new = (new_instance_size << srv_page_size_shift) / srv_buf_pool_chunk_unit; + buf_pool->curr_size = buf_pool->n_chunks_new * buf_pool->chunks->size; + buf_pool_mutex_exit(buf_pool); } #ifdef BTR_CUR_HASH_ADAPT @@ -3031,7 +3025,7 @@ calc_buf_pool_size: ut_2_power_up(buf_pool->curr_size / BUF_READ_AHEAD_PORTION)); buf_pool->curr_pool_size - = buf_pool->curr_size << srv_page_size_shift; + = buf_pool->n_chunks * srv_buf_pool_chunk_unit; curr_size += buf_pool->curr_pool_size; buf_pool->old_size = buf_pool->curr_size; } |