mariadb/storage
Darshan M N c6713f651f Bug#23631471 BUF_BLOCK_ALIGN() MAKES INCORRECT ASSUMPTIONS ABOUT CHUNK SIZE
Issue:
======
Currently the approach we take to find the chunk corresponding to a given
pointer uses srv_buf_pool_chunk_unit based on the assumption that
srv_buf_pool_chunk_unit is the total size of all pages in a buffer pool
chunk. We first step back by srv_buf_pool_chunk_unit bytes and use
std::map::upper_bound() to find the first chunk in the map whose key >= the
resulting pointer.

However, the real size of a chunk (and thus, the total size of its pages)
may differ from the value configured with innodb_buffer_pool_chunk_size
due to rounding up to the OS page size. So, in some cases the above logic
gives us the wrong chunk.

Fix:
====
We find out the chunk corresponding to the give pointer without using
srv_buf_pool_chunk_unit. This is done by using std::map::upper_bound()
to find the next chunk in the map which appears right after the pointer and
decrementing the iterator, which would give us the chunk the pointer
belongs to.

Contribution by Alexey Kopytov.

RB: 13347
Reviewed-by: Debarun Banerjee <debarun.banerjee@oracle.com>
2016-11-02 12:29:41 +04:00
..
archive General spell fixing in comments and strings 2016-06-08 14:17:23 +03:00
blackhole
cassandra MDEV-6284: Remove CMakeLists.txt hack that mangled the server install file 2016-10-27 18:42:16 +03:00
connect MDEV-8791 - AIX: Unresolved Symbols during linking 2016-10-31 12:18:23 +04:00
csv Merge branch '10.0' into 10.1 2016-03-21 13:02:53 +01:00
example
federated MDEV-6353 my_ismbchar() and my_mbcharlen() refactoring 2016-05-17 15:27:10 +04:00
federatedx Merge branch '10.1' into 10.2 2016-06-30 16:38:05 +02:00
heap MDEV-8360 Clean-up CHARSET_INFO: strnncollsp: diff_if_only_endspace_difference 2016-03-31 11:04:48 +04:00
innobase Bug#23631471 BUF_BLOCK_ALIGN() MAKES INCORRECT ASSUMPTIONS ABOUT CHUNK SIZE 2016-11-02 12:29:41 +04:00
maria Fixed compiler warnings and failing tests 2016-10-05 01:11:08 +03:00
mroonga Merge branch '10.1' into 10.2 2016-09-09 08:33:08 +02:00
myisam Merge branch '10.1' into 10.2 2016-09-09 08:33:08 +02:00
myisammrg Merge branch '10.1' into 10.2 2016-06-30 16:38:05 +02:00
oqgraph Merge branch '10.1' into 10.2 2016-06-30 16:38:05 +02:00
perfschema MDEV-7769 MY_CHARSET_INFO refactoring# On branch 10.2 2016-10-10 14:36:09 +04:00
sequence test for group by pushdown with a view 2016-05-05 01:05:05 +02:00
sphinx Merge branch '10.0' into 10.1 2016-02-23 21:35:05 +01:00
spider Merge pull request #251 from ottok/ok-debpkg-10.2 2016-11-01 13:39:09 +02:00
test_sql_discovery do not quote numbers in the DEFAULT clause in SHOW CREATE 2016-08-27 16:59:11 +02:00
tokudb MDEV-6284: Remove CMakeLists.txt hack that mangled the server install file 2016-10-27 18:42:16 +03:00
xtradb MDEV-8791 - AIX: Unresolved Symbols during linking 2016-10-31 12:18:23 +04:00