Merge lp:~percona-dev/percona-server/release-5.1.50-12-adjust_buffer_pool_shm into lp:percona-server/release-5.1.50-12
- release-5.1.50-12-adjust_buffer_pool_shm
- Merge into release-5.1.50-12
Status: | Merged | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Vadim Tkachenko | ||||||||||||
Approved revision: | no longer in the source branch. | ||||||||||||
Merged at revision: | 123 | ||||||||||||
Proposed branch: | lp:~percona-dev/percona-server/release-5.1.50-12-adjust_buffer_pool_shm | ||||||||||||
Merge into: | lp:percona-server/release-5.1.50-12 | ||||||||||||
Diff against target: |
291 lines (+77/-39) 1 file modified
innodb_buffer_pool_shm.patch (+77/-39) |
||||||||||||
To merge this branch: | bzr merge lp:~percona-dev/percona-server/release-5.1.50-12-adjust_buffer_pool_shm | ||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Vadim Tkachenko | Approve | ||
Fred Linhoss (community) | documentation | Approve | |
Review via email: mp+36971@code.launchpad.net |
Commit message
Description of the change
Vadim Tkachenko (vadim-tk) wrote : | # |
Fred Linhoss (fred-linhoss) wrote : | # |
Vadim,
I assume innodb_
variable should be documented.
https:/
I have only changed the System Variables section to add the new variable.
Questions:
1. Is the variable name correct, or does "innodb_" need to be added
to the front?
2. I believe that "PLUGIN_
that, in the table, "Command Line"=No and "Dynamic Variable"=No. But do
I have "Config File" and "Variable Scope" correct?
3. Is the sentence describing what the variable does correct? (When
is the checksum validation done? Should I say anything about that?)
Thanks,
Fred
On 9/29/2010 1:01 PM, Vadim Tkachenko wrote:
> For Fred: document bug and release notes
Vadim Tkachenko (vadim-tk) wrote : | # |
Fred,
it is innodb_
Usually if variable can be set in config file - it is also accepted in
command line.
You should say:
"Checksum validation is performed during start or shutdown. Checksum
check makes process slower but
adds additional protection that memory region is not corrupted".
On Thu, Sep 30, 2010 at 10:18 AM, Fred Linhoss <email address hidden> wrote:
> Vadim,
>
> I assume innodb_
> variable should be documented.
>
> https:/
>
> I have only changed the System Variables section to add the new variable.
>
> Questions:
>
> 1. Is the variable name correct, or does "innodb_" need to be added
> to the front?
> 2. I believe that "PLUGIN_
> that, in the table, "Command Line"=No and "Dynamic Variable"=No. But do
> I have "Config File" and "Variable Scope" correct?
> 3. Is the sentence describing what the variable does correct? (When
> is the checksum validation done? Should I say anything about that?)
>
> Thanks,
> Fred
>
> On 9/29/2010 1:01 PM, Vadim Tkachenko wrote:
>> For Fred: document bug and release notes
> --
> https:/
> Your team Percona developers is requested to review the proposed merge of lp:~percona-dev/percona-server/release-5.1.50-12-adjust_buffer_pool_shm into lp:percona-server.
>
--
Vadim Tkachenko, CTO, Percona Inc.
Phone +1-888-401-3403, Skype: vadimtk153
Schedule meeting: http://
Fred Linhoss (fred-linhoss) wrote : | # |
On 9/30/2010 1:24 PM, Vadim Tkachenko wrote:
> Fred,
>
> it is innodb_
>
> Usually if variable can be set in config file - it is also accepted in
> command line.
*But, "PLUGIN_
take it from the command line, correct?
If that's true, it makes me wonder how you can set it. Or it that wrong
and it does take it from the command line?
*
> You should say:
> "Checksum validation is performed during start or shutdown. Checksum check makes process slower but adds additional protection that memory region is not corrupted".
*Done. Changes are now in this version:*
http://
>
> On Thu, Sep 30, 2010 at 10:18 AM, Fred Linhoss<email address hidden> wrote:
>> Vadim,
>>
>> I assume innodb_
>> variable should be documented.
>>
>> https:/
>>
>> I have only changed the System Variables section to add the new variable.
>>
>> Questions:
>>
>> 1. Is the variable name correct, or does "innodb_" need to be added
>> to the front?
>> 2. I believe that "PLUGIN_
>> that, in the table, "Command Line"=No and "Dynamic Variable"=No. But do
>> I have "Config File" and "Variable Scope" correct?
>> 3. Is the sentence describing what the variable does correct? (When
>> is the checksum validation done? Should I say anything about that?)
>>
>> Thanks,
>> Fred
>>
>> On 9/29/2010 1:01 PM, Vadim Tkachenko wrote:
>>> For Fred: document bug and release notes
>> --
>> https:/
>> Your team Percona developers is requested to review the proposed merge of lp:~percona-dev/percona-server/release-5.1.50-12-adjust_buffer_pool_shm into lp:percona-server.
>>
>
>
Fred Linhoss (fred-linhoss) wrote : | # |
Added new system variable innodb_
Vadim Tkachenko (vadim-tk) : | # |
Baron Schwartz (baron-xaprb) wrote : | # |
Fred,
>> Usually if variable can be set in config file - it is also accepted in
>> command line.
> But, "PLUGIN_
> take it from the command line, correct?
> If that's true, it makes me wonder how you can set it. Or it that wrong
> and it does take it from the command line?
I haven't checked, but it looks like you are right. Do you have a
build that you can test to see?
Preview Diff
1 | === modified file 'innodb_buffer_pool_shm.patch' | |||
2 | --- innodb_buffer_pool_shm.patch 2010-09-27 09:59:34 +0000 | |||
3 | +++ innodb_buffer_pool_shm.patch 2010-09-29 11:18:45 +0000 | |||
4 | @@ -96,7 +96,7 @@ | |||
5 | 96 | /********************************************************************//** | 96 | /********************************************************************//** |
6 | 97 | Allocates a chunk of buffer frames. | 97 | Allocates a chunk of buffer frames. |
7 | 98 | @return chunk, or NULL on failure */ | 98 | @return chunk, or NULL on failure */ |
9 | 99 | @@ -768,26 +835,174 @@ | 99 | @@ -768,26 +835,184 @@ |
10 | 100 | { | 100 | { |
11 | 101 | buf_block_t* block; | 101 | buf_block_t* block; |
12 | 102 | byte* frame; | 102 | byte* frame; |
13 | @@ -161,7 +161,7 @@ | |||
14 | 161 | + if (UNIV_UNLIKELY(chunk->mem == NULL)) { | 161 | + if (UNIV_UNLIKELY(chunk->mem == NULL)) { |
15 | 162 | + return(NULL); | 162 | + return(NULL); |
16 | 163 | + } | 163 | + } |
18 | 164 | + | 164 | +init_again: |
19 | 165 | +#ifdef UNIV_SET_MEM_TO_ZERO | 165 | +#ifdef UNIV_SET_MEM_TO_ZERO |
20 | 166 | + if (is_new) { | 166 | + if (is_new) { |
21 | 167 | + memset(chunk->mem, '\0', chunk->mem_size); | 167 | + memset(chunk->mem, '\0', chunk->mem_size); |
22 | @@ -204,16 +204,6 @@ | |||
23 | 204 | + "InnoDB: Error: The shared memory was not initialized yet.\n"); | 204 | + "InnoDB: Error: The shared memory was not initialized yet.\n"); |
24 | 205 | + return(NULL); | 205 | + return(NULL); |
25 | 206 | + } | 206 | + } |
26 | 207 | + if (!shm_info->clean) { | ||
27 | 208 | + fprintf(stderr, | ||
28 | 209 | + "InnoDB: Error: The shared memory was not shut down cleanly.\n"); | ||
29 | 210 | + return(NULL); | ||
30 | 211 | + } | ||
31 | 212 | + if (!shm_info->reusable) { | ||
32 | 213 | + fprintf(stderr, | ||
33 | 214 | + "InnoDB: Error: The shared memory has unrecoverable contents.\n"); | ||
34 | 215 | + return(NULL); | ||
35 | 216 | + } | ||
36 | 217 | + if (shm_info->buf_pool_size != srv_buf_pool_size) { | 207 | + if (shm_info->buf_pool_size != srv_buf_pool_size) { |
37 | 218 | + fprintf(stderr, | 208 | + fprintf(stderr, |
38 | 219 | + "InnoDB: Error: srv_buf_pool_size is different (shm=%lu current=%lu).\n", | 209 | + "InnoDB: Error: srv_buf_pool_size is different (shm=%lu current=%lu).\n", |
39 | @@ -226,14 +216,34 @@ | |||
40 | 226 | + shm_info->page_size, srv_page_size); | 216 | + shm_info->page_size, srv_page_size); |
41 | 227 | + return(NULL); | 217 | + return(NULL); |
42 | 228 | + } | 218 | + } |
43 | 219 | + if (!shm_info->reusable) { | ||
44 | 220 | + fprintf(stderr, | ||
45 | 221 | + "InnoDB: Warning: The shared memory has unrecoverable contents.\n" | ||
46 | 222 | + "InnoDB: The shared memory segment is initialized.\n"); | ||
47 | 223 | + is_new = TRUE; | ||
48 | 224 | + goto init_again; | ||
49 | 225 | + } | ||
50 | 226 | + if (!shm_info->clean) { | ||
51 | 227 | + fprintf(stderr, | ||
52 | 228 | + "InnoDB: Warning: The shared memory was not shut down cleanly.\n" | ||
53 | 229 | + "InnoDB: The shared memory segment is initialized.\n"); | ||
54 | 230 | + is_new = TRUE; | ||
55 | 231 | + goto init_again; | ||
56 | 232 | + } | ||
57 | 229 | + | 233 | + |
58 | 230 | + ut_a(shm_info->zip_hash_offset == chunk->mem_size - zip_hash_mem_size); | 234 | + ut_a(shm_info->zip_hash_offset == chunk->mem_size - zip_hash_mem_size); |
59 | 231 | + ut_a(shm_info->zip_hash_n == zip_hash_n); | 235 | + ut_a(shm_info->zip_hash_n == zip_hash_n); |
60 | 232 | + | 236 | + |
61 | 233 | + /* check checksum */ | 237 | + /* check checksum */ |
65 | 234 | + checksum = ut_fold_binary_32((byte*)chunk->mem + sizeof(buf_shm_info_t), | 238 | + if (srv_buffer_pool_shm_checksum) { |
66 | 235 | + chunk->mem_size - sizeof(buf_shm_info_t)); | 239 | + checksum = ut_fold_binary_32((byte*)chunk->mem + sizeof(buf_shm_info_t), |
67 | 236 | + if (shm_info->checksum != checksum) { | 240 | + chunk->mem_size - sizeof(buf_shm_info_t)); |
68 | 241 | + } else { | ||
69 | 242 | + checksum = BUF_NO_CHECKSUM_MAGIC; | ||
70 | 243 | + } | ||
71 | 244 | + | ||
72 | 245 | + if (shm_info->checksum != BUF_NO_CHECKSUM_MAGIC | ||
73 | 246 | + && shm_info->checksum != checksum) { | ||
74 | 237 | + fprintf(stderr, | 247 | + fprintf(stderr, |
75 | 238 | + "InnoDB: Error: checksum of the shared memory is not match. " | 248 | + "InnoDB: Error: checksum of the shared memory is not match. " |
76 | 239 | + "(stored=%lu calculated=%lu)\n", | 249 | + "(stored=%lu calculated=%lu)\n", |
77 | @@ -271,7 +281,7 @@ | |||
78 | 271 | 281 | ||
79 | 272 | /* Align a pointer to the first frame. Note that when | 282 | /* Align a pointer to the first frame. Note that when |
80 | 273 | os_large_page_size is smaller than UNIV_PAGE_SIZE, | 283 | os_large_page_size is smaller than UNIV_PAGE_SIZE, |
82 | 274 | @@ -795,8 +1010,13 @@ | 284 | @@ -795,8 +1020,13 @@ |
83 | 275 | it is bigger, we may allocate more blocks than requested. */ | 285 | it is bigger, we may allocate more blocks than requested. */ |
84 | 276 | 286 | ||
85 | 277 | frame = ut_align(chunk->mem, UNIV_PAGE_SIZE); | 287 | frame = ut_align(chunk->mem, UNIV_PAGE_SIZE); |
86 | @@ -285,7 +295,7 @@ | |||
87 | 285 | 295 | ||
88 | 286 | /* Subtract the space needed for block descriptors. */ | 296 | /* Subtract the space needed for block descriptors. */ |
89 | 287 | { | 297 | { |
91 | 288 | @@ -810,6 +1030,98 @@ | 298 | @@ -810,6 +1040,98 @@ |
92 | 289 | chunk->size = size; | 299 | chunk->size = size; |
93 | 290 | } | 300 | } |
94 | 291 | 301 | ||
95 | @@ -305,7 +315,7 @@ | |||
96 | 305 | + } | 315 | + } |
97 | 306 | + | 316 | + |
98 | 307 | + chunk->size = shm_info->chunk_backup.size; | 317 | + chunk->size = shm_info->chunk_backup.size; |
100 | 308 | + phys_offset = frame - (byte*)chunk->mem + shm_info->frame_offset; | 318 | + phys_offset = frame - ((byte*)chunk->mem + shm_info->frame_offset); |
101 | 309 | + logi_offset = frame - chunk->blocks[0].frame; | 319 | + logi_offset = frame - chunk->blocks[0].frame; |
102 | 310 | + previous_frame_address = chunk->blocks[0].frame; | 320 | + previous_frame_address = chunk->blocks[0].frame; |
103 | 311 | + blocks_offset = (byte*)chunk->blocks - (byte*)shm_info->chunk_backup.blocks; | 321 | + blocks_offset = (byte*)chunk->blocks - (byte*)shm_info->chunk_backup.blocks; |
104 | @@ -339,17 +349,17 @@ | |||
105 | 339 | + " Done.\n"); | 349 | + " Done.\n"); |
106 | 340 | + } | 350 | + } |
107 | 341 | + | 351 | + |
108 | 352 | + /* buf_block_t */ | ||
109 | 353 | + block = chunk->blocks; | ||
110 | 354 | + for (i = chunk->size; i--; ) { | ||
111 | 355 | + buf_block_reuse(block, logi_offset); | ||
112 | 356 | + block++; | ||
113 | 357 | + } | ||
114 | 358 | + | ||
115 | 342 | + if (logi_offset || blocks_offset) { | 359 | + if (logi_offset || blocks_offset) { |
116 | 343 | + fprintf(stderr, | 360 | + fprintf(stderr, |
117 | 344 | + "InnoDB: Aligning logical offset..."); | 361 | + "InnoDB: Aligning logical offset..."); |
118 | 345 | + | 362 | + |
119 | 346 | + /* buf_block_t */ | ||
120 | 347 | + block = chunk->blocks; | ||
121 | 348 | + | ||
122 | 349 | + for (i = chunk->size; i--; ) { | ||
123 | 350 | + buf_block_reuse(block, logi_offset); | ||
124 | 351 | + block++; | ||
125 | 352 | + } | ||
126 | 353 | + | 363 | + |
127 | 354 | + /* buf_pool_t buf_pool_backup */ | 364 | + /* buf_pool_t buf_pool_backup */ |
128 | 355 | + UT_LIST_OFFSET(flush_list, buf_page_t, shm_info->buf_pool_backup.flush_list, | 365 | + UT_LIST_OFFSET(flush_list, buf_page_t, shm_info->buf_pool_backup.flush_list, |
129 | @@ -384,7 +394,7 @@ | |||
130 | 384 | /* Init block structs and assign frames for them. Then we | 394 | /* Init block structs and assign frames for them. Then we |
131 | 385 | assign the frames to the first blocks (we already mapped the | 395 | assign the frames to the first blocks (we already mapped the |
132 | 386 | memory above). */ | 396 | memory above). */ |
134 | 387 | @@ -833,6 +1145,11 @@ | 397 | @@ -833,6 +1155,11 @@ |
135 | 388 | block++; | 398 | block++; |
136 | 389 | frame += UNIV_PAGE_SIZE; | 399 | frame += UNIV_PAGE_SIZE; |
137 | 390 | } | 400 | } |
138 | @@ -396,7 +406,7 @@ | |||
139 | 396 | 406 | ||
140 | 397 | return(chunk); | 407 | return(chunk); |
141 | 398 | } | 408 | } |
143 | 399 | @@ -1014,6 +1331,8 @@ | 409 | @@ -1014,6 +1341,8 @@ |
144 | 400 | UNIV_MEM_UNDESC(block); | 410 | UNIV_MEM_UNDESC(block); |
145 | 401 | } | 411 | } |
146 | 402 | 412 | ||
147 | @@ -405,7 +415,7 @@ | |||
148 | 405 | os_mem_free_large(chunk->mem, chunk->mem_size); | 415 | os_mem_free_large(chunk->mem, chunk->mem_size); |
149 | 406 | } | 416 | } |
150 | 407 | 417 | ||
152 | 408 | @@ -1063,7 +1382,10 @@ | 418 | @@ -1063,7 +1392,10 @@ |
153 | 409 | srv_buf_pool_curr_size = buf_pool->curr_size * UNIV_PAGE_SIZE; | 419 | srv_buf_pool_curr_size = buf_pool->curr_size * UNIV_PAGE_SIZE; |
154 | 410 | 420 | ||
155 | 411 | buf_pool->page_hash = hash_create(2 * buf_pool->curr_size); | 421 | buf_pool->page_hash = hash_create(2 * buf_pool->curr_size); |
156 | @@ -416,7 +426,7 @@ | |||
157 | 416 | 426 | ||
158 | 417 | buf_pool->last_printout_time = time(NULL); | 427 | buf_pool->last_printout_time = time(NULL); |
159 | 418 | 428 | ||
161 | 419 | @@ -1078,6 +1400,86 @@ | 429 | @@ -1078,6 +1410,86 @@ |
162 | 420 | --------------------------- */ | 430 | --------------------------- */ |
163 | 421 | /* All fields are initialized by mem_zalloc(). */ | 431 | /* All fields are initialized by mem_zalloc(). */ |
164 | 422 | 432 | ||
165 | @@ -503,7 +513,7 @@ | |||
166 | 503 | mutex_exit(&LRU_list_mutex); | 513 | mutex_exit(&LRU_list_mutex); |
167 | 504 | rw_lock_x_unlock(&page_hash_latch); | 514 | rw_lock_x_unlock(&page_hash_latch); |
168 | 505 | buf_pool_mutex_exit(); | 515 | buf_pool_mutex_exit(); |
170 | 506 | @@ -1102,6 +1504,30 @@ | 516 | @@ -1102,6 +1514,34 @@ |
171 | 507 | buf_chunk_t* chunk; | 517 | buf_chunk_t* chunk; |
172 | 508 | buf_chunk_t* chunks; | 518 | buf_chunk_t* chunks; |
173 | 509 | 519 | ||
174 | @@ -524,8 +534,12 @@ | |||
175 | 524 | + memcpy(&(shm_info->chunk_backup), chunk, sizeof(buf_chunk_t)); | 534 | + memcpy(&(shm_info->chunk_backup), chunk, sizeof(buf_chunk_t)); |
176 | 525 | + | 535 | + |
177 | 526 | + if (srv_fast_shutdown < 2) { | 536 | + if (srv_fast_shutdown < 2) { |
180 | 527 | + shm_info->checksum = ut_fold_binary_32((byte*)chunk->mem + sizeof(buf_shm_info_t), | 537 | + if (srv_buffer_pool_shm_checksum) { |
181 | 528 | + chunk->mem_size - sizeof(buf_shm_info_t)); | 538 | + shm_info->checksum = ut_fold_binary_32((byte*)chunk->mem + sizeof(buf_shm_info_t), |
182 | 539 | + chunk->mem_size - sizeof(buf_shm_info_t)); | ||
183 | 540 | + } else { | ||
184 | 541 | + shm_info->checksum = BUF_NO_CHECKSUM_MAGIC; | ||
185 | 542 | + } | ||
186 | 529 | + shm_info->clean = TRUE; | 543 | + shm_info->clean = TRUE; |
187 | 530 | + } | 544 | + } |
188 | 531 | + | 545 | + |
189 | @@ -534,7 +548,7 @@ | |||
190 | 534 | chunks = buf_pool->chunks; | 548 | chunks = buf_pool->chunks; |
191 | 535 | chunk = chunks + buf_pool->n_chunks; | 549 | chunk = chunks + buf_pool->n_chunks; |
192 | 536 | 550 | ||
194 | 537 | @@ -1110,10 +1536,13 @@ | 551 | @@ -1110,10 +1550,13 @@ |
195 | 538 | would fail at shutdown. */ | 552 | would fail at shutdown. */ |
196 | 539 | os_mem_free_large(chunk->mem, chunk->mem_size); | 553 | os_mem_free_large(chunk->mem, chunk->mem_size); |
197 | 540 | } | 554 | } |
198 | @@ -548,7 +562,7 @@ | |||
199 | 548 | mem_free(buf_pool); | 562 | mem_free(buf_pool); |
200 | 549 | buf_pool = NULL; | 563 | buf_pool = NULL; |
201 | 550 | } | 564 | } |
203 | 551 | @@ -1308,6 +1737,11 @@ | 565 | @@ -1308,6 +1751,11 @@ |
204 | 552 | //buf_pool_mutex_enter(); | 566 | //buf_pool_mutex_enter(); |
205 | 553 | mutex_enter(&LRU_list_mutex); | 567 | mutex_enter(&LRU_list_mutex); |
206 | 554 | 568 | ||
207 | @@ -560,7 +574,7 @@ | |||
208 | 560 | shrink_again: | 574 | shrink_again: |
209 | 561 | if (buf_pool->n_chunks <= 1) { | 575 | if (buf_pool->n_chunks <= 1) { |
210 | 562 | 576 | ||
212 | 563 | @@ -1551,6 +1985,11 @@ | 577 | @@ -1551,6 +1999,11 @@ |
213 | 564 | buf_pool_resize(void) | 578 | buf_pool_resize(void) |
214 | 565 | /*=================*/ | 579 | /*=================*/ |
215 | 566 | { | 580 | { |
216 | @@ -649,7 +663,23 @@ | |||
217 | 649 | diff -ruN a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc | 663 | diff -ruN a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc |
218 | 650 | --- a/storage/innodb_plugin/handler/ha_innodb.cc 2010-07-14 16:34:18.597725479 +0900 | 664 | --- a/storage/innodb_plugin/handler/ha_innodb.cc 2010-07-14 16:34:18.597725479 +0900 |
219 | 651 | +++ b/storage/innodb_plugin/handler/ha_innodb.cc 2010-07-14 16:40:16.159323612 +0900 | 665 | +++ b/storage/innodb_plugin/handler/ha_innodb.cc 2010-07-14 16:40:16.159323612 +0900 |
221 | 652 | @@ -11340,6 +11340,11 @@ | 666 | @@ -197,6 +197,7 @@ |
222 | 667 | static my_bool innobase_create_status_file = FALSE; | ||
223 | 668 | static my_bool innobase_stats_on_metadata = TRUE; | ||
224 | 669 | static my_bool innobase_use_sys_stats_table = FALSE; | ||
225 | 670 | +static my_bool innobase_buffer_pool_shm_checksum = TRUE; | ||
226 | 671 | |||
227 | 672 | static char* internal_innobase_data_file_path = NULL; | ||
228 | 673 | |||
229 | 674 | @@ -2417,6 +2418,7 @@ | ||
230 | 675 | srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; | ||
231 | 676 | srv_use_checksums = (ibool) innobase_use_checksums; | ||
232 | 677 | srv_fast_checksum = (ibool) innobase_fast_checksum; | ||
233 | 678 | + srv_buffer_pool_shm_checksum = (ibool) innobase_buffer_pool_shm_checksum; | ||
234 | 679 | |||
235 | 680 | #ifdef HAVE_LARGE_PAGES | ||
236 | 681 | if ((os_use_large_pages = (ibool) my_use_large_pages)) | ||
237 | 682 | @@ -11340,6 +11342,16 @@ | ||
238 | 653 | "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.", | 683 | "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.", |
239 | 654 | NULL, NULL, 128*1024*1024L, 32*1024*1024L, LONGLONG_MAX, 1024*1024L); | 684 | NULL, NULL, 128*1024*1024L, 32*1024*1024L, LONGLONG_MAX, 1024*1024L); |
240 | 655 | 685 | ||
241 | @@ -658,14 +688,20 @@ | |||
242 | 658 | + "[experimental] The key value of shared memory segment for the buffer pool. 0 (default) disables the feature.", | 688 | + "[experimental] The key value of shared memory segment for the buffer pool. 0 (default) disables the feature.", |
243 | 659 | + NULL, NULL, 0, 0, INT_MAX32, 0); | 689 | + NULL, NULL, 0, 0, INT_MAX32, 0); |
244 | 660 | + | 690 | + |
245 | 691 | +static MYSQL_SYSVAR_BOOL(buffer_pool_shm_checksum, innobase_buffer_pool_shm_checksum, | ||
246 | 692 | + PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, | ||
247 | 693 | + "Enable buffer_pool_shm checksum validation (enabled by default).", | ||
248 | 694 | + NULL, NULL, TRUE); | ||
249 | 695 | + | ||
250 | 661 | static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency, | 696 | static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency, |
251 | 662 | PLUGIN_VAR_RQCMDARG, | 697 | PLUGIN_VAR_RQCMDARG, |
252 | 663 | "Helps in performance tuning in heavily concurrent environments.", | 698 | "Helps in performance tuning in heavily concurrent environments.", |
254 | 664 | @@ -11599,6 +11604,7 @@ | 699 | @@ -11599,6 +11611,8 @@ |
255 | 665 | MYSQL_SYSVAR(additional_mem_pool_size), | 700 | MYSQL_SYSVAR(additional_mem_pool_size), |
256 | 666 | MYSQL_SYSVAR(autoextend_increment), | 701 | MYSQL_SYSVAR(autoextend_increment), |
257 | 667 | MYSQL_SYSVAR(buffer_pool_size), | 702 | MYSQL_SYSVAR(buffer_pool_size), |
258 | 668 | + MYSQL_SYSVAR(buffer_pool_shm_key), | 703 | + MYSQL_SYSVAR(buffer_pool_shm_key), |
259 | 704 | + MYSQL_SYSVAR(buffer_pool_shm_checksum), | ||
260 | 669 | MYSQL_SYSVAR(checksums), | 705 | MYSQL_SYSVAR(checksums), |
261 | 670 | MYSQL_SYSVAR(fast_checksum), | 706 | MYSQL_SYSVAR(fast_checksum), |
262 | 671 | MYSQL_SYSVAR(commit_concurrency), | 707 | MYSQL_SYSVAR(commit_concurrency), |
263 | @@ -816,11 +852,12 @@ | |||
264 | 816 | diff -ruN a/storage/innodb_plugin/include/srv0srv.h b/storage/innodb_plugin/include/srv0srv.h | 852 | diff -ruN a/storage/innodb_plugin/include/srv0srv.h b/storage/innodb_plugin/include/srv0srv.h |
265 | 817 | --- a/storage/innodb_plugin/include/srv0srv.h 2010-07-14 16:32:49.695323045 +0900 | 853 | --- a/storage/innodb_plugin/include/srv0srv.h 2010-07-14 16:32:49.695323045 +0900 |
266 | 818 | +++ b/storage/innodb_plugin/include/srv0srv.h 2010-07-14 16:40:16.171325784 +0900 | 854 | +++ b/storage/innodb_plugin/include/srv0srv.h 2010-07-14 16:40:16.171325784 +0900 |
268 | 819 | @@ -156,6 +156,8 @@ | 855 | @@ -156,6 +156,9 @@ |
269 | 820 | extern ulint srv_mem_pool_size; | 856 | extern ulint srv_mem_pool_size; |
270 | 821 | extern ulint srv_lock_table_size; | 857 | extern ulint srv_lock_table_size; |
271 | 822 | 858 | ||
272 | 823 | +extern uint srv_buffer_pool_shm_key; | 859 | +extern uint srv_buffer_pool_shm_key; |
273 | 860 | +extern ibool srv_buffer_pool_shm_checksum; | ||
274 | 824 | + | 861 | + |
275 | 825 | extern ibool srv_thread_concurrency_timer_based; | 862 | extern ibool srv_thread_concurrency_timer_based; |
276 | 826 | 863 | ||
277 | @@ -1057,12 +1094,13 @@ | |||
278 | 1057 | diff -ruN a/storage/innodb_plugin/srv/srv0srv.c b/storage/innodb_plugin/srv/srv0srv.c | 1094 | diff -ruN a/storage/innodb_plugin/srv/srv0srv.c b/storage/innodb_plugin/srv/srv0srv.c |
279 | 1058 | --- a/storage/innodb_plugin/srv/srv0srv.c 2010-07-14 16:33:23.848391648 +0900 | 1095 | --- a/storage/innodb_plugin/srv/srv0srv.c 2010-07-14 16:33:23.848391648 +0900 |
280 | 1059 | +++ b/storage/innodb_plugin/srv/srv0srv.c 2010-07-14 16:40:16.177323553 +0900 | 1096 | +++ b/storage/innodb_plugin/srv/srv0srv.c 2010-07-14 16:40:16.177323553 +0900 |
282 | 1060 | @@ -211,6 +211,9 @@ | 1097 | @@ -211,6 +211,10 @@ |
283 | 1061 | UNIV_INTERN ulint srv_mem_pool_size = ULINT_MAX; | 1098 | UNIV_INTERN ulint srv_mem_pool_size = ULINT_MAX; |
284 | 1062 | UNIV_INTERN ulint srv_lock_table_size = ULINT_MAX; | 1099 | UNIV_INTERN ulint srv_lock_table_size = ULINT_MAX; |
285 | 1063 | 1100 | ||
286 | 1064 | +/* key value for shm */ | 1101 | +/* key value for shm */ |
287 | 1065 | +UNIV_INTERN uint srv_buffer_pool_shm_key = 0; | 1102 | +UNIV_INTERN uint srv_buffer_pool_shm_key = 0; |
288 | 1103 | +UNIV_INTERN ibool srv_buffer_pool_shm_checksum = TRUE; | ||
289 | 1066 | + | 1104 | + |
290 | 1067 | /* This parameter is deprecated. Use srv_n_io_[read|write]_threads | 1105 | /* This parameter is deprecated. Use srv_n_io_[read|write]_threads |
291 | 1068 | instead. */ | 1106 | instead. */ |
For Fred: document bug and release notes