Merge lp:~percona-dev/percona-server/5.1.54-remove_warnings-yasufumi into lp:percona-server/release-5.1.54-12

Proposed by Yasufumi Kinoshita
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
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Percona developers Pending
Review via email: mp+48326@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Yasufumi Kinoshita (yasufumi-kinoshita) wrote :

I will fix same for 5.5.8 later.

Revision history for this message
Yasufumi Kinoshita (yasufumi-kinoshita) wrote :

Alexey,

Please confirm to build with this branch, if you have time.
Is your compiler satisfied with it?

Revision history for this message
Alexey Kopytov (akopytov) wrote :

Yes, when merged with my changes in the core server, it now builds with -Werror.

review: Approve
Revision history for this message
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. :-)

Revision history for this message
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://bugs.mysql.com/bug.php?id=58402.

Most likely it's a bug in the system headers on your machine.

Revision history for this message
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

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'innodb_dict_size_limit.patch'
--- innodb_dict_size_limit.patch 2010-12-16 11:35:26 +0000
+++ innodb_dict_size_limit.patch 2011-02-02 15:07:48 +0000
@@ -8,7 +8,7 @@
8diff -ruN a/storage/innodb_plugin/btr/btr0sea.c b/storage/innodb_plugin/btr/btr0sea.c8diff -ruN a/storage/innodb_plugin/btr/btr0sea.c b/storage/innodb_plugin/btr/btr0sea.c
9--- a/storage/innodb_plugin/btr/btr0sea.c 2010-08-04 02:24:19.000000000 +09009--- a/storage/innodb_plugin/btr/btr0sea.c 2010-08-04 02:24:19.000000000 +0900
10+++ b/storage/innodb_plugin/btr/btr0sea.c 2010-08-27 16:09:42.926020757 +090010+++ b/storage/innodb_plugin/btr/btr0sea.c 2010-08-27 16:09:42.926020757 +0900
11@@ -1173,6 +1173,126 @@11@@ -1173,6 +1173,173 @@
12 mem_free(folds);12 mem_free(folds);
13 }13 }
14 14
@@ -20,7 +20,7 @@
20+/*=====================================*/20+/*=====================================*/
21+ dict_index_t* index) /* in: record descriptor */21+ dict_index_t* index) /* in: record descriptor */
22+{22+{
23+ buf_page_t* bpage;23+
24+ hash_table_t* table;24+ hash_table_t* table;
25+ buf_block_t* block;25+ buf_block_t* block;
26+ ulint n_fields;26+ ulint n_fields;
@@ -36,96 +36,143 @@
36+ ulint i;36+ ulint i;
37+ mem_heap_t* heap = NULL;37+ mem_heap_t* heap = NULL;
38+ ulint* offsets;38+ ulint* offsets;
39+ ibool released_search_latch;
39+40+
40+ rw_lock_x_lock(&btr_search_latch);41+ rw_lock_s_lock(&btr_search_latch);
41+ buf_pool_mutex_enter();
42+42+
43+ table = btr_search_sys->hash_index;43+ table = btr_search_sys->hash_index;
44+44+
45+ bpage = UT_LIST_GET_LAST(buf_pool->LRU);45+ do {
46+46+ buf_chunk_t* chunks = buf_pool->chunks;
47+ while (bpage != NULL) {47+ buf_chunk_t* chunk = chunks + buf_pool->n_chunks;
48+ block = (buf_block_t*) bpage;48+
49+ if (block->index == index && block->is_hashed) {49+ released_search_latch = FALSE;
50+ page = block->frame;50+
51+51+ while (--chunk >= chunks) {
52+ /* from btr_search_drop_page_hash_index() */52+ block = chunk->blocks;
53+ n_fields = block->curr_n_fields;53+ i = chunk->size;
54+ n_bytes = block->curr_n_bytes;54+
55+55+retry:
56+ ut_a(n_fields + n_bytes > 0);56+ for (; i--; block++) {
57+57+ if (buf_block_get_state(block)
58+ n_recs = page_get_n_recs(page);58+ != BUF_BLOCK_FILE_PAGE
59+59+ || block->index != index
60+ /* Calculate and cache fold values into an array for fast deletion60+ || !block->is_hashed) {
61+ from the hash index */61+ continue;
62+62+ }
63+ folds = mem_alloc(n_recs * sizeof(ulint));63+
64+64+ page = block->frame;
65+ n_cached = 0;65+
66+66+ /* from btr_search_drop_page_hash_index() */
67+ rec = page_get_infimum_rec(page);67+ n_fields = block->curr_n_fields;
68+ rec = page_rec_get_next_low(rec, page_is_comp(page));68+ n_bytes = block->curr_n_bytes;
69+69+
70+ index_id = btr_page_get_index_id(page);70+
71+ /* keeping latch order */
72+ rw_lock_s_unlock(&btr_search_latch);
73+ released_search_latch = TRUE;
74+ rw_lock_x_lock(&block->lock);
75+
76+
77+ ut_a(n_fields + n_bytes > 0);
78+
79+ n_recs = page_get_n_recs(page);
80+
81+ /* Calculate and cache fold values into an array for fast deletion
82+ from the hash index */
83+
84+ folds = mem_alloc(n_recs * sizeof(ulint));
85+
86+ n_cached = 0;
87+
88+ rec = page_get_infimum_rec(page);
89+ rec = page_rec_get_next_low(rec, page_is_comp(page));
90+
91+ index_id = btr_page_get_index_id(page);
71+ 92+
72+ ut_a(0 == ut_dulint_cmp(index_id, index->id));93+ ut_a(0 == ut_dulint_cmp(index_id, index->id));
73+94+
74+ prev_fold = 0;95+ prev_fold = 0;
75+96+
76+ offsets = NULL;97+ offsets = NULL;
77+98+
78+ while (!page_rec_is_supremum(rec)) {99+ while (!page_rec_is_supremum(rec)) {
79+ offsets = rec_get_offsets(rec, index, offsets,100+ offsets = rec_get_offsets(rec, index, offsets,
80+ n_fields + (n_bytes > 0), &heap);101+ n_fields + (n_bytes > 0), &heap);
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));
82+ fold = rec_fold(rec, offsets, n_fields, n_bytes, index_id);103+ fold = rec_fold(rec, offsets, n_fields, n_bytes, index_id);
83+104+
84+ if (fold == prev_fold && prev_fold != 0) {105+ if (fold == prev_fold && prev_fold != 0) {
85+106+
86+ goto next_rec;107+ goto next_rec;
87+ }108+ }
88+109+
89+ /* Remove all hash nodes pointing to this page from the110+ /* Remove all hash nodes pointing to this page from the
90+ hash chain */111+ hash chain */
91+112+
92+ folds[n_cached] = fold;113+ folds[n_cached] = fold;
93+ n_cached++;114+ n_cached++;
94+next_rec:115+next_rec:
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));
96+ prev_fold = fold;117+ prev_fold = fold;
97+ }118+ }
98+119+
99+ for (i = 0; i < n_cached; i++) {120+ if (UNIV_LIKELY_NULL(heap)) {
100+121+ mem_heap_empty(heap);
101+ ha_remove_all_nodes_to_page(table, folds[i], page);122+ }
102+ }123+
103+124+ rw_lock_x_lock(&btr_search_latch);
104+ ut_a(index->search_info->ref_count > 0);125+
105+ index->search_info->ref_count--;126+ if (UNIV_UNLIKELY(!block->is_hashed)) {
106+127+ goto cleanup;
107+ block->is_hashed = FALSE;128+ }
108+ block->index = NULL;129+
109+ 130+ ut_a(block->index == index);
131+
132+ if (UNIV_UNLIKELY(block->curr_n_fields != n_fields)
133+ || UNIV_UNLIKELY(block->curr_n_bytes != n_bytes)) {
134+ rw_lock_x_unlock(&btr_search_latch);
135+ rw_lock_x_unlock(&block->lock);
136+
137+ mem_free(folds);
138+
139+ rw_lock_s_lock(&btr_search_latch);
140+ goto retry;
141+ }
142+
143+ for (i = 0; i < n_cached; i++) {
144+
145+ ha_remove_all_nodes_to_page(table, folds[i], page);
146+ }
147+
148+ ut_a(index->search_info->ref_count > 0);
149+ index->search_info->ref_count--;
150+
151+ block->is_hashed = FALSE;
152+ block->index = NULL;
153+
154+cleanup:
110+#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG155+#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
111+ if (UNIV_UNLIKELY(block->n_pointers)) {156+ if (UNIV_UNLIKELY(block->n_pointers)) {
112+ /* Corruption */157+ /* Corruption */
113+ ut_print_timestamp(stderr);158+ ut_print_timestamp(stderr);
114+ fprintf(stderr,159+ fprintf(stderr,
115+" InnoDB: Corruption of adaptive hash index. After dropping\n"160+" InnoDB: Corruption of adaptive hash index. After dropping\n"
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",
117+ index->name, (ulong) block->n_pointers);162+ index->name, (ulong) block->n_pointers);
118+ }163+ }
119+#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */164+#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
120+165+ rw_lock_x_unlock(&btr_search_latch);
121+ mem_free(folds);166+ rw_lock_x_unlock(&block->lock);
167+
168+ mem_free(folds);
169+
170+ rw_lock_s_lock(&btr_search_latch);
171+ }
122+ }172+ }
123+173+ } while (released_search_latch);
124+ bpage = UT_LIST_GET_PREV(LRU, bpage);174+
125+ }175+ rw_lock_s_unlock(&btr_search_latch);
126+
127+ buf_pool_mutex_exit();
128+ rw_lock_x_unlock(&btr_search_latch);
129+176+
130+ if (UNIV_LIKELY_NULL(heap)) {177+ if (UNIV_LIKELY_NULL(heap)) {
131+ mem_heap_free(heap);178+ mem_heap_free(heap);
132179
=== modified file 'innodb_expand_import.patch'
--- innodb_expand_import.patch 2010-12-16 11:35:26 +0000
+++ innodb_expand_import.patch 2011-02-02 15:07:48 +0000
@@ -34,8 +34,8 @@
34 space_id = fsp_header_get_space_id(page);34 space_id = fsp_header_get_space_id(page);
35 space_flags = fsp_header_get_flags(page);35 space_flags = fsp_header_get_flags(page);
36 36
37+ if (srv_expand_import37+ if (srv_expand_import) {
38+ && (space_id != id || space_flags != (flags & ~(~0 << DICT_TF_BITS)))) {38+
39+ ibool file_is_corrupt = FALSE;39+ ibool file_is_corrupt = FALSE;
40+ byte* buf3;40+ byte* buf3;
41+ byte* descr_page;41+ byte* descr_page;
4242
=== modified file 'innodb_extend_slow.patch'
--- innodb_extend_slow.patch 2010-12-16 11:35:26 +0000
+++ innodb_extend_slow.patch 2011-02-02 15:07:48 +0000
@@ -37,9 +37,9 @@
37+ block->page.offset, DPAH_SIZE << 3);37+ block->page.offset, DPAH_SIZE << 3);
38+ block_hash_byte = block_hash >> 3;38+ block_hash_byte = block_hash >> 3;
39+ block_hash_offset = (byte) block_hash & 0x07;39+ block_hash_offset = (byte) block_hash & 0x07;
40+ if (block_hash_byte < 0 || block_hash_byte >= DPAH_SIZE)40+ if (block_hash_byte >= DPAH_SIZE)
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);
42+ if (block_hash_offset < 0 || block_hash_offset > 7)42+ if (block_hash_offset > 7)
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);
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)
45+ trx->distinct_page_access++;45+ trx->distinct_page_access++;
@@ -766,16 +766,6 @@
766 766
767 if ((ulint)ret == n) {767 if ((ulint)ret == n) {
768 768
769@@ -3356,7 +3390,8 @@
770 offset */
771 ulint offset_high, /*!< in: most significant 32 bits of
772 offset */
773- ulint len) /*!< in: length of the block to read or write */
774+ ulint len, /*!< in: length of the block to read or write */
775+ trx_t* trx)
776 {
777 os_aio_slot_t* slot;
778 ulint i;
779@@ -3642,10 +3677,11 @@769@@ -3642,10 +3677,11 @@
780 (can be used to identify a completed770 (can be used to identify a completed
781 aio operation); ignored if mode is771 aio operation); ignored if mode is
@@ -800,7 +790,7 @@
800 }790 }
801 791
802 ut_a(type == OS_FILE_WRITE);792 ut_a(type == OS_FILE_WRITE);
803@@ -3721,8 +3757,13 @@793@@ -3721,6 +3757,11 @@
804 ut_error;794 ut_error;
805 }795 }
806 796
@@ -810,11 +800,8 @@
810+ trx->io_read += n;800+ trx->io_read += n;
811+ }801+ }
812 slot = os_aio_array_reserve_slot(type, array, message1, message2, file,802 slot = os_aio_array_reserve_slot(type, array, message1, message2, file,
813- name, buf, offset, offset_high, n);803 name, buf, offset, offset_high, n);
814+ name, buf, offset, offset_high, n, trx);
815 if (type == OS_FILE_READ) {804 if (type == OS_FILE_READ) {
816 if (os_aio_use_native_aio) {
817 #ifdef WIN_ASYNC_IO
818diff -ruN a/storage/innodb_plugin/srv/srv0srv.c b/storage/innodb_plugin/srv/srv0srv.c805diff -ruN a/storage/innodb_plugin/srv/srv0srv.c b/storage/innodb_plugin/srv/srv0srv.c
819--- a/storage/innodb_plugin/srv/srv0srv.c 2010-08-27 16:27:30.233022109 +0900806--- a/storage/innodb_plugin/srv/srv0srv.c 2010-08-27 16:27:30.233022109 +0900
820+++ b/storage/innodb_plugin/srv/srv0srv.c 2010-08-27 16:30:47.384058509 +0900807+++ b/storage/innodb_plugin/srv/srv0srv.c 2010-08-27 16:30:47.384058509 +0900
821808
=== modified file 'innodb_files_extend.patch'
--- innodb_files_extend.patch 2010-12-16 11:35:26 +0000
+++ innodb_files_extend.patch 2011-02-02 15:07:48 +0000
@@ -20,6 +20,33 @@
20diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0fil.c20diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0fil.c
21--- a/storage/innodb_plugin/fil/fil0fil.c 2010-08-27 16:43:11.941989968 +090021--- a/storage/innodb_plugin/fil/fil0fil.c 2010-08-27 16:43:11.941989968 +0900
22+++ b/storage/innodb_plugin/fil/fil0fil.c 2010-08-27 16:44:21.668058937 +090022+++ b/storage/innodb_plugin/fil/fil0fil.c 2010-08-27 16:44:21.668058937 +0900
23@@ -690,7 +690,7 @@
24 ut_a(space->purpose != FIL_LOG);
25 ut_a(!trx_sys_sys_space(space->id));
26
27- if (size_bytes < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) {
28+ if (size_bytes < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) {
29 fprintf(stderr,
30 "InnoDB: Error: the size of single-table"
31 " tablespace file %s\n"
32@@ -3778,7 +3778,7 @@
33
34 size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low;
35 #ifndef UNIV_HOTBACKUP
36- if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) {
37+ if (size < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) {
38 fprintf(stderr,
39 "InnoDB: Error: the size of single-table tablespace"
40 " file %s\n"
41@@ -3798,7 +3798,7 @@
42 /* Align the memory for file i/o if we might have O_DIRECT set */
43 page = ut_align(buf2, UNIV_PAGE_SIZE);
44
45- if (size >= FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) {
46+ if (size >= FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) {
47 success = os_file_read(file, page, 0, 0, UNIV_PAGE_SIZE);
48
49 /* We have to read the tablespace id from the file */
23@@ -4776,9 +4776,9 @@50@@ -4776,9 +4776,9 @@
24 ut_ad(ut_is_2pow(zip_size));51 ut_ad(ut_is_2pow(zip_size));
25 ut_ad(buf);52 ut_ad(buf);
@@ -36,28 +63,36 @@
36diff -ruN a/storage/innodb_plugin/fsp/fsp0fsp.c b/storage/innodb_plugin/fsp/fsp0fsp.c63diff -ruN a/storage/innodb_plugin/fsp/fsp0fsp.c b/storage/innodb_plugin/fsp/fsp0fsp.c
37--- a/storage/innodb_plugin/fsp/fsp0fsp.c 2010-08-27 16:40:36.528021375 +090064--- a/storage/innodb_plugin/fsp/fsp0fsp.c 2010-08-27 16:40:36.528021375 +0900
38+++ b/storage/innodb_plugin/fsp/fsp0fsp.c 2010-08-27 16:44:21.673058570 +090065+++ b/storage/innodb_plugin/fsp/fsp0fsp.c 2010-08-27 16:44:21.673058570 +0900
39@@ -658,15 +658,16 @@66@@ -657,16 +657,18 @@
67 0 for uncompressed pages */
40 ulint offset) /*!< in: page offset */68 ulint offset) /*!< in: page offset */
41 {69 {
42 #ifndef DOXYGEN /* Doxygen gets confused of these */70-#ifndef DOXYGEN /* Doxygen gets confused of these */
43-# if UNIV_PAGE_SIZE <= XDES_ARR_OFFSET \71-# if UNIV_PAGE_SIZE <= XDES_ARR_OFFSET \
44- + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE72- + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE
45-# error73-# error
46-# endif74-# endif
75-# if PAGE_ZIP_MIN_SIZE <= XDES_ARR_OFFSET \
76- + (PAGE_ZIP_MIN_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE
77-# error
78-# endif
79-#endif /* !DOXYGEN */
80+//#ifndef DOXYGEN /* Doxygen gets confused of these */
47+//# if UNIV_PAGE_SIZE <= XDES_ARR_OFFSET81+//# if UNIV_PAGE_SIZE <= XDES_ARR_OFFSET
48+// + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE82+// + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE
49+//# error83+//# error
50+//# endif84+//# endif
51 # if PAGE_ZIP_MIN_SIZE <= XDES_ARR_OFFSET \85+//# if PAGE_ZIP_MIN_SIZE <= XDES_ARR_OFFSET
52 + (PAGE_ZIP_MIN_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE86+// + (PAGE_ZIP_MIN_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE
53 # error87+//# error
54 # endif88+//# endif
55 #endif /* !DOXYGEN */89+//#endif /* !DOXYGEN */
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);
91+ ut_a(PAGE_ZIP_MIN_SIZE > XDES_ARR_OFFSET + (PAGE_ZIP_MIN_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE);
57 ut_ad(ut_is_2pow(zip_size));92 ut_ad(ut_is_2pow(zip_size));
58 93
59 if (!zip_size) {94 if (!zip_size) {
60@@ -1465,12 +1466,12 @@95@@ -1465,12 +1467,12 @@
61 mtr);96 mtr);
62 xdes_init(descr, mtr);97 xdes_init(descr, mtr);
63 98
@@ -235,7 +270,7 @@
235diff -ruN a/storage/innodb_plugin/include/buf0types.h b/storage/innodb_plugin/include/buf0types.h270diff -ruN a/storage/innodb_plugin/include/buf0types.h b/storage/innodb_plugin/include/buf0types.h
236--- a/storage/innodb_plugin/include/buf0types.h 2010-08-04 02:24:19.000000000 +0900271--- a/storage/innodb_plugin/include/buf0types.h 2010-08-04 02:24:19.000000000 +0900
237+++ b/storage/innodb_plugin/include/buf0types.h 2010-08-27 16:44:21.692071229 +0900272+++ b/storage/innodb_plugin/include/buf0types.h 2010-08-27 16:44:21.692071229 +0900
238@@ -70,6 +70,7 @@273@@ -70,12 +70,13 @@
239 buddy system; must be at least274 buddy system; must be at least
240 sizeof(buf_page_t) */275 sizeof(buf_page_t) */
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)
@@ -243,6 +278,25 @@
243 /*!< number of buddy sizes */278 /*!< number of buddy sizes */
244 279
245 /** twice the maximum block size of the buddy system;280 /** twice the maximum block size of the buddy system;
281 the underlying memory is aligned by this amount:
282 this must be equal to UNIV_PAGE_SIZE */
283-#define BUF_BUDDY_HIGH (BUF_BUDDY_LOW << BUF_BUDDY_SIZES)
284+#define BUF_BUDDY_HIGH ((ulint)BUF_BUDDY_LOW << BUF_BUDDY_SIZES)
285 /* @} */
286
287 #endif
288diff -ruN a/storage/innodb_plugin/include/fsp0types.h b/storage/innodb_plugin/include/fsp0types.h
289--- a/storage/innodb_plugin/include/fsp0types.h 2010-11-29 19:38:03.000000000 +0900
290+++ b/storage/innodb_plugin/include/fsp0types.h 2011-02-02 23:29:13.000000000 +0900
291@@ -42,7 +42,7 @@
292 /* @} */
293
294 /** File space extent size (one megabyte) in pages */
295-#define FSP_EXTENT_SIZE (1 << (20 - UNIV_PAGE_SIZE_SHIFT))
296+#define FSP_EXTENT_SIZE ((ulint)1 << (20 - UNIV_PAGE_SIZE_SHIFT))
297
298 /** On a page of any file segment, data may be put starting from this
299 offset */
246diff -ruN a/storage/innodb_plugin/include/log0log.h b/storage/innodb_plugin/include/log0log.h300diff -ruN a/storage/innodb_plugin/include/log0log.h b/storage/innodb_plugin/include/log0log.h
247--- a/storage/innodb_plugin/include/log0log.h 2010-11-03 22:39:54.000000000 +0900301--- a/storage/innodb_plugin/include/log0log.h 2010-11-03 22:39:54.000000000 +0900
248+++ b/storage/innodb_plugin/include/log0log.h 2010-12-13 20:17:00.600329611 +0900302+++ b/storage/innodb_plugin/include/log0log.h 2010-12-13 20:17:00.600329611 +0900
249303
=== modified file 'innodb_fix_misc.patch'
--- innodb_fix_misc.patch 2010-12-20 21:54:44 +0000
+++ innodb_fix_misc.patch 2011-02-02 15:07:48 +0000
@@ -51,10 +51,30 @@
51 51
52 #define REFMAN "http://dev.mysql.com/doc/refman/5.1/en/"52 #define REFMAN "http://dev.mysql.com/doc/refman/5.1/en/"
53 53
54diff -ruN a/storage/innodb_plugin/mtr/mtr0log.c b/storage/innodb_plugin/mtr/mtr0log.c
55--- a/storage/innodb_plugin/mtr/mtr0log.c 2010-11-29 19:38:03.000000000 +0900
56+++ b/storage/innodb_plugin/mtr/mtr0log.c 2011-02-02 23:31:34.000000000 +0900
57@@ -408,7 +408,7 @@
58 ptr += 2;
59
60 if (UNIV_UNLIKELY(offset >= UNIV_PAGE_SIZE)
61- || UNIV_UNLIKELY(len + offset) > UNIV_PAGE_SIZE) {
62+ || UNIV_UNLIKELY(len + offset > UNIV_PAGE_SIZE)) {
63 recv_sys->found_corrupt_log = TRUE;
64
65 return(NULL);
54diff -ruN a/storage/innodb_plugin/row/row0mysql.c b/storage/innodb_plugin/row/row0mysql.c66diff -ruN a/storage/innodb_plugin/row/row0mysql.c b/storage/innodb_plugin/row/row0mysql.c
55--- a/storage/innodb_plugin/row/row0mysql.c 2010-07-20 16:33:04.097866666 +090067--- a/storage/innodb_plugin/row/row0mysql.c 2010-07-20 16:33:04.097866666 +0900
56+++ b/storage/innodb_plugin/row/row0mysql.c 2010-07-20 16:33:53.995828763 +090068+++ b/storage/innodb_plugin/row/row0mysql.c 2010-07-20 16:33:53.995828763 +0900
57@@ -1135,6 +1135,13 @@69@@ -51,6 +51,7 @@
70 #include "btr0sea.h"
71 #include "fil0fil.h"
72 #include "ibuf0ibuf.h"
73+#include "ha_prototypes.h"
74
75 /** Provide optional 4.x backwards compatibility for 5.0 and above */
76 UNIV_INTERN ibool row_rollback_on_timeout = FALSE;
77@@ -1135,6 +1136,13 @@
58 78
59 thr = que_fork_get_first_thr(prebuilt->ins_graph);79 thr = que_fork_get_first_thr(prebuilt->ins_graph);
60 80
6181
=== modified file 'innodb_io_patches.patch'
--- innodb_io_patches.patch 2010-12-16 11:35:26 +0000
+++ innodb_io_patches.patch 2011-02-02 15:07:48 +0000
@@ -963,7 +963,7 @@
963 /*-------------------------------------------*/963 /*-------------------------------------------*/
964 UNIV_INTERN ulong srv_n_spin_wait_rounds = 30;964 UNIV_INTERN ulong srv_n_spin_wait_rounds = 30;
965 UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500;965 UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500;
966@@ -2477,15 +2488,30 @@966@@ -2477,15 +2488,31 @@
967 ulint n_pages_purged = 0;967 ulint n_pages_purged = 0;
968 ulint n_bytes_merged;968 ulint n_bytes_merged;
969 ulint n_pages_flushed;969 ulint n_pages_flushed;
@@ -985,7 +985,8 @@
985+ unsigned space:32;985+ unsigned space:32;
986+ unsigned offset:32;986+ unsigned offset:32;
987+ ib_uint64_t oldest_modification;987+ ib_uint64_t oldest_modification;
988+ } prev_flush_info;988+ };
989+ struct t_prev_flush_info_struct prev_flush_info = {0,0,0,0};
989+990+
990+ ib_uint64_t lsn_old;991+ ib_uint64_t lsn_old;
991+992+
@@ -994,7 +995,7 @@
994 #ifdef UNIV_DEBUG_THREAD_CREATION995 #ifdef UNIV_DEBUG_THREAD_CREATION
995 fprintf(stderr, "Master thread starts, id %lu\n",996 fprintf(stderr, "Master thread starts, id %lu\n",
996 os_thread_pf(os_thread_get_curr_id()));997 os_thread_pf(os_thread_get_curr_id()));
997@@ -2501,6 +2527,9 @@998@@ -2501,6 +2528,9 @@
998 999
999 mutex_exit(&kernel_mutex);1000 mutex_exit(&kernel_mutex);
1000 1001
@@ -1004,7 +1005,7 @@
1004 loop:1005 loop:
1005 /*****************************************************************/1006 /*****************************************************************/
1006 /* ---- When there is database activity by users, we cycle in this1007 /* ---- When there is database activity by users, we cycle in this
1007@@ -2528,16 +2557,38 @@1008@@ -2528,16 +2558,40 @@
1008 srv_last_log_flush_time = time(NULL);1009 srv_last_log_flush_time = time(NULL);
1009 skip_sleep = FALSE;1010 skip_sleep = FALSE;
1010 1011
@@ -1013,6 +1014,8 @@
1013 for (i = 0; i < 10; i++) {1014 for (i = 0; i < 10; i++) {
1014+ ulint cur_time = ut_time_ms();1015+ ulint cur_time = ut_time_ms();
1015+1016+
1017+ n_pages_flushed = 0; /* initialize */
1018+
1016 n_ios_old = log_sys->n_log_ios + buf_pool->stat.n_pages_read1019 n_ios_old = log_sys->n_log_ios + buf_pool->stat.n_pages_read
1017 + buf_pool->stat.n_pages_written;1020 + buf_pool->stat.n_pages_written;
1018 srv_main_thread_op_info = "sleeping";1021 srv_main_thread_op_info = "sleeping";
@@ -1044,7 +1047,7 @@
1044 }1047 }
1045 1048
1046 skip_sleep = FALSE;1049 skip_sleep = FALSE;
1047@@ -2574,7 +2625,7 @@1050@@ -2574,7 +2628,7 @@
1048 if (n_pend_ios < SRV_PEND_IO_THRESHOLD1051 if (n_pend_ios < SRV_PEND_IO_THRESHOLD
1049 && (n_ios - n_ios_old < SRV_RECENT_IO_ACTIVITY)) {1052 && (n_ios - n_ios_old < SRV_RECENT_IO_ACTIVITY)) {
1050 srv_main_thread_op_info = "doing insert buffer merge";1053 srv_main_thread_op_info = "doing insert buffer merge";
@@ -1053,7 +1056,7 @@
1053 1056
1054 /* Flush logs if needed */1057 /* Flush logs if needed */
1055 srv_sync_log_buffer_in_background();1058 srv_sync_log_buffer_in_background();
1056@@ -2598,6 +2649,11 @@1059@@ -2598,6 +2652,11 @@
1057 iteration of this loop. */1060 iteration of this loop. */
1058 1061
1059 skip_sleep = TRUE;1062 skip_sleep = TRUE;
@@ -1065,7 +1068,7 @@
1065 } else if (srv_adaptive_flushing) {1068 } else if (srv_adaptive_flushing) {
1066 1069
1067 /* Try to keep the rate of flushing of dirty1070 /* Try to keep the rate of flushing of dirty
1068@@ -2619,6 +2675,255 @@1071@@ -2619,6 +2678,256 @@
1069 skip_sleep = TRUE;1072 skip_sleep = TRUE;
1070 }1073 }
1071 }1074 }
@@ -1221,7 +1224,8 @@
1221+1224+
1222+ if (prev_adaptive_checkpoint == 3) {1225+ if (prev_adaptive_checkpoint == 3) {
1223+ lint n_flush;1226+ lint n_flush;
1224+ lint blocks_sum, new_blocks_sum, flushed_blocks_sum;1227+ lint blocks_sum;
1228+ ulint new_blocks_sum, flushed_blocks_sum;
1225+1229+
1226+ blocks_sum = new_blocks_sum = flushed_blocks_sum = 0;1230+ blocks_sum = new_blocks_sum = flushed_blocks_sum = 0;
1227+1231+
@@ -1321,7 +1325,7 @@
1321 }1325 }
1322 1326
1323 if (srv_activity_count == old_activity_count) {1327 if (srv_activity_count == old_activity_count) {
1324@@ -2667,7 +2972,7 @@1328@@ -2667,7 +2976,7 @@
1325 even if the server were active */1329 even if the server were active */
1326 1330
1327 srv_main_thread_op_info = "doing insert buffer merge";1331 srv_main_thread_op_info = "doing insert buffer merge";
@@ -1330,7 +1334,7 @@
1330 1334
1331 /* Flush logs if needed */1335 /* Flush logs if needed */
1332 srv_sync_log_buffer_in_background();1336 srv_sync_log_buffer_in_background();
1333@@ -2792,7 +3097,7 @@1337@@ -2792,7 +3101,7 @@
1334 buf_flush_batch below. Otherwise, the system favors1338 buf_flush_batch below. Otherwise, the system favors
1335 clean pages over cleanup throughput. */1339 clean pages over cleanup throughput. */
1336 n_bytes_merged = ibuf_contract_for_n_pages(FALSE,1340 n_bytes_merged = ibuf_contract_for_n_pages(FALSE,
13371341
=== modified file 'innodb_lru_dump_restore.patch'
--- innodb_lru_dump_restore.patch 2010-12-22 18:24:52 +0000
+++ innodb_lru_dump_restore.patch 2011-02-02 15:07:48 +0000
@@ -42,7 +42,7 @@
42diff -ruN a/storage/innodb_plugin/buf/buf0lru.c b/storage/innodb_plugin/buf/buf0lru.c42diff -ruN a/storage/innodb_plugin/buf/buf0lru.c b/storage/innodb_plugin/buf/buf0lru.c
43--- a/storage/innodb_plugin/buf/buf0lru.c 2010-08-27 16:13:11.070058073 +090043--- a/storage/innodb_plugin/buf/buf0lru.c 2010-08-27 16:13:11.070058073 +0900
44+++ b/storage/innodb_plugin/buf/buf0lru.c 2010-08-27 16:34:33.860400549 +090044+++ b/storage/innodb_plugin/buf/buf0lru.c 2010-08-27 16:34:33.860400549 +0900
45@@ -2122,6 +2122,278 @@45@@ -2122,6 +2122,277 @@
46 memset(&buf_LRU_stat_cur, 0, sizeof buf_LRU_stat_cur);46 memset(&buf_LRU_stat_cur, 0, sizeof buf_LRU_stat_cur);
47 }47 }
48 48
@@ -285,8 +285,7 @@
285+ continue;285+ continue;
286+ }286+ }
287+287+
288+ if (fil_area_is_exist(space_id, zip_size, page_no, 0,288+ if (fil_is_exist(space_id, page_no)) {
289+ zip_size ? zip_size : UNIV_PAGE_SIZE)) {
290+289+
291+ tablespace_version = fil_space_get_version(space_id);290+ tablespace_version = fil_space_get_version(space_id);
292+291+
@@ -336,7 +335,7 @@
336diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0fil.c335diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0fil.c
337--- a/storage/innodb_plugin/fil/fil0fil.c 2010-08-27 16:32:40.298411400 +0900336--- a/storage/innodb_plugin/fil/fil0fil.c 2010-08-27 16:32:40.298411400 +0900
338+++ b/storage/innodb_plugin/fil/fil0fil.c 2010-08-27 16:34:33.868058362 +0900337+++ b/storage/innodb_plugin/fil/fil0fil.c 2010-08-27 16:34:33.868058362 +0900
339@@ -4915,6 +4915,78 @@338@@ -4915,6 +4915,70 @@
340 return(DB_SUCCESS);339 return(DB_SUCCESS);
341 }340 }
342 341
@@ -344,18 +343,10 @@
344+Confirm whether the parameters are valid or not */343+Confirm whether the parameters are valid or not */
345+UNIV_INTERN344+UNIV_INTERN
346+ibool345+ibool
347+fil_area_is_exist(346+fil_is_exist(
348+/*==============*/347+/*==============*/
349+ ulint space_id, /*!< in: space id */348+ ulint space_id, /*!< in: space id */
350+ ulint zip_size, /*!< in: compressed page size in bytes;349+ ulint block_offset) /*!< in: offset in number of blocks */
351+ 0 for uncompressed pages */
352+ ulint block_offset, /*!< in: offset in number of blocks */
353+ ulint byte_offset, /*!< in: remainder of offset in bytes; in
354+ aio this must be divisible by the OS block
355+ size */
356+ ulint len) /*!< in: how many bytes to read or write; this
357+ must not cross a file boundary; in aio this
358+ must be a block size multiple */
359+{350+{
360+ fil_space_t* space;351+ fil_space_t* space;
361+ fil_node_t* node;352+ fil_node_t* node;
@@ -563,7 +554,7 @@
563diff -ruN a/storage/innodb_plugin/include/fil0fil.h b/storage/innodb_plugin/include/fil0fil.h554diff -ruN a/storage/innodb_plugin/include/fil0fil.h b/storage/innodb_plugin/include/fil0fil.h
564--- a/storage/innodb_plugin/include/fil0fil.h 2010-08-27 16:32:40.315012507 +0900555--- a/storage/innodb_plugin/include/fil0fil.h 2010-08-27 16:32:40.315012507 +0900
565+++ b/storage/innodb_plugin/include/fil0fil.h 2010-08-27 16:34:33.878063455 +0900556+++ b/storage/innodb_plugin/include/fil0fil.h 2010-08-27 16:34:33.878063455 +0900
566@@ -643,6 +643,22 @@557@@ -643,6 +643,14 @@
567 void* message, /*!< in: message for aio handler if non-sync558 void* message, /*!< in: message for aio handler if non-sync
568 aio used, else ignored */559 aio used, else ignored */
569 trx_t* trx);560 trx_t* trx);
@@ -571,18 +562,10 @@
571+Confirm whether the parameters are valid or not */562+Confirm whether the parameters are valid or not */
572+UNIV_INTERN563+UNIV_INTERN
573+ibool564+ibool
574+fil_area_is_exist(565+fil_is_exist(
575+/*==============*/566+/*==============*/
576+ ulint space_id, /*!< in: space id */567+ ulint space_id, /*!< in: space id */
577+ ulint zip_size, /*!< in: compressed page size in bytes;568+ ulint block_offset); /*!< in: offset in number of blocks */
578+ 0 for uncompressed pages */
579+ ulint block_offset, /*!< in: offset in number of blocks */
580+ ulint byte_offset, /*!< in: remainder of offset in bytes; in
581+ aio this must be divisible by the OS block
582+ size */
583+ ulint len); /*!< in: how many bytes to read or write; this
584+ must not cross a file boundary; in aio this
585+ must be a block size multiple */
586 /**********************************************************************//**569 /**********************************************************************//**
587 Waits for an aio operation to complete. This function is used to write the570 Waits for an aio operation to complete. This function is used to write the
588 handler for completed requests. The aio array of pending requests is divided571 handler for completed requests. The aio array of pending requests is divided
589572
=== modified file 'innodb_pass_corrupt_table.patch'
--- innodb_pass_corrupt_table.patch 2010-12-16 11:35:26 +0000
+++ innodb_pass_corrupt_table.patch 2011-02-02 15:07:48 +0000
@@ -608,7 +608,7 @@
608 ut_a(ret);608 ut_a(ret);
609 609
610 if (mode == OS_AIO_SYNC) {610 if (mode == OS_AIO_SYNC) {
611@@ -5053,7 +5074,7 @@611@@ -5045,7 +5066,7 @@
612 612
613 if (fil_node->space->purpose == FIL_TABLESPACE) {613 if (fil_node->space->purpose == FIL_TABLESPACE) {
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");
@@ -617,7 +617,7 @@
617 } else {617 } else {
618 srv_set_io_thread_op_info(segment, "complete io for log");618 srv_set_io_thread_op_info(segment, "complete io for log");
619 log_io_complete(message);619 log_io_complete(message);
620@@ -5407,3 +5428,46 @@620@@ -5399,3 +5420,46 @@
621 return 0;621 return 0;
622 }622 }
623 }623 }
@@ -1184,7 +1184,7 @@
1184diff -ruN a/storage/innodb_plugin/include/fil0fil.h b/storage/innodb_plugin/include/fil0fil.h1184diff -ruN a/storage/innodb_plugin/include/fil0fil.h b/storage/innodb_plugin/include/fil0fil.h
1185--- a/storage/innodb_plugin/include/fil0fil.h 2010-08-27 16:36:03.499987483 +09001185--- a/storage/innodb_plugin/include/fil0fil.h 2010-08-27 16:36:03.499987483 +0900
1186+++ b/storage/innodb_plugin/include/fil0fil.h 2010-08-27 16:39:03.015021314 +09001186+++ b/storage/innodb_plugin/include/fil0fil.h 2010-08-27 16:39:03.015021314 +0900
1187@@ -756,6 +756,19 @@1187@@ -748,6 +748,19 @@
1188 fil_system_hash_nodes(void);1188 fil_system_hash_nodes(void);
1189 /*========================*/1189 /*========================*/
1190 1190
11911191
=== modified file 'innodb_purge_thread.patch'
--- innodb_purge_thread.patch 2010-12-16 11:35:26 +0000
+++ innodb_purge_thread.patch 2011-02-02 15:07:48 +0000
@@ -154,7 +154,7 @@
154 /* if TRUE, then we auto-extend the last data file */154 /* if TRUE, then we auto-extend the last data file */
155 UNIV_INTERN ibool srv_auto_extend_last_data_file = FALSE;155 UNIV_INTERN ibool srv_auto_extend_last_data_file = FALSE;
156 /* if != 0, this tells the max size auto-extending may increase the156 /* if != 0, this tells the max size auto-extending may increase the
157@@ -2625,10 +2627,10 @@157@@ -2626,10 +2628,10 @@
158 srv_main_thread_process_no = os_proc_get_number();158 srv_main_thread_process_no = os_proc_get_number();
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());
160 160
@@ -166,7 +166,7 @@
166 srv_n_threads_active[SRV_MASTER]++;166 srv_n_threads_active[SRV_MASTER]++;
167 167
168 mutex_exit(&kernel_mutex);168 mutex_exit(&kernel_mutex);
169@@ -3083,6 +3085,7 @@169@@ -3087,6 +3089,7 @@
170 /* Flush logs if needed */170 /* Flush logs if needed */
171 srv_sync_log_buffer_in_background();171 srv_sync_log_buffer_in_background();
172 172
@@ -174,7 +174,7 @@
174 /* We run a full purge every 10 seconds, even if the server174 /* We run a full purge every 10 seconds, even if the server
175 were active */175 were active */
176 do {176 do {
177@@ -3099,6 +3102,7 @@177@@ -3103,6 +3106,7 @@
178 srv_sync_log_buffer_in_background();178 srv_sync_log_buffer_in_background();
179 179
180 } while (n_pages_purged);180 } while (n_pages_purged);
@@ -182,7 +182,7 @@
182 182
183 srv_main_thread_op_info = "flushing buffer pool pages";183 srv_main_thread_op_info = "flushing buffer pool pages";
184 184
185@@ -3167,6 +3171,7 @@185@@ -3171,6 +3175,7 @@
186 os_thread_sleep(100000);186 os_thread_sleep(100000);
187 }187 }
188 188
@@ -190,7 +190,7 @@
190 srv_main_thread_op_info = "purging";190 srv_main_thread_op_info = "purging";
191 191
192 /* Run a full purge */192 /* Run a full purge */
193@@ -3183,6 +3188,7 @@193@@ -3187,6 +3192,7 @@
194 srv_sync_log_buffer_in_background();194 srv_sync_log_buffer_in_background();
195 195
196 } while (n_pages_purged);196 } while (n_pages_purged);
@@ -198,7 +198,7 @@
198 198
199 srv_main_thread_op_info = "reserving kernel mutex";199 srv_main_thread_op_info = "reserving kernel mutex";
200 200
201@@ -3335,3 +3341,143 @@201@@ -3339,3 +3345,143 @@
202 202
203 OS_THREAD_DUMMY_RETURN; /* Not reached, avoid compiler warning */203 OS_THREAD_DUMMY_RETURN; /* Not reached, avoid compiler warning */
204 }204 }
205205
=== modified file 'innodb_separate_doublewrite.patch'
--- innodb_separate_doublewrite.patch 2010-12-16 11:35:26 +0000
+++ innodb_separate_doublewrite.patch 2011-02-02 15:07:48 +0000
@@ -67,7 +67,15 @@
67diff -ruN a/storage/innodb_plugin/dict/dict0load.c b/storage/innodb_plugin/dict/dict0load.c67diff -ruN a/storage/innodb_plugin/dict/dict0load.c b/storage/innodb_plugin/dict/dict0load.c
68--- a/storage/innodb_plugin/dict/dict0load.c 2010-08-27 16:22:04.223059346 +090068--- a/storage/innodb_plugin/dict/dict0load.c 2010-08-27 16:22:04.223059346 +0900
69+++ b/storage/innodb_plugin/dict/dict0load.c 2010-08-27 16:37:55.363104692 +090069+++ b/storage/innodb_plugin/dict/dict0load.c 2010-08-27 16:37:55.363104692 +0900
70@@ -396,7 +396,7 @@70@@ -40,6 +40,7 @@
71 #include "rem0cmp.h"
72 #include "srv0start.h"
73 #include "srv0srv.h"
74+#include "trx0sys.h"
75
76 /****************************************************************//**
77 Compare the name of an index column.
78@@ -396,7 +397,7 @@
71 79
72 mtr_commit(&mtr);80 mtr_commit(&mtr);
73 81
@@ -76,7 +84,7 @@
76 /* The system tablespace always exists. */84 /* The system tablespace always exists. */
77 } else if (in_crash_recovery) {85 } else if (in_crash_recovery) {
78 /* Check that the tablespace (the .ibd file) really86 /* Check that the tablespace (the .ibd file) really
79@@ -904,7 +904,7 @@87@@ -904,7 +905,7 @@
80 space = mach_read_from_4(field);88 space = mach_read_from_4(field);
81 89
82 /* Check if the tablespace exists and has the right name */90 /* Check if the tablespace exists and has the right name */
@@ -85,7 +93,7 @@
85 flags = dict_sys_tables_get_flags(rec);93 flags = dict_sys_tables_get_flags(rec);
86 94
87 if (UNIV_UNLIKELY(flags == ULINT_UNDEFINED)) {95 if (UNIV_UNLIKELY(flags == ULINT_UNDEFINED)) {
88@@ -957,7 +957,7 @@96@@ -957,7 +958,7 @@
89 }97 }
90 98
91 /* See if the tablespace is available. */99 /* See if the tablespace is available. */
@@ -295,7 +303,7 @@
295 /* The node must be put back to the LRU list */303 /* The node must be put back to the LRU list */
296 UT_LIST_ADD_FIRST(LRU, system->LRU, node);304 UT_LIST_ADD_FIRST(LRU, system->LRU, node);
297 }305 }
298@@ -5271,7 +5281,7 @@306@@ -5263,7 +5273,7 @@
299 ut_a(fil_node->n_pending == 0);307 ut_a(fil_node->n_pending == 0);
300 ut_a(fil_node->open);308 ut_a(fil_node->open);
301 ut_a(fil_node->space->purpose == FIL_TABLESPACE);309 ut_a(fil_node->space->purpose == FIL_TABLESPACE);
302310
=== modified file 'innodb_show_lock_name.patch'
--- innodb_show_lock_name.patch 2010-12-16 11:35:26 +0000
+++ innodb_show_lock_name.patch 2011-02-02 15:07:48 +0000
@@ -67,25 +67,38 @@
67diff -ruN a/storage/innodb_plugin/include/sync0rw.h b/storage/innodb_plugin/include/sync0rw.h67diff -ruN a/storage/innodb_plugin/include/sync0rw.h b/storage/innodb_plugin/include/sync0rw.h
68--- a/storage/innodb_plugin/include/sync0rw.h 2010-08-04 02:24:19.000000000 +090068--- a/storage/innodb_plugin/include/sync0rw.h 2010-08-04 02:24:19.000000000 +0900
69+++ b/storage/innodb_plugin/include/sync0rw.h 2010-08-27 16:29:24.325059383 +090069+++ b/storage/innodb_plugin/include/sync0rw.h 2010-08-27 16:29:24.325059383 +0900
70@@ -120,7 +120,7 @@70@@ -113,14 +113,14 @@
71 #ifdef UNIV_DEBUG
72 # ifdef UNIV_SYNC_DEBUG
73 # define rw_lock_create(L, level) \
74- rw_lock_create_func((L), (level), #L, __FILE__, __LINE__)
75+ rw_lock_create_func((L), (level), __FILE__, __LINE__, #L)
76 # else /* UNIV_SYNC_DEBUG */
77 # define rw_lock_create(L, level) \
78- rw_lock_create_func((L), #L, __FILE__, __LINE__)
79+ rw_lock_create_func((L), __FILE__, __LINE__, #L)
71 # endif /* UNIV_SYNC_DEBUG */80 # endif /* UNIV_SYNC_DEBUG */
72 #else /* UNIV_DEBUG */81 #else /* UNIV_DEBUG */
73 # define rw_lock_create(L, level) \82 # define rw_lock_create(L, level) \
74- rw_lock_create_func((L), __FILE__, __LINE__)83- rw_lock_create_func((L), __FILE__, __LINE__)
75+ rw_lock_create_func((L), #L, NULL, 0)84+ rw_lock_create_func((L), #L)
76 #endif /* UNIV_DEBUG */85 #endif /* UNIV_DEBUG */
77 86
78 /******************************************************************//**87 /******************************************************************//**
79@@ -137,8 +137,8 @@88@@ -137,10 +137,10 @@
80 # ifdef UNIV_SYNC_DEBUG89 # ifdef UNIV_SYNC_DEBUG
81 ulint level, /*!< in: level */90 ulint level, /*!< in: level */
82 # endif /* UNIV_SYNC_DEBUG */91 # endif /* UNIV_SYNC_DEBUG */
83- const char* cmutex_name, /*!< in: mutex name */92- const char* cmutex_name, /*!< in: mutex name */
84 #endif /* UNIV_DEBUG */93-#endif /* UNIV_DEBUG */
85+ const char* cmutex_name, /*!< in: mutex name */
86 const char* cfile_name, /*!< in: file name where created */94 const char* cfile_name, /*!< in: file name where created */
87 ulint cline); /*!< in: file line where created */95- ulint cline); /*!< in: file line where created */
96+ ulint cline, /*!< in: file line where created */
97+#endif /* UNIV_DEBUG */
98+ const char* cmutex_name); /*!< in: mutex name */
88 /******************************************************************//**99 /******************************************************************//**
100 Calling this function is obligatory only if the memory buffer containing
101 the rw-lock is freed. Removes an rw-lock object from the global list. The
89@@ -541,7 +541,8 @@102@@ -541,7 +541,8 @@
90 ulint level; /*!< Level in the global latching order. */103 ulint level; /*!< Level in the global latching order. */
91 #endif /* UNIV_SYNC_DEBUG */104 #endif /* UNIV_SYNC_DEBUG */
@@ -108,25 +121,41 @@
108diff -ruN a/storage/innodb_plugin/include/sync0sync.h b/storage/innodb_plugin/include/sync0sync.h121diff -ruN a/storage/innodb_plugin/include/sync0sync.h b/storage/innodb_plugin/include/sync0sync.h
109--- a/storage/innodb_plugin/include/sync0sync.h 2010-08-27 16:13:11.087074844 +0900122--- a/storage/innodb_plugin/include/sync0sync.h 2010-08-27 16:13:11.087074844 +0900
110+++ b/storage/innodb_plugin/include/sync0sync.h 2010-08-27 16:29:24.327059254 +0900123+++ b/storage/innodb_plugin/include/sync0sync.h 2010-08-27 16:29:24.327059254 +0900
111@@ -80,7 +80,7 @@124@@ -73,14 +73,14 @@
125 #ifdef UNIV_DEBUG
126 # ifdef UNIV_SYNC_DEBUG
127 # define mutex_create(M, level) \
128- mutex_create_func((M), #M, (level), __FILE__, __LINE__)
129+ mutex_create_func((M), (level), __FILE__, __LINE__, #M)
130 # else
131 # define mutex_create(M, level) \
132- mutex_create_func((M), #M, __FILE__, __LINE__)
133+ mutex_create_func((M), __FILE__, __LINE__, #M)
112 # endif134 # endif
113 #else135 #else
114 # define mutex_create(M, level) \136 # define mutex_create(M, level) \
115- mutex_create_func((M), __FILE__, __LINE__)137- mutex_create_func((M), __FILE__, __LINE__)
116+ mutex_create_func((M), #M, NULL, 0)138+ mutex_create_func((M), #M)
117 #endif139 #endif
118 140
119 /******************************************************************//**141 /******************************************************************//**
120@@ -93,8 +93,8 @@142@@ -94,13 +94,13 @@
121 mutex_create_func(
122 /*==============*/143 /*==============*/
123 mutex_t* mutex, /*!< in: pointer to memory */144 mutex_t* mutex, /*!< in: pointer to memory */
124-#ifdef UNIV_DEBUG145 #ifdef UNIV_DEBUG
125 const char* cmutex_name, /*!< in: mutex name */146- const char* cmutex_name, /*!< in: mutex name */
126+#ifdef UNIV_DEBUG
127 # ifdef UNIV_SYNC_DEBUG147 # ifdef UNIV_SYNC_DEBUG
128 ulint level, /*!< in: level */148 ulint level, /*!< in: level */
129 # endif /* UNIV_SYNC_DEBUG */149 # endif /* UNIV_SYNC_DEBUG */
150-#endif /* UNIV_DEBUG */
151 const char* cfile_name, /*!< in: file name where created */
152- ulint cline); /*!< in: file line where created */
153+ ulint cline, /*!< in: file line where created */
154+#endif /* UNIV_DEBUG */
155+ const char* cmutex_name); /*!< in: mutex name */
156
157 #undef mutex_free /* Fix for MacOS X */
158
130@@ -536,9 +536,9 @@159@@ -536,9 +536,9 @@
131 ulint line; /*!< Line where the mutex was locked */160 ulint line; /*!< Line where the mutex was locked */
132 ulint level; /*!< Level in the global latching order */161 ulint level; /*!< Level in the global latching order */
@@ -182,16 +211,20 @@
182diff -ruN a/storage/innodb_plugin/sync/sync0rw.c b/storage/innodb_plugin/sync/sync0rw.c211diff -ruN a/storage/innodb_plugin/sync/sync0rw.c b/storage/innodb_plugin/sync/sync0rw.c
183--- a/storage/innodb_plugin/sync/sync0rw.c 2010-08-04 02:24:20.000000000 +0900212--- a/storage/innodb_plugin/sync/sync0rw.c 2010-08-04 02:24:20.000000000 +0900
184+++ b/storage/innodb_plugin/sync/sync0rw.c 2010-08-27 16:29:24.331058289 +0900213+++ b/storage/innodb_plugin/sync/sync0rw.c 2010-08-27 16:29:24.331058289 +0900
185@@ -231,8 +231,8 @@214@@ -231,10 +231,10 @@
186 # ifdef UNIV_SYNC_DEBUG215 # ifdef UNIV_SYNC_DEBUG
187 ulint level, /*!< in: level */216 ulint level, /*!< in: level */
188 # endif /* UNIV_SYNC_DEBUG */217 # endif /* UNIV_SYNC_DEBUG */
189- const char* cmutex_name, /*!< in: mutex name */218- const char* cmutex_name, /*!< in: mutex name */
190 #endif /* UNIV_DEBUG */219-#endif /* UNIV_DEBUG */
191+ const char* cmutex_name, /*!< in: mutex name */
192 const char* cfile_name, /*!< in: file name where created */220 const char* cfile_name, /*!< in: file name where created */
193 ulint cline) /*!< in: file line where created */221- ulint cline) /*!< in: file line where created */
222+ ulint cline, /*!< in: file line where created */
223+#endif /* UNIV_DEBUG */
224+ const char* cmutex_name) /*!< in: mutex name */
194 {225 {
226 /* If this is the very first time a synchronization object is
227 created, then the following call initializes the sync system. */
195@@ -242,14 +242,15 @@228@@ -242,14 +242,15 @@
196 #ifndef INNODB_RW_LOCKS_USE_ATOMICS229 #ifndef INNODB_RW_LOCKS_USE_ATOMICS
197 mutex_create(rw_lock_get_mutex(lock), SYNC_NO_ORDER_CHECK);230 mutex_create(rw_lock_get_mutex(lock), SYNC_NO_ORDER_CHECK);
@@ -275,16 +308,23 @@
275diff -ruN a/storage/innodb_plugin/sync/sync0sync.c b/storage/innodb_plugin/sync/sync0sync.c308diff -ruN a/storage/innodb_plugin/sync/sync0sync.c b/storage/innodb_plugin/sync/sync0sync.c
276--- a/storage/innodb_plugin/sync/sync0sync.c 2010-08-27 16:13:11.113988290 +0900309--- a/storage/innodb_plugin/sync/sync0sync.c 2010-08-27 16:13:11.113988290 +0900
277+++ b/storage/innodb_plugin/sync/sync0sync.c 2010-08-27 16:29:24.333058256 +0900310+++ b/storage/innodb_plugin/sync/sync0sync.c 2010-08-27 16:29:24.333058256 +0900
278@@ -238,8 +238,8 @@311@@ -239,13 +239,13 @@
279 mutex_create_func(
280 /*==============*/312 /*==============*/
281 mutex_t* mutex, /*!< in: pointer to memory */313 mutex_t* mutex, /*!< in: pointer to memory */
282-#ifdef UNIV_DEBUG314 #ifdef UNIV_DEBUG
283 const char* cmutex_name, /*!< in: mutex name */315- const char* cmutex_name, /*!< in: mutex name */
284+#ifdef UNIV_DEBUG
285 # ifdef UNIV_SYNC_DEBUG316 # ifdef UNIV_SYNC_DEBUG
286 ulint level, /*!< in: level */317 ulint level, /*!< in: level */
287 # endif /* UNIV_SYNC_DEBUG */318 # endif /* UNIV_SYNC_DEBUG */
319-#endif /* UNIV_DEBUG */
320 const char* cfile_name, /*!< in: file name where created */
321- ulint cline) /*!< in: file line where created */
322+ ulint cline, /*!< in: file line where created */
323+#endif /* UNIV_DEBUG */
324+ const char* cmutex_name) /*!< in: mutex name */
325 {
326 #if defined(HAVE_ATOMIC_BUILTINS)
327 mutex_reset_lock_word(mutex);
288@@ -263,11 +263,13 @@328@@ -263,11 +263,13 @@
289 mutex->file_name = "not yet reserved";329 mutex->file_name = "not yet reserved";
290 mutex->level = level;330 mutex->level = level;
291331
=== modified file 'innodb_split_buf_pool_mutex.patch'
--- innodb_split_buf_pool_mutex.patch 2010-12-16 11:35:26 +0000
+++ innodb_split_buf_pool_mutex.patch 2011-02-02 15:07:48 +0000
@@ -48,25 +48,7 @@
48diff -ruN a/storage/innodb_plugin/btr/btr0sea.c b/storage/innodb_plugin/btr/btr0sea.c48diff -ruN a/storage/innodb_plugin/btr/btr0sea.c b/storage/innodb_plugin/btr/btr0sea.c
49--- a/storage/innodb_plugin/btr/btr0sea.c 2010-08-27 16:11:12.151975789 +090049--- a/storage/innodb_plugin/btr/btr0sea.c 2010-08-27 16:11:12.151975789 +0900
50+++ b/storage/innodb_plugin/btr/btr0sea.c 2010-08-27 16:11:40.593021205 +090050+++ b/storage/innodb_plugin/btr/btr0sea.c 2010-08-27 16:11:40.593021205 +0900
51@@ -1199,7 +1199,7 @@51@@ -1925,7 +1925,8 @@
52 ulint* offsets;
53
54 rw_lock_x_lock(&btr_search_latch);
55- buf_pool_mutex_enter();
56+ mutex_enter(&LRU_list_mutex);
57
58 table = btr_search_sys->hash_index;
59
60@@ -1285,7 +1285,7 @@
61 bpage = UT_LIST_GET_PREV(LRU, bpage);
62 }
63
64- buf_pool_mutex_exit();
65+ mutex_exit(&LRU_list_mutex);
66 rw_lock_x_unlock(&btr_search_latch);
67
68 if (UNIV_LIKELY_NULL(heap)) {
69@@ -1878,7 +1878,8 @@
70 rec_offs_init(offsets_);52 rec_offs_init(offsets_);
71 53
72 rw_lock_x_lock(&btr_search_latch);54 rw_lock_x_lock(&btr_search_latch);
@@ -76,7 +58,7 @@
76 58
77 cell_count = hash_get_n_cells(btr_search_sys->hash_index);59 cell_count = hash_get_n_cells(btr_search_sys->hash_index);
78 60
79@@ -1886,11 +1887,13 @@61@@ -1933,11 +1934,13 @@
80 /* We release btr_search_latch every once in a while to62 /* We release btr_search_latch every once in a while to
81 give other queries a chance to run. */63 give other queries a chance to run. */
82 if ((i != 0) && ((i % chunk_size) == 0)) {64 if ((i != 0) && ((i % chunk_size) == 0)) {
@@ -92,7 +74,7 @@
92 }74 }
93 75
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;
95@@ -1997,11 +2000,13 @@77@@ -2044,11 +2047,13 @@
96 /* We release btr_search_latch every once in a while to78 /* We release btr_search_latch every once in a while to
97 give other queries a chance to run. */79 give other queries a chance to run. */
98 if (i != 0) {80 if (i != 0) {
@@ -108,7 +90,7 @@
108 }90 }
109 91
110 if (!ha_validate(btr_search_sys->hash_index, i, end_index)) {92 if (!ha_validate(btr_search_sys->hash_index, i, end_index)) {
111@@ -2009,7 +2014,8 @@93@@ -2056,7 +2061,8 @@
112 }94 }
113 }95 }
114 96
@@ -388,20 +370,33 @@
388 ut_ad(!mutex_own(&buf_pool_zip_mutex));370 ut_ad(!mutex_own(&buf_pool_zip_mutex));
389 ut_ad(!ut_align_offset(src, size));371 ut_ad(!ut_align_offset(src, size));
390 ut_ad(!ut_align_offset(dst, size));372 ut_ad(!ut_align_offset(dst, size));
391@@ -434,6 +476,12 @@373@@ -433,6 +475,13 @@
374 if (size >= PAGE_ZIP_MIN_SIZE) {
392 /* This is a compressed page. */375 /* This is a compressed page. */
393 mutex_t* mutex;376 mutex_t* mutex;
394 377+ ulint space, page_no;
378+
395+ if (!have_page_hash_mutex) {379+ if (!have_page_hash_mutex) {
396+ mutex_exit(&zip_free_mutex);380+ mutex_exit(&zip_free_mutex);
397+ mutex_enter(&LRU_list_mutex);381+ mutex_enter(&LRU_list_mutex);
398+ rw_lock_x_lock(&page_hash_latch);382+ rw_lock_x_lock(&page_hash_latch);
399+ }383+ }
400+384
401 /* The src block may be split into smaller blocks,385 /* The src block may be split into smaller blocks,
402 some of which may be free. Thus, the386 some of which may be free. Thus, the
403 mach_read_from_4() calls below may attempt to read387@@ -442,9 +491,9 @@
404@@ -458,6 +506,11 @@388 pool), so there is nothing wrong about this. The
389 mach_read_from_4() calls here will only trigger bogus
390 Valgrind memcheck warnings in UNIV_DEBUG_VALGRIND builds. */
391- ulint space = mach_read_from_4(
392+ space = mach_read_from_4(
393 (const byte*) src + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
394- ulint page_no = mach_read_from_4(
395+ page_no = mach_read_from_4(
396 (const byte*) src + FIL_PAGE_OFFSET);
397 /* Suppress Valgrind warnings about conditional jump
398 on uninitialized value. */
399@@ -458,6 +507,11 @@
405 added to buf_pool->page_hash yet. Obviously,400 added to buf_pool->page_hash yet. Obviously,
406 it cannot be relocated. */401 it cannot be relocated. */
407 402
@@ -413,7 +408,7 @@
413 return(FALSE);408 return(FALSE);
414 }409 }
415 410
416@@ -467,18 +520,27 @@411@@ -467,18 +521,27 @@
417 For the sake of simplicity, give up. */412 For the sake of simplicity, give up. */
418 ut_ad(page_zip_get_size(&bpage->zip) < size);413 ut_ad(page_zip_get_size(&bpage->zip) < size);
419 414
@@ -444,7 +439,7 @@
444 /* Relocate the compressed page. */439 /* Relocate the compressed page. */
445 ut_a(bpage->zip.data == src);440 ut_a(bpage->zip.data == src);
446 memcpy(dst, src, size);441 memcpy(dst, src, size);
447@@ -493,10 +555,22 @@442@@ -493,10 +556,22 @@
448 buddy_stat->relocated_usec443 buddy_stat->relocated_usec
449 += ut_time_us(NULL) - usec;444 += ut_time_us(NULL) - usec;
450 }445 }
@@ -468,7 +463,7 @@
468 } else if (i == buf_buddy_get_slot(sizeof(buf_page_t))) {463 } else if (i == buf_buddy_get_slot(sizeof(buf_page_t))) {
469 /* This must be a buf_page_t object. */464 /* This must be a buf_page_t object. */
470 #if UNIV_WORD_SIZE == 4465 #if UNIV_WORD_SIZE == 4
471@@ -505,10 +579,31 @@466@@ -505,10 +580,31 @@
472 about uninitialized pad bytes. */467 about uninitialized pad bytes. */
473 UNIV_MEM_ASSERT_RW(src, size);468 UNIV_MEM_ASSERT_RW(src, size);
474 #endif469 #endif
@@ -500,7 +495,7 @@
500 }495 }
501 496
502 return(FALSE);497 return(FALSE);
503@@ -522,13 +617,15 @@498@@ -522,13 +618,15 @@
504 /*===============*/499 /*===============*/
505 void* buf, /*!< in: block to be freed, must not be500 void* buf, /*!< in: block to be freed, must not be
506 pointed to by the buffer pool */501 pointed to by the buffer pool */
@@ -518,7 +513,7 @@
518 ut_ad(!mutex_own(&buf_pool_zip_mutex));513 ut_ad(!mutex_own(&buf_pool_zip_mutex));
519 ut_ad(i <= BUF_BUDDY_SIZES);514 ut_ad(i <= BUF_BUDDY_SIZES);
520 ut_ad(buf_buddy_stat[i].used > 0);515 ut_ad(buf_buddy_stat[i].used > 0);
521@@ -539,7 +636,9 @@516@@ -539,7 +637,9 @@
522 ut_d(((buf_page_t*) buf)->state = BUF_BLOCK_ZIP_FREE);517 ut_d(((buf_page_t*) buf)->state = BUF_BLOCK_ZIP_FREE);
523 518
524 if (i == BUF_BUDDY_SIZES) {519 if (i == BUF_BUDDY_SIZES) {
@@ -529,7 +524,7 @@
529 return;524 return;
530 }525 }
531 526
532@@ -584,7 +683,7 @@527@@ -584,7 +684,7 @@
533 ut_a(bpage != buf);528 ut_a(bpage != buf);
534 529
535 {530 {
@@ -538,7 +533,7 @@
538 UNIV_MEM_ASSERT_AND_FREE(bpage, BUF_BUDDY_LOW << i);533 UNIV_MEM_ASSERT_AND_FREE(bpage, BUF_BUDDY_LOW << i);
539 bpage = next;534 bpage = next;
540 }535 }
541@@ -593,13 +692,13 @@536@@ -593,13 +693,13 @@
542 #ifndef UNIV_DEBUG_VALGRIND537 #ifndef UNIV_DEBUG_VALGRIND
543 buddy_nonfree:538 buddy_nonfree:
544 /* Valgrind would complain about accessing free memory. */539 /* Valgrind would complain about accessing free memory. */
@@ -554,7 +549,7 @@
554 549
555 if (bpage) {550 if (bpage) {
556 /* Remove the block from the free list, because a successful551 /* Remove the block from the free list, because a successful
557@@ -609,7 +708,7 @@552@@ -609,7 +709,7 @@
558 buf_buddy_remove_from_free(bpage, i);553 buf_buddy_remove_from_free(bpage, i);
559 554
560 /* Try to relocate the buddy of buf to the free block. */555 /* Try to relocate the buddy of buf to the free block. */
@@ -563,7 +558,7 @@
563 558
564 ut_d(buddy->state = BUF_BLOCK_ZIP_FREE);559 ut_d(buddy->state = BUF_BLOCK_ZIP_FREE);
565 goto buddy_free2;560 goto buddy_free2;
566@@ -629,14 +728,14 @@561@@ -629,14 +729,14 @@
567 562
568 (Parts of the buddy can be free in563 (Parts of the buddy can be free in
569 buf_pool->zip_free[j] with j < i.) */564 buf_pool->zip_free[j] with j < i.) */
@@ -1283,6 +1278,15 @@
1283 #if UNIV_WORD_SIZE == 41278 #if UNIV_WORD_SIZE == 4
1284 /* On 32-bit systems, there is no padding in buf_page_t. On1279 /* On 32-bit systems, there is no padding in buf_page_t. On
1285 other systems, Valgrind could complain about uninitialized pad1280 other systems, Valgrind could complain about uninitialized pad
1281@@ -2283,7 +2395,7 @@
1282 /* Try to evict the block from the buffer pool, to use the
1283 insert buffer as much as possible. */
1284
1285- if (buf_LRU_free_block(&block->page, TRUE, NULL)
1286+ if (buf_LRU_free_block(&block->page, TRUE, NULL, FALSE)
1287 == BUF_LRU_FREED) {
1288 buf_pool_mutex_exit();
1289 mutex_exit(&block->mutex);
1286@@ -2305,13 +2417,14 @@1290@@ -2305,13 +2417,14 @@
1287 1291
1288 buf_block_buf_fix_inc(block, file, line);1292 buf_block_buf_fix_inc(block, file, line);
@@ -3803,7 +3807,15 @@
3803 3807
3804 return(bpage != NULL);3808 return(bpage != NULL);
3805 }3809 }
3806@@ -1038,11 +1076,14 @@3810@@ -1031,18 +1069,21 @@
3811 buf_block_t* block, /*!< in: buffer block */
3812 ulint rw_latch, /*!< in: RW_S_LATCH, RW_X_LATCH,
3813 RW_NO_LATCH */
3814- mtr_t* mtr) /*!< in: mtr */
3815+ mtr_t* mtr __attribute__((unused))) /*!< in: mtr */
3816 {
3817 ut_ad(block);
3818
3807 ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);3819 ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
3808 ut_a(block->page.buf_fix_count > 0);3820 ut_a(block->page.buf_fix_count > 0);
3809 3821
@@ -3975,7 +3987,15 @@
3975diff -ruN a/storage/innodb_plugin/mtr/mtr0mtr.c b/storage/innodb_plugin/mtr/mtr0mtr.c3987diff -ruN a/storage/innodb_plugin/mtr/mtr0mtr.c b/storage/innodb_plugin/mtr/mtr0mtr.c
3976--- a/storage/innodb_plugin/mtr/mtr0mtr.c 2010-08-04 02:24:20.000000000 +09003988--- a/storage/innodb_plugin/mtr/mtr0mtr.c 2010-08-04 02:24:20.000000000 +0900
3977+++ b/storage/innodb_plugin/mtr/mtr0mtr.c 2010-08-27 16:11:40.631020912 +09003989+++ b/storage/innodb_plugin/mtr/mtr0mtr.c 2010-08-27 16:11:40.631020912 +0900
3978@@ -105,6 +105,38 @@3990@@ -33,6 +33,7 @@
3991 #include "page0types.h"
3992 #include "mtr0log.h"
3993 #include "log0log.h"
3994+#include "buf0flu.h"
3995
3996 #ifndef UNIV_HOTBACKUP
3997 # include "log0recv.h"
3998@@ -105,6 +106,38 @@
3979 }3999 }
3980 }4000 }
3981 4001
@@ -4014,7 +4034,7 @@
4014 /************************************************************//**4034 /************************************************************//**
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. */
4016 static4036 static
4017@@ -188,6 +220,8 @@4037@@ -188,6 +221,8 @@
4018 4038
4019 if (write_log) {4039 if (write_log) {
4020 mtr_log_reserve_and_write(mtr);4040 mtr_log_reserve_and_write(mtr);
@@ -4023,7 +4043,7 @@
4023 }4043 }
4024 4044
4025 /* We first update the modification info to buffer pages, and only4045 /* We first update the modification info to buffer pages, and only
4026@@ -198,11 +232,13 @@4046@@ -198,11 +233,13 @@
4027 required when we insert modified buffer pages in to the flush list4047 required when we insert modified buffer pages in to the flush list
4028 which must be sorted on oldest_modification. */4048 which must be sorted on oldest_modification. */
4029 4049
@@ -4039,7 +4059,7 @@
4039 #endif /* !UNIV_HOTBACKUP */4059 #endif /* !UNIV_HOTBACKUP */
4040 4060
4041 ut_d(mtr->state = MTR_COMMITTED);4061 ut_d(mtr->state = MTR_COMMITTED);
4042@@ -273,6 +309,12 @@4062@@ -273,6 +310,12 @@
4043 slot = dyn_array_get_element(memo, offset);4063 slot = dyn_array_get_element(memo, offset);
4044 4064
4045 if ((object == slot->object) && (type == slot->type)) {4065 if ((object == slot->object) && (type == slot->type)) {
@@ -4055,7 +4075,7 @@
4055diff -ruN a/storage/innodb_plugin/srv/srv0srv.c b/storage/innodb_plugin/srv/srv0srv.c4075diff -ruN a/storage/innodb_plugin/srv/srv0srv.c b/storage/innodb_plugin/srv/srv0srv.c
4056--- a/storage/innodb_plugin/srv/srv0srv.c 2010-08-27 16:11:12.194989878 +09004076--- a/storage/innodb_plugin/srv/srv0srv.c 2010-08-27 16:11:12.194989878 +0900
4057+++ b/storage/innodb_plugin/srv/srv0srv.c 2010-08-27 16:11:40.634022489 +09004077+++ b/storage/innodb_plugin/srv/srv0srv.c 2010-08-27 16:11:40.634022489 +0900
4058@@ -2852,7 +2852,7 @@4078@@ -2855,7 +2855,7 @@
4059 4079
4060 mutex_exit(&(log_sys->mutex));4080 mutex_exit(&(log_sys->mutex));
4061 4081
@@ -4064,7 +4084,7 @@
4064 4084
4065 level = 0;4085 level = 0;
4066 bpage = UT_LIST_GET_FIRST(buf_pool->flush_list);4086 bpage = UT_LIST_GET_FIRST(buf_pool->flush_list);
4067@@ -2874,7 +2874,7 @@4087@@ -2877,7 +2877,7 @@
4068 bpl = 0;4088 bpl = 0;
4069 }4089 }
4070 4090
40714091
=== modified file 'innodb_stats.patch'
--- innodb_stats.patch 2010-12-16 11:35:26 +0000
+++ innodb_stats.patch 2011-02-02 15:07:48 +0000
@@ -1134,7 +1134,7 @@
1134 table->status = 0;1134 table->status = 0;
1135+#ifdef EXTENDED_FOR_USERSTAT1135+#ifdef EXTENDED_FOR_USERSTAT
1136+ rows_read++;1136+ rows_read++;
1137+ if (active_index >= 0 && active_index < MAX_KEY)1137+ if (active_index < MAX_KEY)
1138+ index_rows_read[active_index]++;1138+ index_rows_read[active_index]++;
1139+#endif1139+#endif
1140 break;1140 break;
11411141
=== modified file 'profiling_slow.patch'
--- profiling_slow.patch 2011-01-10 13:38:39 +0000
+++ profiling_slow.patch 2011-02-02 15:07:48 +0000
@@ -273,7 +273,7 @@
273+ my_b_printf(log_file, "# ");273+ my_b_printf(log_file, "# ");
274+274+
275+ void *entry_iterator;275+ void *entry_iterator;
276+ PROF_MEASUREMENT *entry, *previous= NULL, *first= NULL;276+ PROF_MEASUREMENT *entry= NULL, *previous= NULL, *first= NULL;
277+ /* ...and for each query, go through all its state-change steps. */277+ /* ...and for each query, go through all its state-change steps. */
278+ for (entry_iterator= query->entries.new_iterator();278+ for (entry_iterator= query->entries.new_iterator();
279+ entry_iterator != NULL;279+ entry_iterator != NULL;
280280
=== modified file 'userstat.patch'
--- userstat.patch 2011-01-10 13:38:39 +0000
+++ userstat.patch 2011-02-02 15:07:48 +0000
@@ -1923,7 +1923,7 @@
1923 my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), command);1923 my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), command);
1924 return 1;1924 return 1;
1925 #else1925 #else
1926@@ -6072,6 +6105,30 @@1926@@ -6072,6 +6105,32 @@
1927 lex_start(thd);1927 lex_start(thd);
1928 mysql_reset_thd_for_next_command(thd);1928 mysql_reset_thd_for_next_command(thd);
1929 1929
@@ -1934,7 +1934,9 @@
1934+ double end_usecs = 0;1934+ double end_usecs = 0;
1935+ /* cpu time */1935+ /* cpu time */
1936+ int cputime_error = 0;1936+ int cputime_error = 0;
1937+#ifdef HAVE_CLOCK_GETTIME
1937+ struct timespec tp;1938+ struct timespec tp;
1939+#endif
1938+ double start_cpu_nsecs = 0;1940+ double start_cpu_nsecs = 0;
1939+ double end_cpu_nsecs = 0;1941+ double end_cpu_nsecs = 0;
1940+1942+
@@ -1954,7 +1956,7 @@
1954 if (query_cache_send_result_to_client(thd, rawbuf, length) <= 0)1956 if (query_cache_send_result_to_client(thd, rawbuf, length) <= 0)
1955 {1957 {
1956 LEX *lex= thd->lex;1958 LEX *lex= thd->lex;
1957@@ -6152,6 +6209,43 @@1959@@ -6152,6 +6211,43 @@
1958 *found_semicolon= NULL;1960 *found_semicolon= NULL;
1959 }1961 }
1960 1962
@@ -1998,7 +2000,7 @@
1998 DBUG_VOID_RETURN;2000 DBUG_VOID_RETURN;
1999 }2001 }
2000 2002
2001@@ -7017,6 +7111,13 @@2003@@ -7017,6 +7113,13 @@
2002 if (flush_error_log())2004 if (flush_error_log())
2003 result=1;2005 result=1;
2004 }2006 }
@@ -2012,7 +2014,7 @@
2012 #ifdef HAVE_QUERY_CACHE2014 #ifdef HAVE_QUERY_CACHE
2013 if (options & REFRESH_QUERY_CACHE_FREE)2015 if (options & REFRESH_QUERY_CACHE_FREE)
2014 {2016 {
2015@@ -7117,6 +7218,40 @@2017@@ -7117,6 +7220,40 @@
2016 #endif2018 #endif
2017 if (options & REFRESH_USER_RESOURCES)2019 if (options & REFRESH_USER_RESOURCES)
2018 reset_mqh((LEX_USER *) NULL, 0); /* purecov: inspected */2020 reset_mqh((LEX_USER *) NULL, 0); /* purecov: inspected */
@@ -2066,7 +2068,7 @@
2066 /**2068 /**
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.
2068 */2070 */
2069@@ -2103,8 +2106,32 @@2071@@ -2103,8 +2106,34 @@
2070 /* First of all clear possible warnings from the previous command */2072 /* First of all clear possible warnings from the previous command */
2071 mysql_reset_thd_for_next_command(thd);2073 mysql_reset_thd_for_next_command(thd);
2072 2074
@@ -2077,7 +2079,9 @@
2077+ double end_usecs = 0;2079+ double end_usecs = 0;
2078+ /* cpu time */2080+ /* cpu time */
2079+ int cputime_error = 0;2081+ int cputime_error = 0;
2082+#ifdef HAVE_CLOCK_GETTIME
2080+ struct timespec tp;2083+ struct timespec tp;
2084+#endif
2081+ double start_cpu_nsecs = 0;2085+ double start_cpu_nsecs = 0;
2082+ double end_cpu_nsecs = 0;2086+ double end_cpu_nsecs = 0;
2083+2087+
@@ -2100,7 +2104,7 @@
2100 2104
2101 if (thd->stmt_map.insert(thd, stmt))2105 if (thd->stmt_map.insert(thd, stmt))
2102 {2106 {
2103@@ -2112,7 +2139,7 @@2107@@ -2112,7 +2141,7 @@
2104 The error is set in the insert. The statement itself2108 The error is set in the insert. The statement itself
2105 will be also deleted there (this is how the hash works).2109 will be also deleted there (this is how the hash works).
2106 */2110 */
@@ -2109,7 +2113,7 @@
2109 }2113 }
2110 2114
2111 /* Reset warnings from previous command */2115 /* Reset warnings from previous command */
2112@@ -2139,6 +2166,44 @@2116@@ -2139,6 +2168,44 @@
2113 thd->protocol= save_protocol;2117 thd->protocol= save_protocol;
2114 2118
2115 /* check_prepared_statemnt sends the metadata packet in case of success */2119 /* check_prepared_statemnt sends the metadata packet in case of success */
@@ -2154,7 +2158,7 @@
2154 DBUG_VOID_RETURN;2158 DBUG_VOID_RETURN;
2155 }2159 }
2156 2160
2157@@ -2489,12 +2554,36 @@2161@@ -2489,12 +2556,38 @@
2158 /* First of all clear possible warnings from the previous command */2162 /* First of all clear possible warnings from the previous command */
2159 mysql_reset_thd_for_next_command(thd);2163 mysql_reset_thd_for_next_command(thd);
2160 2164
@@ -2165,7 +2169,9 @@
2165+ double end_usecs = 0;2169+ double end_usecs = 0;
2166+ /* cpu time */2170+ /* cpu time */
2167+ int cputime_error = 0;2171+ int cputime_error = 0;
2172+#ifdef HAVE_CLOCK_GETTIME
2168+ struct timespec tp;2173+ struct timespec tp;
2174+#endif
2169+ double start_cpu_nsecs = 0;2175+ double start_cpu_nsecs = 0;
2170+ double end_cpu_nsecs = 0;2176+ double end_cpu_nsecs = 0;
2171+2177+
@@ -2192,7 +2198,7 @@
2192 }2198 }
2193 2199
2194 #if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)2200 #if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
2195@@ -2515,6 +2604,44 @@2201@@ -2515,6 +2608,44 @@
2196 /* Close connection socket; for use with client testing (Bug#43560). */2202 /* Close connection socket; for use with client testing (Bug#43560). */
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););
2198 2204
@@ -2237,7 +2243,7 @@
2237 DBUG_VOID_RETURN;2243 DBUG_VOID_RETURN;
2238 2244
2239 }2245 }
2240@@ -2588,20 +2715,45 @@2246@@ -2588,20 +2719,47 @@
2241 2247
2242 /* First of all clear possible warnings from the previous command */2248 /* First of all clear possible warnings from the previous command */
2243 mysql_reset_thd_for_next_command(thd);2249 mysql_reset_thd_for_next_command(thd);
@@ -2249,7 +2255,9 @@
2249+ double end_usecs = 0;2255+ double end_usecs = 0;
2250+ /* cpu time */2256+ /* cpu time */
2251+ int cputime_error = 0;2257+ int cputime_error = 0;
2258+#ifdef HAVE_CLOCK_GETTIME
2252+ struct timespec tp;2259+ struct timespec tp;
2260+#endif
2253+ double start_cpu_nsecs = 0;2261+ double start_cpu_nsecs = 0;
2254+ double end_cpu_nsecs = 0;2262+ double end_cpu_nsecs = 0;
2255+2263+
@@ -2285,7 +2293,7 @@
2285 }2293 }
2286 2294
2287 thd->stmt_arena= stmt;2295 thd->stmt_arena= stmt;
2288@@ -2625,6 +2777,44 @@2296@@ -2625,6 +2783,44 @@
2289 thd->restore_backup_statement(stmt, &stmt_backup);2297 thd->restore_backup_statement(stmt, &stmt_backup);
2290 thd->stmt_arena= thd;2298 thd->stmt_arena= thd;
2291 2299
@@ -2330,7 +2338,7 @@
2330 DBUG_VOID_RETURN;2338 DBUG_VOID_RETURN;
2331 }2339 }
2332 2340
2333@@ -2655,13 +2845,37 @@2341@@ -2655,13 +2851,39 @@
2334 /* First of all clear possible warnings from the previous command */2342 /* First of all clear possible warnings from the previous command */
2335 mysql_reset_thd_for_next_command(thd);2343 mysql_reset_thd_for_next_command(thd);
2336 2344
@@ -2341,7 +2349,9 @@
2341+ double end_usecs = 0;2349+ double end_usecs = 0;
2342+ /* cpu time */2350+ /* cpu time */
2343+ int cputime_error = 0;2351+ int cputime_error = 0;
2352+#ifdef HAVE_CLOCK_GETTIME
2344+ struct timespec tp;2353+ struct timespec tp;
2354+#endif
2345+ double start_cpu_nsecs = 0;2355+ double start_cpu_nsecs = 0;
2346+ double end_cpu_nsecs = 0;2356+ double end_cpu_nsecs = 0;
2347+2357+
@@ -2369,7 +2379,7 @@
2369 }2379 }
2370 2380
2371 stmt->close_cursor();2381 stmt->close_cursor();
2372@@ -2678,6 +2892,44 @@2382@@ -2678,6 +2900,44 @@
2373 2383
2374 my_ok(thd);2384 my_ok(thd);
2375 2385

Subscribers

People subscribed via source and target branches

to all changes: