]>
Commit | Line | Data |
---|---|---|
b4e1fa2c AM |
1 | # name : innodb_buffer_pool_shm.patch |
2 | # introduced : 12 | |
3 | # maintainer : Yasufumi | |
4 | # | |
5 | #!!! notice !!! | |
6 | # Any small change to this file in the main branch | |
7 | # should be done or reviewed by the maintainer! | |
b4e1fa2c | 8 | diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c |
11822e22 AM |
9 | --- a/storage/innobase/buf/buf0buf.c 2011-04-09 18:48:47.000000000 +0400 |
10 | +++ b/storage/innobase/buf/buf0buf.c 2011-04-09 18:48:48.000000000 +0400 | |
adf0fb13 | 11 | @@ -1006,10 +1006,12 @@ |
b4e1fa2c AM |
12 | buf_block_t* block; |
13 | byte* frame; | |
b4e1fa2c | 14 | ulint i; |
a9ee80b9 | 15 | + ulint size_target; |
b4e1fa2c AM |
16 | |
17 | /* Round down to a multiple of page size, | |
18 | although it already should be. */ | |
19 | mem_size = ut_2pow_round(mem_size, UNIV_PAGE_SIZE); | |
a9ee80b9 | 20 | + size_target = (mem_size / UNIV_PAGE_SIZE) - 1; |
b4e1fa2c AM |
21 | /* Reserve space for the block descriptors. */ |
22 | mem_size += ut_2pow_round((mem_size / UNIV_PAGE_SIZE) * (sizeof *block) | |
23 | + (UNIV_PAGE_SIZE - 1), UNIV_PAGE_SIZE); | |
adf0fb13 | 24 | @@ -1047,6 +1049,10 @@ |
b4e1fa2c AM |
25 | chunk->size = size; |
26 | } | |
27 | ||
a9ee80b9 ER |
28 | + if (chunk->size > size_target) { |
29 | + chunk->size = size_target; | |
30 | + } | |
31 | + | |
b4e1fa2c AM |
32 | /* Init block structs and assign frames for them. Then we |
33 | assign the frames to the first blocks (we already mapped the | |
34 | memory above). */ | |
b4e1fa2c | 35 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc |
11822e22 AM |
36 | --- a/storage/innobase/handler/ha_innodb.cc 2011-04-09 18:48:47.000000000 +0400 |
37 | +++ b/storage/innobase/handler/ha_innodb.cc 2011-04-09 18:48:48.000000000 +0400 | |
adf0fb13 | 38 | @@ -194,6 +194,8 @@ |
b4e1fa2c AM |
39 | static my_bool innobase_create_status_file = FALSE; |
40 | static my_bool innobase_stats_on_metadata = TRUE; | |
41 | static my_bool innobase_use_sys_stats_table = FALSE; | |
42 | +static my_bool innobase_buffer_pool_shm_checksum = TRUE; | |
adf0fb13 | 43 | +static uint innobase_buffer_pool_shm_key = 0; |
b4e1fa2c AM |
44 | |
45 | ||
46 | static char* internal_innobase_data_file_path = NULL; | |
adf0fb13 | 47 | @@ -2670,6 +2672,12 @@ |
b4e1fa2c AM |
48 | srv_buf_pool_size = (ulint) innobase_buffer_pool_size; |
49 | srv_buf_pool_instances = (ulint) innobase_buffer_pool_instances; | |
50 | ||
adf0fb13 | 51 | + if (innobase_buffer_pool_shm_key) { |
b4e1fa2c | 52 | + fprintf(stderr, |
adf0fb13 AM |
53 | + "InnoDB: Warning: innodb_buffer_pool_shm_key is deprecated function.\n" |
54 | + "InnoDB: innodb_buffer_pool_shm_key was ignored.\n"); | |
b4e1fa2c AM |
55 | + } |
56 | + | |
57 | srv_mem_pool_size = (ulint) innobase_additional_mem_pool_size; | |
58 | ||
59 | srv_n_file_io_threads = (ulint) innobase_file_io_threads; | |
adf0fb13 | 60 | @@ -11733,6 +11741,16 @@ |
b4e1fa2c AM |
61 | "Number of buffer pool instances, set to higher value on high-end machines to increase scalability", |
62 | NULL, NULL, 1L, 1L, MAX_BUFFER_POOLS, 1L); | |
63 | ||
adf0fb13 | 64 | +static MYSQL_SYSVAR_UINT(buffer_pool_shm_key, innobase_buffer_pool_shm_key, |
b4e1fa2c | 65 | + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
adf0fb13 | 66 | + "[Deprecated option] no effect", |
b4e1fa2c AM |
67 | + NULL, NULL, 0, 0, INT_MAX32, 0); |
68 | + | |
69 | +static MYSQL_SYSVAR_BOOL(buffer_pool_shm_checksum, innobase_buffer_pool_shm_checksum, | |
70 | + PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, | |
adf0fb13 | 71 | + "[Deprecated option] no effect", |
b4e1fa2c AM |
72 | + NULL, NULL, TRUE); |
73 | + | |
74 | static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency, | |
75 | PLUGIN_VAR_RQCMDARG, | |
76 | "Helps in performance tuning in heavily concurrent environments.", | |
adf0fb13 | 77 | @@ -12027,6 +12045,8 @@ |
b4e1fa2c AM |
78 | MYSQL_SYSVAR(autoextend_increment), |
79 | MYSQL_SYSVAR(buffer_pool_size), | |
80 | MYSQL_SYSVAR(buffer_pool_instances), | |
81 | + MYSQL_SYSVAR(buffer_pool_shm_key), | |
82 | + MYSQL_SYSVAR(buffer_pool_shm_checksum), | |
83 | MYSQL_SYSVAR(checksums), | |
84 | MYSQL_SYSVAR(fast_checksum), | |
85 | MYSQL_SYSVAR(commit_concurrency), |