Merge lp:~percona-dev/percona-server/5.1.54-remove_warnings-yasufumi into lp:percona-server/release-5.1.54-12
- 5.1.54-remove_warnings-yasufumi
- Merge into 5.1.54
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Vadim Tkachenko | ||||||||
Approved revision: | no longer in the source branch. | ||||||||
Merged at revision: | 193 | ||||||||
Proposed branch: | lp:~percona-dev/percona-server/5.1.54-remove_warnings-yasufumi | ||||||||
Merge into: | lp:percona-server/release-5.1.54-12 | ||||||||
Diff against target: |
1414 lines (+411/-238) 15 files modified
innodb_dict_size_limit.patch (+128/-81) innodb_expand_import.patch (+2/-2) innodb_extend_slow.patch (+4/-17) innodb_files_extend.patch (+63/-9) innodb_fix_misc.patch (+21/-1) innodb_io_patches.patch (+14/-10) innodb_lru_dump_restore.patch (+8/-25) innodb_pass_corrupt_table.patch (+3/-3) innodb_purge_thread.patch (+6/-6) innodb_separate_doublewrite.patch (+12/-4) innodb_show_lock_name.patch (+62/-22) innodb_split_buf_pool_mutex.patch (+63/-43) innodb_stats.patch (+1/-1) profiling_slow.patch (+1/-1) userstat.patch (+23/-13) |
||||||||
To merge this branch: | bzr merge lp:~percona-dev/percona-server/5.1.54-remove_warnings-yasufumi | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexey Kopytov (community) | Approve | ||
Percona developers | Pending | ||
Review via email: mp+48326@code.launchpad.net |
Commit message
Description of the change
But it is based on lp:~percona-dev/percona-server/5.1.54-fix_expand_import_and_dict_size_limit
It should be merged, after the following review approved.
Yasufumi Kinoshita (yasufumi-kinoshita) wrote : | # |
Yasufumi Kinoshita (yasufumi-kinoshita) wrote : | # |
Alexey,
Please confirm to build with this branch, if you have time.
Is your compiler satisfied with it?
Alexey Kopytov (akopytov) wrote : | # |
Yes, when merged with my changes in the core server, it now builds with -Werror.
Yasufumi Kinoshita (yasufumi-kinoshita) wrote : | # |
Thanks, but I cannot build with -Werror.
e.g.
many of
"warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result"
are from normal mysql code.
Your environment seems more looser than mine. :-)
Alexey Kopytov (akopytov) wrote : | # |
> e.g.
> many of
> "warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result"
> are from normal mysql code.
> Your environment seems more looser than mine. :-)
See http://
Most likely it's a bug in the system headers on your machine.
Yasufumi Kinoshita (yasufumi-kinoshita) wrote : | # |
Aha.
I understand all of what you don't like is treated as bug...:-(
Are you bugs.mysql.com?
It is warning. Severely, return value of fwrite should not be ignored.
Naturally, each system have each criteria about warning.
Preview Diff
1 | === modified file 'innodb_dict_size_limit.patch' | |||
2 | --- innodb_dict_size_limit.patch 2010-12-16 11:35:26 +0000 | |||
3 | +++ innodb_dict_size_limit.patch 2011-02-02 15:07:48 +0000 | |||
4 | @@ -8,7 +8,7 @@ | |||
5 | 8 | diff -ruN a/storage/innodb_plugin/btr/btr0sea.c b/storage/innodb_plugin/btr/btr0sea.c | 8 | diff -ruN a/storage/innodb_plugin/btr/btr0sea.c b/storage/innodb_plugin/btr/btr0sea.c |
6 | 9 | --- a/storage/innodb_plugin/btr/btr0sea.c 2010-08-04 02:24:19.000000000 +0900 | 9 | --- a/storage/innodb_plugin/btr/btr0sea.c 2010-08-04 02:24:19.000000000 +0900 |
7 | 10 | +++ b/storage/innodb_plugin/btr/btr0sea.c 2010-08-27 16:09:42.926020757 +0900 | 10 | +++ b/storage/innodb_plugin/btr/btr0sea.c 2010-08-27 16:09:42.926020757 +0900 |
9 | 11 | @@ -1173,6 +1173,126 @@ | 11 | @@ -1173,6 +1173,173 @@ |
10 | 12 | mem_free(folds); | 12 | mem_free(folds); |
11 | 13 | } | 13 | } |
12 | 14 | 14 | ||
13 | @@ -20,7 +20,7 @@ | |||
14 | 20 | +/*=====================================*/ | 20 | +/*=====================================*/ |
15 | 21 | + dict_index_t* index) /* in: record descriptor */ | 21 | + dict_index_t* index) /* in: record descriptor */ |
16 | 22 | +{ | 22 | +{ |
18 | 23 | + buf_page_t* bpage; | 23 | + |
19 | 24 | + hash_table_t* table; | 24 | + hash_table_t* table; |
20 | 25 | + buf_block_t* block; | 25 | + buf_block_t* block; |
21 | 26 | + ulint n_fields; | 26 | + ulint n_fields; |
22 | @@ -36,96 +36,143 @@ | |||
23 | 36 | + ulint i; | 36 | + ulint i; |
24 | 37 | + mem_heap_t* heap = NULL; | 37 | + mem_heap_t* heap = NULL; |
25 | 38 | + ulint* offsets; | 38 | + ulint* offsets; |
26 | 39 | + ibool released_search_latch; | ||
27 | 39 | + | 40 | + |
30 | 40 | + rw_lock_x_lock(&btr_search_latch); | 41 | + rw_lock_s_lock(&btr_search_latch); |
29 | 41 | + buf_pool_mutex_enter(); | ||
31 | 42 | + | 42 | + |
32 | 43 | + table = btr_search_sys->hash_index; | 43 | + table = btr_search_sys->hash_index; |
33 | 44 | + | 44 | + |
60 | 45 | + bpage = UT_LIST_GET_LAST(buf_pool->LRU); | 45 | + do { |
61 | 46 | + | 46 | + buf_chunk_t* chunks = buf_pool->chunks; |
62 | 47 | + while (bpage != NULL) { | 47 | + buf_chunk_t* chunk = chunks + buf_pool->n_chunks; |
63 | 48 | + block = (buf_block_t*) bpage; | 48 | + |
64 | 49 | + if (block->index == index && block->is_hashed) { | 49 | + released_search_latch = FALSE; |
65 | 50 | + page = block->frame; | 50 | + |
66 | 51 | + | 51 | + while (--chunk >= chunks) { |
67 | 52 | + /* from btr_search_drop_page_hash_index() */ | 52 | + block = chunk->blocks; |
68 | 53 | + n_fields = block->curr_n_fields; | 53 | + i = chunk->size; |
69 | 54 | + n_bytes = block->curr_n_bytes; | 54 | + |
70 | 55 | + | 55 | +retry: |
71 | 56 | + ut_a(n_fields + n_bytes > 0); | 56 | + for (; i--; block++) { |
72 | 57 | + | 57 | + if (buf_block_get_state(block) |
73 | 58 | + n_recs = page_get_n_recs(page); | 58 | + != BUF_BLOCK_FILE_PAGE |
74 | 59 | + | 59 | + || block->index != index |
75 | 60 | + /* Calculate and cache fold values into an array for fast deletion | 60 | + || !block->is_hashed) { |
76 | 61 | + from the hash index */ | 61 | + continue; |
77 | 62 | + | 62 | + } |
78 | 63 | + folds = mem_alloc(n_recs * sizeof(ulint)); | 63 | + |
79 | 64 | + | 64 | + page = block->frame; |
80 | 65 | + n_cached = 0; | 65 | + |
81 | 66 | + | 66 | + /* from btr_search_drop_page_hash_index() */ |
82 | 67 | + rec = page_get_infimum_rec(page); | 67 | + n_fields = block->curr_n_fields; |
83 | 68 | + rec = page_rec_get_next_low(rec, page_is_comp(page)); | 68 | + n_bytes = block->curr_n_bytes; |
84 | 69 | + | 69 | + |
85 | 70 | + index_id = btr_page_get_index_id(page); | 70 | + |
86 | 71 | + /* keeping latch order */ | ||
87 | 72 | + rw_lock_s_unlock(&btr_search_latch); | ||
88 | 73 | + released_search_latch = TRUE; | ||
89 | 74 | + rw_lock_x_lock(&block->lock); | ||
90 | 75 | + | ||
91 | 76 | + | ||
92 | 77 | + ut_a(n_fields + n_bytes > 0); | ||
93 | 78 | + | ||
94 | 79 | + n_recs = page_get_n_recs(page); | ||
95 | 80 | + | ||
96 | 81 | + /* Calculate and cache fold values into an array for fast deletion | ||
97 | 82 | + from the hash index */ | ||
98 | 83 | + | ||
99 | 84 | + folds = mem_alloc(n_recs * sizeof(ulint)); | ||
100 | 85 | + | ||
101 | 86 | + n_cached = 0; | ||
102 | 87 | + | ||
103 | 88 | + rec = page_get_infimum_rec(page); | ||
104 | 89 | + rec = page_rec_get_next_low(rec, page_is_comp(page)); | ||
105 | 90 | + | ||
106 | 91 | + index_id = btr_page_get_index_id(page); | ||
107 | 71 | + | 92 | + |
130 | 72 | + ut_a(0 == ut_dulint_cmp(index_id, index->id)); | 93 | + ut_a(0 == ut_dulint_cmp(index_id, index->id)); |
131 | 73 | + | 94 | + |
132 | 74 | + prev_fold = 0; | 95 | + prev_fold = 0; |
133 | 75 | + | 96 | + |
134 | 76 | + offsets = NULL; | 97 | + offsets = NULL; |
135 | 77 | + | 98 | + |
136 | 78 | + while (!page_rec_is_supremum(rec)) { | 99 | + while (!page_rec_is_supremum(rec)) { |
137 | 79 | + offsets = rec_get_offsets(rec, index, offsets, | 100 | + offsets = rec_get_offsets(rec, index, offsets, |
138 | 80 | + n_fields + (n_bytes > 0), &heap); | 101 | + n_fields + (n_bytes > 0), &heap); |
139 | 81 | + ut_a(rec_offs_n_fields(offsets) == n_fields + (n_bytes > 0)); | 102 | + ut_a(rec_offs_n_fields(offsets) == n_fields + (n_bytes > 0)); |
140 | 82 | + fold = rec_fold(rec, offsets, n_fields, n_bytes, index_id); | 103 | + fold = rec_fold(rec, offsets, n_fields, n_bytes, index_id); |
141 | 83 | + | 104 | + |
142 | 84 | + if (fold == prev_fold && prev_fold != 0) { | 105 | + if (fold == prev_fold && prev_fold != 0) { |
143 | 85 | + | 106 | + |
144 | 86 | + goto next_rec; | 107 | + goto next_rec; |
145 | 87 | + } | 108 | + } |
146 | 88 | + | 109 | + |
147 | 89 | + /* Remove all hash nodes pointing to this page from the | 110 | + /* Remove all hash nodes pointing to this page from the |
148 | 90 | + hash chain */ | 111 | + hash chain */ |
149 | 91 | + | 112 | + |
150 | 92 | + folds[n_cached] = fold; | 113 | + folds[n_cached] = fold; |
151 | 93 | + n_cached++; | 114 | + n_cached++; |
152 | 94 | +next_rec: | 115 | +next_rec: |
168 | 95 | + rec = page_rec_get_next_low(rec, page_rec_is_comp(rec)); | 116 | + rec = page_rec_get_next_low(rec, page_rec_is_comp(rec)); |
169 | 96 | + prev_fold = fold; | 117 | + prev_fold = fold; |
170 | 97 | + } | 118 | + } |
171 | 98 | + | 119 | + |
172 | 99 | + for (i = 0; i < n_cached; i++) { | 120 | + if (UNIV_LIKELY_NULL(heap)) { |
173 | 100 | + | 121 | + mem_heap_empty(heap); |
174 | 101 | + ha_remove_all_nodes_to_page(table, folds[i], page); | 122 | + } |
175 | 102 | + } | 123 | + |
176 | 103 | + | 124 | + rw_lock_x_lock(&btr_search_latch); |
177 | 104 | + ut_a(index->search_info->ref_count > 0); | 125 | + |
178 | 105 | + index->search_info->ref_count--; | 126 | + if (UNIV_UNLIKELY(!block->is_hashed)) { |
179 | 106 | + | 127 | + goto cleanup; |
180 | 107 | + block->is_hashed = FALSE; | 128 | + } |
181 | 108 | + block->index = NULL; | 129 | + |
182 | 109 | + | 130 | + ut_a(block->index == index); |
183 | 131 | + | ||
184 | 132 | + if (UNIV_UNLIKELY(block->curr_n_fields != n_fields) | ||
185 | 133 | + || UNIV_UNLIKELY(block->curr_n_bytes != n_bytes)) { | ||
186 | 134 | + rw_lock_x_unlock(&btr_search_latch); | ||
187 | 135 | + rw_lock_x_unlock(&block->lock); | ||
188 | 136 | + | ||
189 | 137 | + mem_free(folds); | ||
190 | 138 | + | ||
191 | 139 | + rw_lock_s_lock(&btr_search_latch); | ||
192 | 140 | + goto retry; | ||
193 | 141 | + } | ||
194 | 142 | + | ||
195 | 143 | + for (i = 0; i < n_cached; i++) { | ||
196 | 144 | + | ||
197 | 145 | + ha_remove_all_nodes_to_page(table, folds[i], page); | ||
198 | 146 | + } | ||
199 | 147 | + | ||
200 | 148 | + ut_a(index->search_info->ref_count > 0); | ||
201 | 149 | + index->search_info->ref_count--; | ||
202 | 150 | + | ||
203 | 151 | + block->is_hashed = FALSE; | ||
204 | 152 | + block->index = NULL; | ||
205 | 153 | + | ||
206 | 154 | +cleanup: | ||
207 | 110 | +#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG | 155 | +#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG |
212 | 111 | + if (UNIV_UNLIKELY(block->n_pointers)) { | 156 | + if (UNIV_UNLIKELY(block->n_pointers)) { |
213 | 112 | + /* Corruption */ | 157 | + /* Corruption */ |
214 | 113 | + ut_print_timestamp(stderr); | 158 | + ut_print_timestamp(stderr); |
215 | 114 | + fprintf(stderr, | 159 | + fprintf(stderr, |
216 | 115 | +" InnoDB: Corruption of adaptive hash index. After dropping\n" | 160 | +" InnoDB: Corruption of adaptive hash index. After dropping\n" |
217 | 116 | +"InnoDB: the hash index to a page of %s, still %lu hash nodes remain.\n", | 161 | +"InnoDB: the hash index to a page of %s, still %lu hash nodes remain.\n", |
220 | 117 | + index->name, (ulong) block->n_pointers); | 162 | + index->name, (ulong) block->n_pointers); |
221 | 118 | + } | 163 | + } |
222 | 119 | +#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ | 164 | +#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ |
225 | 120 | + | 165 | + rw_lock_x_unlock(&btr_search_latch); |
226 | 121 | + mem_free(folds); | 166 | + rw_lock_x_unlock(&block->lock); |
227 | 167 | + | ||
228 | 168 | + mem_free(folds); | ||
229 | 169 | + | ||
230 | 170 | + rw_lock_s_lock(&btr_search_latch); | ||
231 | 171 | + } | ||
232 | 122 | + } | 172 | + } |
239 | 123 | + | 173 | + } while (released_search_latch); |
240 | 124 | + bpage = UT_LIST_GET_PREV(LRU, bpage); | 174 | + |
241 | 125 | + } | 175 | + rw_lock_s_unlock(&btr_search_latch); |
236 | 126 | + | ||
237 | 127 | + buf_pool_mutex_exit(); | ||
238 | 128 | + rw_lock_x_unlock(&btr_search_latch); | ||
242 | 129 | + | 176 | + |
243 | 130 | + if (UNIV_LIKELY_NULL(heap)) { | 177 | + if (UNIV_LIKELY_NULL(heap)) { |
244 | 131 | + mem_heap_free(heap); | 178 | + mem_heap_free(heap); |
245 | 132 | 179 | ||
246 | === modified file 'innodb_expand_import.patch' | |||
247 | --- innodb_expand_import.patch 2010-12-16 11:35:26 +0000 | |||
248 | +++ innodb_expand_import.patch 2011-02-02 15:07:48 +0000 | |||
249 | @@ -34,8 +34,8 @@ | |||
250 | 34 | space_id = fsp_header_get_space_id(page); | 34 | space_id = fsp_header_get_space_id(page); |
251 | 35 | space_flags = fsp_header_get_flags(page); | 35 | space_flags = fsp_header_get_flags(page); |
252 | 36 | 36 | ||
255 | 37 | + if (srv_expand_import | 37 | + if (srv_expand_import) { |
256 | 38 | + && (space_id != id || space_flags != (flags & ~(~0 << DICT_TF_BITS)))) { | 38 | + |
257 | 39 | + ibool file_is_corrupt = FALSE; | 39 | + ibool file_is_corrupt = FALSE; |
258 | 40 | + byte* buf3; | 40 | + byte* buf3; |
259 | 41 | + byte* descr_page; | 41 | + byte* descr_page; |
260 | 42 | 42 | ||
261 | === modified file 'innodb_extend_slow.patch' | |||
262 | --- innodb_extend_slow.patch 2010-12-16 11:35:26 +0000 | |||
263 | +++ innodb_extend_slow.patch 2011-02-02 15:07:48 +0000 | |||
264 | @@ -37,9 +37,9 @@ | |||
265 | 37 | + block->page.offset, DPAH_SIZE << 3); | 37 | + block->page.offset, DPAH_SIZE << 3); |
266 | 38 | + block_hash_byte = block_hash >> 3; | 38 | + block_hash_byte = block_hash >> 3; |
267 | 39 | + block_hash_offset = (byte) block_hash & 0x07; | 39 | + block_hash_offset = (byte) block_hash & 0x07; |
269 | 40 | + if (block_hash_byte < 0 || block_hash_byte >= DPAH_SIZE) | 40 | + if (block_hash_byte >= DPAH_SIZE) |
270 | 41 | + fprintf(stderr, "!!! block_hash_byte = %lu block_hash_offset = %d !!!\n", block_hash_byte, block_hash_offset); | 41 | + fprintf(stderr, "!!! block_hash_byte = %lu block_hash_offset = %d !!!\n", block_hash_byte, block_hash_offset); |
272 | 42 | + if (block_hash_offset < 0 || block_hash_offset > 7) | 42 | + if (block_hash_offset > 7) |
273 | 43 | + fprintf(stderr, "!!! block_hash_byte = %lu block_hash_offset = %d !!!\n", block_hash_byte, block_hash_offset); | 43 | + fprintf(stderr, "!!! block_hash_byte = %lu block_hash_offset = %d !!!\n", block_hash_byte, block_hash_offset); |
274 | 44 | + if ((trx->distinct_page_access_hash[block_hash_byte] & ((byte) 0x01 << block_hash_offset)) == 0) | 44 | + if ((trx->distinct_page_access_hash[block_hash_byte] & ((byte) 0x01 << block_hash_offset)) == 0) |
275 | 45 | + trx->distinct_page_access++; | 45 | + trx->distinct_page_access++; |
276 | @@ -766,16 +766,6 @@ | |||
277 | 766 | 766 | ||
278 | 767 | if ((ulint)ret == n) { | 767 | if ((ulint)ret == n) { |
279 | 768 | 768 | ||
280 | 769 | @@ -3356,7 +3390,8 @@ | ||
281 | 770 | offset */ | ||
282 | 771 | ulint offset_high, /*!< in: most significant 32 bits of | ||
283 | 772 | offset */ | ||
284 | 773 | - ulint len) /*!< in: length of the block to read or write */ | ||
285 | 774 | + ulint len, /*!< in: length of the block to read or write */ | ||
286 | 775 | + trx_t* trx) | ||
287 | 776 | { | ||
288 | 777 | os_aio_slot_t* slot; | ||
289 | 778 | ulint i; | ||
290 | 779 | @@ -3642,10 +3677,11 @@ | 769 | @@ -3642,10 +3677,11 @@ |
291 | 780 | (can be used to identify a completed | 770 | (can be used to identify a completed |
292 | 781 | aio operation); ignored if mode is | 771 | aio operation); ignored if mode is |
293 | @@ -800,7 +790,7 @@ | |||
294 | 800 | } | 790 | } |
295 | 801 | 791 | ||
296 | 802 | ut_a(type == OS_FILE_WRITE); | 792 | ut_a(type == OS_FILE_WRITE); |
298 | 803 | @@ -3721,8 +3757,13 @@ | 793 | @@ -3721,6 +3757,11 @@ |
299 | 804 | ut_error; | 794 | ut_error; |
300 | 805 | } | 795 | } |
301 | 806 | 796 | ||
302 | @@ -810,11 +800,8 @@ | |||
303 | 810 | + trx->io_read += n; | 800 | + trx->io_read += n; |
304 | 811 | + } | 801 | + } |
305 | 812 | slot = os_aio_array_reserve_slot(type, array, message1, message2, file, | 802 | slot = os_aio_array_reserve_slot(type, array, message1, message2, file, |
308 | 813 | - name, buf, offset, offset_high, n); | 803 | name, buf, offset, offset_high, n); |
307 | 814 | + name, buf, offset, offset_high, n, trx); | ||
309 | 815 | if (type == OS_FILE_READ) { | 804 | if (type == OS_FILE_READ) { |
310 | 816 | if (os_aio_use_native_aio) { | ||
311 | 817 | #ifdef WIN_ASYNC_IO | ||
312 | 818 | diff -ruN a/storage/innodb_plugin/srv/srv0srv.c b/storage/innodb_plugin/srv/srv0srv.c | 805 | diff -ruN a/storage/innodb_plugin/srv/srv0srv.c b/storage/innodb_plugin/srv/srv0srv.c |
313 | 819 | --- a/storage/innodb_plugin/srv/srv0srv.c 2010-08-27 16:27:30.233022109 +0900 | 806 | --- a/storage/innodb_plugin/srv/srv0srv.c 2010-08-27 16:27:30.233022109 +0900 |
314 | 820 | +++ b/storage/innodb_plugin/srv/srv0srv.c 2010-08-27 16:30:47.384058509 +0900 | 807 | +++ b/storage/innodb_plugin/srv/srv0srv.c 2010-08-27 16:30:47.384058509 +0900 |
315 | 821 | 808 | ||
316 | === modified file 'innodb_files_extend.patch' | |||
317 | --- innodb_files_extend.patch 2010-12-16 11:35:26 +0000 | |||
318 | +++ innodb_files_extend.patch 2011-02-02 15:07:48 +0000 | |||
319 | @@ -20,6 +20,33 @@ | |||
320 | 20 | diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0fil.c | 20 | diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0fil.c |
321 | 21 | --- a/storage/innodb_plugin/fil/fil0fil.c 2010-08-27 16:43:11.941989968 +0900 | 21 | --- a/storage/innodb_plugin/fil/fil0fil.c 2010-08-27 16:43:11.941989968 +0900 |
322 | 22 | +++ b/storage/innodb_plugin/fil/fil0fil.c 2010-08-27 16:44:21.668058937 +0900 | 22 | +++ b/storage/innodb_plugin/fil/fil0fil.c 2010-08-27 16:44:21.668058937 +0900 |
323 | 23 | @@ -690,7 +690,7 @@ | ||
324 | 24 | ut_a(space->purpose != FIL_LOG); | ||
325 | 25 | ut_a(!trx_sys_sys_space(space->id)); | ||
326 | 26 | |||
327 | 27 | - if (size_bytes < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { | ||
328 | 28 | + if (size_bytes < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) { | ||
329 | 29 | fprintf(stderr, | ||
330 | 30 | "InnoDB: Error: the size of single-table" | ||
331 | 31 | " tablespace file %s\n" | ||
332 | 32 | @@ -3778,7 +3778,7 @@ | ||
333 | 33 | |||
334 | 34 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; | ||
335 | 35 | #ifndef UNIV_HOTBACKUP | ||
336 | 36 | - if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { | ||
337 | 37 | + if (size < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) { | ||
338 | 38 | fprintf(stderr, | ||
339 | 39 | "InnoDB: Error: the size of single-table tablespace" | ||
340 | 40 | " file %s\n" | ||
341 | 41 | @@ -3798,7 +3798,7 @@ | ||
342 | 42 | /* Align the memory for file i/o if we might have O_DIRECT set */ | ||
343 | 43 | page = ut_align(buf2, UNIV_PAGE_SIZE); | ||
344 | 44 | |||
345 | 45 | - if (size >= FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { | ||
346 | 46 | + if (size >= FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) { | ||
347 | 47 | success = os_file_read(file, page, 0, 0, UNIV_PAGE_SIZE); | ||
348 | 48 | |||
349 | 49 | /* We have to read the tablespace id from the file */ | ||
350 | 23 | @@ -4776,9 +4776,9 @@ | 50 | @@ -4776,9 +4776,9 @@ |
351 | 24 | ut_ad(ut_is_2pow(zip_size)); | 51 | ut_ad(ut_is_2pow(zip_size)); |
352 | 25 | ut_ad(buf); | 52 | ut_ad(buf); |
353 | @@ -36,28 +63,36 @@ | |||
354 | 36 | diff -ruN a/storage/innodb_plugin/fsp/fsp0fsp.c b/storage/innodb_plugin/fsp/fsp0fsp.c | 63 | diff -ruN a/storage/innodb_plugin/fsp/fsp0fsp.c b/storage/innodb_plugin/fsp/fsp0fsp.c |
355 | 37 | --- a/storage/innodb_plugin/fsp/fsp0fsp.c 2010-08-27 16:40:36.528021375 +0900 | 64 | --- a/storage/innodb_plugin/fsp/fsp0fsp.c 2010-08-27 16:40:36.528021375 +0900 |
356 | 38 | +++ b/storage/innodb_plugin/fsp/fsp0fsp.c 2010-08-27 16:44:21.673058570 +0900 | 65 | +++ b/storage/innodb_plugin/fsp/fsp0fsp.c 2010-08-27 16:44:21.673058570 +0900 |
358 | 39 | @@ -658,15 +658,16 @@ | 66 | @@ -657,16 +657,18 @@ |
359 | 67 | 0 for uncompressed pages */ | ||
360 | 40 | ulint offset) /*!< in: page offset */ | 68 | ulint offset) /*!< in: page offset */ |
361 | 41 | { | 69 | { |
363 | 42 | #ifndef DOXYGEN /* Doxygen gets confused of these */ | 70 | -#ifndef DOXYGEN /* Doxygen gets confused of these */ |
364 | 43 | -# if UNIV_PAGE_SIZE <= XDES_ARR_OFFSET \ | 71 | -# if UNIV_PAGE_SIZE <= XDES_ARR_OFFSET \ |
365 | 44 | - + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE | 72 | - + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE |
366 | 45 | -# error | 73 | -# error |
367 | 46 | -# endif | 74 | -# endif |
368 | 75 | -# if PAGE_ZIP_MIN_SIZE <= XDES_ARR_OFFSET \ | ||
369 | 76 | - + (PAGE_ZIP_MIN_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE | ||
370 | 77 | -# error | ||
371 | 78 | -# endif | ||
372 | 79 | -#endif /* !DOXYGEN */ | ||
373 | 80 | +//#ifndef DOXYGEN /* Doxygen gets confused of these */ | ||
374 | 47 | +//# if UNIV_PAGE_SIZE <= XDES_ARR_OFFSET | 81 | +//# if UNIV_PAGE_SIZE <= XDES_ARR_OFFSET |
375 | 48 | +// + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE | 82 | +// + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE |
376 | 49 | +//# error | 83 | +//# error |
377 | 50 | +//# endif | 84 | +//# endif |
383 | 51 | # if PAGE_ZIP_MIN_SIZE <= XDES_ARR_OFFSET \ | 85 | +//# if PAGE_ZIP_MIN_SIZE <= XDES_ARR_OFFSET |
384 | 52 | + (PAGE_ZIP_MIN_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE | 86 | +// + (PAGE_ZIP_MIN_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE |
385 | 53 | # error | 87 | +//# error |
386 | 54 | # endif | 88 | +//# endif |
387 | 55 | #endif /* !DOXYGEN */ | 89 | +//#endif /* !DOXYGEN */ |
388 | 56 | + ut_a(UNIV_PAGE_SIZE > XDES_ARR_OFFSET + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE); | 90 | + ut_a(UNIV_PAGE_SIZE > XDES_ARR_OFFSET + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE); |
389 | 91 | + ut_a(PAGE_ZIP_MIN_SIZE > XDES_ARR_OFFSET + (PAGE_ZIP_MIN_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE); | ||
390 | 57 | ut_ad(ut_is_2pow(zip_size)); | 92 | ut_ad(ut_is_2pow(zip_size)); |
391 | 58 | 93 | ||
392 | 59 | if (!zip_size) { | 94 | if (!zip_size) { |
394 | 60 | @@ -1465,12 +1466,12 @@ | 95 | @@ -1465,12 +1467,12 @@ |
395 | 61 | mtr); | 96 | mtr); |
396 | 62 | xdes_init(descr, mtr); | 97 | xdes_init(descr, mtr); |
397 | 63 | 98 | ||
398 | @@ -235,7 +270,7 @@ | |||
399 | 235 | diff -ruN a/storage/innodb_plugin/include/buf0types.h b/storage/innodb_plugin/include/buf0types.h | 270 | diff -ruN a/storage/innodb_plugin/include/buf0types.h b/storage/innodb_plugin/include/buf0types.h |
400 | 236 | --- a/storage/innodb_plugin/include/buf0types.h 2010-08-04 02:24:19.000000000 +0900 | 271 | --- a/storage/innodb_plugin/include/buf0types.h 2010-08-04 02:24:19.000000000 +0900 |
401 | 237 | +++ b/storage/innodb_plugin/include/buf0types.h 2010-08-27 16:44:21.692071229 +0900 | 272 | +++ b/storage/innodb_plugin/include/buf0types.h 2010-08-27 16:44:21.692071229 +0900 |
403 | 238 | @@ -70,6 +70,7 @@ | 273 | @@ -70,12 +70,13 @@ |
404 | 239 | buddy system; must be at least | 274 | buddy system; must be at least |
405 | 240 | sizeof(buf_page_t) */ | 275 | sizeof(buf_page_t) */ |
406 | 241 | #define BUF_BUDDY_SIZES (UNIV_PAGE_SIZE_SHIFT - BUF_BUDDY_LOW_SHIFT) | 276 | #define BUF_BUDDY_SIZES (UNIV_PAGE_SIZE_SHIFT - BUF_BUDDY_LOW_SHIFT) |
407 | @@ -243,6 +278,25 @@ | |||
408 | 243 | /*!< number of buddy sizes */ | 278 | /*!< number of buddy sizes */ |
409 | 244 | 279 | ||
410 | 245 | /** twice the maximum block size of the buddy system; | 280 | /** twice the maximum block size of the buddy system; |
411 | 281 | the underlying memory is aligned by this amount: | ||
412 | 282 | this must be equal to UNIV_PAGE_SIZE */ | ||
413 | 283 | -#define BUF_BUDDY_HIGH (BUF_BUDDY_LOW << BUF_BUDDY_SIZES) | ||
414 | 284 | +#define BUF_BUDDY_HIGH ((ulint)BUF_BUDDY_LOW << BUF_BUDDY_SIZES) | ||
415 | 285 | /* @} */ | ||
416 | 286 | |||
417 | 287 | #endif | ||
418 | 288 | diff -ruN a/storage/innodb_plugin/include/fsp0types.h b/storage/innodb_plugin/include/fsp0types.h | ||
419 | 289 | --- a/storage/innodb_plugin/include/fsp0types.h 2010-11-29 19:38:03.000000000 +0900 | ||
420 | 290 | +++ b/storage/innodb_plugin/include/fsp0types.h 2011-02-02 23:29:13.000000000 +0900 | ||
421 | 291 | @@ -42,7 +42,7 @@ | ||
422 | 292 | /* @} */ | ||
423 | 293 | |||
424 | 294 | /** File space extent size (one megabyte) in pages */ | ||
425 | 295 | -#define FSP_EXTENT_SIZE (1 << (20 - UNIV_PAGE_SIZE_SHIFT)) | ||
426 | 296 | +#define FSP_EXTENT_SIZE ((ulint)1 << (20 - UNIV_PAGE_SIZE_SHIFT)) | ||
427 | 297 | |||
428 | 298 | /** On a page of any file segment, data may be put starting from this | ||
429 | 299 | offset */ | ||
430 | 246 | diff -ruN a/storage/innodb_plugin/include/log0log.h b/storage/innodb_plugin/include/log0log.h | 300 | diff -ruN a/storage/innodb_plugin/include/log0log.h b/storage/innodb_plugin/include/log0log.h |
431 | 247 | --- a/storage/innodb_plugin/include/log0log.h 2010-11-03 22:39:54.000000000 +0900 | 301 | --- a/storage/innodb_plugin/include/log0log.h 2010-11-03 22:39:54.000000000 +0900 |
432 | 248 | +++ b/storage/innodb_plugin/include/log0log.h 2010-12-13 20:17:00.600329611 +0900 | 302 | +++ b/storage/innodb_plugin/include/log0log.h 2010-12-13 20:17:00.600329611 +0900 |
433 | 249 | 303 | ||
434 | === modified file 'innodb_fix_misc.patch' | |||
435 | --- innodb_fix_misc.patch 2010-12-20 21:54:44 +0000 | |||
436 | +++ innodb_fix_misc.patch 2011-02-02 15:07:48 +0000 | |||
437 | @@ -51,10 +51,30 @@ | |||
438 | 51 | 51 | ||
439 | 52 | #define REFMAN "http://dev.mysql.com/doc/refman/5.1/en/" | 52 | #define REFMAN "http://dev.mysql.com/doc/refman/5.1/en/" |
440 | 53 | 53 | ||
441 | 54 | diff -ruN a/storage/innodb_plugin/mtr/mtr0log.c b/storage/innodb_plugin/mtr/mtr0log.c | ||
442 | 55 | --- a/storage/innodb_plugin/mtr/mtr0log.c 2010-11-29 19:38:03.000000000 +0900 | ||
443 | 56 | +++ b/storage/innodb_plugin/mtr/mtr0log.c 2011-02-02 23:31:34.000000000 +0900 | ||
444 | 57 | @@ -408,7 +408,7 @@ | ||
445 | 58 | ptr += 2; | ||
446 | 59 | |||
447 | 60 | if (UNIV_UNLIKELY(offset >= UNIV_PAGE_SIZE) | ||
448 | 61 | - || UNIV_UNLIKELY(len + offset) > UNIV_PAGE_SIZE) { | ||
449 | 62 | + || UNIV_UNLIKELY(len + offset > UNIV_PAGE_SIZE)) { | ||
450 | 63 | recv_sys->found_corrupt_log = TRUE; | ||
451 | 64 | |||
452 | 65 | return(NULL); | ||
453 | 54 | diff -ruN a/storage/innodb_plugin/row/row0mysql.c b/storage/innodb_plugin/row/row0mysql.c | 66 | diff -ruN a/storage/innodb_plugin/row/row0mysql.c b/storage/innodb_plugin/row/row0mysql.c |
454 | 55 | --- a/storage/innodb_plugin/row/row0mysql.c 2010-07-20 16:33:04.097866666 +0900 | 67 | --- a/storage/innodb_plugin/row/row0mysql.c 2010-07-20 16:33:04.097866666 +0900 |
455 | 56 | +++ b/storage/innodb_plugin/row/row0mysql.c 2010-07-20 16:33:53.995828763 +0900 | 68 | +++ b/storage/innodb_plugin/row/row0mysql.c 2010-07-20 16:33:53.995828763 +0900 |
457 | 57 | @@ -1135,6 +1135,13 @@ | 69 | @@ -51,6 +51,7 @@ |
458 | 70 | #include "btr0sea.h" | ||
459 | 71 | #include "fil0fil.h" | ||
460 | 72 | #include "ibuf0ibuf.h" | ||
461 | 73 | +#include "ha_prototypes.h" | ||
462 | 74 | |||
463 | 75 | /** Provide optional 4.x backwards compatibility for 5.0 and above */ | ||
464 | 76 | UNIV_INTERN ibool row_rollback_on_timeout = FALSE; | ||
465 | 77 | @@ -1135,6 +1136,13 @@ | ||
466 | 58 | 78 | ||
467 | 59 | thr = que_fork_get_first_thr(prebuilt->ins_graph); | 79 | thr = que_fork_get_first_thr(prebuilt->ins_graph); |
468 | 60 | 80 | ||
469 | 61 | 81 | ||
470 | === modified file 'innodb_io_patches.patch' | |||
471 | --- innodb_io_patches.patch 2010-12-16 11:35:26 +0000 | |||
472 | +++ innodb_io_patches.patch 2011-02-02 15:07:48 +0000 | |||
473 | @@ -963,7 +963,7 @@ | |||
474 | 963 | /*-------------------------------------------*/ | 963 | /*-------------------------------------------*/ |
475 | 964 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; | 964 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; |
476 | 965 | UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; | 965 | UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; |
478 | 966 | @@ -2477,15 +2488,30 @@ | 966 | @@ -2477,15 +2488,31 @@ |
479 | 967 | ulint n_pages_purged = 0; | 967 | ulint n_pages_purged = 0; |
480 | 968 | ulint n_bytes_merged; | 968 | ulint n_bytes_merged; |
481 | 969 | ulint n_pages_flushed; | 969 | ulint n_pages_flushed; |
482 | @@ -985,7 +985,8 @@ | |||
483 | 985 | + unsigned space:32; | 985 | + unsigned space:32; |
484 | 986 | + unsigned offset:32; | 986 | + unsigned offset:32; |
485 | 987 | + ib_uint64_t oldest_modification; | 987 | + ib_uint64_t oldest_modification; |
487 | 988 | + } prev_flush_info; | 988 | + }; |
488 | 989 | + struct t_prev_flush_info_struct prev_flush_info = {0,0,0,0}; | ||
489 | 989 | + | 990 | + |
490 | 990 | + ib_uint64_t lsn_old; | 991 | + ib_uint64_t lsn_old; |
491 | 991 | + | 992 | + |
492 | @@ -994,7 +995,7 @@ | |||
493 | 994 | #ifdef UNIV_DEBUG_THREAD_CREATION | 995 | #ifdef UNIV_DEBUG_THREAD_CREATION |
494 | 995 | fprintf(stderr, "Master thread starts, id %lu\n", | 996 | fprintf(stderr, "Master thread starts, id %lu\n", |
495 | 996 | os_thread_pf(os_thread_get_curr_id())); | 997 | os_thread_pf(os_thread_get_curr_id())); |
497 | 997 | @@ -2501,6 +2527,9 @@ | 998 | @@ -2501,6 +2528,9 @@ |
498 | 998 | 999 | ||
499 | 999 | mutex_exit(&kernel_mutex); | 1000 | mutex_exit(&kernel_mutex); |
500 | 1000 | 1001 | ||
501 | @@ -1004,7 +1005,7 @@ | |||
502 | 1004 | loop: | 1005 | loop: |
503 | 1005 | /*****************************************************************/ | 1006 | /*****************************************************************/ |
504 | 1006 | /* ---- When there is database activity by users, we cycle in this | 1007 | /* ---- When there is database activity by users, we cycle in this |
506 | 1007 | @@ -2528,16 +2557,38 @@ | 1008 | @@ -2528,16 +2558,40 @@ |
507 | 1008 | srv_last_log_flush_time = time(NULL); | 1009 | srv_last_log_flush_time = time(NULL); |
508 | 1009 | skip_sleep = FALSE; | 1010 | skip_sleep = FALSE; |
509 | 1010 | 1011 | ||
510 | @@ -1013,6 +1014,8 @@ | |||
511 | 1013 | for (i = 0; i < 10; i++) { | 1014 | for (i = 0; i < 10; i++) { |
512 | 1014 | + ulint cur_time = ut_time_ms(); | 1015 | + ulint cur_time = ut_time_ms(); |
513 | 1015 | + | 1016 | + |
514 | 1017 | + n_pages_flushed = 0; /* initialize */ | ||
515 | 1018 | + | ||
516 | 1016 | n_ios_old = log_sys->n_log_ios + buf_pool->stat.n_pages_read | 1019 | n_ios_old = log_sys->n_log_ios + buf_pool->stat.n_pages_read |
517 | 1017 | + buf_pool->stat.n_pages_written; | 1020 | + buf_pool->stat.n_pages_written; |
518 | 1018 | srv_main_thread_op_info = "sleeping"; | 1021 | srv_main_thread_op_info = "sleeping"; |
519 | @@ -1044,7 +1047,7 @@ | |||
520 | 1044 | } | 1047 | } |
521 | 1045 | 1048 | ||
522 | 1046 | skip_sleep = FALSE; | 1049 | skip_sleep = FALSE; |
524 | 1047 | @@ -2574,7 +2625,7 @@ | 1050 | @@ -2574,7 +2628,7 @@ |
525 | 1048 | if (n_pend_ios < SRV_PEND_IO_THRESHOLD | 1051 | if (n_pend_ios < SRV_PEND_IO_THRESHOLD |
526 | 1049 | && (n_ios - n_ios_old < SRV_RECENT_IO_ACTIVITY)) { | 1052 | && (n_ios - n_ios_old < SRV_RECENT_IO_ACTIVITY)) { |
527 | 1050 | srv_main_thread_op_info = "doing insert buffer merge"; | 1053 | srv_main_thread_op_info = "doing insert buffer merge"; |
528 | @@ -1053,7 +1056,7 @@ | |||
529 | 1053 | 1056 | ||
530 | 1054 | /* Flush logs if needed */ | 1057 | /* Flush logs if needed */ |
531 | 1055 | srv_sync_log_buffer_in_background(); | 1058 | srv_sync_log_buffer_in_background(); |
533 | 1056 | @@ -2598,6 +2649,11 @@ | 1059 | @@ -2598,6 +2652,11 @@ |
534 | 1057 | iteration of this loop. */ | 1060 | iteration of this loop. */ |
535 | 1058 | 1061 | ||
536 | 1059 | skip_sleep = TRUE; | 1062 | skip_sleep = TRUE; |
537 | @@ -1065,7 +1068,7 @@ | |||
538 | 1065 | } else if (srv_adaptive_flushing) { | 1068 | } else if (srv_adaptive_flushing) { |
539 | 1066 | 1069 | ||
540 | 1067 | /* Try to keep the rate of flushing of dirty | 1070 | /* Try to keep the rate of flushing of dirty |
542 | 1068 | @@ -2619,6 +2675,255 @@ | 1071 | @@ -2619,6 +2678,256 @@ |
543 | 1069 | skip_sleep = TRUE; | 1072 | skip_sleep = TRUE; |
544 | 1070 | } | 1073 | } |
545 | 1071 | } | 1074 | } |
546 | @@ -1221,7 +1224,8 @@ | |||
547 | 1221 | + | 1224 | + |
548 | 1222 | + if (prev_adaptive_checkpoint == 3) { | 1225 | + if (prev_adaptive_checkpoint == 3) { |
549 | 1223 | + lint n_flush; | 1226 | + lint n_flush; |
551 | 1224 | + lint blocks_sum, new_blocks_sum, flushed_blocks_sum; | 1227 | + lint blocks_sum; |
552 | 1228 | + ulint new_blocks_sum, flushed_blocks_sum; | ||
553 | 1225 | + | 1229 | + |
554 | 1226 | + blocks_sum = new_blocks_sum = flushed_blocks_sum = 0; | 1230 | + blocks_sum = new_blocks_sum = flushed_blocks_sum = 0; |
555 | 1227 | + | 1231 | + |
556 | @@ -1321,7 +1325,7 @@ | |||
557 | 1321 | } | 1325 | } |
558 | 1322 | 1326 | ||
559 | 1323 | if (srv_activity_count == old_activity_count) { | 1327 | if (srv_activity_count == old_activity_count) { |
561 | 1324 | @@ -2667,7 +2972,7 @@ | 1328 | @@ -2667,7 +2976,7 @@ |
562 | 1325 | even if the server were active */ | 1329 | even if the server were active */ |
563 | 1326 | 1330 | ||
564 | 1327 | srv_main_thread_op_info = "doing insert buffer merge"; | 1331 | srv_main_thread_op_info = "doing insert buffer merge"; |
565 | @@ -1330,7 +1334,7 @@ | |||
566 | 1330 | 1334 | ||
567 | 1331 | /* Flush logs if needed */ | 1335 | /* Flush logs if needed */ |
568 | 1332 | srv_sync_log_buffer_in_background(); | 1336 | srv_sync_log_buffer_in_background(); |
570 | 1333 | @@ -2792,7 +3097,7 @@ | 1337 | @@ -2792,7 +3101,7 @@ |
571 | 1334 | buf_flush_batch below. Otherwise, the system favors | 1338 | buf_flush_batch below. Otherwise, the system favors |
572 | 1335 | clean pages over cleanup throughput. */ | 1339 | clean pages over cleanup throughput. */ |
573 | 1336 | n_bytes_merged = ibuf_contract_for_n_pages(FALSE, | 1340 | n_bytes_merged = ibuf_contract_for_n_pages(FALSE, |
574 | 1337 | 1341 | ||
575 | === modified file 'innodb_lru_dump_restore.patch' | |||
576 | --- innodb_lru_dump_restore.patch 2010-12-22 18:24:52 +0000 | |||
577 | +++ innodb_lru_dump_restore.patch 2011-02-02 15:07:48 +0000 | |||
578 | @@ -42,7 +42,7 @@ | |||
579 | 42 | diff -ruN a/storage/innodb_plugin/buf/buf0lru.c b/storage/innodb_plugin/buf/buf0lru.c | 42 | diff -ruN a/storage/innodb_plugin/buf/buf0lru.c b/storage/innodb_plugin/buf/buf0lru.c |
580 | 43 | --- a/storage/innodb_plugin/buf/buf0lru.c 2010-08-27 16:13:11.070058073 +0900 | 43 | --- a/storage/innodb_plugin/buf/buf0lru.c 2010-08-27 16:13:11.070058073 +0900 |
581 | 44 | +++ b/storage/innodb_plugin/buf/buf0lru.c 2010-08-27 16:34:33.860400549 +0900 | 44 | +++ b/storage/innodb_plugin/buf/buf0lru.c 2010-08-27 16:34:33.860400549 +0900 |
583 | 45 | @@ -2122,6 +2122,278 @@ | 45 | @@ -2122,6 +2122,277 @@ |
584 | 46 | memset(&buf_LRU_stat_cur, 0, sizeof buf_LRU_stat_cur); | 46 | memset(&buf_LRU_stat_cur, 0, sizeof buf_LRU_stat_cur); |
585 | 47 | } | 47 | } |
586 | 48 | 48 | ||
587 | @@ -285,8 +285,7 @@ | |||
588 | 285 | + continue; | 285 | + continue; |
589 | 286 | + } | 286 | + } |
590 | 287 | + | 287 | + |
593 | 288 | + if (fil_area_is_exist(space_id, zip_size, page_no, 0, | 288 | + if (fil_is_exist(space_id, page_no)) { |
592 | 289 | + zip_size ? zip_size : UNIV_PAGE_SIZE)) { | ||
594 | 290 | + | 289 | + |
595 | 291 | + tablespace_version = fil_space_get_version(space_id); | 290 | + tablespace_version = fil_space_get_version(space_id); |
596 | 292 | + | 291 | + |
597 | @@ -336,7 +335,7 @@ | |||
598 | 336 | diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0fil.c | 335 | diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0fil.c |
599 | 337 | --- a/storage/innodb_plugin/fil/fil0fil.c 2010-08-27 16:32:40.298411400 +0900 | 336 | --- a/storage/innodb_plugin/fil/fil0fil.c 2010-08-27 16:32:40.298411400 +0900 |
600 | 338 | +++ b/storage/innodb_plugin/fil/fil0fil.c 2010-08-27 16:34:33.868058362 +0900 | 337 | +++ b/storage/innodb_plugin/fil/fil0fil.c 2010-08-27 16:34:33.868058362 +0900 |
602 | 339 | @@ -4915,6 +4915,78 @@ | 338 | @@ -4915,6 +4915,70 @@ |
603 | 340 | return(DB_SUCCESS); | 339 | return(DB_SUCCESS); |
604 | 341 | } | 340 | } |
605 | 342 | 341 | ||
606 | @@ -344,18 +343,10 @@ | |||
607 | 344 | +Confirm whether the parameters are valid or not */ | 343 | +Confirm whether the parameters are valid or not */ |
608 | 345 | +UNIV_INTERN | 344 | +UNIV_INTERN |
609 | 346 | +ibool | 345 | +ibool |
611 | 347 | +fil_area_is_exist( | 346 | +fil_is_exist( |
612 | 348 | +/*==============*/ | 347 | +/*==============*/ |
613 | 349 | + ulint space_id, /*!< in: space id */ | 348 | + ulint space_id, /*!< in: space id */ |
623 | 350 | + ulint zip_size, /*!< in: compressed page size in bytes; | 349 | + ulint block_offset) /*!< in: offset in number of blocks */ |
615 | 351 | + 0 for uncompressed pages */ | ||
616 | 352 | + ulint block_offset, /*!< in: offset in number of blocks */ | ||
617 | 353 | + ulint byte_offset, /*!< in: remainder of offset in bytes; in | ||
618 | 354 | + aio this must be divisible by the OS block | ||
619 | 355 | + size */ | ||
620 | 356 | + ulint len) /*!< in: how many bytes to read or write; this | ||
621 | 357 | + must not cross a file boundary; in aio this | ||
622 | 358 | + must be a block size multiple */ | ||
624 | 359 | +{ | 350 | +{ |
625 | 360 | + fil_space_t* space; | 351 | + fil_space_t* space; |
626 | 361 | + fil_node_t* node; | 352 | + fil_node_t* node; |
627 | @@ -563,7 +554,7 @@ | |||
628 | 563 | diff -ruN a/storage/innodb_plugin/include/fil0fil.h b/storage/innodb_plugin/include/fil0fil.h | 554 | diff -ruN a/storage/innodb_plugin/include/fil0fil.h b/storage/innodb_plugin/include/fil0fil.h |
629 | 564 | --- a/storage/innodb_plugin/include/fil0fil.h 2010-08-27 16:32:40.315012507 +0900 | 555 | --- a/storage/innodb_plugin/include/fil0fil.h 2010-08-27 16:32:40.315012507 +0900 |
630 | 565 | +++ b/storage/innodb_plugin/include/fil0fil.h 2010-08-27 16:34:33.878063455 +0900 | 556 | +++ b/storage/innodb_plugin/include/fil0fil.h 2010-08-27 16:34:33.878063455 +0900 |
632 | 566 | @@ -643,6 +643,22 @@ | 557 | @@ -643,6 +643,14 @@ |
633 | 567 | void* message, /*!< in: message for aio handler if non-sync | 558 | void* message, /*!< in: message for aio handler if non-sync |
634 | 568 | aio used, else ignored */ | 559 | aio used, else ignored */ |
635 | 569 | trx_t* trx); | 560 | trx_t* trx); |
636 | @@ -571,18 +562,10 @@ | |||
637 | 571 | +Confirm whether the parameters are valid or not */ | 562 | +Confirm whether the parameters are valid or not */ |
638 | 572 | +UNIV_INTERN | 563 | +UNIV_INTERN |
639 | 573 | +ibool | 564 | +ibool |
641 | 574 | +fil_area_is_exist( | 565 | +fil_is_exist( |
642 | 575 | +/*==============*/ | 566 | +/*==============*/ |
643 | 576 | + ulint space_id, /*!< in: space id */ | 567 | + ulint space_id, /*!< in: space id */ |
653 | 577 | + ulint zip_size, /*!< in: compressed page size in bytes; | 568 | + ulint block_offset); /*!< in: offset in number of blocks */ |
645 | 578 | + 0 for uncompressed pages */ | ||
646 | 579 | + ulint block_offset, /*!< in: offset in number of blocks */ | ||
647 | 580 | + ulint byte_offset, /*!< in: remainder of offset in bytes; in | ||
648 | 581 | + aio this must be divisible by the OS block | ||
649 | 582 | + size */ | ||
650 | 583 | + ulint len); /*!< in: how many bytes to read or write; this | ||
651 | 584 | + must not cross a file boundary; in aio this | ||
652 | 585 | + must be a block size multiple */ | ||
654 | 586 | /**********************************************************************//** | 569 | /**********************************************************************//** |
655 | 587 | Waits for an aio operation to complete. This function is used to write the | 570 | Waits for an aio operation to complete. This function is used to write the |
656 | 588 | handler for completed requests. The aio array of pending requests is divided | 571 | handler for completed requests. The aio array of pending requests is divided |
657 | 589 | 572 | ||
658 | === modified file 'innodb_pass_corrupt_table.patch' | |||
659 | --- innodb_pass_corrupt_table.patch 2010-12-16 11:35:26 +0000 | |||
660 | +++ innodb_pass_corrupt_table.patch 2011-02-02 15:07:48 +0000 | |||
661 | @@ -608,7 +608,7 @@ | |||
662 | 608 | ut_a(ret); | 608 | ut_a(ret); |
663 | 609 | 609 | ||
664 | 610 | if (mode == OS_AIO_SYNC) { | 610 | if (mode == OS_AIO_SYNC) { |
666 | 611 | @@ -5053,7 +5074,7 @@ | 611 | @@ -5045,7 +5066,7 @@ |
667 | 612 | 612 | ||
668 | 613 | if (fil_node->space->purpose == FIL_TABLESPACE) { | 613 | if (fil_node->space->purpose == FIL_TABLESPACE) { |
669 | 614 | srv_set_io_thread_op_info(segment, "complete io for buf page"); | 614 | srv_set_io_thread_op_info(segment, "complete io for buf page"); |
670 | @@ -617,7 +617,7 @@ | |||
671 | 617 | } else { | 617 | } else { |
672 | 618 | srv_set_io_thread_op_info(segment, "complete io for log"); | 618 | srv_set_io_thread_op_info(segment, "complete io for log"); |
673 | 619 | log_io_complete(message); | 619 | log_io_complete(message); |
675 | 620 | @@ -5407,3 +5428,46 @@ | 620 | @@ -5399,3 +5420,46 @@ |
676 | 621 | return 0; | 621 | return 0; |
677 | 622 | } | 622 | } |
678 | 623 | } | 623 | } |
679 | @@ -1184,7 +1184,7 @@ | |||
680 | 1184 | diff -ruN a/storage/innodb_plugin/include/fil0fil.h b/storage/innodb_plugin/include/fil0fil.h | 1184 | diff -ruN a/storage/innodb_plugin/include/fil0fil.h b/storage/innodb_plugin/include/fil0fil.h |
681 | 1185 | --- a/storage/innodb_plugin/include/fil0fil.h 2010-08-27 16:36:03.499987483 +0900 | 1185 | --- a/storage/innodb_plugin/include/fil0fil.h 2010-08-27 16:36:03.499987483 +0900 |
682 | 1186 | +++ b/storage/innodb_plugin/include/fil0fil.h 2010-08-27 16:39:03.015021314 +0900 | 1186 | +++ b/storage/innodb_plugin/include/fil0fil.h 2010-08-27 16:39:03.015021314 +0900 |
684 | 1187 | @@ -756,6 +756,19 @@ | 1187 | @@ -748,6 +748,19 @@ |
685 | 1188 | fil_system_hash_nodes(void); | 1188 | fil_system_hash_nodes(void); |
686 | 1189 | /*========================*/ | 1189 | /*========================*/ |
687 | 1190 | 1190 | ||
688 | 1191 | 1191 | ||
689 | === modified file 'innodb_purge_thread.patch' | |||
690 | --- innodb_purge_thread.patch 2010-12-16 11:35:26 +0000 | |||
691 | +++ innodb_purge_thread.patch 2011-02-02 15:07:48 +0000 | |||
692 | @@ -154,7 +154,7 @@ | |||
693 | 154 | /* if TRUE, then we auto-extend the last data file */ | 154 | /* if TRUE, then we auto-extend the last data file */ |
694 | 155 | UNIV_INTERN ibool srv_auto_extend_last_data_file = FALSE; | 155 | UNIV_INTERN ibool srv_auto_extend_last_data_file = FALSE; |
695 | 156 | /* if != 0, this tells the max size auto-extending may increase the | 156 | /* if != 0, this tells the max size auto-extending may increase the |
697 | 157 | @@ -2625,10 +2627,10 @@ | 157 | @@ -2626,10 +2628,10 @@ |
698 | 158 | srv_main_thread_process_no = os_proc_get_number(); | 158 | srv_main_thread_process_no = os_proc_get_number(); |
699 | 159 | srv_main_thread_id = os_thread_pf(os_thread_get_curr_id()); | 159 | srv_main_thread_id = os_thread_pf(os_thread_get_curr_id()); |
700 | 160 | 160 | ||
701 | @@ -166,7 +166,7 @@ | |||
702 | 166 | srv_n_threads_active[SRV_MASTER]++; | 166 | srv_n_threads_active[SRV_MASTER]++; |
703 | 167 | 167 | ||
704 | 168 | mutex_exit(&kernel_mutex); | 168 | mutex_exit(&kernel_mutex); |
706 | 169 | @@ -3083,6 +3085,7 @@ | 169 | @@ -3087,6 +3089,7 @@ |
707 | 170 | /* Flush logs if needed */ | 170 | /* Flush logs if needed */ |
708 | 171 | srv_sync_log_buffer_in_background(); | 171 | srv_sync_log_buffer_in_background(); |
709 | 172 | 172 | ||
710 | @@ -174,7 +174,7 @@ | |||
711 | 174 | /* We run a full purge every 10 seconds, even if the server | 174 | /* We run a full purge every 10 seconds, even if the server |
712 | 175 | were active */ | 175 | were active */ |
713 | 176 | do { | 176 | do { |
715 | 177 | @@ -3099,6 +3102,7 @@ | 177 | @@ -3103,6 +3106,7 @@ |
716 | 178 | srv_sync_log_buffer_in_background(); | 178 | srv_sync_log_buffer_in_background(); |
717 | 179 | 179 | ||
718 | 180 | } while (n_pages_purged); | 180 | } while (n_pages_purged); |
719 | @@ -182,7 +182,7 @@ | |||
720 | 182 | 182 | ||
721 | 183 | srv_main_thread_op_info = "flushing buffer pool pages"; | 183 | srv_main_thread_op_info = "flushing buffer pool pages"; |
722 | 184 | 184 | ||
724 | 185 | @@ -3167,6 +3171,7 @@ | 185 | @@ -3171,6 +3175,7 @@ |
725 | 186 | os_thread_sleep(100000); | 186 | os_thread_sleep(100000); |
726 | 187 | } | 187 | } |
727 | 188 | 188 | ||
728 | @@ -190,7 +190,7 @@ | |||
729 | 190 | srv_main_thread_op_info = "purging"; | 190 | srv_main_thread_op_info = "purging"; |
730 | 191 | 191 | ||
731 | 192 | /* Run a full purge */ | 192 | /* Run a full purge */ |
733 | 193 | @@ -3183,6 +3188,7 @@ | 193 | @@ -3187,6 +3192,7 @@ |
734 | 194 | srv_sync_log_buffer_in_background(); | 194 | srv_sync_log_buffer_in_background(); |
735 | 195 | 195 | ||
736 | 196 | } while (n_pages_purged); | 196 | } while (n_pages_purged); |
737 | @@ -198,7 +198,7 @@ | |||
738 | 198 | 198 | ||
739 | 199 | srv_main_thread_op_info = "reserving kernel mutex"; | 199 | srv_main_thread_op_info = "reserving kernel mutex"; |
740 | 200 | 200 | ||
742 | 201 | @@ -3335,3 +3341,143 @@ | 201 | @@ -3339,3 +3345,143 @@ |
743 | 202 | 202 | ||
744 | 203 | OS_THREAD_DUMMY_RETURN; /* Not reached, avoid compiler warning */ | 203 | OS_THREAD_DUMMY_RETURN; /* Not reached, avoid compiler warning */ |
745 | 204 | } | 204 | } |
746 | 205 | 205 | ||
747 | === modified file 'innodb_separate_doublewrite.patch' | |||
748 | --- innodb_separate_doublewrite.patch 2010-12-16 11:35:26 +0000 | |||
749 | +++ innodb_separate_doublewrite.patch 2011-02-02 15:07:48 +0000 | |||
750 | @@ -67,7 +67,15 @@ | |||
751 | 67 | diff -ruN a/storage/innodb_plugin/dict/dict0load.c b/storage/innodb_plugin/dict/dict0load.c | 67 | diff -ruN a/storage/innodb_plugin/dict/dict0load.c b/storage/innodb_plugin/dict/dict0load.c |
752 | 68 | --- a/storage/innodb_plugin/dict/dict0load.c 2010-08-27 16:22:04.223059346 +0900 | 68 | --- a/storage/innodb_plugin/dict/dict0load.c 2010-08-27 16:22:04.223059346 +0900 |
753 | 69 | +++ b/storage/innodb_plugin/dict/dict0load.c 2010-08-27 16:37:55.363104692 +0900 | 69 | +++ b/storage/innodb_plugin/dict/dict0load.c 2010-08-27 16:37:55.363104692 +0900 |
755 | 70 | @@ -396,7 +396,7 @@ | 70 | @@ -40,6 +40,7 @@ |
756 | 71 | #include "rem0cmp.h" | ||
757 | 72 | #include "srv0start.h" | ||
758 | 73 | #include "srv0srv.h" | ||
759 | 74 | +#include "trx0sys.h" | ||
760 | 75 | |||
761 | 76 | /****************************************************************//** | ||
762 | 77 | Compare the name of an index column. | ||
763 | 78 | @@ -396,7 +397,7 @@ | ||
764 | 71 | 79 | ||
765 | 72 | mtr_commit(&mtr); | 80 | mtr_commit(&mtr); |
766 | 73 | 81 | ||
767 | @@ -76,7 +84,7 @@ | |||
768 | 76 | /* The system tablespace always exists. */ | 84 | /* The system tablespace always exists. */ |
769 | 77 | } else if (in_crash_recovery) { | 85 | } else if (in_crash_recovery) { |
770 | 78 | /* Check that the tablespace (the .ibd file) really | 86 | /* Check that the tablespace (the .ibd file) really |
772 | 79 | @@ -904,7 +904,7 @@ | 87 | @@ -904,7 +905,7 @@ |
773 | 80 | space = mach_read_from_4(field); | 88 | space = mach_read_from_4(field); |
774 | 81 | 89 | ||
775 | 82 | /* Check if the tablespace exists and has the right name */ | 90 | /* Check if the tablespace exists and has the right name */ |
776 | @@ -85,7 +93,7 @@ | |||
777 | 85 | flags = dict_sys_tables_get_flags(rec); | 93 | flags = dict_sys_tables_get_flags(rec); |
778 | 86 | 94 | ||
779 | 87 | if (UNIV_UNLIKELY(flags == ULINT_UNDEFINED)) { | 95 | if (UNIV_UNLIKELY(flags == ULINT_UNDEFINED)) { |
781 | 88 | @@ -957,7 +957,7 @@ | 96 | @@ -957,7 +958,7 @@ |
782 | 89 | } | 97 | } |
783 | 90 | 98 | ||
784 | 91 | /* See if the tablespace is available. */ | 99 | /* See if the tablespace is available. */ |
785 | @@ -295,7 +303,7 @@ | |||
786 | 295 | /* The node must be put back to the LRU list */ | 303 | /* The node must be put back to the LRU list */ |
787 | 296 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); | 304 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); |
788 | 297 | } | 305 | } |
790 | 298 | @@ -5271,7 +5281,7 @@ | 306 | @@ -5263,7 +5273,7 @@ |
791 | 299 | ut_a(fil_node->n_pending == 0); | 307 | ut_a(fil_node->n_pending == 0); |
792 | 300 | ut_a(fil_node->open); | 308 | ut_a(fil_node->open); |
793 | 301 | ut_a(fil_node->space->purpose == FIL_TABLESPACE); | 309 | ut_a(fil_node->space->purpose == FIL_TABLESPACE); |
794 | 302 | 310 | ||
795 | === modified file 'innodb_show_lock_name.patch' | |||
796 | --- innodb_show_lock_name.patch 2010-12-16 11:35:26 +0000 | |||
797 | +++ innodb_show_lock_name.patch 2011-02-02 15:07:48 +0000 | |||
798 | @@ -67,25 +67,38 @@ | |||
799 | 67 | diff -ruN a/storage/innodb_plugin/include/sync0rw.h b/storage/innodb_plugin/include/sync0rw.h | 67 | diff -ruN a/storage/innodb_plugin/include/sync0rw.h b/storage/innodb_plugin/include/sync0rw.h |
800 | 68 | --- a/storage/innodb_plugin/include/sync0rw.h 2010-08-04 02:24:19.000000000 +0900 | 68 | --- a/storage/innodb_plugin/include/sync0rw.h 2010-08-04 02:24:19.000000000 +0900 |
801 | 69 | +++ b/storage/innodb_plugin/include/sync0rw.h 2010-08-27 16:29:24.325059383 +0900 | 69 | +++ b/storage/innodb_plugin/include/sync0rw.h 2010-08-27 16:29:24.325059383 +0900 |
803 | 70 | @@ -120,7 +120,7 @@ | 70 | @@ -113,14 +113,14 @@ |
804 | 71 | #ifdef UNIV_DEBUG | ||
805 | 72 | # ifdef UNIV_SYNC_DEBUG | ||
806 | 73 | # define rw_lock_create(L, level) \ | ||
807 | 74 | - rw_lock_create_func((L), (level), #L, __FILE__, __LINE__) | ||
808 | 75 | + rw_lock_create_func((L), (level), __FILE__, __LINE__, #L) | ||
809 | 76 | # else /* UNIV_SYNC_DEBUG */ | ||
810 | 77 | # define rw_lock_create(L, level) \ | ||
811 | 78 | - rw_lock_create_func((L), #L, __FILE__, __LINE__) | ||
812 | 79 | + rw_lock_create_func((L), __FILE__, __LINE__, #L) | ||
813 | 71 | # endif /* UNIV_SYNC_DEBUG */ | 80 | # endif /* UNIV_SYNC_DEBUG */ |
814 | 72 | #else /* UNIV_DEBUG */ | 81 | #else /* UNIV_DEBUG */ |
815 | 73 | # define rw_lock_create(L, level) \ | 82 | # define rw_lock_create(L, level) \ |
816 | 74 | - rw_lock_create_func((L), __FILE__, __LINE__) | 83 | - rw_lock_create_func((L), __FILE__, __LINE__) |
818 | 75 | + rw_lock_create_func((L), #L, NULL, 0) | 84 | + rw_lock_create_func((L), #L) |
819 | 76 | #endif /* UNIV_DEBUG */ | 85 | #endif /* UNIV_DEBUG */ |
820 | 77 | 86 | ||
821 | 78 | /******************************************************************//** | 87 | /******************************************************************//** |
823 | 79 | @@ -137,8 +137,8 @@ | 88 | @@ -137,10 +137,10 @@ |
824 | 80 | # ifdef UNIV_SYNC_DEBUG | 89 | # ifdef UNIV_SYNC_DEBUG |
825 | 81 | ulint level, /*!< in: level */ | 90 | ulint level, /*!< in: level */ |
826 | 82 | # endif /* UNIV_SYNC_DEBUG */ | 91 | # endif /* UNIV_SYNC_DEBUG */ |
827 | 83 | - const char* cmutex_name, /*!< in: mutex name */ | 92 | - const char* cmutex_name, /*!< in: mutex name */ |
830 | 84 | #endif /* UNIV_DEBUG */ | 93 | -#endif /* UNIV_DEBUG */ |
829 | 85 | + const char* cmutex_name, /*!< in: mutex name */ | ||
831 | 86 | const char* cfile_name, /*!< in: file name where created */ | 94 | const char* cfile_name, /*!< in: file name where created */ |
833 | 87 | ulint cline); /*!< in: file line where created */ | 95 | - ulint cline); /*!< in: file line where created */ |
834 | 96 | + ulint cline, /*!< in: file line where created */ | ||
835 | 97 | +#endif /* UNIV_DEBUG */ | ||
836 | 98 | + const char* cmutex_name); /*!< in: mutex name */ | ||
837 | 88 | /******************************************************************//** | 99 | /******************************************************************//** |
838 | 100 | Calling this function is obligatory only if the memory buffer containing | ||
839 | 101 | the rw-lock is freed. Removes an rw-lock object from the global list. The | ||
840 | 89 | @@ -541,7 +541,8 @@ | 102 | @@ -541,7 +541,8 @@ |
841 | 90 | ulint level; /*!< Level in the global latching order. */ | 103 | ulint level; /*!< Level in the global latching order. */ |
842 | 91 | #endif /* UNIV_SYNC_DEBUG */ | 104 | #endif /* UNIV_SYNC_DEBUG */ |
843 | @@ -108,25 +121,41 @@ | |||
844 | 108 | diff -ruN a/storage/innodb_plugin/include/sync0sync.h b/storage/innodb_plugin/include/sync0sync.h | 121 | diff -ruN a/storage/innodb_plugin/include/sync0sync.h b/storage/innodb_plugin/include/sync0sync.h |
845 | 109 | --- a/storage/innodb_plugin/include/sync0sync.h 2010-08-27 16:13:11.087074844 +0900 | 122 | --- a/storage/innodb_plugin/include/sync0sync.h 2010-08-27 16:13:11.087074844 +0900 |
846 | 110 | +++ b/storage/innodb_plugin/include/sync0sync.h 2010-08-27 16:29:24.327059254 +0900 | 123 | +++ b/storage/innodb_plugin/include/sync0sync.h 2010-08-27 16:29:24.327059254 +0900 |
848 | 111 | @@ -80,7 +80,7 @@ | 124 | @@ -73,14 +73,14 @@ |
849 | 125 | #ifdef UNIV_DEBUG | ||
850 | 126 | # ifdef UNIV_SYNC_DEBUG | ||
851 | 127 | # define mutex_create(M, level) \ | ||
852 | 128 | - mutex_create_func((M), #M, (level), __FILE__, __LINE__) | ||
853 | 129 | + mutex_create_func((M), (level), __FILE__, __LINE__, #M) | ||
854 | 130 | # else | ||
855 | 131 | # define mutex_create(M, level) \ | ||
856 | 132 | - mutex_create_func((M), #M, __FILE__, __LINE__) | ||
857 | 133 | + mutex_create_func((M), __FILE__, __LINE__, #M) | ||
858 | 112 | # endif | 134 | # endif |
859 | 113 | #else | 135 | #else |
860 | 114 | # define mutex_create(M, level) \ | 136 | # define mutex_create(M, level) \ |
861 | 115 | - mutex_create_func((M), __FILE__, __LINE__) | 137 | - mutex_create_func((M), __FILE__, __LINE__) |
863 | 116 | + mutex_create_func((M), #M, NULL, 0) | 138 | + mutex_create_func((M), #M) |
864 | 117 | #endif | 139 | #endif |
865 | 118 | 140 | ||
866 | 119 | /******************************************************************//** | 141 | /******************************************************************//** |
869 | 120 | @@ -93,8 +93,8 @@ | 142 | @@ -94,13 +94,13 @@ |
868 | 121 | mutex_create_func( | ||
870 | 122 | /*==============*/ | 143 | /*==============*/ |
871 | 123 | mutex_t* mutex, /*!< in: pointer to memory */ | 144 | mutex_t* mutex, /*!< in: pointer to memory */ |
875 | 124 | -#ifdef UNIV_DEBUG | 145 | #ifdef UNIV_DEBUG |
876 | 125 | const char* cmutex_name, /*!< in: mutex name */ | 146 | - const char* cmutex_name, /*!< in: mutex name */ |
874 | 126 | +#ifdef UNIV_DEBUG | ||
877 | 127 | # ifdef UNIV_SYNC_DEBUG | 147 | # ifdef UNIV_SYNC_DEBUG |
878 | 128 | ulint level, /*!< in: level */ | 148 | ulint level, /*!< in: level */ |
879 | 129 | # endif /* UNIV_SYNC_DEBUG */ | 149 | # endif /* UNIV_SYNC_DEBUG */ |
880 | 150 | -#endif /* UNIV_DEBUG */ | ||
881 | 151 | const char* cfile_name, /*!< in: file name where created */ | ||
882 | 152 | - ulint cline); /*!< in: file line where created */ | ||
883 | 153 | + ulint cline, /*!< in: file line where created */ | ||
884 | 154 | +#endif /* UNIV_DEBUG */ | ||
885 | 155 | + const char* cmutex_name); /*!< in: mutex name */ | ||
886 | 156 | |||
887 | 157 | #undef mutex_free /* Fix for MacOS X */ | ||
888 | 158 | |||
889 | 130 | @@ -536,9 +536,9 @@ | 159 | @@ -536,9 +536,9 @@ |
890 | 131 | ulint line; /*!< Line where the mutex was locked */ | 160 | ulint line; /*!< Line where the mutex was locked */ |
891 | 132 | ulint level; /*!< Level in the global latching order */ | 161 | ulint level; /*!< Level in the global latching order */ |
892 | @@ -182,16 +211,20 @@ | |||
893 | 182 | diff -ruN a/storage/innodb_plugin/sync/sync0rw.c b/storage/innodb_plugin/sync/sync0rw.c | 211 | diff -ruN a/storage/innodb_plugin/sync/sync0rw.c b/storage/innodb_plugin/sync/sync0rw.c |
894 | 183 | --- a/storage/innodb_plugin/sync/sync0rw.c 2010-08-04 02:24:20.000000000 +0900 | 212 | --- a/storage/innodb_plugin/sync/sync0rw.c 2010-08-04 02:24:20.000000000 +0900 |
895 | 184 | +++ b/storage/innodb_plugin/sync/sync0rw.c 2010-08-27 16:29:24.331058289 +0900 | 213 | +++ b/storage/innodb_plugin/sync/sync0rw.c 2010-08-27 16:29:24.331058289 +0900 |
897 | 185 | @@ -231,8 +231,8 @@ | 214 | @@ -231,10 +231,10 @@ |
898 | 186 | # ifdef UNIV_SYNC_DEBUG | 215 | # ifdef UNIV_SYNC_DEBUG |
899 | 187 | ulint level, /*!< in: level */ | 216 | ulint level, /*!< in: level */ |
900 | 188 | # endif /* UNIV_SYNC_DEBUG */ | 217 | # endif /* UNIV_SYNC_DEBUG */ |
901 | 189 | - const char* cmutex_name, /*!< in: mutex name */ | 218 | - const char* cmutex_name, /*!< in: mutex name */ |
904 | 190 | #endif /* UNIV_DEBUG */ | 219 | -#endif /* UNIV_DEBUG */ |
903 | 191 | + const char* cmutex_name, /*!< in: mutex name */ | ||
905 | 192 | const char* cfile_name, /*!< in: file name where created */ | 220 | const char* cfile_name, /*!< in: file name where created */ |
907 | 193 | ulint cline) /*!< in: file line where created */ | 221 | - ulint cline) /*!< in: file line where created */ |
908 | 222 | + ulint cline, /*!< in: file line where created */ | ||
909 | 223 | +#endif /* UNIV_DEBUG */ | ||
910 | 224 | + const char* cmutex_name) /*!< in: mutex name */ | ||
911 | 194 | { | 225 | { |
912 | 226 | /* If this is the very first time a synchronization object is | ||
913 | 227 | created, then the following call initializes the sync system. */ | ||
914 | 195 | @@ -242,14 +242,15 @@ | 228 | @@ -242,14 +242,15 @@ |
915 | 196 | #ifndef INNODB_RW_LOCKS_USE_ATOMICS | 229 | #ifndef INNODB_RW_LOCKS_USE_ATOMICS |
916 | 197 | mutex_create(rw_lock_get_mutex(lock), SYNC_NO_ORDER_CHECK); | 230 | mutex_create(rw_lock_get_mutex(lock), SYNC_NO_ORDER_CHECK); |
917 | @@ -275,16 +308,23 @@ | |||
918 | 275 | diff -ruN a/storage/innodb_plugin/sync/sync0sync.c b/storage/innodb_plugin/sync/sync0sync.c | 308 | diff -ruN a/storage/innodb_plugin/sync/sync0sync.c b/storage/innodb_plugin/sync/sync0sync.c |
919 | 276 | --- a/storage/innodb_plugin/sync/sync0sync.c 2010-08-27 16:13:11.113988290 +0900 | 309 | --- a/storage/innodb_plugin/sync/sync0sync.c 2010-08-27 16:13:11.113988290 +0900 |
920 | 277 | +++ b/storage/innodb_plugin/sync/sync0sync.c 2010-08-27 16:29:24.333058256 +0900 | 310 | +++ b/storage/innodb_plugin/sync/sync0sync.c 2010-08-27 16:29:24.333058256 +0900 |
923 | 278 | @@ -238,8 +238,8 @@ | 311 | @@ -239,13 +239,13 @@ |
922 | 279 | mutex_create_func( | ||
924 | 280 | /*==============*/ | 312 | /*==============*/ |
925 | 281 | mutex_t* mutex, /*!< in: pointer to memory */ | 313 | mutex_t* mutex, /*!< in: pointer to memory */ |
929 | 282 | -#ifdef UNIV_DEBUG | 314 | #ifdef UNIV_DEBUG |
930 | 283 | const char* cmutex_name, /*!< in: mutex name */ | 315 | - const char* cmutex_name, /*!< in: mutex name */ |
928 | 284 | +#ifdef UNIV_DEBUG | ||
931 | 285 | # ifdef UNIV_SYNC_DEBUG | 316 | # ifdef UNIV_SYNC_DEBUG |
932 | 286 | ulint level, /*!< in: level */ | 317 | ulint level, /*!< in: level */ |
933 | 287 | # endif /* UNIV_SYNC_DEBUG */ | 318 | # endif /* UNIV_SYNC_DEBUG */ |
934 | 319 | -#endif /* UNIV_DEBUG */ | ||
935 | 320 | const char* cfile_name, /*!< in: file name where created */ | ||
936 | 321 | - ulint cline) /*!< in: file line where created */ | ||
937 | 322 | + ulint cline, /*!< in: file line where created */ | ||
938 | 323 | +#endif /* UNIV_DEBUG */ | ||
939 | 324 | + const char* cmutex_name) /*!< in: mutex name */ | ||
940 | 325 | { | ||
941 | 326 | #if defined(HAVE_ATOMIC_BUILTINS) | ||
942 | 327 | mutex_reset_lock_word(mutex); | ||
943 | 288 | @@ -263,11 +263,13 @@ | 328 | @@ -263,11 +263,13 @@ |
944 | 289 | mutex->file_name = "not yet reserved"; | 329 | mutex->file_name = "not yet reserved"; |
945 | 290 | mutex->level = level; | 330 | mutex->level = level; |
946 | 291 | 331 | ||
947 | === modified file 'innodb_split_buf_pool_mutex.patch' | |||
948 | --- innodb_split_buf_pool_mutex.patch 2010-12-16 11:35:26 +0000 | |||
949 | +++ innodb_split_buf_pool_mutex.patch 2011-02-02 15:07:48 +0000 | |||
950 | @@ -48,25 +48,7 @@ | |||
951 | 48 | diff -ruN a/storage/innodb_plugin/btr/btr0sea.c b/storage/innodb_plugin/btr/btr0sea.c | 48 | diff -ruN a/storage/innodb_plugin/btr/btr0sea.c b/storage/innodb_plugin/btr/btr0sea.c |
952 | 49 | --- a/storage/innodb_plugin/btr/btr0sea.c 2010-08-27 16:11:12.151975789 +0900 | 49 | --- a/storage/innodb_plugin/btr/btr0sea.c 2010-08-27 16:11:12.151975789 +0900 |
953 | 50 | +++ b/storage/innodb_plugin/btr/btr0sea.c 2010-08-27 16:11:40.593021205 +0900 | 50 | +++ b/storage/innodb_plugin/btr/btr0sea.c 2010-08-27 16:11:40.593021205 +0900 |
973 | 51 | @@ -1199,7 +1199,7 @@ | 51 | @@ -1925,7 +1925,8 @@ |
955 | 52 | ulint* offsets; | ||
956 | 53 | |||
957 | 54 | rw_lock_x_lock(&btr_search_latch); | ||
958 | 55 | - buf_pool_mutex_enter(); | ||
959 | 56 | + mutex_enter(&LRU_list_mutex); | ||
960 | 57 | |||
961 | 58 | table = btr_search_sys->hash_index; | ||
962 | 59 | |||
963 | 60 | @@ -1285,7 +1285,7 @@ | ||
964 | 61 | bpage = UT_LIST_GET_PREV(LRU, bpage); | ||
965 | 62 | } | ||
966 | 63 | |||
967 | 64 | - buf_pool_mutex_exit(); | ||
968 | 65 | + mutex_exit(&LRU_list_mutex); | ||
969 | 66 | rw_lock_x_unlock(&btr_search_latch); | ||
970 | 67 | |||
971 | 68 | if (UNIV_LIKELY_NULL(heap)) { | ||
972 | 69 | @@ -1878,7 +1878,8 @@ | ||
974 | 70 | rec_offs_init(offsets_); | 52 | rec_offs_init(offsets_); |
975 | 71 | 53 | ||
976 | 72 | rw_lock_x_lock(&btr_search_latch); | 54 | rw_lock_x_lock(&btr_search_latch); |
977 | @@ -76,7 +58,7 @@ | |||
978 | 76 | 58 | ||
979 | 77 | cell_count = hash_get_n_cells(btr_search_sys->hash_index); | 59 | cell_count = hash_get_n_cells(btr_search_sys->hash_index); |
980 | 78 | 60 | ||
982 | 79 | @@ -1886,11 +1887,13 @@ | 61 | @@ -1933,11 +1934,13 @@ |
983 | 80 | /* We release btr_search_latch every once in a while to | 62 | /* We release btr_search_latch every once in a while to |
984 | 81 | give other queries a chance to run. */ | 63 | give other queries a chance to run. */ |
985 | 82 | if ((i != 0) && ((i % chunk_size) == 0)) { | 64 | if ((i != 0) && ((i % chunk_size) == 0)) { |
986 | @@ -92,7 +74,7 @@ | |||
987 | 92 | } | 74 | } |
988 | 93 | 75 | ||
989 | 94 | node = hash_get_nth_cell(btr_search_sys->hash_index, i)->node; | 76 | node = hash_get_nth_cell(btr_search_sys->hash_index, i)->node; |
991 | 95 | @@ -1997,11 +2000,13 @@ | 77 | @@ -2044,11 +2047,13 @@ |
992 | 96 | /* We release btr_search_latch every once in a while to | 78 | /* We release btr_search_latch every once in a while to |
993 | 97 | give other queries a chance to run. */ | 79 | give other queries a chance to run. */ |
994 | 98 | if (i != 0) { | 80 | if (i != 0) { |
995 | @@ -108,7 +90,7 @@ | |||
996 | 108 | } | 90 | } |
997 | 109 | 91 | ||
998 | 110 | if (!ha_validate(btr_search_sys->hash_index, i, end_index)) { | 92 | if (!ha_validate(btr_search_sys->hash_index, i, end_index)) { |
1000 | 111 | @@ -2009,7 +2014,8 @@ | 93 | @@ -2056,7 +2061,8 @@ |
1001 | 112 | } | 94 | } |
1002 | 113 | } | 95 | } |
1003 | 114 | 96 | ||
1004 | @@ -388,20 +370,33 @@ | |||
1005 | 388 | ut_ad(!mutex_own(&buf_pool_zip_mutex)); | 370 | ut_ad(!mutex_own(&buf_pool_zip_mutex)); |
1006 | 389 | ut_ad(!ut_align_offset(src, size)); | 371 | ut_ad(!ut_align_offset(src, size)); |
1007 | 390 | ut_ad(!ut_align_offset(dst, size)); | 372 | ut_ad(!ut_align_offset(dst, size)); |
1009 | 391 | @@ -434,6 +476,12 @@ | 373 | @@ -433,6 +475,13 @@ |
1010 | 374 | if (size >= PAGE_ZIP_MIN_SIZE) { | ||
1011 | 392 | /* This is a compressed page. */ | 375 | /* This is a compressed page. */ |
1012 | 393 | mutex_t* mutex; | 376 | mutex_t* mutex; |
1014 | 394 | 377 | + ulint space, page_no; | |
1015 | 378 | + | ||
1016 | 395 | + if (!have_page_hash_mutex) { | 379 | + if (!have_page_hash_mutex) { |
1017 | 396 | + mutex_exit(&zip_free_mutex); | 380 | + mutex_exit(&zip_free_mutex); |
1018 | 397 | + mutex_enter(&LRU_list_mutex); | 381 | + mutex_enter(&LRU_list_mutex); |
1019 | 398 | + rw_lock_x_lock(&page_hash_latch); | 382 | + rw_lock_x_lock(&page_hash_latch); |
1020 | 399 | + } | 383 | + } |
1022 | 400 | + | 384 | |
1023 | 401 | /* The src block may be split into smaller blocks, | 385 | /* The src block may be split into smaller blocks, |
1024 | 402 | some of which may be free. Thus, the | 386 | some of which may be free. Thus, the |
1027 | 403 | mach_read_from_4() calls below may attempt to read | 387 | @@ -442,9 +491,9 @@ |
1028 | 404 | @@ -458,6 +506,11 @@ | 388 | pool), so there is nothing wrong about this. The |
1029 | 389 | mach_read_from_4() calls here will only trigger bogus | ||
1030 | 390 | Valgrind memcheck warnings in UNIV_DEBUG_VALGRIND builds. */ | ||
1031 | 391 | - ulint space = mach_read_from_4( | ||
1032 | 392 | + space = mach_read_from_4( | ||
1033 | 393 | (const byte*) src + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID); | ||
1034 | 394 | - ulint page_no = mach_read_from_4( | ||
1035 | 395 | + page_no = mach_read_from_4( | ||
1036 | 396 | (const byte*) src + FIL_PAGE_OFFSET); | ||
1037 | 397 | /* Suppress Valgrind warnings about conditional jump | ||
1038 | 398 | on uninitialized value. */ | ||
1039 | 399 | @@ -458,6 +507,11 @@ | ||
1040 | 405 | added to buf_pool->page_hash yet. Obviously, | 400 | added to buf_pool->page_hash yet. Obviously, |
1041 | 406 | it cannot be relocated. */ | 401 | it cannot be relocated. */ |
1042 | 407 | 402 | ||
1043 | @@ -413,7 +408,7 @@ | |||
1044 | 413 | return(FALSE); | 408 | return(FALSE); |
1045 | 414 | } | 409 | } |
1046 | 415 | 410 | ||
1048 | 416 | @@ -467,18 +520,27 @@ | 411 | @@ -467,18 +521,27 @@ |
1049 | 417 | For the sake of simplicity, give up. */ | 412 | For the sake of simplicity, give up. */ |
1050 | 418 | ut_ad(page_zip_get_size(&bpage->zip) < size); | 413 | ut_ad(page_zip_get_size(&bpage->zip) < size); |
1051 | 419 | 414 | ||
1052 | @@ -444,7 +439,7 @@ | |||
1053 | 444 | /* Relocate the compressed page. */ | 439 | /* Relocate the compressed page. */ |
1054 | 445 | ut_a(bpage->zip.data == src); | 440 | ut_a(bpage->zip.data == src); |
1055 | 446 | memcpy(dst, src, size); | 441 | memcpy(dst, src, size); |
1057 | 447 | @@ -493,10 +555,22 @@ | 442 | @@ -493,10 +556,22 @@ |
1058 | 448 | buddy_stat->relocated_usec | 443 | buddy_stat->relocated_usec |
1059 | 449 | += ut_time_us(NULL) - usec; | 444 | += ut_time_us(NULL) - usec; |
1060 | 450 | } | 445 | } |
1061 | @@ -468,7 +463,7 @@ | |||
1062 | 468 | } else if (i == buf_buddy_get_slot(sizeof(buf_page_t))) { | 463 | } else if (i == buf_buddy_get_slot(sizeof(buf_page_t))) { |
1063 | 469 | /* This must be a buf_page_t object. */ | 464 | /* This must be a buf_page_t object. */ |
1064 | 470 | #if UNIV_WORD_SIZE == 4 | 465 | #if UNIV_WORD_SIZE == 4 |
1066 | 471 | @@ -505,10 +579,31 @@ | 466 | @@ -505,10 +580,31 @@ |
1067 | 472 | about uninitialized pad bytes. */ | 467 | about uninitialized pad bytes. */ |
1068 | 473 | UNIV_MEM_ASSERT_RW(src, size); | 468 | UNIV_MEM_ASSERT_RW(src, size); |
1069 | 474 | #endif | 469 | #endif |
1070 | @@ -500,7 +495,7 @@ | |||
1071 | 500 | } | 495 | } |
1072 | 501 | 496 | ||
1073 | 502 | return(FALSE); | 497 | return(FALSE); |
1075 | 503 | @@ -522,13 +617,15 @@ | 498 | @@ -522,13 +618,15 @@ |
1076 | 504 | /*===============*/ | 499 | /*===============*/ |
1077 | 505 | void* buf, /*!< in: block to be freed, must not be | 500 | void* buf, /*!< in: block to be freed, must not be |
1078 | 506 | pointed to by the buffer pool */ | 501 | pointed to by the buffer pool */ |
1079 | @@ -518,7 +513,7 @@ | |||
1080 | 518 | ut_ad(!mutex_own(&buf_pool_zip_mutex)); | 513 | ut_ad(!mutex_own(&buf_pool_zip_mutex)); |
1081 | 519 | ut_ad(i <= BUF_BUDDY_SIZES); | 514 | ut_ad(i <= BUF_BUDDY_SIZES); |
1082 | 520 | ut_ad(buf_buddy_stat[i].used > 0); | 515 | ut_ad(buf_buddy_stat[i].used > 0); |
1084 | 521 | @@ -539,7 +636,9 @@ | 516 | @@ -539,7 +637,9 @@ |
1085 | 522 | ut_d(((buf_page_t*) buf)->state = BUF_BLOCK_ZIP_FREE); | 517 | ut_d(((buf_page_t*) buf)->state = BUF_BLOCK_ZIP_FREE); |
1086 | 523 | 518 | ||
1087 | 524 | if (i == BUF_BUDDY_SIZES) { | 519 | if (i == BUF_BUDDY_SIZES) { |
1088 | @@ -529,7 +524,7 @@ | |||
1089 | 529 | return; | 524 | return; |
1090 | 530 | } | 525 | } |
1091 | 531 | 526 | ||
1093 | 532 | @@ -584,7 +683,7 @@ | 527 | @@ -584,7 +684,7 @@ |
1094 | 533 | ut_a(bpage != buf); | 528 | ut_a(bpage != buf); |
1095 | 534 | 529 | ||
1096 | 535 | { | 530 | { |
1097 | @@ -538,7 +533,7 @@ | |||
1098 | 538 | UNIV_MEM_ASSERT_AND_FREE(bpage, BUF_BUDDY_LOW << i); | 533 | UNIV_MEM_ASSERT_AND_FREE(bpage, BUF_BUDDY_LOW << i); |
1099 | 539 | bpage = next; | 534 | bpage = next; |
1100 | 540 | } | 535 | } |
1102 | 541 | @@ -593,13 +692,13 @@ | 536 | @@ -593,13 +693,13 @@ |
1103 | 542 | #ifndef UNIV_DEBUG_VALGRIND | 537 | #ifndef UNIV_DEBUG_VALGRIND |
1104 | 543 | buddy_nonfree: | 538 | buddy_nonfree: |
1105 | 544 | /* Valgrind would complain about accessing free memory. */ | 539 | /* Valgrind would complain about accessing free memory. */ |
1106 | @@ -554,7 +549,7 @@ | |||
1107 | 554 | 549 | ||
1108 | 555 | if (bpage) { | 550 | if (bpage) { |
1109 | 556 | /* Remove the block from the free list, because a successful | 551 | /* Remove the block from the free list, because a successful |
1111 | 557 | @@ -609,7 +708,7 @@ | 552 | @@ -609,7 +709,7 @@ |
1112 | 558 | buf_buddy_remove_from_free(bpage, i); | 553 | buf_buddy_remove_from_free(bpage, i); |
1113 | 559 | 554 | ||
1114 | 560 | /* Try to relocate the buddy of buf to the free block. */ | 555 | /* Try to relocate the buddy of buf to the free block. */ |
1115 | @@ -563,7 +558,7 @@ | |||
1116 | 563 | 558 | ||
1117 | 564 | ut_d(buddy->state = BUF_BLOCK_ZIP_FREE); | 559 | ut_d(buddy->state = BUF_BLOCK_ZIP_FREE); |
1118 | 565 | goto buddy_free2; | 560 | goto buddy_free2; |
1120 | 566 | @@ -629,14 +728,14 @@ | 561 | @@ -629,14 +729,14 @@ |
1121 | 567 | 562 | ||
1122 | 568 | (Parts of the buddy can be free in | 563 | (Parts of the buddy can be free in |
1123 | 569 | buf_pool->zip_free[j] with j < i.) */ | 564 | buf_pool->zip_free[j] with j < i.) */ |
1124 | @@ -1283,6 +1278,15 @@ | |||
1125 | 1283 | #if UNIV_WORD_SIZE == 4 | 1278 | #if UNIV_WORD_SIZE == 4 |
1126 | 1284 | /* On 32-bit systems, there is no padding in buf_page_t. On | 1279 | /* On 32-bit systems, there is no padding in buf_page_t. On |
1127 | 1285 | other systems, Valgrind could complain about uninitialized pad | 1280 | other systems, Valgrind could complain about uninitialized pad |
1128 | 1281 | @@ -2283,7 +2395,7 @@ | ||
1129 | 1282 | /* Try to evict the block from the buffer pool, to use the | ||
1130 | 1283 | insert buffer as much as possible. */ | ||
1131 | 1284 | |||
1132 | 1285 | - if (buf_LRU_free_block(&block->page, TRUE, NULL) | ||
1133 | 1286 | + if (buf_LRU_free_block(&block->page, TRUE, NULL, FALSE) | ||
1134 | 1287 | == BUF_LRU_FREED) { | ||
1135 | 1288 | buf_pool_mutex_exit(); | ||
1136 | 1289 | mutex_exit(&block->mutex); | ||
1137 | 1286 | @@ -2305,13 +2417,14 @@ | 1290 | @@ -2305,13 +2417,14 @@ |
1138 | 1287 | 1291 | ||
1139 | 1288 | buf_block_buf_fix_inc(block, file, line); | 1292 | buf_block_buf_fix_inc(block, file, line); |
1140 | @@ -3803,7 +3807,15 @@ | |||
1141 | 3803 | 3807 | ||
1142 | 3804 | return(bpage != NULL); | 3808 | return(bpage != NULL); |
1143 | 3805 | } | 3809 | } |
1145 | 3806 | @@ -1038,11 +1076,14 @@ | 3810 | @@ -1031,18 +1069,21 @@ |
1146 | 3811 | buf_block_t* block, /*!< in: buffer block */ | ||
1147 | 3812 | ulint rw_latch, /*!< in: RW_S_LATCH, RW_X_LATCH, | ||
1148 | 3813 | RW_NO_LATCH */ | ||
1149 | 3814 | - mtr_t* mtr) /*!< in: mtr */ | ||
1150 | 3815 | + mtr_t* mtr __attribute__((unused))) /*!< in: mtr */ | ||
1151 | 3816 | { | ||
1152 | 3817 | ut_ad(block); | ||
1153 | 3818 | |||
1154 | 3807 | ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE); | 3819 | ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE); |
1155 | 3808 | ut_a(block->page.buf_fix_count > 0); | 3820 | ut_a(block->page.buf_fix_count > 0); |
1156 | 3809 | 3821 | ||
1157 | @@ -3975,7 +3987,15 @@ | |||
1158 | 3975 | diff -ruN a/storage/innodb_plugin/mtr/mtr0mtr.c b/storage/innodb_plugin/mtr/mtr0mtr.c | 3987 | diff -ruN a/storage/innodb_plugin/mtr/mtr0mtr.c b/storage/innodb_plugin/mtr/mtr0mtr.c |
1159 | 3976 | --- a/storage/innodb_plugin/mtr/mtr0mtr.c 2010-08-04 02:24:20.000000000 +0900 | 3988 | --- a/storage/innodb_plugin/mtr/mtr0mtr.c 2010-08-04 02:24:20.000000000 +0900 |
1160 | 3977 | +++ b/storage/innodb_plugin/mtr/mtr0mtr.c 2010-08-27 16:11:40.631020912 +0900 | 3989 | +++ b/storage/innodb_plugin/mtr/mtr0mtr.c 2010-08-27 16:11:40.631020912 +0900 |
1162 | 3978 | @@ -105,6 +105,38 @@ | 3990 | @@ -33,6 +33,7 @@ |
1163 | 3991 | #include "page0types.h" | ||
1164 | 3992 | #include "mtr0log.h" | ||
1165 | 3993 | #include "log0log.h" | ||
1166 | 3994 | +#include "buf0flu.h" | ||
1167 | 3995 | |||
1168 | 3996 | #ifndef UNIV_HOTBACKUP | ||
1169 | 3997 | # include "log0recv.h" | ||
1170 | 3998 | @@ -105,6 +106,38 @@ | ||
1171 | 3979 | } | 3999 | } |
1172 | 3980 | } | 4000 | } |
1173 | 3981 | 4001 | ||
1174 | @@ -4014,7 +4034,7 @@ | |||
1175 | 4014 | /************************************************************//** | 4034 | /************************************************************//** |
1176 | 4015 | Writes the contents of a mini-transaction log, if any, to the database log. */ | 4035 | Writes the contents of a mini-transaction log, if any, to the database log. */ |
1177 | 4016 | static | 4036 | static |
1179 | 4017 | @@ -188,6 +220,8 @@ | 4037 | @@ -188,6 +221,8 @@ |
1180 | 4018 | 4038 | ||
1181 | 4019 | if (write_log) { | 4039 | if (write_log) { |
1182 | 4020 | mtr_log_reserve_and_write(mtr); | 4040 | mtr_log_reserve_and_write(mtr); |
1183 | @@ -4023,7 +4043,7 @@ | |||
1184 | 4023 | } | 4043 | } |
1185 | 4024 | 4044 | ||
1186 | 4025 | /* We first update the modification info to buffer pages, and only | 4045 | /* We first update the modification info to buffer pages, and only |
1188 | 4026 | @@ -198,11 +232,13 @@ | 4046 | @@ -198,11 +233,13 @@ |
1189 | 4027 | required when we insert modified buffer pages in to the flush list | 4047 | required when we insert modified buffer pages in to the flush list |
1190 | 4028 | which must be sorted on oldest_modification. */ | 4048 | which must be sorted on oldest_modification. */ |
1191 | 4029 | 4049 | ||
1192 | @@ -4039,7 +4059,7 @@ | |||
1193 | 4039 | #endif /* !UNIV_HOTBACKUP */ | 4059 | #endif /* !UNIV_HOTBACKUP */ |
1194 | 4040 | 4060 | ||
1195 | 4041 | ut_d(mtr->state = MTR_COMMITTED); | 4061 | ut_d(mtr->state = MTR_COMMITTED); |
1197 | 4042 | @@ -273,6 +309,12 @@ | 4062 | @@ -273,6 +310,12 @@ |
1198 | 4043 | slot = dyn_array_get_element(memo, offset); | 4063 | slot = dyn_array_get_element(memo, offset); |
1199 | 4044 | 4064 | ||
1200 | 4045 | if ((object == slot->object) && (type == slot->type)) { | 4065 | if ((object == slot->object) && (type == slot->type)) { |
1201 | @@ -4055,7 +4075,7 @@ | |||
1202 | 4055 | diff -ruN a/storage/innodb_plugin/srv/srv0srv.c b/storage/innodb_plugin/srv/srv0srv.c | 4075 | diff -ruN a/storage/innodb_plugin/srv/srv0srv.c b/storage/innodb_plugin/srv/srv0srv.c |
1203 | 4056 | --- a/storage/innodb_plugin/srv/srv0srv.c 2010-08-27 16:11:12.194989878 +0900 | 4076 | --- a/storage/innodb_plugin/srv/srv0srv.c 2010-08-27 16:11:12.194989878 +0900 |
1204 | 4057 | +++ b/storage/innodb_plugin/srv/srv0srv.c 2010-08-27 16:11:40.634022489 +0900 | 4077 | +++ b/storage/innodb_plugin/srv/srv0srv.c 2010-08-27 16:11:40.634022489 +0900 |
1206 | 4058 | @@ -2852,7 +2852,7 @@ | 4078 | @@ -2855,7 +2855,7 @@ |
1207 | 4059 | 4079 | ||
1208 | 4060 | mutex_exit(&(log_sys->mutex)); | 4080 | mutex_exit(&(log_sys->mutex)); |
1209 | 4061 | 4081 | ||
1210 | @@ -4064,7 +4084,7 @@ | |||
1211 | 4064 | 4084 | ||
1212 | 4065 | level = 0; | 4085 | level = 0; |
1213 | 4066 | bpage = UT_LIST_GET_FIRST(buf_pool->flush_list); | 4086 | bpage = UT_LIST_GET_FIRST(buf_pool->flush_list); |
1215 | 4067 | @@ -2874,7 +2874,7 @@ | 4087 | @@ -2877,7 +2877,7 @@ |
1216 | 4068 | bpl = 0; | 4088 | bpl = 0; |
1217 | 4069 | } | 4089 | } |
1218 | 4070 | 4090 | ||
1219 | 4071 | 4091 | ||
1220 | === modified file 'innodb_stats.patch' | |||
1221 | --- innodb_stats.patch 2010-12-16 11:35:26 +0000 | |||
1222 | +++ innodb_stats.patch 2011-02-02 15:07:48 +0000 | |||
1223 | @@ -1134,7 +1134,7 @@ | |||
1224 | 1134 | table->status = 0; | 1134 | table->status = 0; |
1225 | 1135 | +#ifdef EXTENDED_FOR_USERSTAT | 1135 | +#ifdef EXTENDED_FOR_USERSTAT |
1226 | 1136 | + rows_read++; | 1136 | + rows_read++; |
1228 | 1137 | + if (active_index >= 0 && active_index < MAX_KEY) | 1137 | + if (active_index < MAX_KEY) |
1229 | 1138 | + index_rows_read[active_index]++; | 1138 | + index_rows_read[active_index]++; |
1230 | 1139 | +#endif | 1139 | +#endif |
1231 | 1140 | break; | 1140 | break; |
1232 | 1141 | 1141 | ||
1233 | === modified file 'profiling_slow.patch' | |||
1234 | --- profiling_slow.patch 2011-01-10 13:38:39 +0000 | |||
1235 | +++ profiling_slow.patch 2011-02-02 15:07:48 +0000 | |||
1236 | @@ -273,7 +273,7 @@ | |||
1237 | 273 | + my_b_printf(log_file, "# "); | 273 | + my_b_printf(log_file, "# "); |
1238 | 274 | + | 274 | + |
1239 | 275 | + void *entry_iterator; | 275 | + void *entry_iterator; |
1241 | 276 | + PROF_MEASUREMENT *entry, *previous= NULL, *first= NULL; | 276 | + PROF_MEASUREMENT *entry= NULL, *previous= NULL, *first= NULL; |
1242 | 277 | + /* ...and for each query, go through all its state-change steps. */ | 277 | + /* ...and for each query, go through all its state-change steps. */ |
1243 | 278 | + for (entry_iterator= query->entries.new_iterator(); | 278 | + for (entry_iterator= query->entries.new_iterator(); |
1244 | 279 | + entry_iterator != NULL; | 279 | + entry_iterator != NULL; |
1245 | 280 | 280 | ||
1246 | === modified file 'userstat.patch' | |||
1247 | --- userstat.patch 2011-01-10 13:38:39 +0000 | |||
1248 | +++ userstat.patch 2011-02-02 15:07:48 +0000 | |||
1249 | @@ -1923,7 +1923,7 @@ | |||
1250 | 1923 | my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), command); | 1923 | my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), command); |
1251 | 1924 | return 1; | 1924 | return 1; |
1252 | 1925 | #else | 1925 | #else |
1254 | 1926 | @@ -6072,6 +6105,30 @@ | 1926 | @@ -6072,6 +6105,32 @@ |
1255 | 1927 | lex_start(thd); | 1927 | lex_start(thd); |
1256 | 1928 | mysql_reset_thd_for_next_command(thd); | 1928 | mysql_reset_thd_for_next_command(thd); |
1257 | 1929 | 1929 | ||
1258 | @@ -1934,7 +1934,9 @@ | |||
1259 | 1934 | + double end_usecs = 0; | 1934 | + double end_usecs = 0; |
1260 | 1935 | + /* cpu time */ | 1935 | + /* cpu time */ |
1261 | 1936 | + int cputime_error = 0; | 1936 | + int cputime_error = 0; |
1262 | 1937 | +#ifdef HAVE_CLOCK_GETTIME | ||
1263 | 1937 | + struct timespec tp; | 1938 | + struct timespec tp; |
1264 | 1939 | +#endif | ||
1265 | 1938 | + double start_cpu_nsecs = 0; | 1940 | + double start_cpu_nsecs = 0; |
1266 | 1939 | + double end_cpu_nsecs = 0; | 1941 | + double end_cpu_nsecs = 0; |
1267 | 1940 | + | 1942 | + |
1268 | @@ -1954,7 +1956,7 @@ | |||
1269 | 1954 | if (query_cache_send_result_to_client(thd, rawbuf, length) <= 0) | 1956 | if (query_cache_send_result_to_client(thd, rawbuf, length) <= 0) |
1270 | 1955 | { | 1957 | { |
1271 | 1956 | LEX *lex= thd->lex; | 1958 | LEX *lex= thd->lex; |
1273 | 1957 | @@ -6152,6 +6209,43 @@ | 1959 | @@ -6152,6 +6211,43 @@ |
1274 | 1958 | *found_semicolon= NULL; | 1960 | *found_semicolon= NULL; |
1275 | 1959 | } | 1961 | } |
1276 | 1960 | 1962 | ||
1277 | @@ -1998,7 +2000,7 @@ | |||
1278 | 1998 | DBUG_VOID_RETURN; | 2000 | DBUG_VOID_RETURN; |
1279 | 1999 | } | 2001 | } |
1280 | 2000 | 2002 | ||
1282 | 2001 | @@ -7017,6 +7111,13 @@ | 2003 | @@ -7017,6 +7113,13 @@ |
1283 | 2002 | if (flush_error_log()) | 2004 | if (flush_error_log()) |
1284 | 2003 | result=1; | 2005 | result=1; |
1285 | 2004 | } | 2006 | } |
1286 | @@ -2012,7 +2014,7 @@ | |||
1287 | 2012 | #ifdef HAVE_QUERY_CACHE | 2014 | #ifdef HAVE_QUERY_CACHE |
1288 | 2013 | if (options & REFRESH_QUERY_CACHE_FREE) | 2015 | if (options & REFRESH_QUERY_CACHE_FREE) |
1289 | 2014 | { | 2016 | { |
1291 | 2015 | @@ -7117,6 +7218,40 @@ | 2017 | @@ -7117,6 +7220,40 @@ |
1292 | 2016 | #endif | 2018 | #endif |
1293 | 2017 | if (options & REFRESH_USER_RESOURCES) | 2019 | if (options & REFRESH_USER_RESOURCES) |
1294 | 2018 | reset_mqh((LEX_USER *) NULL, 0); /* purecov: inspected */ | 2020 | reset_mqh((LEX_USER *) NULL, 0); /* purecov: inspected */ |
1295 | @@ -2066,7 +2068,7 @@ | |||
1296 | 2066 | /** | 2068 | /** |
1297 | 2067 | A result class used to send cursor rows using the binary protocol. | 2069 | A result class used to send cursor rows using the binary protocol. |
1298 | 2068 | */ | 2070 | */ |
1300 | 2069 | @@ -2103,8 +2106,32 @@ | 2071 | @@ -2103,8 +2106,34 @@ |
1301 | 2070 | /* First of all clear possible warnings from the previous command */ | 2072 | /* First of all clear possible warnings from the previous command */ |
1302 | 2071 | mysql_reset_thd_for_next_command(thd); | 2073 | mysql_reset_thd_for_next_command(thd); |
1303 | 2072 | 2074 | ||
1304 | @@ -2077,7 +2079,9 @@ | |||
1305 | 2077 | + double end_usecs = 0; | 2079 | + double end_usecs = 0; |
1306 | 2078 | + /* cpu time */ | 2080 | + /* cpu time */ |
1307 | 2079 | + int cputime_error = 0; | 2081 | + int cputime_error = 0; |
1308 | 2082 | +#ifdef HAVE_CLOCK_GETTIME | ||
1309 | 2080 | + struct timespec tp; | 2083 | + struct timespec tp; |
1310 | 2084 | +#endif | ||
1311 | 2081 | + double start_cpu_nsecs = 0; | 2085 | + double start_cpu_nsecs = 0; |
1312 | 2082 | + double end_cpu_nsecs = 0; | 2086 | + double end_cpu_nsecs = 0; |
1313 | 2083 | + | 2087 | + |
1314 | @@ -2100,7 +2104,7 @@ | |||
1315 | 2100 | 2104 | ||
1316 | 2101 | if (thd->stmt_map.insert(thd, stmt)) | 2105 | if (thd->stmt_map.insert(thd, stmt)) |
1317 | 2102 | { | 2106 | { |
1319 | 2103 | @@ -2112,7 +2139,7 @@ | 2107 | @@ -2112,7 +2141,7 @@ |
1320 | 2104 | The error is set in the insert. The statement itself | 2108 | The error is set in the insert. The statement itself |
1321 | 2105 | will be also deleted there (this is how the hash works). | 2109 | will be also deleted there (this is how the hash works). |
1322 | 2106 | */ | 2110 | */ |
1323 | @@ -2109,7 +2113,7 @@ | |||
1324 | 2109 | } | 2113 | } |
1325 | 2110 | 2114 | ||
1326 | 2111 | /* Reset warnings from previous command */ | 2115 | /* Reset warnings from previous command */ |
1328 | 2112 | @@ -2139,6 +2166,44 @@ | 2116 | @@ -2139,6 +2168,44 @@ |
1329 | 2113 | thd->protocol= save_protocol; | 2117 | thd->protocol= save_protocol; |
1330 | 2114 | 2118 | ||
1331 | 2115 | /* check_prepared_statemnt sends the metadata packet in case of success */ | 2119 | /* check_prepared_statemnt sends the metadata packet in case of success */ |
1332 | @@ -2154,7 +2158,7 @@ | |||
1333 | 2154 | DBUG_VOID_RETURN; | 2158 | DBUG_VOID_RETURN; |
1334 | 2155 | } | 2159 | } |
1335 | 2156 | 2160 | ||
1337 | 2157 | @@ -2489,12 +2554,36 @@ | 2161 | @@ -2489,12 +2556,38 @@ |
1338 | 2158 | /* First of all clear possible warnings from the previous command */ | 2162 | /* First of all clear possible warnings from the previous command */ |
1339 | 2159 | mysql_reset_thd_for_next_command(thd); | 2163 | mysql_reset_thd_for_next_command(thd); |
1340 | 2160 | 2164 | ||
1341 | @@ -2165,7 +2169,9 @@ | |||
1342 | 2165 | + double end_usecs = 0; | 2169 | + double end_usecs = 0; |
1343 | 2166 | + /* cpu time */ | 2170 | + /* cpu time */ |
1344 | 2167 | + int cputime_error = 0; | 2171 | + int cputime_error = 0; |
1345 | 2172 | +#ifdef HAVE_CLOCK_GETTIME | ||
1346 | 2168 | + struct timespec tp; | 2173 | + struct timespec tp; |
1347 | 2174 | +#endif | ||
1348 | 2169 | + double start_cpu_nsecs = 0; | 2175 | + double start_cpu_nsecs = 0; |
1349 | 2170 | + double end_cpu_nsecs = 0; | 2176 | + double end_cpu_nsecs = 0; |
1350 | 2171 | + | 2177 | + |
1351 | @@ -2192,7 +2198,7 @@ | |||
1352 | 2192 | } | 2198 | } |
1353 | 2193 | 2199 | ||
1354 | 2194 | #if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) | 2200 | #if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) |
1356 | 2195 | @@ -2515,6 +2604,44 @@ | 2201 | @@ -2515,6 +2608,44 @@ |
1357 | 2196 | /* Close connection socket; for use with client testing (Bug#43560). */ | 2202 | /* Close connection socket; for use with client testing (Bug#43560). */ |
1358 | 2197 | DBUG_EXECUTE_IF("close_conn_after_stmt_execute", vio_close(thd->net.vio);); | 2203 | DBUG_EXECUTE_IF("close_conn_after_stmt_execute", vio_close(thd->net.vio);); |
1359 | 2198 | 2204 | ||
1360 | @@ -2237,7 +2243,7 @@ | |||
1361 | 2237 | DBUG_VOID_RETURN; | 2243 | DBUG_VOID_RETURN; |
1362 | 2238 | 2244 | ||
1363 | 2239 | } | 2245 | } |
1365 | 2240 | @@ -2588,20 +2715,45 @@ | 2246 | @@ -2588,20 +2719,47 @@ |
1366 | 2241 | 2247 | ||
1367 | 2242 | /* First of all clear possible warnings from the previous command */ | 2248 | /* First of all clear possible warnings from the previous command */ |
1368 | 2243 | mysql_reset_thd_for_next_command(thd); | 2249 | mysql_reset_thd_for_next_command(thd); |
1369 | @@ -2249,7 +2255,9 @@ | |||
1370 | 2249 | + double end_usecs = 0; | 2255 | + double end_usecs = 0; |
1371 | 2250 | + /* cpu time */ | 2256 | + /* cpu time */ |
1372 | 2251 | + int cputime_error = 0; | 2257 | + int cputime_error = 0; |
1373 | 2258 | +#ifdef HAVE_CLOCK_GETTIME | ||
1374 | 2252 | + struct timespec tp; | 2259 | + struct timespec tp; |
1375 | 2260 | +#endif | ||
1376 | 2253 | + double start_cpu_nsecs = 0; | 2261 | + double start_cpu_nsecs = 0; |
1377 | 2254 | + double end_cpu_nsecs = 0; | 2262 | + double end_cpu_nsecs = 0; |
1378 | 2255 | + | 2263 | + |
1379 | @@ -2285,7 +2293,7 @@ | |||
1380 | 2285 | } | 2293 | } |
1381 | 2286 | 2294 | ||
1382 | 2287 | thd->stmt_arena= stmt; | 2295 | thd->stmt_arena= stmt; |
1384 | 2288 | @@ -2625,6 +2777,44 @@ | 2296 | @@ -2625,6 +2783,44 @@ |
1385 | 2289 | thd->restore_backup_statement(stmt, &stmt_backup); | 2297 | thd->restore_backup_statement(stmt, &stmt_backup); |
1386 | 2290 | thd->stmt_arena= thd; | 2298 | thd->stmt_arena= thd; |
1387 | 2291 | 2299 | ||
1388 | @@ -2330,7 +2338,7 @@ | |||
1389 | 2330 | DBUG_VOID_RETURN; | 2338 | DBUG_VOID_RETURN; |
1390 | 2331 | } | 2339 | } |
1391 | 2332 | 2340 | ||
1393 | 2333 | @@ -2655,13 +2845,37 @@ | 2341 | @@ -2655,13 +2851,39 @@ |
1394 | 2334 | /* First of all clear possible warnings from the previous command */ | 2342 | /* First of all clear possible warnings from the previous command */ |
1395 | 2335 | mysql_reset_thd_for_next_command(thd); | 2343 | mysql_reset_thd_for_next_command(thd); |
1396 | 2336 | 2344 | ||
1397 | @@ -2341,7 +2349,9 @@ | |||
1398 | 2341 | + double end_usecs = 0; | 2349 | + double end_usecs = 0; |
1399 | 2342 | + /* cpu time */ | 2350 | + /* cpu time */ |
1400 | 2343 | + int cputime_error = 0; | 2351 | + int cputime_error = 0; |
1401 | 2352 | +#ifdef HAVE_CLOCK_GETTIME | ||
1402 | 2344 | + struct timespec tp; | 2353 | + struct timespec tp; |
1403 | 2354 | +#endif | ||
1404 | 2345 | + double start_cpu_nsecs = 0; | 2355 | + double start_cpu_nsecs = 0; |
1405 | 2346 | + double end_cpu_nsecs = 0; | 2356 | + double end_cpu_nsecs = 0; |
1406 | 2347 | + | 2357 | + |
1407 | @@ -2369,7 +2379,7 @@ | |||
1408 | 2369 | } | 2379 | } |
1409 | 2370 | 2380 | ||
1410 | 2371 | stmt->close_cursor(); | 2381 | stmt->close_cursor(); |
1412 | 2372 | @@ -2678,6 +2892,44 @@ | 2382 | @@ -2678,6 +2900,44 @@ |
1413 | 2373 | 2383 | ||
1414 | 2374 | my_ok(thd); | 2384 | my_ok(thd); |
1415 | 2375 | 2385 |
I will fix same for 5.5.8 later.