]> git.pld-linux.org Git - packages/mysql.git/blob - innodb_buffer_pool_shm.patch
- rel 2; update percona patches
[packages/mysql.git] / innodb_buffer_pool_shm.patch
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!
8 diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
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
11 @@ -1006,10 +1006,12 @@
12         buf_block_t*    block;
13         byte*           frame;
14         ulint           i;
15 +       ulint           size_target;
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);
20 +       size_target = (mem_size / UNIV_PAGE_SIZE) - 1;
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);
24 @@ -1047,6 +1049,10 @@
25                 chunk->size = size;
26         }
27  
28 +       if (chunk->size > size_target) {
29 +               chunk->size = size_target;
30 +       }
31 +
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). */
35 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
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
38 @@ -194,6 +194,8 @@
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;
43 +static uint    innobase_buffer_pool_shm_key            = 0;
44  
45  
46  static char*   internal_innobase_data_file_path        = NULL;
47 @@ -2670,6 +2672,12 @@
48         srv_buf_pool_size = (ulint) innobase_buffer_pool_size;
49         srv_buf_pool_instances = (ulint) innobase_buffer_pool_instances;
50  
51 +       if (innobase_buffer_pool_shm_key) {
52 +               fprintf(stderr,
53 +                       "InnoDB: Warning: innodb_buffer_pool_shm_key is deprecated function.\n"
54 +                       "InnoDB:          innodb_buffer_pool_shm_key was ignored.\n");
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;
60 @@ -11733,6 +11741,16 @@
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  
64 +static MYSQL_SYSVAR_UINT(buffer_pool_shm_key, innobase_buffer_pool_shm_key,
65 +  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
66 +  "[Deprecated option] no effect",
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,
71 +  "[Deprecated option] no effect",
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.",
77 @@ -12027,6 +12045,8 @@
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),
This page took 0.062803 seconds and 3 git commands to generate.