Merge lp:~stewart/percona-server/5.5.13-merge into lp:percona-server/5.5
- 5.5.13-merge
- Merge into 5.5
Proposed by
Stewart Smith
Status: | Merged | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Stewart Smith | ||||||||||||||||
Approved revision: | no longer in the source branch. | ||||||||||||||||
Merged at revision: | 122 | ||||||||||||||||
Proposed branch: | lp:~stewart/percona-server/5.5.13-merge | ||||||||||||||||
Merge into: | lp:percona-server/5.5 | ||||||||||||||||
Diff against target: |
11671 lines (+7079/-693) 63 files modified
Makefile (+2/-2) control_online_alter_index.patch (+1/-1) innodb_adaptive_hash_index_partitions.patch (+45/-27) innodb_admin_command_base.patch (+1/-1) innodb_buffer_pool_pages_i_s.patch (+3/-3) innodb_buffer_pool_shm.patch (+7/-7) innodb_deadlock_count.patch (+3/-3) innodb_dict_size_limit.patch (+10/-10) innodb_expand_import.patch (+597/-87) innodb_extend_slow.patch (+35/-34) innodb_extra_rseg.patch (+1/-1) innodb_fake_changes.patch (+614/-0) innodb_fast_checksum.patch (+33/-46) innodb_files_extend.patch (+15/-24) innodb_fix_misc.patch (+39/-39) innodb_io_patches.patch (+39/-38) innodb_lru_dump_restore.patch (+8/-8) innodb_overwrite_relay_log_info.patch (+17/-18) innodb_pass_corrupt_table.patch (+106/-100) innodb_recovery_patches.patch (+10/-10) innodb_separate_doublewrite.patch (+34/-34) innodb_show_lock_name.patch (+6/-6) innodb_show_status.patch (+15/-15) innodb_show_status_extend.patch (+8/-8) innodb_show_sys_tables.patch (+1/-1) innodb_split_buf_pool_mutex.patch (+37/-26) innodb_stats.patch (+31/-25) innodb_thread_concurrency_timer_based.patch (+7/-7) install_tests.sh.THIS (+35/-0) log_connection_error.patch (+3/-3) log_warnings_suppress.patch (+3/-3) memory_dynamic_rows.patch (+2865/-0) microsec_process.patch (+1/-1) mysql-test/memory_dynamic_rows.patch/percona_heap_blob.result (+952/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_blob.test.disabled (+642/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_bug783366.result (+14/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_bug783366.test.disabled (+19/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_bug783451.result (+132/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_bug783451.test.disabled (+16/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_bug784464.result (+70/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_bug784464.test.disabled (+67/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_bug784468.result (+15/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_bug784468.test.disabled (+16/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_bug788544.result (+9/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_bug788544.test.disabled (+15/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_bug788576.result (+19/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_bug788576.test.disabled (+19/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_bug788722.result (+18/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_bug788722.test.disabled (+20/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_bug789131.result (+7/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_bug789131.test.disabled (+14/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_var.result (+194/-0) mysql-test/memory_dynamic_rows.patch/percona_heap_var.test.disabled (+84/-0) normalize_patches.sh (+1/-1) optimizer_fix.patch (+2/-2) processlist_row_stats.patch (+2/-2) query_cache_enhance.patch (+2/-2) response_time_distribution.patch (+8/-8) show_slave_status_nolock.patch (+1/-1) show_temp.patch (+6/-6) slow_extended.patch (+17/-17) sql_no_fcache.patch (+8/-8) userstat.patch (+58/-58) |
||||||||||||||||
To merge this branch: | bzr merge lp:~stewart/percona-server/5.5.13-merge | ||||||||||||||||
Related bugs: |
|
||||||||||||||||
Related blueprints: |
Update to MySQL 5.5.13 base
(Essential)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Oleg Tsarev (community) | dev | Needs Fixing | |
Percona developers | Pending | ||
Review via email: mp+65167@code.launchpad.net |
Commit message
Description of the change
Merge of Yasufumi and Oleg merging patches to MySQL 5.5.13 base. Only patches that already in 5.5.12
http://
passes as well as lp:percona-server does (better really)
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Makefile' | |||
2 | --- Makefile 2011-05-18 00:03:53 +0000 | |||
3 | +++ Makefile 2011-06-20 09:04:39 +0000 | |||
4 | @@ -1,7 +1,7 @@ | |||
5 | 1 | FETCH_CMD=wget | 1 | FETCH_CMD=wget |
6 | 2 | MASTER_SITE=http://www.percona.com/downloads/community | 2 | MASTER_SITE=http://www.percona.com/downloads/community |
9 | 3 | MYSQL_VERSION=5.5.12 | 3 | MYSQL_VERSION=5.5.13 |
10 | 4 | PERCONA_SERVER_VERSION=rel20.3 | 4 | PERCONA_SERVER_VERSION=rel20.4 |
11 | 5 | PERCONA_SERVER ?=Percona-Server-$(MYSQL_VERSION)-$(PERCONA_SERVER_VERSION) | 5 | PERCONA_SERVER ?=Percona-Server-$(MYSQL_VERSION)-$(PERCONA_SERVER_VERSION) |
12 | 6 | DEBUG_DIR ?= $(PERCONA_SERVER)-debug | 6 | DEBUG_DIR ?= $(PERCONA_SERVER)-debug |
13 | 7 | RELEASE_DIR ?= $(PERCONA_SERVER)-release | 7 | RELEASE_DIR ?= $(PERCONA_SERVER)-release |
14 | 8 | 8 | ||
15 | === modified file 'control_online_alter_index.patch' | |||
16 | --- control_online_alter_index.patch 2011-05-10 11:57:42 +0000 | |||
17 | +++ control_online_alter_index.patch 2011-06-20 09:04:39 +0000 | |||
18 | @@ -8,7 +8,7 @@ | |||
19 | 8 | diff -ruN a/sql/handler.h b/sql/handler.h | 8 | diff -ruN a/sql/handler.h b/sql/handler.h |
20 | 9 | --- a/sql/handler.h 2010-11-03 07:01:14.000000000 +0900 | 9 | --- a/sql/handler.h 2010-11-03 07:01:14.000000000 +0900 |
21 | 10 | +++ b/sql/handler.h 2010-12-03 13:51:04.727293058 +0900 | 10 | +++ b/sql/handler.h 2010-12-03 13:51:04.727293058 +0900 |
23 | 11 | @@ -203,6 +203,8 @@ | 11 | @@ -205,6 +205,8 @@ |
24 | 12 | #define HA_INPLACE_DROP_UNIQUE_INDEX_NO_WRITE (1L << 9) | 12 | #define HA_INPLACE_DROP_UNIQUE_INDEX_NO_WRITE (1L << 9) |
25 | 13 | #define HA_INPLACE_ADD_PK_INDEX_NO_WRITE (1L << 10) | 13 | #define HA_INPLACE_ADD_PK_INDEX_NO_WRITE (1L << 10) |
26 | 14 | #define HA_INPLACE_DROP_PK_INDEX_NO_WRITE (1L << 11) | 14 | #define HA_INPLACE_DROP_PK_INDEX_NO_WRITE (1L << 11) |
27 | 15 | 15 | ||
28 | === modified file 'innodb_adaptive_hash_index_partitions.patch' | |||
29 | --- innodb_adaptive_hash_index_partitions.patch 2011-06-03 13:00:05 +0000 | |||
30 | +++ innodb_adaptive_hash_index_partitions.patch 2011-06-20 09:04:39 +0000 | |||
31 | @@ -516,7 +516,7 @@ | |||
32 | 516 | + } | 516 | + } |
33 | 517 | + if (UNIV_LIKELY(!block->is_hashed)) { | 517 | + if (UNIV_LIKELY(!block->is_hashed)) { |
34 | 518 | + rw_lock_s_unlock(btr_search_latch); | 518 | + rw_lock_s_unlock(btr_search_latch); |
36 | 519 | + return; | 519 | + goto retry; |
37 | 520 | + } | 520 | + } |
38 | 521 | + index = block->index; | 521 | + index = block->index; |
39 | 522 | + ut_a(btr_search_latch == btr_search_get_latch(index->id)); | 522 | + ut_a(btr_search_latch == btr_search_get_latch(index->id)); |
40 | @@ -1008,7 +1008,7 @@ | |||
41 | 1008 | #endif /* UNIV_SYNC_DEBUG */ | 1008 | #endif /* UNIV_SYNC_DEBUG */ |
42 | 1009 | ut_ad(!btr_search_enabled); | 1009 | ut_ad(!btr_search_enabled); |
43 | 1010 | 1010 | ||
45 | 1011 | @@ -2633,6 +2638,7 @@ | 1011 | @@ -2632,6 +2637,7 @@ |
46 | 1012 | { | 1012 | { |
47 | 1013 | block->check_index_page_at_flush = FALSE; | 1013 | block->check_index_page_at_flush = FALSE; |
48 | 1014 | block->index = NULL; | 1014 | block->index = NULL; |
49 | @@ -1019,7 +1019,7 @@ | |||
50 | 1019 | diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c | 1019 | diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c |
51 | 1020 | --- a/storage/innobase/buf/buf0lru.c 2010-12-04 15:35:29.137347521 +0900 | 1020 | --- a/storage/innobase/buf/buf0lru.c 2010-12-04 15:35:29.137347521 +0900 |
52 | 1021 | +++ b/storage/innobase/buf/buf0lru.c 2010-12-04 16:12:48.658550840 +0900 | 1021 | +++ b/storage/innobase/buf/buf0lru.c 2010-12-04 16:12:48.658550840 +0900 |
54 | 1022 | @@ -1796,7 +1796,7 @@ | 1022 | @@ -1798,7 +1798,7 @@ |
55 | 1023 | 1023 | ||
56 | 1024 | UNIV_MEM_VALID(((buf_block_t*) bpage)->frame, | 1024 | UNIV_MEM_VALID(((buf_block_t*) bpage)->frame, |
57 | 1025 | UNIV_PAGE_SIZE); | 1025 | UNIV_PAGE_SIZE); |
58 | @@ -1031,7 +1031,7 @@ | |||
59 | 1031 | diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c | 1031 | diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c |
60 | 1032 | --- a/storage/innobase/dict/dict0dict.c 2010-12-04 15:52:23.398513916 +0900 | 1032 | --- a/storage/innobase/dict/dict0dict.c 2010-12-04 15:52:23.398513916 +0900 |
61 | 1033 | +++ b/storage/innobase/dict/dict0dict.c 2010-12-04 16:12:48.662550715 +0900 | 1033 | +++ b/storage/innobase/dict/dict0dict.c 2010-12-04 16:12:48.662550715 +0900 |
63 | 1034 | @@ -1812,7 +1812,7 @@ | 1034 | @@ -1811,7 +1811,7 @@ |
64 | 1035 | zero. */ | 1035 | zero. */ |
65 | 1036 | 1036 | ||
66 | 1037 | for (;;) { | 1037 | for (;;) { |
67 | @@ -1056,19 +1056,19 @@ | |||
68 | 1056 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc | 1056 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc |
69 | 1057 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-04 16:12:20.185850734 +0900 | 1057 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-04 16:12:20.185850734 +0900 |
70 | 1058 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-04 16:12:48.674552412 +0900 | 1058 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-04 16:12:48.674552412 +0900 |
72 | 1059 | @@ -11695,6 +11695,11 @@ | 1059 | @@ -11702,6 +11702,11 @@ |
73 | 1060 | "Disable with --skip-innodb-adaptive-hash-index.", | 1060 | "Disable with --skip-innodb-adaptive-hash-index.", |
74 | 1061 | NULL, innodb_adaptive_hash_index_update, TRUE); | 1061 | NULL, innodb_adaptive_hash_index_update, TRUE); |
75 | 1062 | 1062 | ||
76 | 1063 | +static MYSQL_SYSVAR_ULONG(adaptive_hash_index_partitions, btr_search_index_num, | 1063 | +static MYSQL_SYSVAR_ULONG(adaptive_hash_index_partitions, btr_search_index_num, |
77 | 1064 | + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, | 1064 | + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
78 | 1065 | + "Number of InnoDB adaptive hash index partitions (default 1: disable partitioning)", | 1065 | + "Number of InnoDB adaptive hash index partitions (default 1: disable partitioning)", |
80 | 1066 | + NULL, NULL, 1, 1, 32, 0); | 1066 | + NULL, NULL, 1, 1, sizeof(ulint) * 8, 0); |
81 | 1067 | + | 1067 | + |
82 | 1068 | static MYSQL_SYSVAR_ULONG(replication_delay, srv_replication_delay, | 1068 | static MYSQL_SYSVAR_ULONG(replication_delay, srv_replication_delay, |
83 | 1069 | PLUGIN_VAR_RQCMDARG, | 1069 | PLUGIN_VAR_RQCMDARG, |
84 | 1070 | "Replication thread delay (ms) on the slave server if " | 1070 | "Replication thread delay (ms) on the slave server if " |
86 | 1071 | @@ -12060,6 +12065,7 @@ | 1071 | @@ -12068,6 +12073,7 @@ |
87 | 1072 | MYSQL_SYSVAR(use_sys_stats_table), | 1072 | MYSQL_SYSVAR(use_sys_stats_table), |
88 | 1073 | MYSQL_SYSVAR(stats_sample_pages), | 1073 | MYSQL_SYSVAR(stats_sample_pages), |
89 | 1074 | MYSQL_SYSVAR(adaptive_hash_index), | 1074 | MYSQL_SYSVAR(adaptive_hash_index), |
90 | @@ -1264,7 +1264,7 @@ | |||
91 | 1264 | diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h | 1264 | diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h |
92 | 1265 | --- a/storage/innobase/include/buf0buf.h 2010-12-15 19:00:07.713604580 +0900 | 1265 | --- a/storage/innobase/include/buf0buf.h 2010-12-15 19:00:07.713604580 +0900 |
93 | 1266 | +++ b/storage/innobase/include/buf0buf.h 2010-12-15 20:58:03.546839883 +0900 | 1266 | +++ b/storage/innobase/include/buf0buf.h 2010-12-15 20:58:03.546839883 +0900 |
95 | 1267 | @@ -1547,7 +1547,7 @@ | 1267 | @@ -1546,7 +1546,7 @@ |
96 | 1268 | pointers in the adaptive hash index | 1268 | pointers in the adaptive hash index |
97 | 1269 | pointing to this frame */ | 1269 | pointing to this frame */ |
98 | 1270 | #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ | 1270 | #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ |
99 | @@ -1273,7 +1273,7 @@ | |||
100 | 1273 | already been built on this | 1273 | already been built on this |
101 | 1274 | page; note that it does not | 1274 | page; note that it does not |
102 | 1275 | guarantee that the index is | 1275 | guarantee that the index is |
104 | 1276 | @@ -1561,6 +1561,7 @@ | 1276 | @@ -1560,6 +1560,7 @@ |
105 | 1277 | unsigned curr_left_side:1;/*!< TRUE or FALSE in hash indexing */ | 1277 | unsigned curr_left_side:1;/*!< TRUE or FALSE in hash indexing */ |
106 | 1278 | dict_index_t* index; /*!< Index for which the adaptive | 1278 | dict_index_t* index; /*!< Index for which the adaptive |
107 | 1279 | hash index has been created. */ | 1279 | hash index has been created. */ |
108 | @@ -1389,7 +1389,7 @@ | |||
109 | 1389 | #ifdef UNIV_SEARCH_DEBUG | 1389 | #ifdef UNIV_SEARCH_DEBUG |
110 | 1390 | ulint cnt = 0; | 1390 | ulint cnt = 0; |
111 | 1391 | #endif /* UNIV_SEARCH_DEBUG */ | 1391 | #endif /* UNIV_SEARCH_DEBUG */ |
113 | 1392 | @@ -3441,18 +3443,32 @@ | 1392 | @@ -3446,18 +3448,33 @@ |
114 | 1393 | /* PHASE 0: Release a possible s-latch we are holding on the | 1393 | /* PHASE 0: Release a possible s-latch we are holding on the |
115 | 1394 | adaptive hash index latch if there is someone waiting behind */ | 1394 | adaptive hash index latch if there is someone waiting behind */ |
116 | 1395 | 1395 | ||
117 | @@ -1397,9 +1397,9 @@ | |||
118 | 1397 | - && trx->has_search_latch) { | 1397 | - && trx->has_search_latch) { |
119 | 1398 | + should_release = 0; | 1398 | + should_release = 0; |
120 | 1399 | + for (i = 0; i < btr_search_index_num; i++) { | 1399 | + for (i = 0; i < btr_search_index_num; i++) { |
124 | 1400 | + if ((trx->has_search_latch & ((ulint)1 << i)) | 1400 | + /* we should check all latches (fix Bug#791030) */ |
125 | 1401 | + && rw_lock_get_writer(btr_search_latch_part[i]) | 1401 | + if (rw_lock_get_writer(btr_search_latch_part[i]) |
126 | 1402 | + != RW_LOCK_NOT_LOCKED) { | 1402 | + != RW_LOCK_NOT_LOCKED) { |
127 | 1403 | + should_release |= ((ulint)1 << i); | 1403 | + should_release |= ((ulint)1 << i); |
128 | 1404 | + } | 1404 | + } |
129 | 1405 | + } | 1405 | + } |
130 | @@ -1414,9 +1414,10 @@ | |||
131 | 1414 | - rw_lock_s_unlock(&btr_search_latch); | 1414 | - rw_lock_s_unlock(&btr_search_latch); |
132 | 1415 | - trx->has_search_latch = FALSE; | 1415 | - trx->has_search_latch = FALSE; |
133 | 1416 | + for (i = 0; i < btr_search_index_num; i++) { | 1416 | + for (i = 0; i < btr_search_index_num; i++) { |
135 | 1417 | + if (should_release & ((ulint)1 << i)) { | 1417 | + /* we should release all s-latches (fix Bug#791030) */ |
136 | 1418 | + if (trx->has_search_latch & ((ulint)1 << i)) { | ||
137 | 1418 | + rw_lock_s_unlock(btr_search_latch_part[i]); | 1419 | + rw_lock_s_unlock(btr_search_latch_part[i]); |
139 | 1419 | + trx->has_search_latch &= ~((ulint)1 << i); | 1420 | + trx->has_search_latch &= (~((ulint)1 << i)); |
140 | 1420 | + } | 1421 | + } |
141 | 1421 | + } | 1422 | + } |
142 | 1422 | 1423 | ||
143 | @@ -1426,7 +1427,7 @@ | |||
144 | 1426 | } | 1427 | } |
145 | 1427 | 1428 | ||
146 | 1428 | /* Reset the new record lock info if srv_locks_unsafe_for_binlog | 1429 | /* Reset the new record lock info if srv_locks_unsafe_for_binlog |
148 | 1429 | @@ -3603,9 +3619,11 @@ | 1430 | @@ -3608,9 +3625,28 @@ |
149 | 1430 | hash index semaphore! */ | 1431 | hash index semaphore! */ |
150 | 1431 | 1432 | ||
151 | 1432 | #ifndef UNIV_SEARCH_DEBUG | 1433 | #ifndef UNIV_SEARCH_DEBUG |
152 | @@ -1435,13 +1436,30 @@ | |||
153 | 1435 | - trx->has_search_latch = TRUE; | 1436 | - trx->has_search_latch = TRUE; |
154 | 1436 | + if (!(trx->has_search_latch | 1437 | + if (!(trx->has_search_latch |
155 | 1437 | + & ((ulint)1 << (index->id % btr_search_index_num)))) { | 1438 | + & ((ulint)1 << (index->id % btr_search_index_num)))) { |
159 | 1438 | + rw_lock_s_lock(btr_search_get_latch(index->id)); | 1439 | + if (trx->has_search_latch |
160 | 1439 | + trx->has_search_latch |= | 1440 | + < ((ulint)1 << (index->id % btr_search_index_num))) { |
161 | 1440 | + (ulint)1 << (index->id % btr_search_index_num); | 1441 | + rw_lock_s_lock(btr_search_get_latch(index->id)); |
162 | 1442 | + trx->has_search_latch |= | ||
163 | 1443 | + ((ulint)1 << (index->id % btr_search_index_num)); | ||
164 | 1444 | + } else { | ||
165 | 1445 | + /* should re-lock to obay latch-order */ | ||
166 | 1446 | + for (i = 0; i < btr_search_index_num; i++) { | ||
167 | 1447 | + if (trx->has_search_latch & ((ulint)1 << i)) { | ||
168 | 1448 | + rw_lock_s_unlock(btr_search_latch_part[i]); | ||
169 | 1449 | + } | ||
170 | 1450 | + } | ||
171 | 1451 | + trx->has_search_latch |= | ||
172 | 1452 | + ((ulint)1 << (index->id % btr_search_index_num)); | ||
173 | 1453 | + for (i = 0; i < btr_search_index_num; i++) { | ||
174 | 1454 | + if (trx->has_search_latch & ((ulint)1 << i)) { | ||
175 | 1455 | + rw_lock_s_lock(btr_search_latch_part[i]); | ||
176 | 1456 | + } | ||
177 | 1457 | + } | ||
178 | 1458 | + } | ||
179 | 1441 | } | 1459 | } |
180 | 1442 | #endif | 1460 | #endif |
181 | 1443 | switch (row_sel_try_search_shortcut_for_mysql( | 1461 | switch (row_sel_try_search_shortcut_for_mysql( |
183 | 1444 | @@ -3666,7 +3684,11 @@ | 1462 | @@ -3671,7 +3707,11 @@ |
184 | 1445 | 1463 | ||
185 | 1446 | trx->search_latch_timeout--; | 1464 | trx->search_latch_timeout--; |
186 | 1447 | 1465 | ||
187 | @@ -1454,7 +1472,7 @@ | |||
188 | 1454 | trx->has_search_latch = FALSE; | 1472 | trx->has_search_latch = FALSE; |
189 | 1455 | } | 1473 | } |
190 | 1456 | 1474 | ||
192 | 1457 | @@ -3690,7 +3712,12 @@ | 1475 | @@ -3695,7 +3735,12 @@ |
193 | 1458 | /* PHASE 3: Open or restore index cursor position */ | 1476 | /* PHASE 3: Open or restore index cursor position */ |
194 | 1459 | 1477 | ||
195 | 1460 | if (trx->has_search_latch) { | 1478 | if (trx->has_search_latch) { |
196 | @@ -1471,7 +1489,7 @@ | |||
197 | 1471 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c | 1489 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c |
198 | 1472 | --- a/storage/innobase/srv/srv0srv.c 2010-12-04 16:12:20.231484679 +0900 | 1490 | --- a/storage/innobase/srv/srv0srv.c 2010-12-04 16:12:20.231484679 +0900 |
199 | 1473 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-04 16:12:48.726551018 +0900 | 1491 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-04 16:12:48.726551018 +0900 |
201 | 1474 | @@ -2035,7 +2035,9 @@ | 1492 | @@ -2045,7 +2045,9 @@ |
202 | 1475 | "-------------------------------------\n", file); | 1493 | "-------------------------------------\n", file); |
203 | 1476 | ibuf_print(file); | 1494 | ibuf_print(file); |
204 | 1477 | 1495 | ||
205 | @@ -1482,7 +1500,7 @@ | |||
206 | 1482 | 1500 | ||
207 | 1483 | fprintf(file, | 1501 | fprintf(file, |
208 | 1484 | "%.2f hash searches/s, %.2f non-hash searches/s\n", | 1502 | "%.2f hash searches/s, %.2f non-hash searches/s\n", |
210 | 1485 | @@ -2060,14 +2062,15 @@ | 1503 | @@ -2070,14 +2072,15 @@ |
211 | 1486 | ut_total_allocated_memory, | 1504 | ut_total_allocated_memory, |
212 | 1487 | mem_pool_get_reserved(mem_comm_pool)); | 1505 | mem_pool_get_reserved(mem_comm_pool)); |
213 | 1488 | /* Calcurate reserved memories */ | 1506 | /* Calcurate reserved memories */ |
214 | @@ -1502,7 +1520,7 @@ | |||
215 | 1502 | 1520 | ||
216 | 1503 | lock_sys_subtotal = 0; | 1521 | lock_sys_subtotal = 0; |
217 | 1504 | if (trx_sys) { | 1522 | if (trx_sys) { |
219 | 1505 | @@ -2093,10 +2096,10 @@ | 1523 | @@ -2103,10 +2106,10 @@ |
220 | 1506 | " Recovery system %lu \t(%lu + %lu)\n", | 1524 | " Recovery system %lu \t(%lu + %lu)\n", |
221 | 1507 | 1525 | ||
222 | 1508 | (ulong) (btr_search_sys | 1526 | (ulong) (btr_search_sys |
223 | @@ -1518,7 +1536,7 @@ | |||
224 | 1518 | diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c | 1536 | diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c |
225 | 1519 | --- a/storage/innobase/sync/sync0sync.c 2010-12-03 17:36:44.300986571 +0900 | 1537 | --- a/storage/innobase/sync/sync0sync.c 2010-12-03 17:36:44.300986571 +0900 |
226 | 1520 | +++ b/storage/innobase/sync/sync0sync.c 2010-12-04 16:12:48.729513564 +0900 | 1538 | +++ b/storage/innobase/sync/sync0sync.c 2010-12-04 16:12:48.729513564 +0900 |
228 | 1521 | @@ -1178,7 +1178,6 @@ | 1539 | @@ -1223,7 +1223,6 @@ |
229 | 1522 | case SYNC_OUTER_ANY_LATCH: | 1540 | case SYNC_OUTER_ANY_LATCH: |
230 | 1523 | case SYNC_FILE_FORMAT_TAG: | 1541 | case SYNC_FILE_FORMAT_TAG: |
231 | 1524 | case SYNC_DOUBLEWRITE: | 1542 | case SYNC_DOUBLEWRITE: |
232 | @@ -1526,7 +1544,7 @@ | |||
233 | 1526 | case SYNC_SEARCH_SYS_CONF: | 1544 | case SYNC_SEARCH_SYS_CONF: |
234 | 1527 | case SYNC_TRX_LOCK_HEAP: | 1545 | case SYNC_TRX_LOCK_HEAP: |
235 | 1528 | case SYNC_KERNEL: | 1546 | case SYNC_KERNEL: |
237 | 1529 | @@ -1199,6 +1198,7 @@ | 1547 | @@ -1244,6 +1243,7 @@ |
238 | 1530 | ut_error; | 1548 | ut_error; |
239 | 1531 | } | 1549 | } |
240 | 1532 | break; | 1550 | break; |
241 | @@ -1537,7 +1555,7 @@ | |||
242 | 1537 | diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c | 1555 | diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c |
243 | 1538 | --- a/storage/innobase/trx/trx0trx.c 2010-12-03 17:49:11.623953784 +0900 | 1556 | --- a/storage/innobase/trx/trx0trx.c 2010-12-03 17:49:11.623953784 +0900 |
244 | 1539 | +++ b/storage/innobase/trx/trx0trx.c 2010-12-04 16:12:48.731513275 +0900 | 1557 | +++ b/storage/innobase/trx/trx0trx.c 2010-12-04 16:12:48.731513275 +0900 |
246 | 1540 | @@ -266,8 +266,14 @@ | 1558 | @@ -265,8 +265,14 @@ |
247 | 1541 | /*=================================*/ | 1559 | /*=================================*/ |
248 | 1542 | trx_t* trx) /*!< in: transaction */ | 1560 | trx_t* trx) /*!< in: transaction */ |
249 | 1543 | { | 1561 | { |
250 | 1544 | 1562 | ||
251 | === modified file 'innodb_admin_command_base.patch' | |||
252 | --- innodb_admin_command_base.patch 2011-05-23 03:13:18 +0000 | |||
253 | +++ innodb_admin_command_base.patch 2011-06-20 09:04:39 +0000 | |||
254 | @@ -8,7 +8,7 @@ | |||
255 | 8 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc | 8 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc |
256 | 9 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:32:15.624039043 +0900 | 9 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:32:15.624039043 +0900 |
257 | 10 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:32:35.424957827 +0900 | 10 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:32:35.424957827 +0900 |
259 | 11 | @@ -11856,7 +11856,8 @@ | 11 | @@ -11863,7 +11863,8 @@ |
260 | 12 | i_s_innodb_sys_foreign_cols, | 12 | i_s_innodb_sys_foreign_cols, |
261 | 13 | i_s_innodb_sys_stats, | 13 | i_s_innodb_sys_stats, |
262 | 14 | i_s_innodb_table_stats, | 14 | i_s_innodb_table_stats, |
263 | 15 | 15 | ||
264 | === modified file 'innodb_buffer_pool_pages_i_s.patch' | |||
265 | --- innodb_buffer_pool_pages_i_s.patch 2011-05-23 03:13:18 +0000 | |||
266 | +++ innodb_buffer_pool_pages_i_s.patch 2011-06-20 09:04:39 +0000 | |||
267 | @@ -8,7 +8,7 @@ | |||
268 | 8 | diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c | 8 | diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c |
269 | 9 | --- a/storage/innobase/buf/buf0buf.c 2010-12-04 20:20:44.595483291 +0900 | 9 | --- a/storage/innobase/buf/buf0buf.c 2010-12-04 20:20:44.595483291 +0900 |
270 | 10 | +++ b/storage/innobase/buf/buf0buf.c 2010-12-06 19:28:04.055227506 +0900 | 10 | +++ b/storage/innobase/buf/buf0buf.c 2010-12-06 19:28:04.055227506 +0900 |
272 | 11 | @@ -4536,6 +4536,36 @@ | 11 | @@ -4537,6 +4537,36 @@ |
273 | 12 | mutex_exit(block_mutex); | 12 | mutex_exit(block_mutex); |
274 | 13 | } | 13 | } |
275 | 14 | 14 | ||
276 | @@ -48,7 +48,7 @@ | |||
277 | 48 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc | 48 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc |
278 | 49 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-04 20:20:44.614551139 +0900 | 49 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-04 20:20:44.614551139 +0900 |
279 | 50 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-06 19:23:47.622195800 +0900 | 50 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-06 19:23:47.622195800 +0900 |
281 | 51 | @@ -12140,6 +12140,9 @@ | 51 | @@ -12148,6 +12148,9 @@ |
282 | 52 | i_s_innodb_sys_stats, | 52 | i_s_innodb_sys_stats, |
283 | 53 | i_s_innodb_table_stats, | 53 | i_s_innodb_table_stats, |
284 | 54 | i_s_innodb_index_stats, | 54 | i_s_innodb_index_stats, |
285 | @@ -786,7 +786,7 @@ | |||
286 | 786 | diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h | 786 | diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h |
287 | 787 | --- a/storage/innobase/include/buf0buf.h 2010-12-04 19:46:40.197471531 +0900 | 787 | --- a/storage/innobase/include/buf0buf.h 2010-12-04 19:46:40.197471531 +0900 |
288 | 788 | +++ b/storage/innobase/include/buf0buf.h 2010-12-06 19:23:47.638195824 +0900 | 788 | +++ b/storage/innobase/include/buf0buf.h 2010-12-06 19:23:47.638195824 +0900 |
290 | 789 | @@ -1145,6 +1145,14 @@ | 789 | @@ -1144,6 +1144,14 @@ |
291 | 790 | /*===========*/ | 790 | /*===========*/ |
292 | 791 | const buf_pool_t* buf_pool) /*!< in: buffer pool */ | 791 | const buf_pool_t* buf_pool) /*!< in: buffer pool */ |
293 | 792 | __attribute__((nonnull, const)); | 792 | __attribute__((nonnull, const)); |
294 | 793 | 793 | ||
295 | === modified file 'innodb_buffer_pool_shm.patch' | |||
296 | --- innodb_buffer_pool_shm.patch 2011-05-10 11:57:42 +0000 | |||
297 | +++ innodb_buffer_pool_shm.patch 2011-06-20 09:04:39 +0000 | |||
298 | @@ -742,7 +742,7 @@ | |||
299 | 742 | 742 | ||
300 | 743 | 743 | ||
301 | 744 | static char* internal_innobase_data_file_path = NULL; | 744 | static char* internal_innobase_data_file_path = NULL; |
303 | 745 | @@ -2656,6 +2657,14 @@ | 745 | @@ -2670,6 +2671,14 @@ |
304 | 746 | srv_buf_pool_size = (ulint) innobase_buffer_pool_size; | 746 | srv_buf_pool_size = (ulint) innobase_buffer_pool_size; |
305 | 747 | srv_buf_pool_instances = (ulint) innobase_buffer_pool_instances; | 747 | srv_buf_pool_instances = (ulint) innobase_buffer_pool_instances; |
306 | 748 | 748 | ||
307 | @@ -757,7 +757,7 @@ | |||
308 | 757 | srv_mem_pool_size = (ulint) innobase_additional_mem_pool_size; | 757 | srv_mem_pool_size = (ulint) innobase_additional_mem_pool_size; |
309 | 758 | 758 | ||
310 | 759 | srv_n_file_io_threads = (ulint) innobase_file_io_threads; | 759 | srv_n_file_io_threads = (ulint) innobase_file_io_threads; |
312 | 760 | @@ -2672,6 +2681,7 @@ | 760 | @@ -2686,6 +2695,7 @@ |
313 | 761 | srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; | 761 | srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; |
314 | 762 | srv_use_checksums = (ibool) innobase_use_checksums; | 762 | srv_use_checksums = (ibool) innobase_use_checksums; |
315 | 763 | srv_fast_checksum = (ibool) innobase_fast_checksum; | 763 | srv_fast_checksum = (ibool) innobase_fast_checksum; |
316 | @@ -765,7 +765,7 @@ | |||
317 | 765 | 765 | ||
318 | 766 | #ifdef HAVE_LARGE_PAGES | 766 | #ifdef HAVE_LARGE_PAGES |
319 | 767 | if ((os_use_large_pages = (ibool) my_use_large_pages)) | 767 | if ((os_use_large_pages = (ibool) my_use_large_pages)) |
321 | 768 | @@ -11726,6 +11736,16 @@ | 768 | @@ -11733,6 +11743,16 @@ |
322 | 769 | "Number of buffer pool instances, set to higher value on high-end machines to increase scalability", | 769 | "Number of buffer pool instances, set to higher value on high-end machines to increase scalability", |
323 | 770 | NULL, NULL, 1L, 1L, MAX_BUFFER_POOLS, 1L); | 770 | NULL, NULL, 1L, 1L, MAX_BUFFER_POOLS, 1L); |
324 | 771 | 771 | ||
325 | @@ -782,7 +782,7 @@ | |||
326 | 782 | static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency, | 782 | static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency, |
327 | 783 | PLUGIN_VAR_RQCMDARG, | 783 | PLUGIN_VAR_RQCMDARG, |
328 | 784 | "Helps in performance tuning in heavily concurrent environments.", | 784 | "Helps in performance tuning in heavily concurrent environments.", |
330 | 785 | @@ -12019,6 +12039,8 @@ | 785 | @@ -12027,6 +12047,8 @@ |
331 | 786 | MYSQL_SYSVAR(autoextend_increment), | 786 | MYSQL_SYSVAR(autoextend_increment), |
332 | 787 | MYSQL_SYSVAR(buffer_pool_size), | 787 | MYSQL_SYSVAR(buffer_pool_size), |
333 | 788 | MYSQL_SYSVAR(buffer_pool_instances), | 788 | MYSQL_SYSVAR(buffer_pool_instances), |
334 | @@ -802,7 +802,7 @@ | |||
335 | 802 | 802 | ||
336 | 803 | /** @name Modes for buf_page_get_gen */ | 803 | /** @name Modes for buf_page_get_gen */ |
337 | 804 | /* @{ */ | 804 | /* @{ */ |
339 | 805 | @@ -1594,9 +1595,12 @@ | 805 | @@ -1593,9 +1594,12 @@ |
340 | 806 | /**********************************************************************//** | 806 | /**********************************************************************//** |
341 | 807 | Compute the hash fold value for blocks in buf_pool->zip_hash. */ | 807 | Compute the hash fold value for blocks in buf_pool->zip_hash. */ |
342 | 808 | /* @{ */ | 808 | /* @{ */ |
343 | @@ -950,7 +950,7 @@ | |||
344 | 950 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h | 950 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h |
345 | 951 | --- a/storage/innobase/include/srv0srv.h 2011-04-09 18:48:45.000000000 +0400 | 951 | --- a/storage/innobase/include/srv0srv.h 2011-04-09 18:48:45.000000000 +0400 |
346 | 952 | +++ b/storage/innobase/include/srv0srv.h 2011-04-09 18:48:48.000000000 +0400 | 952 | +++ b/storage/innobase/include/srv0srv.h 2011-04-09 18:48:48.000000000 +0400 |
348 | 953 | @@ -171,6 +171,10 @@ | 953 | @@ -168,6 +168,10 @@ |
349 | 954 | extern ulint srv_mem_pool_size; | 954 | extern ulint srv_mem_pool_size; |
350 | 955 | extern ulint srv_lock_table_size; | 955 | extern ulint srv_lock_table_size; |
351 | 956 | 956 | ||
352 | @@ -1204,7 +1204,7 @@ | |||
353 | 1204 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c | 1204 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c |
354 | 1205 | --- a/storage/innobase/srv/srv0srv.c 2011-04-09 18:48:46.000000000 +0400 | 1205 | --- a/storage/innobase/srv/srv0srv.c 2011-04-09 18:48:46.000000000 +0400 |
355 | 1206 | +++ b/storage/innobase/srv/srv0srv.c 2011-04-09 18:48:48.000000000 +0400 | 1206 | +++ b/storage/innobase/srv/srv0srv.c 2011-04-09 18:48:48.000000000 +0400 |
357 | 1207 | @@ -234,6 +234,11 @@ | 1207 | @@ -228,6 +228,11 @@ |
358 | 1208 | UNIV_INTERN ulint srv_mem_pool_size = ULINT_MAX; | 1208 | UNIV_INTERN ulint srv_mem_pool_size = ULINT_MAX; |
359 | 1209 | UNIV_INTERN ulint srv_lock_table_size = ULINT_MAX; | 1209 | UNIV_INTERN ulint srv_lock_table_size = ULINT_MAX; |
360 | 1210 | 1210 | ||
361 | 1211 | 1211 | ||
362 | === modified file 'innodb_deadlock_count.patch' | |||
363 | --- innodb_deadlock_count.patch 2011-05-10 11:57:42 +0000 | |||
364 | +++ innodb_deadlock_count.patch 2011-06-20 09:04:39 +0000 | |||
365 | @@ -31,7 +31,7 @@ | |||
366 | 31 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h | 31 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h |
367 | 32 | --- a/storage/innobase/include/srv0srv.h 2010-12-04 15:55:21.378480843 +0900 | 32 | --- a/storage/innobase/include/srv0srv.h 2010-12-04 15:55:21.378480843 +0900 |
368 | 33 | +++ b/storage/innobase/include/srv0srv.h 2010-12-04 16:10:24.606550983 +0900 | 33 | +++ b/storage/innobase/include/srv0srv.h 2010-12-04 16:10:24.606550983 +0900 |
370 | 34 | @@ -761,6 +761,7 @@ | 34 | @@ -758,6 +758,7 @@ |
371 | 35 | ulint innodb_buffer_pool_read_ahead_evicted;/*!< srv_read_ahead evicted*/ | 35 | ulint innodb_buffer_pool_read_ahead_evicted;/*!< srv_read_ahead evicted*/ |
372 | 36 | ulint innodb_dblwr_pages_written; /*!< srv_dblwr_pages_written */ | 36 | ulint innodb_dblwr_pages_written; /*!< srv_dblwr_pages_written */ |
373 | 37 | ulint innodb_dblwr_writes; /*!< srv_dblwr_writes */ | 37 | ulint innodb_dblwr_writes; /*!< srv_dblwr_writes */ |
374 | @@ -53,7 +53,7 @@ | |||
375 | 53 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c | 53 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c |
376 | 54 | --- a/storage/innobase/srv/srv0srv.c 2010-12-04 15:57:13.069513371 +0900 | 54 | --- a/storage/innobase/srv/srv0srv.c 2010-12-04 15:57:13.069513371 +0900 |
377 | 55 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-04 16:10:24.610593039 +0900 | 55 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-04 16:10:24.610593039 +0900 |
379 | 56 | @@ -474,6 +474,7 @@ | 56 | @@ -468,6 +468,7 @@ |
380 | 57 | static ulint srv_n_rows_deleted_old = 0; | 57 | static ulint srv_n_rows_deleted_old = 0; |
381 | 58 | static ulint srv_n_rows_read_old = 0; | 58 | static ulint srv_n_rows_read_old = 0; |
382 | 59 | 59 | ||
383 | @@ -61,7 +61,7 @@ | |||
384 | 61 | UNIV_INTERN ulint srv_n_lock_wait_count = 0; | 61 | UNIV_INTERN ulint srv_n_lock_wait_count = 0; |
385 | 62 | UNIV_INTERN ulint srv_n_lock_wait_current_count = 0; | 62 | UNIV_INTERN ulint srv_n_lock_wait_current_count = 0; |
386 | 63 | UNIV_INTERN ib_int64_t srv_n_lock_wait_time = 0; | 63 | UNIV_INTERN ib_int64_t srv_n_lock_wait_time = 0; |
388 | 64 | @@ -2272,6 +2273,7 @@ | 64 | @@ -2282,6 +2283,7 @@ |
389 | 65 | export_vars.innodb_buffer_pool_pages_data = LRU_len; | 65 | export_vars.innodb_buffer_pool_pages_data = LRU_len; |
390 | 66 | export_vars.innodb_buffer_pool_pages_dirty = flush_list_len; | 66 | export_vars.innodb_buffer_pool_pages_dirty = flush_list_len; |
391 | 67 | export_vars.innodb_buffer_pool_pages_free = free_len; | 67 | export_vars.innodb_buffer_pool_pages_free = free_len; |
392 | 68 | 68 | ||
393 | === modified file 'innodb_dict_size_limit.patch' | |||
394 | --- innodb_dict_size_limit.patch 2011-05-10 11:57:42 +0000 | |||
395 | +++ innodb_dict_size_limit.patch 2011-06-20 09:04:39 +0000 | |||
396 | @@ -277,7 +277,7 @@ | |||
397 | 277 | diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c | 277 | diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c |
398 | 278 | --- a/storage/innobase/dict/dict0dict.c 2010-11-03 07:01:13.000000000 +0900 | 278 | --- a/storage/innobase/dict/dict0dict.c 2010-11-03 07:01:13.000000000 +0900 |
399 | 279 | +++ b/storage/innobase/dict/dict0dict.c 2010-12-03 15:45:47.525953769 +0900 | 279 | +++ b/storage/innobase/dict/dict0dict.c 2010-12-03 15:45:47.525953769 +0900 |
401 | 280 | @@ -627,6 +627,8 @@ | 280 | @@ -626,6 +626,8 @@ |
402 | 281 | 281 | ||
403 | 282 | table = dict_table_get_on_id_low(table_id); | 282 | table = dict_table_get_on_id_low(table_id); |
404 | 283 | 283 | ||
405 | @@ -286,7 +286,7 @@ | |||
406 | 286 | mutex_exit(&(dict_sys->mutex)); | 286 | mutex_exit(&(dict_sys->mutex)); |
407 | 287 | 287 | ||
408 | 288 | return(table); | 288 | return(table); |
410 | 289 | @@ -745,6 +747,8 @@ | 289 | @@ -744,6 +746,8 @@ |
411 | 290 | table->n_mysql_handles_opened++; | 290 | table->n_mysql_handles_opened++; |
412 | 291 | } | 291 | } |
413 | 292 | 292 | ||
414 | @@ -295,7 +295,7 @@ | |||
415 | 295 | mutex_exit(&(dict_sys->mutex)); | 295 | mutex_exit(&(dict_sys->mutex)); |
416 | 296 | 296 | ||
417 | 297 | if (table != NULL) { | 297 | if (table != NULL) { |
419 | 298 | @@ -1260,6 +1264,64 @@ | 298 | @@ -1259,6 +1263,64 @@ |
420 | 299 | dict_mem_table_free(table); | 299 | dict_mem_table_free(table); |
421 | 300 | } | 300 | } |
422 | 301 | 301 | ||
423 | @@ -360,7 +360,7 @@ | |||
424 | 360 | /****************************************************************//** | 360 | /****************************************************************//** |
425 | 361 | If the given column name is reserved for InnoDB system columns, return | 361 | If the given column name is reserved for InnoDB system columns, return |
426 | 362 | TRUE. | 362 | TRUE. |
428 | 363 | @@ -1729,6 +1791,11 @@ | 363 | @@ -1728,6 +1790,11 @@ |
429 | 364 | ut_ad(index->magic_n == DICT_INDEX_MAGIC_N); | 364 | ut_ad(index->magic_n == DICT_INDEX_MAGIC_N); |
430 | 365 | ut_ad(mutex_own(&(dict_sys->mutex))); | 365 | ut_ad(mutex_own(&(dict_sys->mutex))); |
431 | 366 | 366 | ||
432 | @@ -384,7 +384,7 @@ | |||
433 | 384 | {"have_atomic_builtins", | 384 | {"have_atomic_builtins", |
434 | 385 | (char*) &export_vars.innodb_have_atomic_builtins, SHOW_BOOL}, | 385 | (char*) &export_vars.innodb_have_atomic_builtins, SHOW_BOOL}, |
435 | 386 | {"log_waits", | 386 | {"log_waits", |
437 | 387 | @@ -11635,6 +11637,11 @@ | 387 | @@ -11642,6 +11644,11 @@ |
438 | 388 | "Choose method of innodb_adaptive_flushing. (native, [estimate], keep_average)", | 388 | "Choose method of innodb_adaptive_flushing. (native, [estimate], keep_average)", |
439 | 389 | NULL, innodb_adaptive_flushing_method_update, 1, &adaptive_flushing_method_typelib); | 389 | NULL, innodb_adaptive_flushing_method_update, 1, &adaptive_flushing_method_typelib); |
440 | 390 | 390 | ||
441 | @@ -396,7 +396,7 @@ | |||
442 | 396 | static struct st_mysql_sys_var* innobase_system_variables[]= { | 396 | static struct st_mysql_sys_var* innobase_system_variables[]= { |
443 | 397 | MYSQL_SYSVAR(additional_mem_pool_size), | 397 | MYSQL_SYSVAR(additional_mem_pool_size), |
444 | 398 | MYSQL_SYSVAR(autoextend_increment), | 398 | MYSQL_SYSVAR(autoextend_increment), |
446 | 399 | @@ -11702,6 +11709,7 @@ | 399 | @@ -11709,6 +11716,7 @@ |
447 | 400 | MYSQL_SYSVAR(flush_neighbor_pages), | 400 | MYSQL_SYSVAR(flush_neighbor_pages), |
448 | 401 | MYSQL_SYSVAR(read_ahead), | 401 | MYSQL_SYSVAR(read_ahead), |
449 | 402 | MYSQL_SYSVAR(adaptive_flushing_method), | 402 | MYSQL_SYSVAR(adaptive_flushing_method), |
450 | @@ -500,7 +500,7 @@ | |||
451 | 500 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h | 500 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h |
452 | 501 | --- a/storage/innobase/include/srv0srv.h 2010-12-03 15:43:57.297067100 +0900 | 501 | --- a/storage/innobase/include/srv0srv.h 2010-12-03 15:43:57.297067100 +0900 |
453 | 502 | +++ b/storage/innobase/include/srv0srv.h 2010-12-03 15:45:47.562024404 +0900 | 502 | +++ b/storage/innobase/include/srv0srv.h 2010-12-03 15:45:47.562024404 +0900 |
455 | 503 | @@ -232,6 +232,7 @@ | 503 | @@ -229,6 +229,7 @@ |
456 | 504 | extern ulint srv_read_ahead; | 504 | extern ulint srv_read_ahead; |
457 | 505 | extern ulint srv_adaptive_flushing_method; | 505 | extern ulint srv_adaptive_flushing_method; |
458 | 506 | 506 | ||
459 | @@ -508,7 +508,7 @@ | |||
460 | 508 | /*-------------------------------------------*/ | 508 | /*-------------------------------------------*/ |
461 | 509 | 509 | ||
462 | 510 | extern ulint srv_n_rows_inserted; | 510 | extern ulint srv_n_rows_inserted; |
464 | 511 | @@ -712,6 +713,7 @@ | 511 | @@ -709,6 +710,7 @@ |
465 | 512 | ulint innodb_data_writes; /*!< I/O write requests */ | 512 | ulint innodb_data_writes; /*!< I/O write requests */ |
466 | 513 | ulint innodb_data_written; /*!< Data bytes written */ | 513 | ulint innodb_data_written; /*!< Data bytes written */ |
467 | 514 | ulint innodb_data_reads; /*!< I/O read requests */ | 514 | ulint innodb_data_reads; /*!< I/O read requests */ |
468 | @@ -519,7 +519,7 @@ | |||
469 | 519 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c | 519 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c |
470 | 520 | --- a/storage/innobase/srv/srv0srv.c 2010-12-03 15:43:57.301024390 +0900 | 520 | --- a/storage/innobase/srv/srv0srv.c 2010-12-03 15:43:57.301024390 +0900 |
471 | 521 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-03 15:45:47.565023830 +0900 | 521 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-03 15:45:47.565023830 +0900 |
473 | 522 | @@ -421,6 +421,8 @@ | 522 | @@ -415,6 +415,8 @@ |
474 | 523 | UNIV_INTERN ulint srv_enable_unsafe_group_commit = 0; /* 0:disable 1:enable */ | 523 | UNIV_INTERN ulint srv_enable_unsafe_group_commit = 0; /* 0:disable 1:enable */ |
475 | 524 | UNIV_INTERN ulint srv_read_ahead = 3; /* 1: random 2: linear 3: Both */ | 524 | UNIV_INTERN ulint srv_read_ahead = 3; /* 1: random 2: linear 3: Both */ |
476 | 525 | UNIV_INTERN ulint srv_adaptive_flushing_method = 0; /* 0: native 1: estimate 2: keep_average */ | 525 | UNIV_INTERN ulint srv_adaptive_flushing_method = 0; /* 0: native 1: estimate 2: keep_average */ |
477 | @@ -528,7 +528,7 @@ | |||
478 | 528 | /*-------------------------------------------*/ | 528 | /*-------------------------------------------*/ |
479 | 529 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; | 529 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; |
480 | 530 | UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; | 530 | UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; |
482 | 531 | @@ -2211,6 +2213,7 @@ | 531 | @@ -2220,6 +2222,7 @@ |
483 | 532 | export_vars.innodb_data_reads = os_n_file_reads; | 532 | export_vars.innodb_data_reads = os_n_file_reads; |
484 | 533 | export_vars.innodb_data_writes = os_n_file_writes; | 533 | export_vars.innodb_data_writes = os_n_file_writes; |
485 | 534 | export_vars.innodb_data_written = srv_data_written; | 534 | export_vars.innodb_data_written = srv_data_written; |
486 | 535 | 535 | ||
487 | === modified file 'innodb_expand_import.patch' | |||
488 | --- innodb_expand_import.patch 2011-05-10 11:57:42 +0000 | |||
489 | +++ innodb_expand_import.patch 2011-06-20 09:04:39 +0000 | |||
490 | @@ -5,10 +5,40 @@ | |||
491 | 5 | #!!! notice !!! | 5 | #!!! notice !!! |
492 | 6 | # Any small change to this file in the main branch | 6 | # Any small change to this file in the main branch |
493 | 7 | # should be done or reviewed by the maintainer! | 7 | # should be done or reviewed by the maintainer! |
494 | 8 | diff -ruN a/storage/innobase/btr/btr0btr.c b/storage/innobase/btr/btr0btr.c | ||
495 | 9 | --- a/storage/innobase/btr/btr0btr.c 2011-04-11 19:44:03.000000000 +0900 | ||
496 | 10 | +++ b/storage/innobase/btr/btr0btr.c 2011-05-24 20:30:12.455852287 +0900 | ||
497 | 11 | @@ -837,7 +837,7 @@ | ||
498 | 12 | /**************************************************************//** | ||
499 | 13 | Creates a new index page (not the root, and also not | ||
500 | 14 | used in page reorganization). @see btr_page_empty(). */ | ||
501 | 15 | -static | ||
502 | 16 | +UNIV_INTERN | ||
503 | 17 | void | ||
504 | 18 | btr_page_create( | ||
505 | 19 | /*============*/ | ||
506 | 20 | @@ -1707,7 +1707,7 @@ | ||
507 | 21 | #ifndef UNIV_HOTBACKUP | ||
508 | 22 | /*************************************************************//** | ||
509 | 23 | Empties an index page. @see btr_page_create(). */ | ||
510 | 24 | -static | ||
511 | 25 | +UNIV_INTERN | ||
512 | 26 | void | ||
513 | 27 | btr_page_empty( | ||
514 | 28 | /*===========*/ | ||
515 | 29 | @@ -2269,7 +2269,7 @@ | ||
516 | 30 | /**************************************************************//** | ||
517 | 31 | Attaches the halves of an index page on the appropriate level in an | ||
518 | 32 | index tree. */ | ||
519 | 33 | -static | ||
520 | 34 | +UNIV_INTERN | ||
521 | 35 | void | ||
522 | 36 | btr_attach_half_pages( | ||
523 | 37 | /*==================*/ | ||
524 | 8 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c | 38 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c |
525 | 9 | --- a/storage/innobase/fil/fil0fil.c 2010-12-03 15:09:51.274957577 +0900 | 39 | --- a/storage/innobase/fil/fil0fil.c 2010-12-03 15:09:51.274957577 +0900 |
526 | 10 | +++ b/storage/innobase/fil/fil0fil.c 2010-12-03 15:52:23.553986552 +0900 | 40 | +++ b/storage/innobase/fil/fil0fil.c 2010-12-03 15:52:23.553986552 +0900 |
528 | 11 | @@ -40,6 +40,12 @@ | 41 | @@ -40,6 +40,14 @@ |
529 | 12 | #include "dict0dict.h" | 42 | #include "dict0dict.h" |
530 | 13 | #include "page0page.h" | 43 | #include "page0page.h" |
531 | 14 | #include "page0zip.h" | 44 | #include "page0zip.h" |
532 | @@ -18,10 +48,97 @@ | |||
533 | 18 | +#include "row0mysql.h" | 48 | +#include "row0mysql.h" |
534 | 19 | +#include "row0row.h" | 49 | +#include "row0row.h" |
535 | 20 | +#include "que0que.h" | 50 | +#include "que0que.h" |
536 | 51 | +#include "btr0btr.h" | ||
537 | 52 | +#include "btr0sea.h" | ||
538 | 21 | #ifndef UNIV_HOTBACKUP | 53 | #ifndef UNIV_HOTBACKUP |
539 | 22 | # include "buf0lru.h" | 54 | # include "buf0lru.h" |
540 | 23 | # include "ibuf0ibuf.h" | 55 | # include "ibuf0ibuf.h" |
542 | 24 | @@ -3078,7 +3084,7 @@ | 56 | @@ -3032,6 +3040,84 @@ |
543 | 57 | } | ||
544 | 58 | |||
545 | 59 | /********************************************************************//** | ||
546 | 60 | +Checks if a page is corrupt. (for offline page) | ||
547 | 61 | +*/ | ||
548 | 62 | +static | ||
549 | 63 | +ibool | ||
550 | 64 | +fil_page_buf_page_is_corrupted_offline( | ||
551 | 65 | +/*===================================*/ | ||
552 | 66 | + const byte* page, /*!< in: a database page */ | ||
553 | 67 | + ulint zip_size) /*!< in: size of compressed page; | ||
554 | 68 | + 0 for uncompressed pages */ | ||
555 | 69 | +{ | ||
556 | 70 | + ulint checksum_field; | ||
557 | 71 | + ulint old_checksum_field; | ||
558 | 72 | + | ||
559 | 73 | + if (!zip_size | ||
560 | 74 | + && memcmp(page + FIL_PAGE_LSN + 4, | ||
561 | 75 | + page + UNIV_PAGE_SIZE | ||
562 | 76 | + - FIL_PAGE_END_LSN_OLD_CHKSUM + 4, 4)) { | ||
563 | 77 | + return(TRUE); | ||
564 | 78 | + } | ||
565 | 79 | + | ||
566 | 80 | + checksum_field = mach_read_from_4(page | ||
567 | 81 | + + FIL_PAGE_SPACE_OR_CHKSUM); | ||
568 | 82 | + | ||
569 | 83 | + if (zip_size) { | ||
570 | 84 | + return(checksum_field != BUF_NO_CHECKSUM_MAGIC | ||
571 | 85 | + && checksum_field | ||
572 | 86 | + != page_zip_calc_checksum(page, zip_size)); | ||
573 | 87 | + } | ||
574 | 88 | + | ||
575 | 89 | + old_checksum_field = mach_read_from_4( | ||
576 | 90 | + page + UNIV_PAGE_SIZE | ||
577 | 91 | + - FIL_PAGE_END_LSN_OLD_CHKSUM); | ||
578 | 92 | + | ||
579 | 93 | + if (old_checksum_field != mach_read_from_4(page | ||
580 | 94 | + + FIL_PAGE_LSN) | ||
581 | 95 | + && old_checksum_field != BUF_NO_CHECKSUM_MAGIC | ||
582 | 96 | + && old_checksum_field | ||
583 | 97 | + != buf_calc_page_old_checksum(page)) { | ||
584 | 98 | + return(TRUE); | ||
585 | 99 | + } | ||
586 | 100 | + | ||
587 | 101 | + if (checksum_field != 0 | ||
588 | 102 | + && checksum_field != BUF_NO_CHECKSUM_MAGIC | ||
589 | 103 | + && checksum_field | ||
590 | 104 | + != buf_calc_page_new_checksum(page)) { | ||
591 | 105 | + return(TRUE); | ||
592 | 106 | + } | ||
593 | 107 | + | ||
594 | 108 | + return(FALSE); | ||
595 | 109 | +} | ||
596 | 110 | + | ||
597 | 111 | +/********************************************************************//** | ||
598 | 112 | +*/ | ||
599 | 113 | +static | ||
600 | 114 | +void | ||
601 | 115 | +fil_page_buf_page_store_checksum( | ||
602 | 116 | +/*=============================*/ | ||
603 | 117 | + byte* page, | ||
604 | 118 | + ulint zip_size) | ||
605 | 119 | +{ | ||
606 | 120 | + if (!zip_size) { | ||
607 | 121 | + mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM, | ||
608 | 122 | + srv_use_checksums | ||
609 | 123 | + ? buf_calc_page_new_checksum(page) | ||
610 | 124 | + : BUF_NO_CHECKSUM_MAGIC); | ||
611 | 125 | + mach_write_to_4(page + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM, | ||
612 | 126 | + srv_use_checksums | ||
613 | 127 | + ? buf_calc_page_old_checksum(page) | ||
614 | 128 | + : BUF_NO_CHECKSUM_MAGIC); | ||
615 | 129 | + } else { | ||
616 | 130 | + mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM, | ||
617 | 131 | + srv_use_checksums | ||
618 | 132 | + ? page_zip_calc_checksum(page, zip_size) | ||
619 | 133 | + : BUF_NO_CHECKSUM_MAGIC); | ||
620 | 134 | + } | ||
621 | 135 | +} | ||
622 | 136 | + | ||
623 | 137 | +/********************************************************************//** | ||
624 | 138 | Tries to open a single-table tablespace and optionally checks the space id is | ||
625 | 139 | right in it. If does not succeed, prints an error message to the .err log. This | ||
626 | 140 | function is used to open a tablespace when we start up mysqld, and also in | ||
627 | 141 | @@ -3078,7 +3164,7 @@ | ||
628 | 25 | 142 | ||
629 | 26 | file = os_file_create_simple_no_error_handling( | 143 | file = os_file_create_simple_no_error_handling( |
630 | 27 | innodb_file_data_key, filepath, OS_FILE_OPEN, | 144 | innodb_file_data_key, filepath, OS_FILE_OPEN, |
631 | @@ -30,7 +147,7 @@ | |||
632 | 30 | if (!success) { | 147 | if (!success) { |
633 | 31 | /* The following call prints an error message */ | 148 | /* The following call prints an error message */ |
634 | 32 | os_file_get_last_error(TRUE); | 149 | os_file_get_last_error(TRUE); |
636 | 33 | @@ -3125,6 +3131,466 @@ | 150 | @@ -3125,6 +3211,445 @@ |
637 | 34 | space_id = fsp_header_get_space_id(page); | 151 | space_id = fsp_header_get_space_id(page); |
638 | 35 | space_flags = fsp_header_get_flags(page); | 152 | space_flags = fsp_header_get_flags(page); |
639 | 36 | 153 | ||
640 | @@ -56,6 +173,7 @@ | |||
641 | 56 | + fil_system_t* system; | 173 | + fil_system_t* system; |
642 | 57 | + fil_node_t* node = NULL; | 174 | + fil_node_t* node = NULL; |
643 | 58 | + fil_space_t* space; | 175 | + fil_space_t* space; |
644 | 176 | + ulint zip_size; | ||
645 | 59 | + | 177 | + |
646 | 60 | + buf3 = ut_malloc(2 * UNIV_PAGE_SIZE); | 178 | + buf3 = ut_malloc(2 * UNIV_PAGE_SIZE); |
647 | 61 | + descr_page = ut_align(buf3, UNIV_PAGE_SIZE); | 179 | + descr_page = ut_align(buf3, UNIV_PAGE_SIZE); |
648 | @@ -73,12 +191,15 @@ | |||
649 | 73 | + /* store as first descr page */ | 191 | + /* store as first descr page */ |
650 | 74 | + memcpy(descr_page, page, UNIV_PAGE_SIZE); | 192 | + memcpy(descr_page, page, UNIV_PAGE_SIZE); |
651 | 75 | + | 193 | + |
652 | 194 | + zip_size = dict_table_flags_to_zip_size(flags); | ||
653 | 195 | + ut_a(zip_size == dict_table_flags_to_zip_size(space_flags)); | ||
654 | 196 | + | ||
655 | 76 | + /* get free limit (page number) of the table space */ | 197 | + /* get free limit (page number) of the table space */ |
656 | 77 | +/* these should be same to the definition in fsp0fsp.c */ | 198 | +/* these should be same to the definition in fsp0fsp.c */ |
657 | 78 | +#define FSP_HEADER_OFFSET FIL_PAGE_DATA | 199 | +#define FSP_HEADER_OFFSET FIL_PAGE_DATA |
658 | 79 | +#define FSP_FREE_LIMIT 12 | 200 | +#define FSP_FREE_LIMIT 12 |
659 | 80 | + free_limit = mach_read_from_4(FSP_HEADER_OFFSET + FSP_FREE_LIMIT + page); | 201 | + free_limit = mach_read_from_4(FSP_HEADER_OFFSET + FSP_FREE_LIMIT + page); |
661 | 81 | + free_limit_bytes = (ib_int64_t)free_limit * (ib_int64_t)UNIV_PAGE_SIZE; | 202 | + free_limit_bytes = (ib_int64_t)free_limit * (ib_int64_t)(zip_size ? zip_size : UNIV_PAGE_SIZE); |
662 | 82 | + | 203 | + |
663 | 83 | + /* overwrite fsp header */ | 204 | + /* overwrite fsp header */ |
664 | 84 | + fsp_header_init_fields(page, id, flags); | 205 | + fsp_header_init_fields(page, id, flags); |
665 | @@ -87,14 +208,9 @@ | |||
666 | 87 | + space_flags = flags; | 208 | + space_flags = flags; |
667 | 88 | + if (mach_read_from_8(page + FIL_PAGE_FILE_FLUSH_LSN) > current_lsn) | 209 | + if (mach_read_from_8(page + FIL_PAGE_FILE_FLUSH_LSN) > current_lsn) |
668 | 89 | + mach_write_to_8(page + FIL_PAGE_FILE_FLUSH_LSN, current_lsn); | 210 | + mach_write_to_8(page + FIL_PAGE_FILE_FLUSH_LSN, current_lsn); |
677 | 90 | + mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM, | 211 | + |
678 | 91 | + srv_use_checksums | 212 | + fil_page_buf_page_store_checksum(page, zip_size); |
679 | 92 | + ? buf_calc_page_new_checksum(page) | 213 | + |
672 | 93 | + : BUF_NO_CHECKSUM_MAGIC); | ||
673 | 94 | + mach_write_to_4(page + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM, | ||
674 | 95 | + srv_use_checksums | ||
675 | 96 | + ? buf_calc_page_old_checksum(page) | ||
676 | 97 | + : BUF_NO_CHECKSUM_MAGIC); | ||
680 | 98 | + success = os_file_write(filepath, file, page, 0, 0, UNIV_PAGE_SIZE); | 214 | + success = os_file_write(filepath, file, page, 0, 0, UNIV_PAGE_SIZE); |
681 | 99 | + | 215 | + |
682 | 100 | + /* get file size */ | 216 | + /* get file size */ |
683 | @@ -104,7 +220,7 @@ | |||
684 | 104 | + | 220 | + |
685 | 105 | + if (size_bytes < free_limit_bytes) { | 221 | + if (size_bytes < free_limit_bytes) { |
686 | 106 | + free_limit_bytes = size_bytes; | 222 | + free_limit_bytes = size_bytes; |
688 | 107 | + if (size_bytes >= FSP_EXTENT_SIZE * UNIV_PAGE_SIZE) { | 223 | + if (size_bytes >= (lint)FSP_EXTENT_SIZE * (lint)(zip_size ? zip_size : UNIV_PAGE_SIZE)) { |
689 | 108 | + fprintf(stderr, "InnoDB: free limit of %s is larger than its real size.\n", filepath); | 224 | + fprintf(stderr, "InnoDB: free limit of %s is larger than its real size.\n", filepath); |
690 | 109 | + file_is_corrupt = TRUE; | 225 | + file_is_corrupt = TRUE; |
691 | 110 | + } | 226 | + } |
692 | @@ -168,63 +284,41 @@ | |||
693 | 168 | + size_bytes = ut_2pow_round(size_bytes, 1024 * 1024); | 284 | + size_bytes = ut_2pow_round(size_bytes, 1024 * 1024); |
694 | 169 | + } | 285 | + } |
695 | 170 | + */ | 286 | + */ |
697 | 171 | + if (!(flags & DICT_TF_ZSSIZE_MASK)) { | 287 | + |
698 | 288 | + if (zip_size) { | ||
699 | 289 | + fprintf(stderr, "InnoDB: Warning: importing compressed table is still EXPERIMENTAL, currently.\n"); | ||
700 | 290 | + } | ||
701 | 291 | + | ||
702 | 292 | + { | ||
703 | 172 | + mem_heap_t* heap = NULL; | 293 | + mem_heap_t* heap = NULL; |
704 | 173 | + ulint offsets_[REC_OFFS_NORMAL_SIZE]; | 294 | + ulint offsets_[REC_OFFS_NORMAL_SIZE]; |
705 | 174 | + ulint* offsets = offsets_; | 295 | + ulint* offsets = offsets_; |
706 | 175 | + ib_int64_t offset; | 296 | + ib_int64_t offset; |
707 | 176 | + | 297 | + |
709 | 177 | + size = (ulint) (size_bytes / UNIV_PAGE_SIZE); | 298 | + size = (ulint) (size_bytes / (zip_size ? zip_size : UNIV_PAGE_SIZE)); |
710 | 178 | + /* over write space id of all pages */ | 299 | + /* over write space id of all pages */ |
711 | 179 | + rec_offs_init(offsets_); | 300 | + rec_offs_init(offsets_); |
712 | 180 | + | 301 | + |
713 | 181 | + fprintf(stderr, "InnoDB: Progress in %%:"); | 302 | + fprintf(stderr, "InnoDB: Progress in %%:"); |
714 | 182 | + | 303 | + |
718 | 183 | + for (offset = 0; offset < free_limit_bytes; offset += UNIV_PAGE_SIZE) { | 304 | + for (offset = 0; offset < free_limit_bytes; |
719 | 184 | + ulint checksum_field; | 305 | + offset += zip_size ? zip_size : UNIV_PAGE_SIZE) { |
717 | 185 | + ulint old_checksum_field; | ||
720 | 186 | + ibool page_is_corrupt; | 306 | + ibool page_is_corrupt; |
721 | 187 | + | 307 | + |
722 | 188 | + success = os_file_read(file, page, | 308 | + success = os_file_read(file, page, |
723 | 189 | + (ulint)(offset & 0xFFFFFFFFUL), | 309 | + (ulint)(offset & 0xFFFFFFFFUL), |
725 | 190 | + (ulint)(offset >> 32), UNIV_PAGE_SIZE); | 310 | + (ulint)(offset >> 32), |
726 | 311 | + zip_size ? zip_size : UNIV_PAGE_SIZE); | ||
727 | 191 | + | 312 | + |
728 | 192 | + page_is_corrupt = FALSE; | 313 | + page_is_corrupt = FALSE; |
729 | 193 | + | 314 | + |
730 | 194 | + /* check consistency */ | 315 | + /* check consistency */ |
735 | 195 | + if (memcmp(page + FIL_PAGE_LSN + 4, | 316 | + if (fil_page_buf_page_is_corrupted_offline(page, zip_size)) { |
732 | 196 | + page + UNIV_PAGE_SIZE | ||
733 | 197 | + - FIL_PAGE_END_LSN_OLD_CHKSUM + 4, 4)) { | ||
734 | 198 | + | ||
736 | 199 | + page_is_corrupt = TRUE; | 317 | + page_is_corrupt = TRUE; |
737 | 200 | + } | 318 | + } |
738 | 201 | + | 319 | + |
739 | 202 | + if (mach_read_from_4(page + FIL_PAGE_OFFSET) | 320 | + if (mach_read_from_4(page + FIL_PAGE_OFFSET) |
765 | 203 | + != offset / UNIV_PAGE_SIZE) { | 321 | + != offset / (zip_size ? zip_size : UNIV_PAGE_SIZE)) { |
741 | 204 | + | ||
742 | 205 | + page_is_corrupt = TRUE; | ||
743 | 206 | + } | ||
744 | 207 | + | ||
745 | 208 | + checksum_field = mach_read_from_4(page | ||
746 | 209 | + + FIL_PAGE_SPACE_OR_CHKSUM); | ||
747 | 210 | + | ||
748 | 211 | + old_checksum_field = mach_read_from_4( | ||
749 | 212 | + page + UNIV_PAGE_SIZE | ||
750 | 213 | + - FIL_PAGE_END_LSN_OLD_CHKSUM); | ||
751 | 214 | + | ||
752 | 215 | + if (old_checksum_field != mach_read_from_4(page | ||
753 | 216 | + + FIL_PAGE_LSN) | ||
754 | 217 | + && old_checksum_field != BUF_NO_CHECKSUM_MAGIC | ||
755 | 218 | + && old_checksum_field | ||
756 | 219 | + != buf_calc_page_old_checksum(page)) { | ||
757 | 220 | + | ||
758 | 221 | + page_is_corrupt = TRUE; | ||
759 | 222 | + } | ||
760 | 223 | + | ||
761 | 224 | + if (checksum_field != 0 | ||
762 | 225 | + && checksum_field != BUF_NO_CHECKSUM_MAGIC | ||
763 | 226 | + && checksum_field | ||
764 | 227 | + != buf_calc_page_new_checksum(page)) { | ||
766 | 228 | + | 322 | + |
767 | 229 | + page_is_corrupt = TRUE; | 323 | + page_is_corrupt = TRUE; |
768 | 230 | + } | 324 | + } |
769 | @@ -235,7 +329,8 @@ | |||
770 | 235 | + /* it should be overwritten already */ | 329 | + /* it should be overwritten already */ |
771 | 236 | + ut_a(!page_is_corrupt); | 330 | + ut_a(!page_is_corrupt); |
772 | 237 | + | 331 | + |
774 | 238 | + } else if (!((offset / UNIV_PAGE_SIZE) % UNIV_PAGE_SIZE)) { | 332 | + } else if (!((offset / (zip_size ? zip_size : UNIV_PAGE_SIZE)) |
775 | 333 | + % (zip_size ? zip_size : UNIV_PAGE_SIZE))) { | ||
776 | 239 | + /* descr page (not header) */ | 334 | + /* descr page (not header) */ |
777 | 240 | + if (page_is_corrupt) { | 335 | + if (page_is_corrupt) { |
778 | 241 | + file_is_corrupt = TRUE; | 336 | + file_is_corrupt = TRUE; |
779 | @@ -246,7 +341,7 @@ | |||
780 | 246 | + } | 341 | + } |
781 | 247 | + | 342 | + |
782 | 248 | + /* store as descr page */ | 343 | + /* store as descr page */ |
784 | 249 | + memcpy(descr_page, page, UNIV_PAGE_SIZE); | 344 | + memcpy(descr_page, page, (zip_size ? zip_size : UNIV_PAGE_SIZE)); |
785 | 250 | + | 345 | + |
786 | 251 | + } else if (descr_is_corrupt) { | 346 | + } else if (descr_is_corrupt) { |
787 | 252 | + /* unknown state of the page */ | 347 | + /* unknown state of the page */ |
788 | @@ -274,9 +369,12 @@ | |||
789 | 274 | + ulint bit_index; | 369 | + ulint bit_index; |
790 | 275 | + | 370 | + |
791 | 276 | + descr = descr_page + XDES_ARR_OFFSET | 371 | + descr = descr_page + XDES_ARR_OFFSET |
793 | 277 | + + XDES_SIZE * (ut_2pow_remainder((offset / UNIV_PAGE_SIZE), UNIV_PAGE_SIZE) / FSP_EXTENT_SIZE); | 372 | + + XDES_SIZE * (ut_2pow_remainder( |
794 | 373 | + (offset / (zip_size ? zip_size : UNIV_PAGE_SIZE)), | ||
795 | 374 | + (zip_size ? zip_size : UNIV_PAGE_SIZE)) / FSP_EXTENT_SIZE); | ||
796 | 278 | + | 375 | + |
798 | 279 | + index = XDES_FREE_BIT + XDES_BITS_PER_PAGE * ((offset / UNIV_PAGE_SIZE) % FSP_EXTENT_SIZE); | 376 | + index = XDES_FREE_BIT |
799 | 377 | + + XDES_BITS_PER_PAGE * ((offset / (zip_size ? zip_size : UNIV_PAGE_SIZE)) % FSP_EXTENT_SIZE); | ||
800 | 280 | + byte_index = index / 8; | 378 | + byte_index = index / 8; |
801 | 281 | + bit_index = index % 8; | 379 | + bit_index = index % 8; |
802 | 282 | + | 380 | + |
803 | @@ -294,7 +392,7 @@ | |||
804 | 294 | + } | 392 | + } |
805 | 295 | + | 393 | + |
806 | 296 | + if (page_is_corrupt) { | 394 | + if (page_is_corrupt) { |
808 | 297 | + fprintf(stderr, " [errp:%lld]", offset / UNIV_PAGE_SIZE); | 395 | + fprintf(stderr, " [errp:%lld]", offset / (zip_size ? zip_size : UNIV_PAGE_SIZE)); |
809 | 298 | + | 396 | + |
810 | 299 | + /* cannot treat corrupt page */ | 397 | + /* cannot treat corrupt page */ |
811 | 300 | + goto skip_write; | 398 | + goto skip_write; |
812 | @@ -304,7 +402,13 @@ | |||
813 | 304 | + mach_write_to_4(page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID, id); | 402 | + mach_write_to_4(page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID, id); |
814 | 305 | + | 403 | + |
815 | 306 | + for (i = 0; i < n_index; i++) { | 404 | + for (i = 0; i < n_index; i++) { |
817 | 307 | + if (offset / UNIV_PAGE_SIZE == root_page[i]) { | 405 | + if (offset / (zip_size ? zip_size : UNIV_PAGE_SIZE) == root_page[i]) { |
818 | 406 | + if (fil_page_get_type(page) != FIL_PAGE_INDEX) { | ||
819 | 407 | + file_is_corrupt = TRUE; | ||
820 | 408 | + fprintf(stderr, " [etyp:%lld]", | ||
821 | 409 | + offset / (zip_size ? zip_size : UNIV_PAGE_SIZE)); | ||
822 | 410 | + goto skip_write; | ||
823 | 411 | + } | ||
824 | 308 | + /* this is index root page */ | 412 | + /* this is index root page */ |
825 | 309 | + mach_write_to_4(page + FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF | 413 | + mach_write_to_4(page + FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF |
826 | 310 | + + FSEG_HDR_SPACE, id); | 414 | + + FSEG_HDR_SPACE, id); |
827 | @@ -317,7 +421,14 @@ | |||
828 | 317 | + if (fil_page_get_type(page) == FIL_PAGE_INDEX) { | 421 | + if (fil_page_get_type(page) == FIL_PAGE_INDEX) { |
829 | 318 | + index_id_t tmp = mach_read_from_8(page + (PAGE_HEADER + PAGE_INDEX_ID)); | 422 | + index_id_t tmp = mach_read_from_8(page + (PAGE_HEADER + PAGE_INDEX_ID)); |
830 | 319 | + | 423 | + |
832 | 320 | + if (mach_read_from_2(page + PAGE_HEADER + PAGE_LEVEL) == 0 | 424 | + for (i = 0; i < n_index; i++) { |
833 | 425 | + if (old_id[i] == tmp) { | ||
834 | 426 | + mach_write_to_8(page + (PAGE_HEADER + PAGE_INDEX_ID), new_id[i]); | ||
835 | 427 | + break; | ||
836 | 428 | + } | ||
837 | 429 | + } | ||
838 | 430 | + | ||
839 | 431 | + if (!zip_size && mach_read_from_2(page + PAGE_HEADER + PAGE_LEVEL) == 0 | ||
840 | 321 | + && old_id[0] == tmp) { | 432 | + && old_id[0] == tmp) { |
841 | 322 | + /* leaf page of cluster index, reset trx_id of records */ | 433 | + /* leaf page of cluster index, reset trx_id of records */ |
842 | 323 | + rec_t* rec; | 434 | + rec_t* rec; |
843 | @@ -356,42 +467,34 @@ | |||
844 | 356 | + rec = page_rec_get_next(rec); | 467 | + rec = page_rec_get_next(rec); |
845 | 357 | + n_recs--; | 468 | + n_recs--; |
846 | 358 | + } | 469 | + } |
854 | 359 | + } | 470 | + } else if (mach_read_from_2(page + PAGE_HEADER + PAGE_LEVEL) == 0 |
855 | 360 | + | 471 | + && old_id[0] != tmp) { |
856 | 361 | + for (i = 0; i < n_index; i++) { | 472 | + mach_write_to_8(page + (PAGE_HEADER + PAGE_MAX_TRX_ID), 1); |
850 | 362 | + if (old_id[i] == tmp) { | ||
851 | 363 | + mach_write_to_8(page + (PAGE_HEADER + PAGE_INDEX_ID), new_id[i]); | ||
852 | 364 | + break; | ||
853 | 365 | + } | ||
857 | 366 | + } | 473 | + } |
858 | 367 | + } | 474 | + } |
859 | 368 | + | 475 | + |
860 | 369 | + if (mach_read_from_8(page + FIL_PAGE_LSN) > current_lsn) { | 476 | + if (mach_read_from_8(page + FIL_PAGE_LSN) > current_lsn) { |
861 | 370 | + mach_write_to_8(page + FIL_PAGE_LSN, current_lsn); | 477 | + mach_write_to_8(page + FIL_PAGE_LSN, current_lsn); |
864 | 371 | + mach_write_to_8(page + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM, | 478 | + if (!zip_size) { |
865 | 372 | + current_lsn); | 479 | + mach_write_to_8(page + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM, |
866 | 480 | + current_lsn); | ||
867 | 481 | + } | ||
868 | 373 | + } | 482 | + } |
869 | 374 | + | 483 | + |
878 | 375 | + mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM, | 484 | + fil_page_buf_page_store_checksum(page, zip_size); |
871 | 376 | + srv_use_checksums | ||
872 | 377 | + ? buf_calc_page_new_checksum(page) | ||
873 | 378 | + : BUF_NO_CHECKSUM_MAGIC); | ||
874 | 379 | + mach_write_to_4(page + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM, | ||
875 | 380 | + srv_use_checksums | ||
876 | 381 | + ? buf_calc_page_old_checksum(page) | ||
877 | 382 | + : BUF_NO_CHECKSUM_MAGIC); | ||
879 | 383 | + | 485 | + |
880 | 384 | + success = os_file_write(filepath, file, page, | 486 | + success = os_file_write(filepath, file, page, |
881 | 385 | + (ulint)(offset & 0xFFFFFFFFUL), | 487 | + (ulint)(offset & 0xFFFFFFFFUL), |
883 | 386 | + (ulint)(offset >> 32), UNIV_PAGE_SIZE); | 488 | + (ulint)(offset >> 32), |
884 | 489 | + zip_size ? zip_size : UNIV_PAGE_SIZE); | ||
885 | 387 | + } | 490 | + } |
886 | 388 | + | 491 | + |
887 | 389 | +skip_write: | 492 | +skip_write: |
888 | 390 | + if (free_limit_bytes | 493 | + if (free_limit_bytes |
890 | 391 | + && ((ib_int64_t)((offset + UNIV_PAGE_SIZE) * 100) / free_limit_bytes) | 494 | + && ((ib_int64_t)((offset + (zip_size ? zip_size : UNIV_PAGE_SIZE)) * 100) / free_limit_bytes) |
891 | 392 | + != ((offset * 100) / free_limit_bytes)) { | 495 | + != ((offset * 100) / free_limit_bytes)) { |
892 | 393 | + fprintf(stderr, " %lu", | 496 | + fprintf(stderr, " %lu", |
894 | 394 | + (ulong)((ib_int64_t)((offset + UNIV_PAGE_SIZE) * 100) / free_limit_bytes)); | 497 | + (ulong)((ib_int64_t)((offset + (zip_size ? zip_size : UNIV_PAGE_SIZE)) * 100) / free_limit_bytes)); |
895 | 395 | + } | 498 | + } |
896 | 396 | + } | 499 | + } |
897 | 397 | + | 500 | + |
898 | @@ -447,13 +550,6 @@ | |||
899 | 447 | + if (UNIV_LIKELY_NULL(heap)) { | 550 | + if (UNIV_LIKELY_NULL(heap)) { |
900 | 448 | + mem_heap_free(heap); | 551 | + mem_heap_free(heap); |
901 | 449 | + } | 552 | + } |
902 | 450 | + } else { | ||
903 | 451 | + /* zip page? */ | ||
904 | 452 | + size = (ulint) | ||
905 | 453 | + (size_bytes | ||
906 | 454 | + / dict_table_flags_to_zip_size(flags)); | ||
907 | 455 | + fprintf(stderr, "InnoDB: Import: The table %s seems to be in a newer format." | ||
908 | 456 | + " It may not be possible to process it.\n", name); | ||
909 | 457 | + } | 553 | + } |
910 | 458 | + /* .exp file should be removed */ | 554 | + /* .exp file should be removed */ |
911 | 459 | + success = os_file_delete(info_file_path); | 555 | + success = os_file_delete(info_file_path); |
912 | @@ -497,10 +593,282 @@ | |||
913 | 497 | ut_free(buf2); | 593 | ut_free(buf2); |
914 | 498 | 594 | ||
915 | 499 | if (UNIV_UNLIKELY(space_id != id | 595 | if (UNIV_UNLIKELY(space_id != id |
916 | 596 | @@ -3166,6 +3691,271 @@ | ||
917 | 597 | os_file_close(file); | ||
918 | 598 | mem_free(filepath); | ||
919 | 599 | |||
920 | 600 | + if (srv_expand_import && dict_table_flags_to_zip_size(flags)) { | ||
921 | 601 | + ulint page_no; | ||
922 | 602 | + ulint zip_size; | ||
923 | 603 | + ulint height; | ||
924 | 604 | + ulint root_height = 0; | ||
925 | 605 | + rec_t* node_ptr; | ||
926 | 606 | + dict_table_t* table; | ||
927 | 607 | + dict_index_t* index; | ||
928 | 608 | + buf_block_t* block; | ||
929 | 609 | + page_t* page; | ||
930 | 610 | + page_zip_des_t* page_zip; | ||
931 | 611 | + mtr_t mtr; | ||
932 | 612 | + | ||
933 | 613 | + mem_heap_t* heap = NULL; | ||
934 | 614 | + ulint offsets_[REC_OFFS_NORMAL_SIZE]; | ||
935 | 615 | + ulint* offsets = offsets_; | ||
936 | 616 | + | ||
937 | 617 | + rec_offs_init(offsets_); | ||
938 | 618 | + | ||
939 | 619 | + zip_size = dict_table_flags_to_zip_size(flags); | ||
940 | 620 | + | ||
941 | 621 | + table = dict_table_get_low(name); | ||
942 | 622 | + index = dict_table_get_first_index(table); | ||
943 | 623 | + page_no = dict_index_get_page(index); | ||
944 | 624 | + ut_a(page_no == 3); | ||
945 | 625 | + | ||
946 | 626 | + fprintf(stderr, "InnoDB: It is compressed .ibd file. need to convert additionaly on buffer pool.\n"); | ||
947 | 627 | + | ||
948 | 628 | + /* down to leaf */ | ||
949 | 629 | + mtr_start(&mtr); | ||
950 | 630 | + mtr_set_log_mode(&mtr, MTR_LOG_NONE); | ||
951 | 631 | + | ||
952 | 632 | + height = ULINT_UNDEFINED; | ||
953 | 633 | + | ||
954 | 634 | + for (;;) { | ||
955 | 635 | + block = buf_page_get(space_id, zip_size, page_no, | ||
956 | 636 | + RW_NO_LATCH, &mtr); | ||
957 | 637 | + page = buf_block_get_frame(block); | ||
958 | 638 | + | ||
959 | 639 | + block->check_index_page_at_flush = TRUE; | ||
960 | 640 | + | ||
961 | 641 | + if (height == ULINT_UNDEFINED) { | ||
962 | 642 | + height = btr_page_get_level(page, &mtr); | ||
963 | 643 | + root_height = height; | ||
964 | 644 | + } | ||
965 | 645 | + | ||
966 | 646 | + if (height == 0) { | ||
967 | 647 | + break; | ||
968 | 648 | + } | ||
969 | 649 | + | ||
970 | 650 | + node_ptr = page_rec_get_next(page_get_infimum_rec(page)); | ||
971 | 651 | + | ||
972 | 652 | + height--; | ||
973 | 653 | + | ||
974 | 654 | + offsets = rec_get_offsets(node_ptr, index, offsets, ULINT_UNDEFINED, &heap); | ||
975 | 655 | + page_no = btr_node_ptr_get_child_page_no(node_ptr, offsets); | ||
976 | 656 | + } | ||
977 | 657 | + | ||
978 | 658 | + mtr_commit(&mtr); | ||
979 | 659 | + | ||
980 | 660 | + fprintf(stderr, "InnoDB: pages needs split are ..."); | ||
981 | 661 | + | ||
982 | 662 | + /* scan reaf pages */ | ||
983 | 663 | + while (page_no != FIL_NULL) { | ||
984 | 664 | + rec_t* rec; | ||
985 | 665 | + rec_t* supremum; | ||
986 | 666 | + ulint n_recs; | ||
987 | 667 | + | ||
988 | 668 | + mtr_start(&mtr); | ||
989 | 669 | + | ||
990 | 670 | + block = buf_page_get(space_id, zip_size, page_no, | ||
991 | 671 | + RW_X_LATCH, &mtr); | ||
992 | 672 | + page = buf_block_get_frame(block); | ||
993 | 673 | + page_zip = buf_block_get_page_zip(block); | ||
994 | 674 | + | ||
995 | 675 | + if (!page_zip) { | ||
996 | 676 | + /*something wrong*/ | ||
997 | 677 | + fprintf(stderr, "InnoDB: Something wrong with reading page %lu.\n", page_no); | ||
998 | 678 | +convert_err_exit: | ||
999 | 679 | + mtr_commit(&mtr); | ||
1000 | 680 | + mutex_enter(&fil_system->mutex); | ||
1001 | 681 | + fil_space_free(space_id, FALSE); | ||
1002 | 682 | + mutex_exit(&fil_system->mutex); | ||
1003 | 683 | + success = FALSE; | ||
1004 | 684 | + goto convert_exit; | ||
1005 | 685 | + } | ||
1006 | 686 | + | ||
1007 | 687 | + supremum = page_get_supremum_rec(page); | ||
1008 | 688 | + rec = page_rec_get_next(page_get_infimum_rec(page)); | ||
1009 | 689 | + n_recs = page_get_n_recs(page); | ||
1010 | 690 | + | ||
1011 | 691 | + /* illegal operation as InnoDB online system. so not logged */ | ||
1012 | 692 | + while (rec && rec != supremum && n_recs > 0) { | ||
1013 | 693 | + ulint n_fields; | ||
1014 | 694 | + ulint i; | ||
1015 | 695 | + ulint offset = index->trx_id_offset; | ||
1016 | 696 | + | ||
1017 | 697 | + offsets = rec_get_offsets(rec, index, offsets, | ||
1018 | 698 | + ULINT_UNDEFINED, &heap); | ||
1019 | 699 | + n_fields = rec_offs_n_fields(offsets); | ||
1020 | 700 | + if (!offset) { | ||
1021 | 701 | + offset = row_get_trx_id_offset(rec, index, offsets); | ||
1022 | 702 | + } | ||
1023 | 703 | + trx_write_trx_id(rec + offset, 1); | ||
1024 | 704 | + | ||
1025 | 705 | + for (i = 0; i < n_fields; i++) { | ||
1026 | 706 | + if (rec_offs_nth_extern(offsets, i)) { | ||
1027 | 707 | + ulint local_len; | ||
1028 | 708 | + byte* data; | ||
1029 | 709 | + | ||
1030 | 710 | + data = rec_get_nth_field(rec, offsets, i, &local_len); | ||
1031 | 711 | + | ||
1032 | 712 | + local_len -= BTR_EXTERN_FIELD_REF_SIZE; | ||
1033 | 713 | + | ||
1034 | 714 | + mach_write_to_4(data + local_len + BTR_EXTERN_SPACE_ID, id); | ||
1035 | 715 | + } | ||
1036 | 716 | + } | ||
1037 | 717 | + | ||
1038 | 718 | + rec = page_rec_get_next(rec); | ||
1039 | 719 | + n_recs--; | ||
1040 | 720 | + } | ||
1041 | 721 | + | ||
1042 | 722 | + /* dummy logged update for along with modified page path */ | ||
1043 | 723 | + if (index->id != btr_page_get_index_id(page)) { | ||
1044 | 724 | + /* this should be adjusted already */ | ||
1045 | 725 | + fprintf(stderr, "InnoDB: The page %lu seems to be converted wrong.\n", page_no); | ||
1046 | 726 | + goto convert_err_exit; | ||
1047 | 727 | + } | ||
1048 | 728 | + btr_page_set_index_id(page, page_zip, index->id, &mtr); | ||
1049 | 729 | + | ||
1050 | 730 | + /* confirm whether fits to the page size or not */ | ||
1051 | 731 | + if (!page_zip_compress(page_zip, page, index, &mtr) | ||
1052 | 732 | + && !btr_page_reorganize(block, index, &mtr)) { | ||
1053 | 733 | + buf_block_t* new_block; | ||
1054 | 734 | + page_t* new_page; | ||
1055 | 735 | + page_zip_des_t* new_page_zip; | ||
1056 | 736 | + rec_t* split_rec; | ||
1057 | 737 | + ulint n_uniq; | ||
1058 | 738 | + | ||
1059 | 739 | + /* split page is needed */ | ||
1060 | 740 | + fprintf(stderr, " %lu", page_no); | ||
1061 | 741 | + | ||
1062 | 742 | + mtr_x_lock(dict_index_get_lock(index), &mtr); | ||
1063 | 743 | + | ||
1064 | 744 | + n_uniq = dict_index_get_n_unique_in_tree(index); | ||
1065 | 745 | + | ||
1066 | 746 | + if(page_get_n_recs(page) < 2) { | ||
1067 | 747 | + /* no way to make smaller */ | ||
1068 | 748 | + fprintf(stderr, "InnoDB: The page %lu cannot be store to the page size.\n", page_no); | ||
1069 | 749 | + goto convert_err_exit; | ||
1070 | 750 | + } | ||
1071 | 751 | + | ||
1072 | 752 | + if (UNIV_UNLIKELY(page_no == dict_index_get_page(index))) { | ||
1073 | 753 | + ulint new_page_no; | ||
1074 | 754 | + dtuple_t* node_ptr; | ||
1075 | 755 | + ulint level; | ||
1076 | 756 | + rec_t* node_ptr_rec; | ||
1077 | 757 | + page_cur_t page_cursor; | ||
1078 | 758 | + | ||
1079 | 759 | + /* it is root page, need to raise before split */ | ||
1080 | 760 | + | ||
1081 | 761 | + level = btr_page_get_level(page, &mtr); | ||
1082 | 762 | + | ||
1083 | 763 | + new_block = btr_page_alloc(index, 0, FSP_NO_DIR, level, &mtr); | ||
1084 | 764 | + new_page = buf_block_get_frame(new_block); | ||
1085 | 765 | + new_page_zip = buf_block_get_page_zip(new_block); | ||
1086 | 766 | + btr_page_create(new_block, new_page_zip, index, level, &mtr); | ||
1087 | 767 | + | ||
1088 | 768 | + btr_page_set_next(new_page, new_page_zip, FIL_NULL, &mtr); | ||
1089 | 769 | + btr_page_set_prev(new_page, new_page_zip, FIL_NULL, &mtr); | ||
1090 | 770 | + | ||
1091 | 771 | + page_zip_copy_recs(new_page_zip, new_page, | ||
1092 | 772 | + page_zip, page, index, &mtr); | ||
1093 | 773 | + btr_search_move_or_delete_hash_entries(new_block, block, index); | ||
1094 | 774 | + | ||
1095 | 775 | + rec = page_rec_get_next(page_get_infimum_rec(new_page)); | ||
1096 | 776 | + new_page_no = buf_block_get_page_no(new_block); | ||
1097 | 777 | + | ||
1098 | 778 | + node_ptr = dict_index_build_node_ptr(index, rec, new_page_no, heap, | ||
1099 | 779 | + level); | ||
1100 | 780 | + dtuple_set_info_bits(node_ptr, | ||
1101 | 781 | + dtuple_get_info_bits(node_ptr) | ||
1102 | 782 | + | REC_INFO_MIN_REC_FLAG); | ||
1103 | 783 | + btr_page_empty(block, page_zip, index, level + 1, &mtr); | ||
1104 | 784 | + | ||
1105 | 785 | + btr_page_set_next(page, page_zip, FIL_NULL, &mtr); | ||
1106 | 786 | + btr_page_set_prev(page, page_zip, FIL_NULL, &mtr); | ||
1107 | 787 | + | ||
1108 | 788 | + page_cur_set_before_first(block, &page_cursor); | ||
1109 | 789 | + | ||
1110 | 790 | + node_ptr_rec = page_cur_tuple_insert(&page_cursor, node_ptr, | ||
1111 | 791 | + index, 0, &mtr); | ||
1112 | 792 | + ut_a(node_ptr_rec); | ||
1113 | 793 | + | ||
1114 | 794 | + if (!btr_page_reorganize(block, index, &mtr)) { | ||
1115 | 795 | + fprintf(stderr, "InnoDB: failed to store the page %lu.\n", page_no); | ||
1116 | 796 | + goto convert_err_exit; | ||
1117 | 797 | + } | ||
1118 | 798 | + | ||
1119 | 799 | + /* move to the raised page */ | ||
1120 | 800 | + page_no = new_page_no; | ||
1121 | 801 | + block = new_block; | ||
1122 | 802 | + page = new_page; | ||
1123 | 803 | + page_zip = new_page_zip; | ||
1124 | 804 | + | ||
1125 | 805 | + fprintf(stderr, "(raise_to:%lu)", page_no); | ||
1126 | 806 | + } | ||
1127 | 807 | + | ||
1128 | 808 | + split_rec = page_get_middle_rec(page); | ||
1129 | 809 | + | ||
1130 | 810 | + new_block = btr_page_alloc(index, page_no + 1, FSP_UP, | ||
1131 | 811 | + btr_page_get_level(page, &mtr), &mtr); | ||
1132 | 812 | + new_page = buf_block_get_frame(new_block); | ||
1133 | 813 | + new_page_zip = buf_block_get_page_zip(new_block); | ||
1134 | 814 | + btr_page_create(new_block, new_page_zip, index, | ||
1135 | 815 | + btr_page_get_level(page, &mtr), &mtr); | ||
1136 | 816 | + | ||
1137 | 817 | + offsets = rec_get_offsets(split_rec, index, offsets, n_uniq, &heap); | ||
1138 | 818 | + | ||
1139 | 819 | + btr_attach_half_pages(index, block, | ||
1140 | 820 | + split_rec, new_block, FSP_UP, &mtr); | ||
1141 | 821 | + | ||
1142 | 822 | + page_zip_copy_recs(new_page_zip, new_page, | ||
1143 | 823 | + page_zip, page, index, &mtr); | ||
1144 | 824 | + page_delete_rec_list_start(split_rec - page + new_page, | ||
1145 | 825 | + new_block, index, &mtr); | ||
1146 | 826 | + btr_search_move_or_delete_hash_entries(new_block, block, index); | ||
1147 | 827 | + page_delete_rec_list_end(split_rec, block, index, | ||
1148 | 828 | + ULINT_UNDEFINED, ULINT_UNDEFINED, &mtr); | ||
1149 | 829 | + | ||
1150 | 830 | + fprintf(stderr, "(new:%lu)", buf_block_get_page_no(new_block)); | ||
1151 | 831 | + | ||
1152 | 832 | + /* Are they needed? */ | ||
1153 | 833 | + if (!btr_page_reorganize(block, index, &mtr)) { | ||
1154 | 834 | + fprintf(stderr, "InnoDB: failed to store the page %lu.\n", page_no); | ||
1155 | 835 | + goto convert_err_exit; | ||
1156 | 836 | + } | ||
1157 | 837 | + if (!btr_page_reorganize(new_block, index, &mtr)) { | ||
1158 | 838 | + fprintf(stderr, "InnoDB: failed to store the page %lu.\n", buf_block_get_page_no(new_block)); | ||
1159 | 839 | + goto convert_err_exit; | ||
1160 | 840 | + } | ||
1161 | 841 | + } | ||
1162 | 842 | + | ||
1163 | 843 | + page_no = btr_page_get_next(page, &mtr); | ||
1164 | 844 | + | ||
1165 | 845 | + mtr_commit(&mtr); | ||
1166 | 846 | + | ||
1167 | 847 | + if (heap) { | ||
1168 | 848 | + mem_heap_empty(heap); | ||
1169 | 849 | + } | ||
1170 | 850 | + } | ||
1171 | 851 | + | ||
1172 | 852 | + fprintf(stderr, "...done.\nInnoDB: waiting the flush batch of the additional conversion.\n"); | ||
1173 | 853 | + | ||
1174 | 854 | + /* should wait for the not-logged changes are all flushed */ | ||
1175 | 855 | + buf_flush_list(ULINT_MAX, mtr.end_lsn + 1); | ||
1176 | 856 | + buf_flush_wait_batch_end(NULL, BUF_FLUSH_LIST); | ||
1177 | 857 | + | ||
1178 | 858 | + fprintf(stderr, "InnoDB: done.\n"); | ||
1179 | 859 | +convert_exit: | ||
1180 | 860 | + if (UNIV_LIKELY_NULL(heap)) { | ||
1181 | 861 | + mem_heap_free(heap); | ||
1182 | 862 | + } | ||
1183 | 863 | + } | ||
1184 | 864 | + | ||
1185 | 865 | return(success); | ||
1186 | 866 | } | ||
1187 | 867 | #endif /* !UNIV_HOTBACKUP */ | ||
1188 | 500 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc | 868 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc |
1189 | 501 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-03 15:49:59.195023983 +0900 | 869 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-03 15:49:59.195023983 +0900 |
1190 | 502 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-03 15:52:23.555957062 +0900 | 870 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-03 15:52:23.555957062 +0900 |
1192 | 503 | @@ -7368,6 +7368,14 @@ | 871 | @@ -7377,6 +7377,14 @@ |
1193 | 504 | err = row_discard_tablespace_for_mysql(dict_table->name, trx); | 872 | err = row_discard_tablespace_for_mysql(dict_table->name, trx); |
1194 | 505 | } else { | 873 | } else { |
1195 | 506 | err = row_import_tablespace_for_mysql(dict_table->name, trx); | 874 | err = row_import_tablespace_for_mysql(dict_table->name, trx); |
1196 | @@ -515,7 +883,7 @@ | |||
1197 | 515 | } | 883 | } |
1198 | 516 | 884 | ||
1199 | 517 | err = convert_error_code_to_mysql(err, dict_table->flags, NULL); | 885 | err = convert_error_code_to_mysql(err, dict_table->flags, NULL); |
1201 | 518 | @@ -11642,6 +11650,11 @@ | 886 | @@ -11649,6 +11657,11 @@ |
1202 | 519 | "Choose method of innodb_adaptive_flushing. (native, [estimate], keep_average)", | 887 | "Choose method of innodb_adaptive_flushing. (native, [estimate], keep_average)", |
1203 | 520 | NULL, innodb_adaptive_flushing_method_update, 1, &adaptive_flushing_method_typelib); | 888 | NULL, innodb_adaptive_flushing_method_update, 1, &adaptive_flushing_method_typelib); |
1204 | 521 | 889 | ||
1205 | @@ -527,7 +895,7 @@ | |||
1206 | 527 | static MYSQL_SYSVAR_ULONG(dict_size_limit, srv_dict_size_limit, | 895 | static MYSQL_SYSVAR_ULONG(dict_size_limit, srv_dict_size_limit, |
1207 | 528 | PLUGIN_VAR_RQCMDARG, | 896 | PLUGIN_VAR_RQCMDARG, |
1208 | 529 | "Limit the allocated memory for dictionary cache. (0: unlimited)", | 897 | "Limit the allocated memory for dictionary cache. (0: unlimited)", |
1210 | 530 | @@ -11714,6 +11727,7 @@ | 898 | @@ -11721,6 +11734,7 @@ |
1211 | 531 | MYSQL_SYSVAR(flush_neighbor_pages), | 899 | MYSQL_SYSVAR(flush_neighbor_pages), |
1212 | 532 | MYSQL_SYSVAR(read_ahead), | 900 | MYSQL_SYSVAR(read_ahead), |
1213 | 533 | MYSQL_SYSVAR(adaptive_flushing_method), | 901 | MYSQL_SYSVAR(adaptive_flushing_method), |
1214 | @@ -535,10 +903,125 @@ | |||
1215 | 535 | MYSQL_SYSVAR(dict_size_limit), | 903 | MYSQL_SYSVAR(dict_size_limit), |
1216 | 536 | MYSQL_SYSVAR(use_sys_malloc), | 904 | MYSQL_SYSVAR(use_sys_malloc), |
1217 | 537 | MYSQL_SYSVAR(use_native_aio), | 905 | MYSQL_SYSVAR(use_native_aio), |
1218 | 906 | diff -ruN a/storage/innobase/include/btr0btr.h b/storage/innobase/include/btr0btr.h | ||
1219 | 907 | --- a/storage/innobase/include/btr0btr.h 2011-04-11 19:44:03.000000000 +0900 | ||
1220 | 908 | +++ b/storage/innobase/include/btr0btr.h 2011-05-24 20:30:12.459853343 +0900 | ||
1221 | 909 | @@ -219,6 +219,17 @@ | ||
1222 | 910 | @return the uncompressed page frame */ | ||
1223 | 911 | # define btr_page_get(space,zip_size,page_no,mode,mtr) \ | ||
1224 | 912 | buf_block_get_frame(btr_block_get(space,zip_size,page_no,mode,mtr)) | ||
1225 | 913 | +/**************************************************************//** | ||
1226 | 914 | +Sets the index id field of a page. */ | ||
1227 | 915 | +UNIV_INLINE | ||
1228 | 916 | +void | ||
1229 | 917 | +btr_page_set_index_id( | ||
1230 | 918 | +/*==================*/ | ||
1231 | 919 | + page_t* page, /*!< in: page to be created */ | ||
1232 | 920 | + page_zip_des_t* page_zip,/*!< in: compressed page whose uncompressed | ||
1233 | 921 | + part will be updated, or NULL */ | ||
1234 | 922 | + index_id_t id, /*!< in: index id */ | ||
1235 | 923 | + mtr_t* mtr); /*!< in: mtr */ | ||
1236 | 924 | #endif /* !UNIV_HOTBACKUP */ | ||
1237 | 925 | /**************************************************************//** | ||
1238 | 926 | Gets the index id field of a page. | ||
1239 | 927 | @@ -256,6 +267,17 @@ | ||
1240 | 928 | const page_t* page, /*!< in: index page */ | ||
1241 | 929 | mtr_t* mtr); /*!< in: mini-transaction handle */ | ||
1242 | 930 | /********************************************************//** | ||
1243 | 931 | +Sets the next index page field. */ | ||
1244 | 932 | +UNIV_INLINE | ||
1245 | 933 | +void | ||
1246 | 934 | +btr_page_set_next( | ||
1247 | 935 | +/*==============*/ | ||
1248 | 936 | + page_t* page, /*!< in: index page */ | ||
1249 | 937 | + page_zip_des_t* page_zip,/*!< in: compressed page whose uncompressed | ||
1250 | 938 | + part will be updated, or NULL */ | ||
1251 | 939 | + ulint next, /*!< in: next page number */ | ||
1252 | 940 | + mtr_t* mtr); /*!< in: mini-transaction handle */ | ||
1253 | 941 | +/********************************************************//** | ||
1254 | 942 | Gets the previous index page number. | ||
1255 | 943 | @return prev page number */ | ||
1256 | 944 | UNIV_INLINE | ||
1257 | 945 | @@ -264,6 +286,17 @@ | ||
1258 | 946 | /*==============*/ | ||
1259 | 947 | const page_t* page, /*!< in: index page */ | ||
1260 | 948 | mtr_t* mtr); /*!< in: mini-transaction handle */ | ||
1261 | 949 | +/********************************************************//** | ||
1262 | 950 | +Sets the previous index page field. */ | ||
1263 | 951 | +UNIV_INLINE | ||
1264 | 952 | +void | ||
1265 | 953 | +btr_page_set_prev( | ||
1266 | 954 | +/*==============*/ | ||
1267 | 955 | + page_t* page, /*!< in: index page */ | ||
1268 | 956 | + page_zip_des_t* page_zip,/*!< in: compressed page whose uncompressed | ||
1269 | 957 | + part will be updated, or NULL */ | ||
1270 | 958 | + ulint prev, /*!< in: previous page number */ | ||
1271 | 959 | + mtr_t* mtr); /*!< in: mini-transaction handle */ | ||
1272 | 960 | /*************************************************************//** | ||
1273 | 961 | Gets pointer to the previous user record in the tree. It is assumed | ||
1274 | 962 | that the caller has appropriate latches on the page and its neighbor. | ||
1275 | 963 | @@ -309,6 +342,18 @@ | ||
1276 | 964 | /*===========================*/ | ||
1277 | 965 | const rec_t* rec, /*!< in: node pointer record */ | ||
1278 | 966 | const ulint* offsets);/*!< in: array returned by rec_get_offsets() */ | ||
1279 | 967 | +/**************************************************************//** | ||
1280 | 968 | +Creates a new index page (not the root, and also not | ||
1281 | 969 | +used in page reorganization). @see btr_page_empty(). */ | ||
1282 | 970 | +UNIV_INTERN | ||
1283 | 971 | +void | ||
1284 | 972 | +btr_page_create( | ||
1285 | 973 | +/*============*/ | ||
1286 | 974 | + buf_block_t* block, /*!< in/out: page to be created */ | ||
1287 | 975 | + page_zip_des_t* page_zip,/*!< in/out: compressed page, or NULL */ | ||
1288 | 976 | + dict_index_t* index, /*!< in: index */ | ||
1289 | 977 | + ulint level, /*!< in: the B-tree level of the page */ | ||
1290 | 978 | + mtr_t* mtr); /*!< in: mtr */ | ||
1291 | 979 | /************************************************************//** | ||
1292 | 980 | Creates the root node for a new index tree. | ||
1293 | 981 | @return page number of the created root, FIL_NULL if did not succeed */ | ||
1294 | 982 | @@ -379,6 +424,17 @@ | ||
1295 | 983 | dict_index_t* index, /*!< in: record descriptor */ | ||
1296 | 984 | mtr_t* mtr); /*!< in: mtr */ | ||
1297 | 985 | /*************************************************************//** | ||
1298 | 986 | +Empties an index page. @see btr_page_create(). */ | ||
1299 | 987 | +UNIV_INTERN | ||
1300 | 988 | +void | ||
1301 | 989 | +btr_page_empty( | ||
1302 | 990 | +/*===========*/ | ||
1303 | 991 | + buf_block_t* block, /*!< in: page to be emptied */ | ||
1304 | 992 | + page_zip_des_t* page_zip,/*!< out: compressed page, or NULL */ | ||
1305 | 993 | + dict_index_t* index, /*!< in: index of the page */ | ||
1306 | 994 | + ulint level, /*!< in: the B-tree level of the page */ | ||
1307 | 995 | + mtr_t* mtr); /*!< in: mtr */ | ||
1308 | 996 | +/*************************************************************//** | ||
1309 | 997 | Decides if the page should be split at the convergence point of | ||
1310 | 998 | inserts converging to left. | ||
1311 | 999 | @return TRUE if split recommended */ | ||
1312 | 1000 | @@ -437,6 +493,20 @@ | ||
1313 | 1001 | # define btr_insert_on_non_leaf_level(i,l,t,m) \ | ||
1314 | 1002 | btr_insert_on_non_leaf_level_func(i,l,t,__FILE__,__LINE__,m) | ||
1315 | 1003 | #endif /* !UNIV_HOTBACKUP */ | ||
1316 | 1004 | +/**************************************************************//** | ||
1317 | 1005 | +Attaches the halves of an index page on the appropriate level in an | ||
1318 | 1006 | +index tree. */ | ||
1319 | 1007 | +UNIV_INTERN | ||
1320 | 1008 | +void | ||
1321 | 1009 | +btr_attach_half_pages( | ||
1322 | 1010 | +/*==================*/ | ||
1323 | 1011 | + dict_index_t* index, /*!< in: the index tree */ | ||
1324 | 1012 | + buf_block_t* block, /*!< in/out: page to be split */ | ||
1325 | 1013 | + rec_t* split_rec, /*!< in: first record on upper | ||
1326 | 1014 | + half page */ | ||
1327 | 1015 | + buf_block_t* new_block, /*!< in/out: the new half page */ | ||
1328 | 1016 | + ulint direction, /*!< in: FSP_UP or FSP_DOWN */ | ||
1329 | 1017 | + mtr_t* mtr); /*!< in: mtr */ | ||
1330 | 1018 | /****************************************************************//** | ||
1331 | 1019 | Sets a record as the predefined minimum record. */ | ||
1332 | 1020 | UNIV_INTERN | ||
1333 | 538 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h | 1021 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h |
1334 | 539 | --- a/storage/innobase/include/srv0srv.h 2010-12-03 15:48:03.077954270 +0900 | 1022 | --- a/storage/innobase/include/srv0srv.h 2010-12-03 15:48:03.077954270 +0900 |
1335 | 540 | +++ b/storage/innobase/include/srv0srv.h 2010-12-03 15:52:23.561986996 +0900 | 1023 | +++ b/storage/innobase/include/srv0srv.h 2010-12-03 15:52:23.561986996 +0900 |
1337 | 541 | @@ -232,6 +232,8 @@ | 1024 | @@ -229,6 +229,8 @@ |
1338 | 542 | extern ulint srv_read_ahead; | 1025 | extern ulint srv_read_ahead; |
1339 | 543 | extern ulint srv_adaptive_flushing_method; | 1026 | extern ulint srv_adaptive_flushing_method; |
1340 | 544 | 1027 | ||
1341 | @@ -547,10 +1030,37 @@ | |||
1342 | 547 | extern ulint srv_dict_size_limit; | 1030 | extern ulint srv_dict_size_limit; |
1343 | 548 | /*-------------------------------------------*/ | 1031 | /*-------------------------------------------*/ |
1344 | 549 | 1032 | ||
1345 | 1033 | diff -ruN a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c | ||
1346 | 1034 | --- a/storage/innobase/row/row0mysql.c 2011-04-11 19:44:03.000000000 +0900 | ||
1347 | 1035 | +++ b/storage/innobase/row/row0mysql.c 2011-06-06 11:53:18.395764565 +0900 | ||
1348 | 1036 | @@ -2568,6 +2568,11 @@ | ||
1349 | 1037 | |||
1350 | 1038 | current_lsn = log_get_lsn(); | ||
1351 | 1039 | |||
1352 | 1040 | + /* Enlarge the fatal lock wait timeout during import. */ | ||
1353 | 1041 | + mutex_enter(&kernel_mutex); | ||
1354 | 1042 | + srv_fatal_semaphore_wait_threshold += 7200; /* 2 hours */ | ||
1355 | 1043 | + mutex_exit(&kernel_mutex); | ||
1356 | 1044 | + | ||
1357 | 1045 | /* It is possible, though very improbable, that the lsn's in the | ||
1358 | 1046 | tablespace to be imported have risen above the current system lsn, if | ||
1359 | 1047 | a lengthy purge, ibuf merge, or rollback was performed on a backup | ||
1360 | 1048 | @@ -2679,6 +2684,11 @@ | ||
1361 | 1049 | |||
1362 | 1050 | trx->op_info = ""; | ||
1363 | 1051 | |||
1364 | 1052 | + /* Restore the fatal semaphore wait timeout */ | ||
1365 | 1053 | + mutex_enter(&kernel_mutex); | ||
1366 | 1054 | + srv_fatal_semaphore_wait_threshold -= 7200; /* 2 hours */ | ||
1367 | 1055 | + mutex_exit(&kernel_mutex); | ||
1368 | 1056 | + | ||
1369 | 1057 | return((int) err); | ||
1370 | 1058 | } | ||
1371 | 1059 | |||
1372 | 550 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c | 1060 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c |
1373 | 551 | --- a/storage/innobase/srv/srv0srv.c 2010-12-03 15:49:59.230956118 +0900 | 1061 | --- a/storage/innobase/srv/srv0srv.c 2010-12-03 15:49:59.230956118 +0900 |
1374 | 552 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-03 15:52:23.562954411 +0900 | 1062 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-03 15:52:23.562954411 +0900 |
1376 | 553 | @@ -422,6 +422,8 @@ | 1063 | @@ -416,6 +416,8 @@ |
1377 | 554 | UNIV_INTERN ulint srv_read_ahead = 3; /* 1: random 2: linear 3: Both */ | 1064 | UNIV_INTERN ulint srv_read_ahead = 3; /* 1: random 2: linear 3: Both */ |
1378 | 555 | UNIV_INTERN ulint srv_adaptive_flushing_method = 0; /* 0: native 1: estimate 2: keep_average */ | 1065 | UNIV_INTERN ulint srv_adaptive_flushing_method = 0; /* 0: native 1: estimate 2: keep_average */ |
1379 | 556 | 1066 | ||
1380 | 557 | 1067 | ||
1381 | === modified file 'innodb_extend_slow.patch' | |||
1382 | --- innodb_extend_slow.patch 2011-05-10 11:57:42 +0000 | |||
1383 | +++ innodb_extend_slow.patch 2011-06-20 09:04:39 +0000 | |||
1384 | @@ -335,7 +335,7 @@ | |||
1385 | 335 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c | 335 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c |
1386 | 336 | --- a/storage/innobase/fil/fil0fil.c 2010-12-03 15:53:54.610037199 +0900 | 336 | --- a/storage/innobase/fil/fil0fil.c 2010-12-03 15:53:54.610037199 +0900 |
1387 | 337 | +++ b/storage/innobase/fil/fil0fil.c 2010-12-03 17:42:42.079064198 +0900 | 337 | +++ b/storage/innobase/fil/fil0fil.c 2010-12-03 17:42:42.079064198 +0900 |
1389 | 338 | @@ -4423,7 +4423,7 @@ | 338 | @@ -4747,7 +4747,7 @@ |
1390 | 339 | node->name, node->handle, buf, | 339 | node->name, node->handle, buf, |
1391 | 340 | offset_low, offset_high, | 340 | offset_low, offset_high, |
1392 | 341 | page_size * n_pages, | 341 | page_size * n_pages, |
1393 | @@ -344,7 +344,7 @@ | |||
1394 | 344 | #endif | 344 | #endif |
1395 | 345 | if (success) { | 345 | if (success) { |
1396 | 346 | node->size += n_pages; | 346 | node->size += n_pages; |
1398 | 347 | @@ -4750,7 +4750,7 @@ | 347 | @@ -5074,7 +5074,7 @@ |
1399 | 348 | i/o on a tablespace which does not exist */ | 348 | i/o on a tablespace which does not exist */ |
1400 | 349 | UNIV_INTERN | 349 | UNIV_INTERN |
1401 | 350 | ulint | 350 | ulint |
1402 | @@ -353,7 +353,7 @@ | |||
1403 | 353 | /*===*/ | 353 | /*===*/ |
1404 | 354 | ulint type, /*!< in: OS_FILE_READ or OS_FILE_WRITE, | 354 | ulint type, /*!< in: OS_FILE_READ or OS_FILE_WRITE, |
1405 | 355 | ORed to OS_FILE_LOG, if a log i/o | 355 | ORed to OS_FILE_LOG, if a log i/o |
1407 | 356 | @@ -4775,8 +4775,9 @@ | 356 | @@ -5099,8 +5099,9 @@ |
1408 | 357 | void* buf, /*!< in/out: buffer where to store read data | 357 | void* buf, /*!< in/out: buffer where to store read data |
1409 | 358 | or from where to write; in aio this must be | 358 | or from where to write; in aio this must be |
1410 | 359 | appropriately aligned */ | 359 | appropriately aligned */ |
1411 | @@ -364,7 +364,7 @@ | |||
1412 | 364 | { | 364 | { |
1413 | 365 | ulint mode; | 365 | ulint mode; |
1414 | 366 | fil_space_t* space; | 366 | fil_space_t* space; |
1416 | 367 | @@ -4944,7 +4945,7 @@ | 367 | @@ -5268,7 +5269,7 @@ |
1417 | 368 | #else | 368 | #else |
1418 | 369 | /* Queue the aio request */ | 369 | /* Queue the aio request */ |
1419 | 370 | ret = os_aio(type, mode | wake_later, node->name, node->handle, buf, | 370 | ret = os_aio(type, mode | wake_later, node->name, node->handle, buf, |
1420 | @@ -376,7 +376,7 @@ | |||
1421 | 376 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc | 376 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc |
1422 | 377 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:36:44.293955189 +0900 | 377 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:36:44.293955189 +0900 |
1423 | 378 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:42:42.090024586 +0900 | 378 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:42:42.090024586 +0900 |
1425 | 379 | @@ -1559,6 +1559,16 @@ | 379 | @@ -1573,6 +1573,16 @@ |
1426 | 380 | trx->check_unique_secondary = !thd_test_options( | 380 | trx->check_unique_secondary = !thd_test_options( |
1427 | 381 | thd, OPTION_RELAXED_UNIQUE_CHECKS); | 381 | thd, OPTION_RELAXED_UNIQUE_CHECKS); |
1428 | 382 | 382 | ||
1429 | @@ -393,7 +393,7 @@ | |||
1430 | 393 | DBUG_VOID_RETURN; | 393 | DBUG_VOID_RETURN; |
1431 | 394 | } | 394 | } |
1432 | 395 | 395 | ||
1434 | 396 | @@ -1613,6 +1623,32 @@ | 396 | @@ -1627,6 +1637,32 @@ |
1435 | 397 | return(trx); | 397 | return(trx); |
1436 | 398 | } | 398 | } |
1437 | 399 | 399 | ||
1438 | @@ -426,7 +426,7 @@ | |||
1439 | 426 | /*********************************************************************//** | 426 | /*********************************************************************//** |
1440 | 427 | Note that a transaction has been registered with MySQL. | 427 | Note that a transaction has been registered with MySQL. |
1441 | 428 | @return true if transaction is registered with MySQL 2PC coordinator */ | 428 | @return true if transaction is registered with MySQL 2PC coordinator */ |
1443 | 429 | @@ -9296,6 +9332,25 @@ | 429 | @@ -9301,6 +9337,25 @@ |
1444 | 430 | statement has ended */ | 430 | statement has ended */ |
1445 | 431 | 431 | ||
1446 | 432 | if (trx->n_mysql_tables_in_use == 0) { | 432 | if (trx->n_mysql_tables_in_use == 0) { |
1447 | @@ -648,13 +648,13 @@ | |||
1448 | 648 | +/* prototypes for new functions added to ha_innodb.cc */ | 648 | +/* prototypes for new functions added to ha_innodb.cc */ |
1449 | 649 | +ibool innobase_get_slow_log(); | 649 | +ibool innobase_get_slow_log(); |
1450 | 650 | + | 650 | + |
1454 | 651 | /* This is set to the MySQL server value for this variable. */ | 651 | /* Mutex for locking srv_monitor_file */ |
1455 | 652 | extern uint srv_lower_case_table_names; | 652 | extern mutex_t srv_monitor_file_mutex; |
1456 | 653 | 653 | /* Temporary file for innodb monitor output */ | |
1457 | 654 | diff -ruN a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h | 654 | diff -ruN a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h |
1458 | 655 | --- a/storage/innobase/include/trx0trx.h 2010-12-03 15:41:52.049372966 +0900 | 655 | --- a/storage/innobase/include/trx0trx.h 2010-12-03 15:41:52.049372966 +0900 |
1459 | 656 | +++ b/storage/innobase/include/trx0trx.h 2010-12-03 17:42:42.107024532 +0900 | 656 | +++ b/storage/innobase/include/trx0trx.h 2010-12-03 17:42:42.107024532 +0900 |
1461 | 657 | @@ -738,6 +738,17 @@ | 657 | @@ -743,6 +743,17 @@ |
1462 | 658 | /*------------------------------*/ | 658 | /*------------------------------*/ |
1463 | 659 | char detailed_error[256]; /*!< detailed error message for last | 659 | char detailed_error[256]; /*!< detailed error message for last |
1464 | 660 | error, or empty. */ | 660 | error, or empty. */ |
1465 | @@ -843,8 +843,8 @@ | |||
1466 | 843 | } | 843 | } |
1467 | 844 | 844 | ||
1468 | 845 | ut_a(type == OS_FILE_WRITE); | 845 | ut_a(type == OS_FILE_WRITE); |
1471 | 846 | @@ -4099,6 +4131,11 @@ | 846 | @@ -4101,6 +4133,11 @@ |
1472 | 847 | ut_error; | 847 | array = NULL; /* Eliminate compiler warning */ |
1473 | 848 | } | 848 | } |
1474 | 849 | 849 | ||
1475 | 850 | + if (trx && type == OS_FILE_READ) | 850 | + if (trx && type == OS_FILE_READ) |
1476 | @@ -865,10 +865,10 @@ | |||
1477 | 865 | +/* prototypes for new functions added to ha_innodb.cc */ | 865 | +/* prototypes for new functions added to ha_innodb.cc */ |
1478 | 866 | +ibool innobase_get_slow_log(); | 866 | +ibool innobase_get_slow_log(); |
1479 | 867 | + | 867 | + |
1484 | 868 | /* This is set to the MySQL server value for this variable. It is only | 868 | /* The following counter is incremented whenever there is some user activity |
1485 | 869 | needed for FOREIGN KEY definition parsing since FOREIGN KEY names are not | 869 | in the server */ |
1486 | 870 | stored in the server metadata. The server stores and enforces it for | 870 | UNIV_INTERN ulint srv_activity_count = 0; |
1487 | 871 | @@ -1244,6 +1247,10 @@ | 871 | @@ -1232,6 +1235,10 @@ |
1488 | 872 | ibool has_slept = FALSE; | 872 | ibool has_slept = FALSE; |
1489 | 873 | srv_conc_slot_t* slot = NULL; | 873 | srv_conc_slot_t* slot = NULL; |
1490 | 874 | ulint i; | 874 | ulint i; |
1491 | @@ -877,9 +877,9 @@ | |||
1492 | 877 | + ulint sec; | 877 | + ulint sec; |
1493 | 878 | + ulint ms; | 878 | + ulint ms; |
1494 | 879 | 879 | ||
1498 | 880 | if (trx->mysql_thd != NULL | 880 | #ifdef UNIV_SYNC_DEBUG |
1499 | 881 | && thd_is_replication_slave_thread(trx->mysql_thd)) { | 881 | ut_ad(!sync_thread_levels_nonempty_trx(trx->has_search_latch)); |
1500 | 882 | @@ -1320,6 +1327,7 @@ | 882 | @@ -1312,6 +1319,7 @@ |
1501 | 883 | switches. */ | 883 | switches. */ |
1502 | 884 | if (SRV_THREAD_SLEEP_DELAY > 0) { | 884 | if (SRV_THREAD_SLEEP_DELAY > 0) { |
1503 | 885 | os_thread_sleep(SRV_THREAD_SLEEP_DELAY); | 885 | os_thread_sleep(SRV_THREAD_SLEEP_DELAY); |
1504 | @@ -887,10 +887,11 @@ | |||
1505 | 887 | } | 887 | } |
1506 | 888 | 888 | ||
1507 | 889 | trx->op_info = ""; | 889 | trx->op_info = ""; |
1512 | 890 | @@ -1375,6 +1383,13 @@ | 890 | @@ -1371,6 +1379,14 @@ |
1513 | 891 | /* Go to wait for the event; when a thread leaves InnoDB it will | 891 | #ifdef UNIV_SYNC_DEBUG |
1514 | 892 | release this thread */ | 892 | ut_ad(!sync_thread_levels_nonempty_trx(trx->has_search_latch)); |
1515 | 893 | 893 | #endif /* UNIV_SYNC_DEBUG */ | |
1516 | 894 | + | ||
1517 | 894 | + if (innobase_get_slow_log() && trx->take_stats) { | 895 | + if (innobase_get_slow_log() && trx->take_stats) { |
1518 | 895 | + ut_usectime(&sec, &ms); | 896 | + ut_usectime(&sec, &ms); |
1519 | 896 | + start_time = (ib_uint64_t)sec * 1000000 + ms; | 897 | + start_time = (ib_uint64_t)sec * 1000000 + ms; |
1520 | @@ -901,7 +902,7 @@ | |||
1521 | 901 | trx->op_info = "waiting in InnoDB queue"; | 902 | trx->op_info = "waiting in InnoDB queue"; |
1522 | 902 | 903 | ||
1523 | 903 | thd_wait_begin(trx->mysql_thd, THD_WAIT_ROW_TABLE_LOCK); | 904 | thd_wait_begin(trx->mysql_thd, THD_WAIT_ROW_TABLE_LOCK); |
1525 | 904 | @@ -1383,6 +1398,12 @@ | 905 | @@ -1379,6 +1395,12 @@ |
1526 | 905 | 906 | ||
1527 | 906 | trx->op_info = ""; | 907 | trx->op_info = ""; |
1528 | 907 | 908 | ||
1529 | @@ -917,7 +918,7 @@ | |||
1530 | 917 | diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c | 918 | diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c |
1531 | 918 | --- a/storage/innobase/trx/trx0trx.c 2010-12-03 15:41:52.053955669 +0900 | 919 | --- a/storage/innobase/trx/trx0trx.c 2010-12-03 15:41:52.053955669 +0900 |
1532 | 919 | +++ b/storage/innobase/trx/trx0trx.c 2010-12-03 17:42:42.127023410 +0900 | 920 | +++ b/storage/innobase/trx/trx0trx.c 2010-12-03 17:42:42.127023410 +0900 |
1534 | 920 | @@ -185,6 +185,15 @@ | 921 | @@ -188,6 +188,15 @@ |
1535 | 921 | trx->global_read_view = NULL; | 922 | trx->global_read_view = NULL; |
1536 | 922 | trx->read_view = NULL; | 923 | trx->read_view = NULL; |
1537 | 923 | 924 | ||
1538 | @@ -933,9 +934,9 @@ | |||
1539 | 933 | /* Set X/Open XA transaction identification to NULL */ | 934 | /* Set X/Open XA transaction identification to NULL */ |
1540 | 934 | memset(&trx->xid, 0, sizeof(trx->xid)); | 935 | memset(&trx->xid, 0, sizeof(trx->xid)); |
1541 | 935 | trx->xid.formatID = -1; | 936 | trx->xid.formatID = -1; |
1543 | 936 | @@ -222,6 +231,11 @@ | 937 | @@ -221,6 +230,11 @@ |
1544 | 937 | 938 | ||
1546 | 938 | trx->mysql_process_no = os_proc_get_number(); | 939 | mutex_exit(&kernel_mutex); |
1547 | 939 | 940 | ||
1548 | 940 | + if (innobase_get_slow_log() && trx->take_stats) { | 941 | + if (innobase_get_slow_log() && trx->take_stats) { |
1549 | 941 | + trx->distinct_page_access_hash = mem_alloc(DPAH_SIZE); | 942 | + trx->distinct_page_access_hash = mem_alloc(DPAH_SIZE); |
1550 | @@ -945,7 +946,7 @@ | |||
1551 | 945 | return(trx); | 946 | return(trx); |
1552 | 946 | } | 947 | } |
1553 | 947 | 948 | ||
1555 | 948 | @@ -353,6 +367,12 @@ | 949 | @@ -406,6 +420,12 @@ |
1556 | 949 | /*===============*/ | 950 | /*===============*/ |
1557 | 950 | trx_t* trx) /*!< in, own: trx object */ | 951 | trx_t* trx) /*!< in, own: trx object */ |
1558 | 951 | { | 952 | { |
1559 | @@ -958,7 +959,7 @@ | |||
1560 | 958 | mutex_enter(&kernel_mutex); | 959 | mutex_enter(&kernel_mutex); |
1561 | 959 | 960 | ||
1562 | 960 | UT_LIST_REMOVE(mysql_trx_list, trx_sys->mysql_trx_list, trx); | 961 | UT_LIST_REMOVE(mysql_trx_list, trx_sys->mysql_trx_list, trx); |
1564 | 961 | @@ -374,6 +394,12 @@ | 962 | @@ -427,6 +447,12 @@ |
1565 | 962 | /*====================*/ | 963 | /*====================*/ |
1566 | 963 | trx_t* trx) /*!< in, own: trx object */ | 964 | trx_t* trx) /*!< in, own: trx object */ |
1567 | 964 | { | 965 | { |
1568 | @@ -971,7 +972,7 @@ | |||
1569 | 971 | mutex_enter(&kernel_mutex); | 972 | mutex_enter(&kernel_mutex); |
1570 | 972 | 973 | ||
1571 | 973 | trx_free(trx); | 974 | trx_free(trx); |
1573 | 974 | @@ -1152,6 +1178,9 @@ | 975 | @@ -1212,6 +1238,9 @@ |
1574 | 975 | trx_t* trx) /*!< in: transaction */ | 976 | trx_t* trx) /*!< in: transaction */ |
1575 | 976 | { | 977 | { |
1576 | 977 | que_thr_t* thr; | 978 | que_thr_t* thr; |
1577 | @@ -981,7 +982,7 @@ | |||
1578 | 981 | 982 | ||
1579 | 982 | ut_ad(mutex_own(&kernel_mutex)); | 983 | ut_ad(mutex_own(&kernel_mutex)); |
1580 | 983 | ut_ad(trx->que_state == TRX_QUE_LOCK_WAIT); | 984 | ut_ad(trx->que_state == TRX_QUE_LOCK_WAIT); |
1582 | 984 | @@ -1166,6 +1195,11 @@ | 985 | @@ -1226,6 +1255,11 @@ |
1583 | 985 | thr = UT_LIST_GET_FIRST(trx->wait_thrs); | 986 | thr = UT_LIST_GET_FIRST(trx->wait_thrs); |
1584 | 986 | } | 987 | } |
1585 | 987 | 988 | ||
1586 | @@ -993,7 +994,7 @@ | |||
1587 | 993 | trx->que_state = TRX_QUE_RUNNING; | 994 | trx->que_state = TRX_QUE_RUNNING; |
1588 | 994 | } | 995 | } |
1589 | 995 | 996 | ||
1591 | 996 | @@ -1179,6 +1213,9 @@ | 997 | @@ -1239,6 +1273,9 @@ |
1592 | 997 | trx_t* trx) /*!< in: transaction in the TRX_QUE_LOCK_WAIT state */ | 998 | trx_t* trx) /*!< in: transaction in the TRX_QUE_LOCK_WAIT state */ |
1593 | 998 | { | 999 | { |
1594 | 999 | que_thr_t* thr; | 1000 | que_thr_t* thr; |
1595 | @@ -1003,7 +1004,7 @@ | |||
1596 | 1003 | 1004 | ||
1597 | 1004 | ut_ad(mutex_own(&kernel_mutex)); | 1005 | ut_ad(mutex_own(&kernel_mutex)); |
1598 | 1005 | ut_ad(trx->que_state == TRX_QUE_LOCK_WAIT); | 1006 | ut_ad(trx->que_state == TRX_QUE_LOCK_WAIT); |
1600 | 1006 | @@ -1193,6 +1230,11 @@ | 1007 | @@ -1253,6 +1290,11 @@ |
1601 | 1007 | thr = UT_LIST_GET_FIRST(trx->wait_thrs); | 1008 | thr = UT_LIST_GET_FIRST(trx->wait_thrs); |
1602 | 1008 | } | 1009 | } |
1603 | 1009 | 1010 | ||
1604 | 1010 | 1011 | ||
1605 | === modified file 'innodb_extra_rseg.patch' | |||
1606 | --- innodb_extra_rseg.patch 2011-05-23 03:13:18 +0000 | |||
1607 | +++ innodb_extra_rseg.patch 2011-06-20 09:04:39 +0000 | |||
1608 | @@ -8,7 +8,7 @@ | |||
1609 | 8 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc | 8 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc |
1610 | 9 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-03 15:18:48.879955903 +0900 | 9 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-03 15:18:48.879955903 +0900 |
1611 | 10 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-03 15:22:53.779955671 +0900 | 10 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-03 15:22:53.779955671 +0900 |
1613 | 11 | @@ -11521,6 +11521,7 @@ | 11 | @@ -11528,6 +11528,7 @@ |
1614 | 12 | innobase_system_variables, /* system variables */ | 12 | innobase_system_variables, /* system variables */ |
1615 | 13 | NULL /* reserved */ | 13 | NULL /* reserved */ |
1616 | 14 | }, | 14 | }, |
1617 | 15 | 15 | ||
1618 | === added file 'innodb_fake_changes.patch' | |||
1619 | --- innodb_fake_changes.patch 1970-01-01 00:00:00 +0000 | |||
1620 | +++ innodb_fake_changes.patch 2011-06-20 09:04:39 +0000 | |||
1621 | @@ -0,0 +1,614 @@ | |||
1622 | 1 | # name : innodb_fake_changes.patch | ||
1623 | 2 | # introduced : 5.5.12 | ||
1624 | 3 | # maintainer : Yasufumi | ||
1625 | 4 | # | ||
1626 | 5 | #!!! notice !!! | ||
1627 | 6 | # Any small change to this file in the main branch | ||
1628 | 7 | # should be done or reviewed by the maintainer! | ||
1629 | 8 | diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c | ||
1630 | 9 | --- a/storage/innobase/btr/btr0cur.c 2011-06-01 21:04:26.346416429 +0900 | ||
1631 | 10 | +++ b/storage/innobase/btr/btr0cur.c 2011-06-01 21:04:53.718415294 +0900 | ||
1632 | 11 | @@ -1167,6 +1167,11 @@ | ||
1633 | 12 | rec_t* rec; | ||
1634 | 13 | roll_ptr_t roll_ptr; | ||
1635 | 14 | |||
1636 | 15 | + if (thr && thr_get_trx(thr)->fake_changes) { | ||
1637 | 16 | + /* skip LOCK, UNDO */ | ||
1638 | 17 | + return(DB_SUCCESS); | ||
1639 | 18 | + } | ||
1640 | 19 | + | ||
1641 | 20 | /* Check if we have to wait for a lock: enqueue an explicit lock | ||
1642 | 21 | request if yes */ | ||
1643 | 22 | |||
1644 | 23 | @@ -1298,7 +1303,7 @@ | ||
1645 | 24 | } | ||
1646 | 25 | #endif /* UNIV_DEBUG */ | ||
1647 | 26 | |||
1648 | 27 | - ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); | ||
1649 | 28 | + ut_ad((thr && thr_get_trx(thr)->fake_changes) || mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); | ||
1650 | 29 | max_size = page_get_max_insert_size_after_reorganize(page, 1); | ||
1651 | 30 | leaf = page_is_leaf(page); | ||
1652 | 31 | |||
1653 | 32 | @@ -1393,6 +1398,12 @@ | ||
1654 | 33 | goto fail_err; | ||
1655 | 34 | } | ||
1656 | 35 | |||
1657 | 36 | + if (thr && thr_get_trx(thr)->fake_changes) { | ||
1658 | 37 | + /* skip CHANGE, LOG */ | ||
1659 | 38 | + *big_rec = big_rec_vec; | ||
1660 | 39 | + return(err); /* == DB_SUCCESS */ | ||
1661 | 40 | + } | ||
1662 | 41 | + | ||
1663 | 42 | page_cursor = btr_cur_get_page_cur(cursor); | ||
1664 | 43 | |||
1665 | 44 | /* Now, try the insert */ | ||
1666 | 45 | @@ -1535,10 +1546,10 @@ | ||
1667 | 46 | |||
1668 | 47 | *big_rec = NULL; | ||
1669 | 48 | |||
1670 | 49 | - ut_ad(mtr_memo_contains(mtr, | ||
1671 | 50 | + ut_ad((thr && thr_get_trx(thr)->fake_changes) || mtr_memo_contains(mtr, | ||
1672 | 51 | dict_index_get_lock(btr_cur_get_index(cursor)), | ||
1673 | 52 | MTR_MEMO_X_LOCK)); | ||
1674 | 53 | - ut_ad(mtr_memo_contains(mtr, btr_cur_get_block(cursor), | ||
1675 | 54 | + ut_ad((thr && thr_get_trx(thr)->fake_changes) || mtr_memo_contains(mtr, btr_cur_get_block(cursor), | ||
1676 | 55 | MTR_MEMO_PAGE_X_FIX)); | ||
1677 | 56 | |||
1678 | 57 | /* Try first an optimistic insert; reset the cursor flag: we do not | ||
1679 | 58 | @@ -1604,6 +1615,16 @@ | ||
1680 | 59 | } | ||
1681 | 60 | } | ||
1682 | 61 | |||
1683 | 62 | + if (thr && thr_get_trx(thr)->fake_changes) { | ||
1684 | 63 | + /* skip CHANGE, LOG */ | ||
1685 | 64 | + if (n_extents > 0) { | ||
1686 | 65 | + fil_space_release_free_extents(index->space, | ||
1687 | 66 | + n_reserved); | ||
1688 | 67 | + } | ||
1689 | 68 | + *big_rec = big_rec_vec; | ||
1690 | 69 | + return(DB_SUCCESS); | ||
1691 | 70 | + } | ||
1692 | 71 | + | ||
1693 | 72 | if (dict_index_get_page(index) | ||
1694 | 73 | == buf_block_get_page_no(btr_cur_get_block(cursor))) { | ||
1695 | 74 | |||
1696 | 75 | @@ -1660,6 +1681,11 @@ | ||
1697 | 76 | |||
1698 | 77 | ut_ad(cursor && update && thr && roll_ptr); | ||
1699 | 78 | |||
1700 | 79 | + if (thr && thr_get_trx(thr)->fake_changes) { | ||
1701 | 80 | + /* skip LOCK, UNDO */ | ||
1702 | 81 | + return(DB_SUCCESS); | ||
1703 | 82 | + } | ||
1704 | 83 | + | ||
1705 | 84 | rec = btr_cur_get_rec(cursor); | ||
1706 | 85 | index = cursor->index; | ||
1707 | 86 | |||
1708 | 87 | @@ -1958,6 +1984,14 @@ | ||
1709 | 88 | return(err); | ||
1710 | 89 | } | ||
1711 | 90 | |||
1712 | 91 | + if (trx->fake_changes) { | ||
1713 | 92 | + /* skip CHANGE, LOG */ | ||
1714 | 93 | + if (UNIV_LIKELY_NULL(heap)) { | ||
1715 | 94 | + mem_heap_free(heap); | ||
1716 | 95 | + } | ||
1717 | 96 | + return(err); /* == DB_SUCCESS */ | ||
1718 | 97 | + } | ||
1719 | 98 | + | ||
1720 | 99 | if (block->is_hashed) { | ||
1721 | 100 | /* The function row_upd_changes_ord_field_binary works only | ||
1722 | 101 | if the update vector was built for a clustered index, we must | ||
1723 | 102 | @@ -2061,7 +2095,7 @@ | ||
1724 | 103 | rec = btr_cur_get_rec(cursor); | ||
1725 | 104 | index = cursor->index; | ||
1726 | 105 | ut_ad(!!page_rec_is_comp(rec) == dict_table_is_comp(index->table)); | ||
1727 | 106 | - ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); | ||
1728 | 107 | + ut_ad((thr && thr_get_trx(thr)->fake_changes) || mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); | ||
1729 | 108 | /* The insert buffer tree should never be updated in place. */ | ||
1730 | 109 | ut_ad(!dict_index_is_ibuf(index)); | ||
1731 | 110 | |||
1732 | 111 | @@ -2171,6 +2205,11 @@ | ||
1733 | 112 | goto err_exit; | ||
1734 | 113 | } | ||
1735 | 114 | |||
1736 | 115 | + if (thr && thr_get_trx(thr)->fake_changes) { | ||
1737 | 116 | + /* skip CHANGE, LOG */ | ||
1738 | 117 | + goto err_exit; /* == DB_SUCCESS */ | ||
1739 | 118 | + } | ||
1740 | 119 | + | ||
1741 | 120 | /* Ok, we may do the replacement. Store on the page infimum the | ||
1742 | 121 | explicit locks on rec, before deleting rec (see the comment in | ||
1743 | 122 | btr_cur_pessimistic_update). */ | ||
1744 | 123 | @@ -2321,9 +2360,9 @@ | ||
1745 | 124 | rec = btr_cur_get_rec(cursor); | ||
1746 | 125 | index = cursor->index; | ||
1747 | 126 | |||
1748 | 127 | - ut_ad(mtr_memo_contains(mtr, dict_index_get_lock(index), | ||
1749 | 128 | + ut_ad((thr && thr_get_trx(thr)->fake_changes) || mtr_memo_contains(mtr, dict_index_get_lock(index), | ||
1750 | 129 | MTR_MEMO_X_LOCK)); | ||
1751 | 130 | - ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); | ||
1752 | 131 | + ut_ad((thr && thr_get_trx(thr)->fake_changes) || mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); | ||
1753 | 132 | #ifdef UNIV_ZIP_DEBUG | ||
1754 | 133 | ut_a(!page_zip || page_zip_validate(page_zip, page)); | ||
1755 | 134 | #endif /* UNIV_ZIP_DEBUG */ | ||
1756 | 135 | @@ -2411,6 +2450,9 @@ | ||
1757 | 136 | |||
1758 | 137 | ut_ad(big_rec_vec == NULL); | ||
1759 | 138 | |||
1760 | 139 | + /* fake_changes should not cause undo. so never reaches here */ | ||
1761 | 140 | + ut_ad(!(trx->fake_changes)); | ||
1762 | 141 | + | ||
1763 | 142 | btr_rec_free_updated_extern_fields( | ||
1764 | 143 | index, rec, page_zip, offsets, update, | ||
1765 | 144 | trx_is_recv(trx) ? RB_RECOVERY : RB_NORMAL, mtr); | ||
1766 | 145 | @@ -2445,6 +2487,12 @@ | ||
1767 | 146 | } | ||
1768 | 147 | } | ||
1769 | 148 | |||
1770 | 149 | + if (trx->fake_changes) { | ||
1771 | 150 | + /* skip CHANGE, LOG */ | ||
1772 | 151 | + err = DB_SUCCESS; | ||
1773 | 152 | + goto return_after_reservations; | ||
1774 | 153 | + } | ||
1775 | 154 | + | ||
1776 | 155 | /* Store state of explicit locks on rec on the page infimum record, | ||
1777 | 156 | before deleting rec. The page infimum acts as a dummy carrier of the | ||
1778 | 157 | locks, taking care also of lock releases, before we can move the locks | ||
1779 | 158 | @@ -2746,6 +2794,11 @@ | ||
1780 | 159 | ut_ad(dict_index_is_clust(index)); | ||
1781 | 160 | ut_ad(!rec_get_deleted_flag(rec, rec_offs_comp(offsets))); | ||
1782 | 161 | |||
1783 | 162 | + if (thr && thr_get_trx(thr)->fake_changes) { | ||
1784 | 163 | + /* skip LOCK, UNDO, CHANGE, LOG */ | ||
1785 | 164 | + return(DB_SUCCESS); | ||
1786 | 165 | + } | ||
1787 | 166 | + | ||
1788 | 167 | err = lock_clust_rec_modify_check_and_lock(flags, block, | ||
1789 | 168 | rec, index, offsets, thr); | ||
1790 | 169 | |||
1791 | 170 | @@ -2883,6 +2936,11 @@ | ||
1792 | 171 | rec_t* rec; | ||
1793 | 172 | ulint err; | ||
1794 | 173 | |||
1795 | 174 | + if (thr && thr_get_trx(thr)->fake_changes) { | ||
1796 | 175 | + /* skip LOCK, CHANGE, LOG */ | ||
1797 | 176 | + return(DB_SUCCESS); | ||
1798 | 177 | + } | ||
1799 | 178 | + | ||
1800 | 179 | block = btr_cur_get_block(cursor); | ||
1801 | 180 | rec = btr_cur_get_rec(cursor); | ||
1802 | 181 | |||
1803 | 182 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc | ||
1804 | 183 | --- a/storage/innobase/handler/ha_innodb.cc 2011-06-01 21:04:26.511385596 +0900 | ||
1805 | 184 | +++ b/storage/innobase/handler/ha_innodb.cc 2011-06-01 21:04:53.723390828 +0900 | ||
1806 | 185 | @@ -484,6 +484,12 @@ | ||
1807 | 186 | " or 2 (write at commit, flush once per second).", | ||
1808 | 187 | NULL, NULL, 1, 0, 2, 0); | ||
1809 | 188 | |||
1810 | 189 | +static MYSQL_THDVAR_BOOL(fake_changes, PLUGIN_VAR_OPCMDARG, | ||
1811 | 190 | + "In the transaction after enabled, UPDATE, INSERT and DELETE only move the cursor to the records " | ||
1812 | 191 | + "and do nothing other operations (no changes, no ibuf, no undo, no transaction log) in the transaction. " | ||
1813 | 192 | + "ATTENTION: the transaction started after enabled is affected.", | ||
1814 | 193 | + NULL, NULL, FALSE); | ||
1815 | 194 | + | ||
1816 | 195 | |||
1817 | 196 | static handler *innobase_create_handler(handlerton *hton, | ||
1818 | 197 | TABLE_SHARE *table, | ||
1819 | 198 | @@ -1675,6 +1681,8 @@ | ||
1820 | 199 | trx->check_unique_secondary = !thd_test_options( | ||
1821 | 200 | thd, OPTION_RELAXED_UNIQUE_CHECKS); | ||
1822 | 201 | |||
1823 | 202 | + trx->fake_changes = THDVAR(thd, fake_changes); | ||
1824 | 203 | + | ||
1825 | 204 | #ifdef EXTENDED_SLOWLOG | ||
1826 | 205 | if (thd_log_slow_verbosity(thd) & SLOG_V_INNODB) { | ||
1827 | 206 | trx->take_stats = TRUE; | ||
1828 | 207 | @@ -7486,12 +7494,20 @@ | ||
1829 | 208 | |||
1830 | 209 | parent_trx = check_trx_exists(thd); | ||
1831 | 210 | |||
1832 | 211 | + | ||
1833 | 212 | + if (parent_trx->fake_changes | ||
1834 | 213 | + && thd_sql_command(thd) != SQLCOM_CREATE_TABLE) { | ||
1835 | 214 | + sql_print_error("innodb_fake_changes cannot treat new table during other than CREATE TABLE. (%s)\n", name); | ||
1836 | 215 | + DBUG_RETURN(HA_ERR_WRONG_COMMAND); | ||
1837 | 216 | + } | ||
1838 | 217 | + | ||
1839 | 218 | /* In case MySQL calls this in the middle of a SELECT query, release | ||
1840 | 219 | possible adaptive hash latch to avoid deadlocks of threads */ | ||
1841 | 220 | |||
1842 | 221 | trx_search_latch_release_if_reserved(parent_trx); | ||
1843 | 222 | |||
1844 | 223 | trx = innobase_trx_allocate(thd); | ||
1845 | 224 | + trx->fake_changes = FALSE; | ||
1846 | 225 | |||
1847 | 226 | /* Latch the InnoDB data dictionary exclusively so that no deadlocks | ||
1848 | 227 | or lock waits can happen in it during a table create operation. | ||
1849 | 228 | @@ -7701,6 +7717,7 @@ | ||
1850 | 229 | /*==============================*/ | ||
1851 | 230 | { | ||
1852 | 231 | int error; | ||
1853 | 232 | + ibool fake_changes_reserved = FALSE; | ||
1854 | 233 | |||
1855 | 234 | DBUG_ENTER("ha_innobase::truncate"); | ||
1856 | 235 | |||
1857 | 236 | @@ -7713,10 +7730,21 @@ | ||
1858 | 237 | DBUG_RETURN(HA_ERR_CRASHED); | ||
1859 | 238 | } | ||
1860 | 239 | |||
1861 | 240 | + if (prebuilt->trx->fake_changes) { | ||
1862 | 241 | + /* disable temporally */ | ||
1863 | 242 | + prebuilt->trx->fake_changes = FALSE; | ||
1864 | 243 | + fake_changes_reserved = TRUE; | ||
1865 | 244 | + } | ||
1866 | 245 | + | ||
1867 | 246 | /* Truncate the table in InnoDB */ | ||
1868 | 247 | |||
1869 | 248 | error = row_truncate_table_for_mysql(prebuilt->table, prebuilt->trx); | ||
1870 | 249 | |||
1871 | 250 | + if (fake_changes_reserved) { | ||
1872 | 251 | + prebuilt->trx->fake_changes = TRUE; | ||
1873 | 252 | + fake_changes_reserved = FALSE; | ||
1874 | 253 | + } | ||
1875 | 254 | + | ||
1876 | 255 | if (share->ib_table->is_corrupt) { | ||
1877 | 256 | DBUG_RETURN(HA_ERR_CRASHED); | ||
1878 | 257 | } | ||
1879 | 258 | @@ -7768,6 +7796,7 @@ | ||
1880 | 259 | trx_search_latch_release_if_reserved(parent_trx); | ||
1881 | 260 | |||
1882 | 261 | trx = innobase_trx_allocate(thd); | ||
1883 | 262 | + trx->fake_changes = FALSE; | ||
1884 | 263 | |||
1885 | 264 | name_len = strlen(name); | ||
1886 | 265 | |||
1887 | 266 | @@ -7855,6 +7884,7 @@ | ||
1888 | 267 | trx->mysql_thd = NULL; | ||
1889 | 268 | #else | ||
1890 | 269 | trx = innobase_trx_allocate(thd); | ||
1891 | 270 | + trx->fake_changes = FALSE; | ||
1892 | 271 | #endif | ||
1893 | 272 | row_drop_database_for_mysql(namebuf, trx); | ||
1894 | 273 | my_free(namebuf); | ||
1895 | 274 | @@ -7960,6 +7990,7 @@ | ||
1896 | 275 | trx_search_latch_release_if_reserved(parent_trx); | ||
1897 | 276 | |||
1898 | 277 | trx = innobase_trx_allocate(thd); | ||
1899 | 278 | + trx->fake_changes = FALSE; | ||
1900 | 279 | |||
1901 | 280 | error = innobase_rename_table(trx, from, to, TRUE); | ||
1902 | 281 | |||
1903 | 282 | @@ -12228,6 +12259,7 @@ | ||
1904 | 283 | MYSQL_SYSVAR(rollback_segments), | ||
1905 | 284 | MYSQL_SYSVAR(corrupt_table_action), | ||
1906 | 285 | MYSQL_SYSVAR(lazy_drop_table), | ||
1907 | 286 | + MYSQL_SYSVAR(fake_changes), | ||
1908 | 287 | NULL | ||
1909 | 288 | }; | ||
1910 | 289 | |||
1911 | 290 | diff -ruN a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc | ||
1912 | 291 | --- a/storage/innobase/handler/handler0alter.cc 2011-04-11 19:44:03.000000000 +0900 | ||
1913 | 292 | +++ b/storage/innobase/handler/handler0alter.cc 2011-06-01 21:04:53.728495636 +0900 | ||
1914 | 293 | @@ -641,6 +641,7 @@ | ||
1915 | 294 | ibool dict_locked = FALSE; | ||
1916 | 295 | ulint new_primary; | ||
1917 | 296 | int error; | ||
1918 | 297 | + ulint should_fake_changes = FALSE; | ||
1919 | 298 | |||
1920 | 299 | DBUG_ENTER("ha_innobase::add_index"); | ||
1921 | 300 | ut_a(table); | ||
1922 | 301 | @@ -677,11 +678,17 @@ | ||
1923 | 302 | } | ||
1924 | 303 | |||
1925 | 304 | heap = mem_heap_create(1024); | ||
1926 | 305 | + | ||
1927 | 306 | + if (prebuilt->trx->fake_changes) { | ||
1928 | 307 | + prebuilt->trx->fake_changes = FALSE; | ||
1929 | 308 | + should_fake_changes = TRUE; | ||
1930 | 309 | + } | ||
1931 | 310 | trx_start_if_not_started(prebuilt->trx); | ||
1932 | 311 | |||
1933 | 312 | /* Create a background transaction for the operations on | ||
1934 | 313 | the data dictionary tables. */ | ||
1935 | 314 | trx = innobase_trx_allocate(user_thd); | ||
1936 | 315 | + trx->fake_changes = FALSE; | ||
1937 | 316 | trx_start_if_not_started(trx); | ||
1938 | 317 | |||
1939 | 318 | /* Create table containing all indexes to be built in this | ||
1940 | 319 | @@ -760,6 +767,9 @@ | ||
1941 | 320 | row_mysql_unlock_data_dictionary(trx); | ||
1942 | 321 | trx_free_for_mysql(trx); | ||
1943 | 322 | trx_commit_for_mysql(prebuilt->trx); | ||
1944 | 323 | + if (should_fake_changes) { | ||
1945 | 324 | + prebuilt->trx->fake_changes = TRUE; | ||
1946 | 325 | + } | ||
1947 | 326 | DBUG_RETURN(error); | ||
1948 | 327 | } | ||
1949 | 328 | |||
1950 | 329 | @@ -925,6 +935,9 @@ | ||
1951 | 330 | trx_commit_for_mysql(trx); | ||
1952 | 331 | if (prebuilt->trx) { | ||
1953 | 332 | trx_commit_for_mysql(prebuilt->trx); | ||
1954 | 333 | + if (should_fake_changes) { | ||
1955 | 334 | + prebuilt->trx->fake_changes = TRUE; | ||
1956 | 335 | + } | ||
1957 | 336 | } | ||
1958 | 337 | |||
1959 | 338 | if (dict_locked) { | ||
1960 | 339 | @@ -1172,6 +1185,7 @@ | ||
1961 | 340 | /* Create a background transaction for the operations on | ||
1962 | 341 | the data dictionary tables. */ | ||
1963 | 342 | trx = innobase_trx_allocate(user_thd); | ||
1964 | 343 | + trx->fake_changes = FALSE; | ||
1965 | 344 | trx_start_if_not_started(trx); | ||
1966 | 345 | |||
1967 | 346 | /* Flag this transaction as a dictionary operation, so that | ||
1968 | 347 | diff -ruN a/storage/innobase/ibuf/ibuf0ibuf.c b/storage/innobase/ibuf/ibuf0ibuf.c | ||
1969 | 348 | --- a/storage/innobase/ibuf/ibuf0ibuf.c 2011-06-01 21:04:26.529383815 +0900 | ||
1970 | 349 | +++ b/storage/innobase/ibuf/ibuf0ibuf.c 2011-06-01 21:04:53.732416483 +0900 | ||
1971 | 350 | @@ -3496,6 +3496,8 @@ | ||
1972 | 351 | |||
1973 | 352 | ut_a(trx_sys_multiple_tablespace_format); | ||
1974 | 353 | |||
1975 | 354 | + ut_ad(!(thr_get_trx(thr)->fake_changes)); | ||
1976 | 355 | + | ||
1977 | 356 | do_merge = FALSE; | ||
1978 | 357 | |||
1979 | 358 | /* Perform dirty reads of ibuf->size and ibuf->max_size, to | ||
1980 | 359 | diff -ruN a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h | ||
1981 | 360 | --- a/storage/innobase/include/trx0trx.h 2011-06-01 21:04:25.762416618 +0900 | ||
1982 | 361 | +++ b/storage/innobase/include/trx0trx.h 2011-06-01 21:04:53.736387944 +0900 | ||
1983 | 362 | @@ -512,6 +512,7 @@ | ||
1984 | 363 | FALSE, one can save CPU time and about | ||
1985 | 364 | 150 bytes in the undo log size as then | ||
1986 | 365 | we skip XA steps */ | ||
1987 | 366 | + ulint fake_changes; | ||
1988 | 367 | ulint flush_log_later;/* In 2PC, we hold the | ||
1989 | 368 | prepare_commit mutex across | ||
1990 | 369 | both phases. In that case, we | ||
1991 | 370 | diff -ruN a/storage/innobase/lock/lock0lock.c b/storage/innobase/lock/lock0lock.c | ||
1992 | 371 | --- a/storage/innobase/lock/lock0lock.c 2011-06-01 21:04:26.543396960 +0900 | ||
1993 | 372 | +++ b/storage/innobase/lock/lock0lock.c 2011-06-01 21:04:53.739416526 +0900 | ||
1994 | 373 | @@ -3909,6 +3909,10 @@ | ||
1995 | 374 | |||
1996 | 375 | trx = thr_get_trx(thr); | ||
1997 | 376 | |||
1998 | 377 | + if (trx->fake_changes && mode == LOCK_IX) { | ||
1999 | 378 | + mode = LOCK_IS; | ||
2000 | 379 | + } | ||
2001 | 380 | + | ||
2002 | 381 | lock_mutex_enter_kernel(); | ||
2003 | 382 | |||
2004 | 383 | /* Look for stronger locks the same trx already has on the table */ | ||
2005 | 384 | @@ -5107,6 +5111,11 @@ | ||
2006 | 385 | } | ||
2007 | 386 | |||
2008 | 387 | trx = thr_get_trx(thr); | ||
2009 | 388 | + | ||
2010 | 389 | + if (trx->fake_changes) { | ||
2011 | 390 | + return(DB_SUCCESS); | ||
2012 | 391 | + } | ||
2013 | 392 | + | ||
2014 | 393 | next_rec = page_rec_get_next_const(rec); | ||
2015 | 394 | next_rec_heap_no = page_rec_get_heap_no(next_rec); | ||
2016 | 395 | |||
2017 | 396 | @@ -5275,6 +5284,10 @@ | ||
2018 | 397 | return(DB_SUCCESS); | ||
2019 | 398 | } | ||
2020 | 399 | |||
2021 | 400 | + if (thr && thr_get_trx(thr)->fake_changes) { | ||
2022 | 401 | + return(DB_SUCCESS); | ||
2023 | 402 | + } | ||
2024 | 403 | + | ||
2025 | 404 | heap_no = rec_offs_comp(offsets) | ||
2026 | 405 | ? rec_get_heap_no_new(rec) | ||
2027 | 406 | : rec_get_heap_no_old(rec); | ||
2028 | 407 | @@ -5333,6 +5346,10 @@ | ||
2029 | 408 | return(DB_SUCCESS); | ||
2030 | 409 | } | ||
2031 | 410 | |||
2032 | 411 | + if (thr && thr_get_trx(thr)->fake_changes) { | ||
2033 | 412 | + return(DB_SUCCESS); | ||
2034 | 413 | + } | ||
2035 | 414 | + | ||
2036 | 415 | heap_no = page_rec_get_heap_no(rec); | ||
2037 | 416 | |||
2038 | 417 | /* Another transaction cannot have an implicit lock on the record, | ||
2039 | 418 | @@ -5420,6 +5437,10 @@ | ||
2040 | 419 | return(DB_SUCCESS); | ||
2041 | 420 | } | ||
2042 | 421 | |||
2043 | 422 | + if (thr && thr_get_trx(thr)->fake_changes && mode == LOCK_X) { | ||
2044 | 423 | + mode = LOCK_S; | ||
2045 | 424 | + } | ||
2046 | 425 | + | ||
2047 | 426 | heap_no = page_rec_get_heap_no(rec); | ||
2048 | 427 | |||
2049 | 428 | lock_mutex_enter_kernel(); | ||
2050 | 429 | @@ -5496,6 +5517,10 @@ | ||
2051 | 430 | return(DB_SUCCESS); | ||
2052 | 431 | } | ||
2053 | 432 | |||
2054 | 433 | + if (thr && thr_get_trx(thr)->fake_changes && mode == LOCK_X) { | ||
2055 | 434 | + mode = LOCK_S; | ||
2056 | 435 | + } | ||
2057 | 436 | + | ||
2058 | 437 | heap_no = page_rec_get_heap_no(rec); | ||
2059 | 438 | |||
2060 | 439 | lock_mutex_enter_kernel(); | ||
2061 | 440 | diff -ruN a/storage/innobase/que/que0que.c b/storage/innobase/que/que0que.c | ||
2062 | 441 | --- a/storage/innobase/que/que0que.c 2011-06-01 21:04:25.553416889 +0900 | ||
2063 | 442 | +++ b/storage/innobase/que/que0que.c 2011-06-01 21:04:53.743419001 +0900 | ||
2064 | 443 | @@ -1417,6 +1417,12 @@ | ||
2065 | 444 | |||
2066 | 445 | ut_a(trx->error_state == DB_SUCCESS); | ||
2067 | 446 | |||
2068 | 447 | + if (trx->fake_changes) { | ||
2069 | 448 | + /* fake_changes should not access to system tables */ | ||
2070 | 449 | + fprintf(stderr, "InnoDB: ERROR: innodb_fake_changes tried to access to system tables.\n"); | ||
2071 | 450 | + return(DB_ERROR); | ||
2072 | 451 | + } | ||
2073 | 452 | + | ||
2074 | 453 | if (reserve_dict_mutex) { | ||
2075 | 454 | mutex_enter(&dict_sys->mutex); | ||
2076 | 455 | } | ||
2077 | 456 | diff -ruN a/storage/innobase/row/row0ins.c b/storage/innobase/row/row0ins.c | ||
2078 | 457 | --- a/storage/innobase/row/row0ins.c 2011-06-01 21:04:26.099449453 +0900 | ||
2079 | 458 | +++ b/storage/innobase/row/row0ins.c 2011-06-01 21:04:53.746383371 +0900 | ||
2080 | 459 | @@ -1499,6 +1499,11 @@ | ||
2081 | 460 | if (UNIV_LIKELY_NULL(heap)) { | ||
2082 | 461 | mem_heap_free(heap); | ||
2083 | 462 | } | ||
2084 | 463 | + | ||
2085 | 464 | + if (trx->fake_changes) { | ||
2086 | 465 | + err = DB_SUCCESS; | ||
2087 | 466 | + } | ||
2088 | 467 | + | ||
2089 | 468 | return(err); | ||
2090 | 469 | } | ||
2091 | 470 | |||
2092 | 471 | @@ -2004,7 +2009,7 @@ | ||
2093 | 472 | } | ||
2094 | 473 | |||
2095 | 474 | btr_cur_search_to_nth_level(index, 0, entry, PAGE_CUR_LE, | ||
2096 | 475 | - search_mode, | ||
2097 | 476 | + thr_get_trx(thr)->fake_changes ? BTR_SEARCH_LEAF : search_mode, | ||
2098 | 477 | &cursor, 0, __FILE__, __LINE__, &mtr); | ||
2099 | 478 | |||
2100 | 479 | if (cursor.flag == BTR_CUR_INSERT_TO_IBUF) { | ||
2101 | 480 | @@ -2065,7 +2070,7 @@ | ||
2102 | 481 | |||
2103 | 482 | btr_cur_search_to_nth_level(index, 0, entry, | ||
2104 | 483 | PAGE_CUR_LE, | ||
2105 | 484 | - mode | BTR_INSERT, | ||
2106 | 485 | + thr_get_trx(thr)->fake_changes ? BTR_SEARCH_LEAF : (mode | BTR_INSERT), | ||
2107 | 486 | &cursor, 0, | ||
2108 | 487 | __FILE__, __LINE__, &mtr); | ||
2109 | 488 | } | ||
2110 | 489 | @@ -2119,6 +2124,22 @@ | ||
2111 | 490 | if (UNIV_LIKELY_NULL(big_rec)) { | ||
2112 | 491 | rec_t* rec; | ||
2113 | 492 | ulint* offsets; | ||
2114 | 493 | + | ||
2115 | 494 | + if (thr_get_trx(thr)->fake_changes) { | ||
2116 | 495 | + /* skip store extern */ | ||
2117 | 496 | + if (modify) { | ||
2118 | 497 | + dtuple_big_rec_free(big_rec); | ||
2119 | 498 | + } else { | ||
2120 | 499 | + dtuple_convert_back_big_rec(index, entry, big_rec); | ||
2121 | 500 | + } | ||
2122 | 501 | + | ||
2123 | 502 | + if (UNIV_LIKELY_NULL(heap)) { | ||
2124 | 503 | + mem_heap_free(heap); | ||
2125 | 504 | + } | ||
2126 | 505 | + | ||
2127 | 506 | + return(err); | ||
2128 | 507 | + } | ||
2129 | 508 | + | ||
2130 | 509 | mtr_start(&mtr); | ||
2131 | 510 | |||
2132 | 511 | btr_cur_search_to_nth_level(index, 0, entry, PAGE_CUR_LE, | ||
2133 | 512 | diff -ruN a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c | ||
2134 | 513 | --- a/storage/innobase/row/row0mysql.c 2011-06-01 21:04:26.287385626 +0900 | ||
2135 | 514 | +++ b/storage/innobase/row/row0mysql.c 2011-06-01 21:04:53.749372325 +0900 | ||
2136 | 515 | @@ -1245,6 +1245,7 @@ | ||
2137 | 516 | prebuilt->table->stat_n_rows--; | ||
2138 | 517 | } | ||
2139 | 518 | |||
2140 | 519 | + if (!(trx->fake_changes)) | ||
2141 | 520 | row_update_statistics_if_needed(prebuilt->table); | ||
2142 | 521 | trx->op_info = ""; | ||
2143 | 522 | |||
2144 | 523 | @@ -1504,6 +1505,7 @@ | ||
2145 | 524 | that changes indexed columns, UPDATEs that change only non-indexed | ||
2146 | 525 | columns would not affect statistics. */ | ||
2147 | 526 | if (node->is_delete || !(node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)) { | ||
2148 | 527 | + if (!(trx->fake_changes)) | ||
2149 | 528 | row_update_statistics_if_needed(prebuilt->table); | ||
2150 | 529 | } | ||
2151 | 530 | |||
2152 | 531 | @@ -1721,6 +1723,7 @@ | ||
2153 | 532 | srv_n_rows_updated++; | ||
2154 | 533 | } | ||
2155 | 534 | |||
2156 | 535 | + if (!(trx->fake_changes)) | ||
2157 | 536 | row_update_statistics_if_needed(table); | ||
2158 | 537 | |||
2159 | 538 | return(err); | ||
2160 | 539 | diff -ruN a/storage/innobase/row/row0upd.c b/storage/innobase/row/row0upd.c | ||
2161 | 540 | --- a/storage/innobase/row/row0upd.c 2011-06-01 21:04:25.588384975 +0900 | ||
2162 | 541 | +++ b/storage/innobase/row/row0upd.c 2011-06-01 21:04:53.753385366 +0900 | ||
2163 | 542 | @@ -1603,7 +1603,8 @@ | ||
2164 | 543 | mode |= BTR_DELETE_MARK; | ||
2165 | 544 | } | ||
2166 | 545 | |||
2167 | 546 | - search_result = row_search_index_entry(index, entry, mode, | ||
2168 | 547 | + search_result = row_search_index_entry(index, entry, | ||
2169 | 548 | + trx->fake_changes ? BTR_SEARCH_LEAF : mode, | ||
2170 | 549 | &pcur, &mtr); | ||
2171 | 550 | |||
2172 | 551 | btr_cur = btr_pcur_get_btr_cur(&pcur); | ||
2173 | 552 | @@ -1850,9 +1851,11 @@ | ||
2174 | 553 | the previous invocation of this function. Mark the | ||
2175 | 554 | off-page columns in the entry inherited. */ | ||
2176 | 555 | |||
2177 | 556 | + if (!(trx->fake_changes)) { | ||
2178 | 557 | change_ownership = row_upd_clust_rec_by_insert_inherit( | ||
2179 | 558 | NULL, NULL, entry, node->update); | ||
2180 | 559 | ut_a(change_ownership); | ||
2181 | 560 | + } | ||
2182 | 561 | /* fall through */ | ||
2183 | 562 | case UPD_NODE_INSERT_CLUSTERED: | ||
2184 | 563 | /* A lock wait occurred in row_ins_index_entry() in | ||
2185 | 564 | @@ -1882,7 +1885,7 @@ | ||
2186 | 565 | delete-marked old record, mark them disowned by the | ||
2187 | 566 | old record and owned by the new entry. */ | ||
2188 | 567 | |||
2189 | 568 | - if (rec_offs_any_extern(offsets)) { | ||
2190 | 569 | + if (rec_offs_any_extern(offsets) && !(trx->fake_changes)) { | ||
2191 | 570 | change_ownership = row_upd_clust_rec_by_insert_inherit( | ||
2192 | 571 | rec, offsets, entry, node->update); | ||
2193 | 572 | |||
2194 | 573 | @@ -2012,7 +2015,8 @@ | ||
2195 | 574 | the same transaction do not modify the record in the meantime. | ||
2196 | 575 | Therefore we can assert that the restoration of the cursor succeeds. */ | ||
2197 | 576 | |||
2198 | 577 | - ut_a(btr_pcur_restore_position(BTR_MODIFY_TREE, pcur, mtr)); | ||
2199 | 578 | + ut_a(btr_pcur_restore_position(thr_get_trx(thr)->fake_changes ? BTR_SEARCH_LEAF : BTR_MODIFY_TREE, | ||
2200 | 579 | + pcur, mtr)); | ||
2201 | 580 | |||
2202 | 581 | ut_ad(!rec_get_deleted_flag(btr_pcur_get_rec(pcur), | ||
2203 | 582 | dict_table_is_comp(index->table))); | ||
2204 | 583 | @@ -2022,7 +2026,8 @@ | ||
2205 | 584 | node->cmpl_info, thr, mtr); | ||
2206 | 585 | mtr_commit(mtr); | ||
2207 | 586 | |||
2208 | 587 | - if (err == DB_SUCCESS && big_rec) { | ||
2209 | 588 | + /* skip store extern for fake_changes */ | ||
2210 | 589 | + if (err == DB_SUCCESS && big_rec && !(thr_get_trx(thr)->fake_changes)) { | ||
2211 | 590 | ulint offsets_[REC_OFFS_NORMAL_SIZE]; | ||
2212 | 591 | rec_t* rec; | ||
2213 | 592 | rec_offs_init(offsets_); | ||
2214 | 593 | @@ -2146,7 +2151,8 @@ | ||
2215 | 594 | |||
2216 | 595 | ut_a(pcur->rel_pos == BTR_PCUR_ON); | ||
2217 | 596 | |||
2218 | 597 | - success = btr_pcur_restore_position(BTR_MODIFY_LEAF, pcur, mtr); | ||
2219 | 598 | + success = btr_pcur_restore_position(thr_get_trx(thr)->fake_changes ? BTR_SEARCH_LEAF : BTR_MODIFY_LEAF, | ||
2220 | 599 | + pcur, mtr); | ||
2221 | 600 | |||
2222 | 601 | if (!success) { | ||
2223 | 602 | err = DB_RECORD_NOT_FOUND; | ||
2224 | 603 | diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c | ||
2225 | 604 | --- a/storage/innobase/trx/trx0trx.c 2011-06-01 21:04:26.411537237 +0900 | ||
2226 | 605 | +++ b/storage/innobase/trx/trx0trx.c 2011-06-01 21:04:53.756415956 +0900 | ||
2227 | 606 | @@ -121,6 +121,8 @@ | ||
2228 | 607 | |||
2229 | 608 | trx->support_xa = TRUE; | ||
2230 | 609 | |||
2231 | 610 | + trx->fake_changes = FALSE; | ||
2232 | 611 | + | ||
2233 | 612 | trx->check_foreigns = TRUE; | ||
2234 | 613 | trx->check_unique_secondary = TRUE; | ||
2235 | 614 | |||
2236 | 0 | 615 | ||
2237 | === modified file 'innodb_fast_checksum.patch' | |||
2238 | --- innodb_fast_checksum.patch 2011-05-10 11:57:42 +0000 | |||
2239 | +++ innodb_fast_checksum.patch 2011-06-20 09:04:39 +0000 | |||
2240 | @@ -109,8 +109,34 @@ | |||
2241 | 109 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c | 109 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c |
2242 | 110 | --- a/storage/innobase/fil/fil0fil.c 2010-12-04 15:52:23.406513743 +0900 | 110 | --- a/storage/innobase/fil/fil0fil.c 2010-12-04 15:52:23.406513743 +0900 |
2243 | 111 | +++ b/storage/innobase/fil/fil0fil.c 2010-12-04 15:53:45.020513800 +0900 | 111 | +++ b/storage/innobase/fil/fil0fil.c 2010-12-04 15:53:45.020513800 +0900 |
2246 | 112 | @@ -3199,7 +3199,9 @@ | 112 | @@ -3094,13 +3094,24 @@ |
2247 | 113 | mach_write_to_8(page + FIL_PAGE_FILE_FLUSH_LSN, current_lsn); | 113 | return(TRUE); |
2248 | 114 | } | ||
2249 | 115 | |||
2250 | 116 | - if (checksum_field != 0 | ||
2251 | 117 | + if (!srv_fast_checksum | ||
2252 | 118 | + && checksum_field != 0 | ||
2253 | 119 | && checksum_field != BUF_NO_CHECKSUM_MAGIC | ||
2254 | 120 | && checksum_field | ||
2255 | 121 | != buf_calc_page_new_checksum(page)) { | ||
2256 | 122 | return(TRUE); | ||
2257 | 123 | } | ||
2258 | 124 | |||
2259 | 125 | + if (srv_fast_checksum | ||
2260 | 126 | + && checksum_field != 0 | ||
2261 | 127 | + && checksum_field != BUF_NO_CHECKSUM_MAGIC | ||
2262 | 128 | + && checksum_field | ||
2263 | 129 | + != buf_calc_page_new_checksum_32(page) | ||
2264 | 130 | + && checksum_field | ||
2265 | 131 | + != buf_calc_page_new_checksum(page)) { | ||
2266 | 132 | + return(TRUE); | ||
2267 | 133 | + } | ||
2268 | 134 | + | ||
2269 | 135 | return(FALSE); | ||
2270 | 136 | } | ||
2271 | 137 | |||
2272 | 138 | @@ -3116,7 +3127,9 @@ | ||
2273 | 139 | if (!zip_size) { | ||
2274 | 114 | mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM, | 140 | mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM, |
2275 | 115 | srv_use_checksums | 141 | srv_use_checksums |
2276 | 116 | - ? buf_calc_page_new_checksum(page) | 142 | - ? buf_calc_page_new_checksum(page) |
2277 | @@ -120,45 +146,6 @@ | |||
2278 | 120 | : BUF_NO_CHECKSUM_MAGIC); | 146 | : BUF_NO_CHECKSUM_MAGIC); |
2279 | 121 | mach_write_to_4(page + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM, | 147 | mach_write_to_4(page + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM, |
2280 | 122 | srv_use_checksums | 148 | srv_use_checksums |
2281 | 123 | @@ -3331,7 +3333,8 @@ | ||
2282 | 124 | page_is_corrupt = TRUE; | ||
2283 | 125 | } | ||
2284 | 126 | |||
2285 | 127 | - if (checksum_field != 0 | ||
2286 | 128 | + if (!srv_fast_checksum | ||
2287 | 129 | + && checksum_field != 0 | ||
2288 | 130 | && checksum_field != BUF_NO_CHECKSUM_MAGIC | ||
2289 | 131 | && checksum_field | ||
2290 | 132 | != buf_calc_page_new_checksum(page)) { | ||
2291 | 133 | @@ -3339,6 +3342,17 @@ | ||
2292 | 134 | page_is_corrupt = TRUE; | ||
2293 | 135 | } | ||
2294 | 136 | |||
2295 | 137 | + if (srv_fast_checksum | ||
2296 | 138 | + && checksum_field != 0 | ||
2297 | 139 | + && checksum_field != BUF_NO_CHECKSUM_MAGIC | ||
2298 | 140 | + && checksum_field | ||
2299 | 141 | + != buf_calc_page_new_checksum_32(page) | ||
2300 | 142 | + && checksum_field | ||
2301 | 143 | + != buf_calc_page_new_checksum(page)) { | ||
2302 | 144 | + | ||
2303 | 145 | + page_is_corrupt = TRUE; | ||
2304 | 146 | + } | ||
2305 | 147 | + | ||
2306 | 148 | /* if it is free page, inconsistency is acceptable */ | ||
2307 | 149 | if (!offset) { | ||
2308 | 150 | /* header page*/ | ||
2309 | 151 | @@ -3484,7 +3498,9 @@ | ||
2310 | 152 | |||
2311 | 153 | mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM, | ||
2312 | 154 | srv_use_checksums | ||
2313 | 155 | - ? buf_calc_page_new_checksum(page) | ||
2314 | 156 | + ? (!srv_fast_checksum | ||
2315 | 157 | + ? buf_calc_page_new_checksum(page) | ||
2316 | 158 | + : buf_calc_page_new_checksum_32(page)) | ||
2317 | 159 | : BUF_NO_CHECKSUM_MAGIC); | ||
2318 | 160 | mach_write_to_4(page + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM, | ||
2319 | 161 | srv_use_checksums | ||
2320 | 162 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc | 149 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc |
2321 | 163 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-04 15:52:23.420480329 +0900 | 150 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-04 15:52:23.420480329 +0900 |
2322 | 164 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-04 15:53:45.029551892 +0900 | 151 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-04 15:53:45.029551892 +0900 |
2323 | @@ -170,7 +157,7 @@ | |||
2324 | 170 | static my_bool innobase_recovery_stats = TRUE; | 157 | static my_bool innobase_recovery_stats = TRUE; |
2325 | 171 | static my_bool innobase_locks_unsafe_for_binlog = FALSE; | 158 | static my_bool innobase_locks_unsafe_for_binlog = FALSE; |
2326 | 172 | static my_bool innobase_overwrite_relay_log_info = FALSE; | 159 | static my_bool innobase_overwrite_relay_log_info = FALSE; |
2328 | 173 | @@ -2606,6 +2607,7 @@ | 160 | @@ -2620,6 +2621,7 @@ |
2329 | 174 | 161 | ||
2330 | 175 | srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; | 162 | srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; |
2331 | 176 | srv_use_checksums = (ibool) innobase_use_checksums; | 163 | srv_use_checksums = (ibool) innobase_use_checksums; |
2332 | @@ -178,7 +165,7 @@ | |||
2333 | 178 | 165 | ||
2334 | 179 | #ifdef HAVE_LARGE_PAGES | 166 | #ifdef HAVE_LARGE_PAGES |
2335 | 180 | if ((os_use_large_pages = (ibool) my_use_large_pages)) | 167 | if ((os_use_large_pages = (ibool) my_use_large_pages)) |
2337 | 181 | @@ -11414,6 +11416,15 @@ | 168 | @@ -11421,6 +11423,15 @@ |
2338 | 182 | "Disable with --skip-innodb-checksums.", | 169 | "Disable with --skip-innodb-checksums.", |
2339 | 183 | NULL, NULL, TRUE); | 170 | NULL, NULL, TRUE); |
2340 | 184 | 171 | ||
2341 | @@ -194,7 +181,7 @@ | |||
2342 | 194 | static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir, | 181 | static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir, |
2343 | 195 | PLUGIN_VAR_READONLY, | 182 | PLUGIN_VAR_READONLY, |
2344 | 196 | "The common part for InnoDB table spaces.", | 183 | "The common part for InnoDB table spaces.", |
2346 | 197 | @@ -11922,6 +11933,7 @@ | 184 | @@ -11930,6 +11941,7 @@ |
2347 | 198 | MYSQL_SYSVAR(buffer_pool_size), | 185 | MYSQL_SYSVAR(buffer_pool_size), |
2348 | 199 | MYSQL_SYSVAR(buffer_pool_instances), | 186 | MYSQL_SYSVAR(buffer_pool_instances), |
2349 | 200 | MYSQL_SYSVAR(checksums), | 187 | MYSQL_SYSVAR(checksums), |
2350 | @@ -231,7 +218,7 @@ | |||
2351 | 231 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h | 218 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h |
2352 | 232 | --- a/storage/innobase/include/srv0srv.h 2010-12-04 15:52:23.474482590 +0900 | 219 | --- a/storage/innobase/include/srv0srv.h 2010-12-04 15:52:23.474482590 +0900 |
2353 | 233 | +++ b/storage/innobase/include/srv0srv.h 2010-12-04 15:53:45.048512100 +0900 | 220 | +++ b/storage/innobase/include/srv0srv.h 2010-12-04 15:53:45.048512100 +0900 |
2355 | 234 | @@ -227,6 +227,7 @@ | 221 | @@ -224,6 +224,7 @@ |
2356 | 235 | 222 | ||
2357 | 236 | extern ibool srv_use_doublewrite_buf; | 223 | extern ibool srv_use_doublewrite_buf; |
2358 | 237 | extern ibool srv_use_checksums; | 224 | extern ibool srv_use_checksums; |
2359 | @@ -291,7 +278,7 @@ | |||
2360 | 291 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c | 278 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c |
2361 | 292 | --- a/storage/innobase/srv/srv0srv.c 2010-12-04 15:52:23.498513634 +0900 | 279 | --- a/storage/innobase/srv/srv0srv.c 2010-12-04 15:52:23.498513634 +0900 |
2362 | 293 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-04 15:53:45.053550283 +0900 | 280 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-04 15:53:45.053550283 +0900 |
2364 | 294 | @@ -420,6 +420,7 @@ | 281 | @@ -414,6 +414,7 @@ |
2365 | 295 | 282 | ||
2366 | 296 | UNIV_INTERN ibool srv_use_doublewrite_buf = TRUE; | 283 | UNIV_INTERN ibool srv_use_doublewrite_buf = TRUE; |
2367 | 297 | UNIV_INTERN ibool srv_use_checksums = TRUE; | 284 | UNIV_INTERN ibool srv_use_checksums = TRUE; |
2368 | 298 | 285 | ||
2369 | === modified file 'innodb_files_extend.patch' | |||
2370 | --- innodb_files_extend.patch 2011-05-10 11:57:42 +0000 | |||
2371 | +++ innodb_files_extend.patch 2011-06-20 09:04:39 +0000 | |||
2372 | @@ -8,7 +8,7 @@ | |||
2373 | 8 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c | 8 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c |
2374 | 9 | --- a/storage/innobase/fil/fil0fil.c 2010-12-04 15:55:21.358513751 +0900 | 9 | --- a/storage/innobase/fil/fil0fil.c 2010-12-04 15:55:21.358513751 +0900 |
2375 | 10 | +++ b/storage/innobase/fil/fil0fil.c 2010-12-04 15:55:58.243481131 +0900 | 10 | +++ b/storage/innobase/fil/fil0fil.c 2010-12-04 15:55:58.243481131 +0900 |
2377 | 11 | @@ -729,7 +729,7 @@ | 11 | @@ -731,7 +731,7 @@ |
2378 | 12 | ut_a(space->purpose != FIL_LOG); | 12 | ut_a(space->purpose != FIL_LOG); |
2379 | 13 | ut_a(!trx_sys_sys_space(space->id)); | 13 | ut_a(!trx_sys_sys_space(space->id)); |
2380 | 14 | 14 | ||
2381 | @@ -17,16 +17,7 @@ | |||
2382 | 17 | fprintf(stderr, | 17 | fprintf(stderr, |
2383 | 18 | "InnoDB: Error: the size of single-table" | 18 | "InnoDB: Error: the size of single-table" |
2384 | 19 | " tablespace file %s\n" | 19 | " tablespace file %s\n" |
2395 | 20 | @@ -3216,7 +3216,7 @@ | 20 | @@ -4151,7 +4151,7 @@ |
2386 | 21 | |||
2387 | 22 | if (size_bytes < free_limit_bytes) { | ||
2388 | 23 | free_limit_bytes = size_bytes; | ||
2389 | 24 | - if (size_bytes >= FSP_EXTENT_SIZE * UNIV_PAGE_SIZE) { | ||
2390 | 25 | + if (size_bytes >= (lint)FSP_EXTENT_SIZE * (lint)UNIV_PAGE_SIZE) { | ||
2391 | 26 | fprintf(stderr, "InnoDB: free limit of %s is larger than its real size.\n", filepath); | ||
2392 | 27 | file_is_corrupt = TRUE; | ||
2393 | 28 | } | ||
2394 | 29 | @@ -3830,7 +3830,7 @@ | ||
2396 | 30 | 21 | ||
2397 | 31 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; | 22 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; |
2398 | 32 | #ifndef UNIV_HOTBACKUP | 23 | #ifndef UNIV_HOTBACKUP |
2399 | @@ -35,7 +26,7 @@ | |||
2400 | 35 | fprintf(stderr, | 26 | fprintf(stderr, |
2401 | 36 | "InnoDB: Error: the size of single-table tablespace" | 27 | "InnoDB: Error: the size of single-table tablespace" |
2402 | 37 | " file %s\n" | 28 | " file %s\n" |
2404 | 38 | @@ -3850,7 +3850,7 @@ | 29 | @@ -4171,7 +4171,7 @@ |
2405 | 39 | /* Align the memory for file i/o if we might have O_DIRECT set */ | 30 | /* Align the memory for file i/o if we might have O_DIRECT set */ |
2406 | 40 | page = ut_align(buf2, UNIV_PAGE_SIZE); | 31 | page = ut_align(buf2, UNIV_PAGE_SIZE); |
2407 | 41 | 32 | ||
2408 | @@ -44,7 +35,7 @@ | |||
2409 | 44 | success = os_file_read(file, page, 0, 0, UNIV_PAGE_SIZE); | 35 | success = os_file_read(file, page, 0, 0, UNIV_PAGE_SIZE); |
2410 | 45 | 36 | ||
2411 | 46 | /* We have to read the tablespace id from the file */ | 37 | /* We have to read the tablespace id from the file */ |
2413 | 47 | @@ -4828,9 +4828,9 @@ | 38 | @@ -5149,9 +5149,9 @@ |
2414 | 48 | ut_ad(ut_is_2pow(zip_size)); | 39 | ut_ad(ut_is_2pow(zip_size)); |
2415 | 49 | ut_ad(buf); | 40 | ut_ad(buf); |
2416 | 50 | ut_ad(len > 0); | 41 | ut_ad(len > 0); |
2417 | @@ -121,7 +112,7 @@ | |||
2418 | 121 | static my_bool innobase_thread_concurrency_timer_based; | 112 | static my_bool innobase_thread_concurrency_timer_based; |
2419 | 122 | static long long innobase_buffer_pool_size, innobase_log_file_size; | 113 | static long long innobase_buffer_pool_size, innobase_log_file_size; |
2420 | 123 | 114 | ||
2422 | 124 | @@ -2302,6 +2305,65 @@ | 115 | @@ -2316,6 +2319,65 @@ |
2423 | 125 | } | 116 | } |
2424 | 126 | #endif /* DBUG_OFF */ | 117 | #endif /* DBUG_OFF */ |
2425 | 127 | 118 | ||
2426 | @@ -187,7 +178,7 @@ | |||
2427 | 187 | #ifndef MYSQL_SERVER | 178 | #ifndef MYSQL_SERVER |
2428 | 188 | innodb_overwrite_relay_log_info = FALSE; | 179 | innodb_overwrite_relay_log_info = FALSE; |
2429 | 189 | #endif | 180 | #endif |
2431 | 190 | @@ -7253,9 +7315,9 @@ | 181 | @@ -7241,9 +7303,9 @@ |
2432 | 191 | | DICT_TF_COMPACT | 182 | | DICT_TF_COMPACT |
2433 | 192 | | DICT_TF_FORMAT_ZIP | 183 | | DICT_TF_FORMAT_ZIP |
2434 | 193 | << DICT_TF_FORMAT_SHIFT; | 184 | << DICT_TF_FORMAT_SHIFT; |
2435 | @@ -200,7 +191,7 @@ | |||
2436 | 200 | } | 191 | } |
2437 | 201 | } | 192 | } |
2438 | 202 | 193 | ||
2440 | 203 | @@ -11425,6 +11487,16 @@ | 194 | @@ -11432,6 +11494,16 @@ |
2441 | 204 | "#### Attention: The checksum is not compatible for normal or disabled version! ####", | 195 | "#### Attention: The checksum is not compatible for normal or disabled version! ####", |
2442 | 205 | NULL, NULL, FALSE); | 196 | NULL, NULL, FALSE); |
2443 | 206 | 197 | ||
2444 | @@ -217,7 +208,7 @@ | |||
2445 | 217 | static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir, | 208 | static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir, |
2446 | 218 | PLUGIN_VAR_READONLY, | 209 | PLUGIN_VAR_READONLY, |
2447 | 219 | "The common part for InnoDB table spaces.", | 210 | "The common part for InnoDB table spaces.", |
2449 | 220 | @@ -11928,6 +12000,8 @@ | 211 | @@ -11936,6 +12008,8 @@ |
2450 | 221 | NULL, NULL, 0, &corrupt_table_action_typelib); | 212 | NULL, NULL, 0, &corrupt_table_action_typelib); |
2451 | 222 | 213 | ||
2452 | 223 | static struct st_mysql_sys_var* innobase_system_variables[]= { | 214 | static struct st_mysql_sys_var* innobase_system_variables[]= { |
2453 | @@ -229,7 +220,7 @@ | |||
2454 | 229 | diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h | 220 | diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h |
2455 | 230 | --- a/storage/innobase/include/buf0buf.h 2010-12-04 15:55:21.375482937 +0900 | 221 | --- a/storage/innobase/include/buf0buf.h 2010-12-04 15:55:21.375482937 +0900 |
2456 | 231 | +++ b/storage/innobase/include/buf0buf.h 2010-12-04 15:55:58.258469088 +0900 | 222 | +++ b/storage/innobase/include/buf0buf.h 2010-12-04 15:55:58.258469088 +0900 |
2458 | 232 | @@ -1684,7 +1684,7 @@ | 223 | @@ -1683,7 +1683,7 @@ |
2459 | 233 | time_t last_printout_time; | 224 | time_t last_printout_time; |
2460 | 234 | /*!< when buf_print_io was last time | 225 | /*!< when buf_print_io was last time |
2461 | 235 | called */ | 226 | called */ |
2462 | @@ -238,7 +229,7 @@ | |||
2463 | 238 | /*!< Statistics of buddy system, | 229 | /*!< Statistics of buddy system, |
2464 | 239 | indexed by block size */ | 230 | indexed by block size */ |
2465 | 240 | buf_pool_stat_t stat; /*!< current statistics */ | 231 | buf_pool_stat_t stat; /*!< current statistics */ |
2467 | 241 | @@ -1780,7 +1780,7 @@ | 232 | @@ -1779,7 +1779,7 @@ |
2468 | 242 | /* @{ */ | 233 | /* @{ */ |
2469 | 243 | UT_LIST_BASE_NODE_T(buf_page_t) zip_clean; | 234 | UT_LIST_BASE_NODE_T(buf_page_t) zip_clean; |
2470 | 244 | /*!< unmodified compressed pages */ | 235 | /*!< unmodified compressed pages */ |
2471 | @@ -247,7 +238,7 @@ | |||
2472 | 247 | /*!< buddy free lists */ | 238 | /*!< buddy free lists */ |
2473 | 248 | 239 | ||
2474 | 249 | buf_page_t watch[BUF_POOL_WATCH_SIZE]; | 240 | buf_page_t watch[BUF_POOL_WATCH_SIZE]; |
2476 | 250 | @@ -1788,9 +1788,9 @@ | 241 | @@ -1787,9 +1787,9 @@ |
2477 | 251 | pool watches. Protected by | 242 | pool watches. Protected by |
2478 | 252 | buf_pool->mutex. */ | 243 | buf_pool->mutex. */ |
2479 | 253 | 244 | ||
2480 | @@ -379,7 +370,7 @@ | |||
2481 | 379 | diff -ruN a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i | 370 | diff -ruN a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i |
2482 | 380 | --- a/storage/innobase/include/univ.i 2010-11-03 07:01:13.000000000 +0900 | 371 | --- a/storage/innobase/include/univ.i 2010-11-03 07:01:13.000000000 +0900 |
2483 | 381 | +++ b/storage/innobase/include/univ.i 2010-12-04 15:55:58.263549721 +0900 | 372 | +++ b/storage/innobase/include/univ.i 2010-12-04 15:55:58.263549721 +0900 |
2485 | 382 | @@ -298,9 +298,13 @@ | 373 | @@ -311,9 +311,13 @@ |
2486 | 383 | */ | 374 | */ |
2487 | 384 | 375 | ||
2488 | 385 | /* The 2-logarithm of UNIV_PAGE_SIZE: */ | 376 | /* The 2-logarithm of UNIV_PAGE_SIZE: */ |
2489 | @@ -395,7 +386,7 @@ | |||
2490 | 395 | 386 | ||
2491 | 396 | /* Maximum number of parallel threads in a parallelized operation */ | 387 | /* Maximum number of parallel threads in a parallelized operation */ |
2492 | 397 | #define UNIV_MAX_PARALLELISM 32 | 388 | #define UNIV_MAX_PARALLELISM 32 |
2494 | 398 | @@ -419,7 +423,7 @@ | 389 | @@ -432,7 +436,7 @@ |
2495 | 399 | stored part of the field in the tablespace. The length field then | 390 | stored part of the field in the tablespace. The length field then |
2496 | 400 | contains the sum of the following flag and the locally stored len. */ | 391 | contains the sum of the following flag and the locally stored len. */ |
2497 | 401 | 392 | ||
2498 | @@ -404,7 +395,7 @@ | |||
2499 | 404 | 395 | ||
2500 | 405 | /* Some macros to improve branch prediction and reduce cache misses */ | 396 | /* Some macros to improve branch prediction and reduce cache misses */ |
2501 | 406 | #if defined(__GNUC__) && (__GNUC__ > 2) && ! defined(__INTEL_COMPILER) | 397 | #if defined(__GNUC__) && (__GNUC__ > 2) && ! defined(__INTEL_COMPILER) |
2503 | 407 | @@ -522,4 +526,6 @@ | 398 | @@ -535,4 +539,6 @@ |
2504 | 408 | UNIV_MEM_ALLOC(addr, size); \ | 399 | UNIV_MEM_ALLOC(addr, size); \ |
2505 | 409 | } while (0) | 400 | } while (0) |
2506 | 410 | 401 | ||
2507 | @@ -547,7 +538,7 @@ | |||
2508 | 547 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c | 538 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c |
2509 | 548 | --- a/storage/innobase/srv/srv0srv.c 2010-12-04 15:55:21.384486344 +0900 | 539 | --- a/storage/innobase/srv/srv0srv.c 2010-12-04 15:55:21.384486344 +0900 |
2510 | 549 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-04 15:55:58.282550845 +0900 | 540 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-04 15:55:58.282550845 +0900 |
2512 | 550 | @@ -240,6 +240,13 @@ | 541 | @@ -234,6 +234,13 @@ |
2513 | 551 | UNIV_INTERN ulint srv_n_read_io_threads = ULINT_MAX; | 542 | UNIV_INTERN ulint srv_n_read_io_threads = ULINT_MAX; |
2514 | 552 | UNIV_INTERN ulint srv_n_write_io_threads = ULINT_MAX; | 543 | UNIV_INTERN ulint srv_n_write_io_threads = ULINT_MAX; |
2515 | 553 | 544 | ||
2516 | 554 | 545 | ||
2517 | === modified file 'innodb_fix_misc.patch' | |||
2518 | --- innodb_fix_misc.patch 2011-05-18 00:03:53 +0000 | |||
2519 | +++ innodb_fix_misc.patch 2011-06-20 09:04:39 +0000 | |||
2520 | @@ -13,7 +13,7 @@ | |||
2521 | 13 | diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c | 13 | diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c |
2522 | 14 | --- a/storage/innobase/buf/buf0buf.c 2011-02-23 19:00:48.178696354 +0900 | 14 | --- a/storage/innobase/buf/buf0buf.c 2011-02-23 19:00:48.178696354 +0900 |
2523 | 15 | +++ b/storage/innobase/buf/buf0buf.c 2011-02-23 19:01:19.138826278 +0900 | 15 | +++ b/storage/innobase/buf/buf0buf.c 2011-02-23 19:01:19.138826278 +0900 |
2525 | 16 | @@ -4063,6 +4063,7 @@ | 16 | @@ -4061,6 +4061,7 @@ |
2526 | 17 | bpage->state = BUF_BLOCK_ZIP_PAGE; | 17 | bpage->state = BUF_BLOCK_ZIP_PAGE; |
2527 | 18 | bpage->space = space; | 18 | bpage->space = space; |
2528 | 19 | bpage->offset = offset; | 19 | bpage->offset = offset; |
2529 | @@ -102,7 +102,7 @@ | |||
2530 | 102 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c | 102 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c |
2531 | 103 | --- a/storage/innobase/fil/fil0fil.c 2011-02-23 19:00:48.223696428 +0900 | 103 | --- a/storage/innobase/fil/fil0fil.c 2011-02-23 19:00:48.223696428 +0900 |
2532 | 104 | +++ b/storage/innobase/fil/fil0fil.c 2011-02-23 19:01:19.147655510 +0900 | 104 | +++ b/storage/innobase/fil/fil0fil.c 2011-02-23 19:01:19.147655510 +0900 |
2534 | 105 | @@ -252,6 +252,7 @@ | 105 | @@ -254,6 +254,7 @@ |
2535 | 106 | struct fil_system_struct { | 106 | struct fil_system_struct { |
2536 | 107 | #ifndef UNIV_HOTBACKUP | 107 | #ifndef UNIV_HOTBACKUP |
2537 | 108 | mutex_t mutex; /*!< The mutex protecting the cache */ | 108 | mutex_t mutex; /*!< The mutex protecting the cache */ |
2538 | @@ -110,7 +110,7 @@ | |||
2539 | 110 | #endif /* !UNIV_HOTBACKUP */ | 110 | #endif /* !UNIV_HOTBACKUP */ |
2540 | 111 | hash_table_t* spaces; /*!< The hash table of spaces in the | 111 | hash_table_t* spaces; /*!< The hash table of spaces in the |
2541 | 112 | system; they are hashed on the space | 112 | system; they are hashed on the space |
2543 | 113 | @@ -861,7 +862,7 @@ | 113 | @@ -863,7 +864,7 @@ |
2544 | 114 | ut_ad(node && system); | 114 | ut_ad(node && system); |
2545 | 115 | ut_ad(mutex_own(&(system->mutex))); | 115 | ut_ad(mutex_own(&(system->mutex))); |
2546 | 116 | ut_a(node->open); | 116 | ut_a(node->open); |
2547 | @@ -119,7 +119,7 @@ | |||
2548 | 119 | ut_a(node->n_pending_flushes == 0); | 119 | ut_a(node->n_pending_flushes == 0); |
2549 | 120 | ut_a(node->modification_counter == node->flush_counter); | 120 | ut_a(node->modification_counter == node->flush_counter); |
2550 | 121 | 121 | ||
2552 | 122 | @@ -874,7 +875,7 @@ | 122 | @@ -876,7 +877,7 @@ |
2553 | 123 | ut_a(system->n_open > 0); | 123 | ut_a(system->n_open > 0); |
2554 | 124 | system->n_open--; | 124 | system->n_open--; |
2555 | 125 | 125 | ||
2556 | @@ -128,7 +128,7 @@ | |||
2557 | 128 | ut_a(UT_LIST_GET_LEN(system->LRU) > 0); | 128 | ut_a(UT_LIST_GET_LEN(system->LRU) > 0); |
2558 | 129 | 129 | ||
2559 | 130 | /* The node is in the LRU list, remove it */ | 130 | /* The node is in the LRU list, remove it */ |
2561 | 131 | @@ -1073,7 +1074,7 @@ | 131 | @@ -1075,7 +1076,7 @@ |
2562 | 132 | ut_ad(node && system && space); | 132 | ut_ad(node && system && space); |
2563 | 133 | ut_ad(mutex_own(&(system->mutex))); | 133 | ut_ad(mutex_own(&(system->mutex))); |
2564 | 134 | ut_a(node->magic_n == FIL_NODE_MAGIC_N); | 134 | ut_a(node->magic_n == FIL_NODE_MAGIC_N); |
2565 | @@ -137,7 +137,7 @@ | |||
2566 | 137 | 137 | ||
2567 | 138 | if (node->open) { | 138 | if (node->open) { |
2568 | 139 | /* We fool the assertion in fil_node_close_file() to think | 139 | /* We fool the assertion in fil_node_close_file() to think |
2570 | 140 | @@ -1595,6 +1596,8 @@ | 140 | @@ -1597,6 +1598,8 @@ |
2571 | 141 | 141 | ||
2572 | 142 | mutex_create(fil_system_mutex_key, | 142 | mutex_create(fil_system_mutex_key, |
2573 | 143 | &fil_system->mutex, SYNC_ANY_LATCH); | 143 | &fil_system->mutex, SYNC_ANY_LATCH); |
2574 | @@ -146,7 +146,7 @@ | |||
2575 | 146 | 146 | ||
2576 | 147 | fil_system->spaces = hash_create(hash_size); | 147 | fil_system->spaces = hash_create(hash_size); |
2577 | 148 | fil_system->name_hash = hash_create(hash_size); | 148 | fil_system->name_hash = hash_create(hash_size); |
2579 | 149 | @@ -2341,7 +2344,11 @@ | 149 | @@ -2343,7 +2346,11 @@ |
2580 | 150 | completely and permanently. The flag is_being_deleted also prevents | 150 | completely and permanently. The flag is_being_deleted also prevents |
2581 | 151 | fil_flush() from being applied to this tablespace. */ | 151 | fil_flush() from being applied to this tablespace. */ |
2582 | 152 | 152 | ||
2583 | @@ -158,7 +158,7 @@ | |||
2584 | 158 | #endif | 158 | #endif |
2585 | 159 | /* printf("Deleting tablespace %s id %lu\n", space->name, id); */ | 159 | /* printf("Deleting tablespace %s id %lu\n", space->name, id); */ |
2586 | 160 | 160 | ||
2588 | 161 | @@ -4400,6 +4407,10 @@ | 161 | @@ -4721,6 +4728,10 @@ |
2589 | 162 | ulint page_size; | 162 | ulint page_size; |
2590 | 163 | ibool success = TRUE; | 163 | ibool success = TRUE; |
2591 | 164 | 164 | ||
2592 | @@ -169,7 +169,7 @@ | |||
2593 | 169 | fil_mutex_enter_and_prepare_for_io(space_id); | 169 | fil_mutex_enter_and_prepare_for_io(space_id); |
2594 | 170 | 170 | ||
2595 | 171 | space = fil_space_get_by_id(space_id); | 171 | space = fil_space_get_by_id(space_id); |
2597 | 172 | @@ -4411,6 +4422,7 @@ | 172 | @@ -4732,6 +4743,7 @@ |
2598 | 173 | *actual_size = space->size; | 173 | *actual_size = space->size; |
2599 | 174 | 174 | ||
2600 | 175 | mutex_exit(&fil_system->mutex); | 175 | mutex_exit(&fil_system->mutex); |
2601 | @@ -177,7 +177,7 @@ | |||
2602 | 177 | 177 | ||
2603 | 178 | return(TRUE); | 178 | return(TRUE); |
2604 | 179 | } | 179 | } |
2606 | 180 | @@ -4443,6 +4455,8 @@ | 180 | @@ -4764,6 +4776,8 @@ |
2607 | 181 | offset_low = ((start_page_no - file_start_page_no) | 181 | offset_low = ((start_page_no - file_start_page_no) |
2608 | 182 | % (4096 * ((1024 * 1024) / page_size))) | 182 | % (4096 * ((1024 * 1024) / page_size))) |
2609 | 183 | * page_size; | 183 | * page_size; |
2610 | @@ -186,7 +186,7 @@ | |||
2611 | 186 | #ifdef UNIV_HOTBACKUP | 186 | #ifdef UNIV_HOTBACKUP |
2612 | 187 | success = os_file_write(node->name, node->handle, buf, | 187 | success = os_file_write(node->name, node->handle, buf, |
2613 | 188 | offset_low, offset_high, | 188 | offset_low, offset_high, |
2615 | 189 | @@ -4452,8 +4466,10 @@ | 189 | @@ -4773,8 +4787,10 @@ |
2616 | 190 | node->name, node->handle, buf, | 190 | node->name, node->handle, buf, |
2617 | 191 | offset_low, offset_high, | 191 | offset_low, offset_high, |
2618 | 192 | page_size * n_pages, | 192 | page_size * n_pages, |
2619 | @@ -198,7 +198,7 @@ | |||
2620 | 198 | if (success) { | 198 | if (success) { |
2621 | 199 | node->size += n_pages; | 199 | node->size += n_pages; |
2622 | 200 | space->size += n_pages; | 200 | space->size += n_pages; |
2624 | 201 | @@ -4499,6 +4515,7 @@ | 201 | @@ -4820,6 +4836,7 @@ |
2625 | 202 | printf("Extended %s to %lu, actual size %lu pages\n", space->name, | 202 | printf("Extended %s to %lu, actual size %lu pages\n", space->name, |
2626 | 203 | size_after_extend, *actual_size); */ | 203 | size_after_extend, *actual_size); */ |
2627 | 204 | mutex_exit(&fil_system->mutex); | 204 | mutex_exit(&fil_system->mutex); |
2628 | @@ -206,7 +206,7 @@ | |||
2629 | 206 | 206 | ||
2630 | 207 | fil_flush(space_id); | 207 | fil_flush(space_id); |
2631 | 208 | 208 | ||
2633 | 209 | @@ -4861,6 +4878,22 @@ | 209 | @@ -5182,6 +5199,22 @@ |
2634 | 210 | srv_data_written+= len; | 210 | srv_data_written+= len; |
2635 | 211 | } | 211 | } |
2636 | 212 | 212 | ||
2637 | @@ -216,7 +216,7 @@ | |||
2638 | 216 | + && ((buf_page_t*)message)->space_was_being_deleted) { | 216 | + && ((buf_page_t*)message)->space_was_being_deleted) { |
2639 | 217 | + | 217 | + |
2640 | 218 | + if (mode == OS_AIO_NORMAL) { | 218 | + if (mode == OS_AIO_NORMAL) { |
2642 | 219 | + buf_page_io_complete(message, trx); | 219 | + buf_page_io_complete(message); |
2643 | 220 | + return(DB_SUCCESS); /*fake*/ | 220 | + return(DB_SUCCESS); /*fake*/ |
2644 | 221 | + } | 221 | + } |
2645 | 222 | + if (type == OS_FILE_READ) { | 222 | + if (type == OS_FILE_READ) { |
2646 | @@ -229,7 +229,7 @@ | |||
2647 | 229 | /* Reserve the fil_system mutex and make sure that we can open at | 229 | /* Reserve the fil_system mutex and make sure that we can open at |
2648 | 230 | least one file while holding it, if the file is not already open */ | 230 | least one file while holding it, if the file is not already open */ |
2649 | 231 | 231 | ||
2651 | 232 | @@ -4990,10 +5023,24 @@ | 232 | @@ -5323,10 +5356,24 @@ |
2652 | 233 | #else | 233 | #else |
2653 | 234 | /* Queue the aio request */ | 234 | /* Queue the aio request */ |
2654 | 235 | ret = os_aio(type, mode | wake_later, node->name, node->handle, buf, | 235 | ret = os_aio(type, mode | wake_later, node->name, node->handle, buf, |
2655 | @@ -255,7 +255,7 @@ | |||
2656 | 255 | ut_a(ret); | 255 | ut_a(ret); |
2657 | 256 | 256 | ||
2658 | 257 | if (mode == OS_AIO_SYNC) { | 257 | if (mode == OS_AIO_SYNC) { |
2660 | 258 | @@ -5093,6 +5140,7 @@ | 258 | @@ -5426,6 +5473,7 @@ |
2661 | 259 | fil_node_t* fil_node; | 259 | fil_node_t* fil_node; |
2662 | 260 | void* message; | 260 | void* message; |
2663 | 261 | ulint type; | 261 | ulint type; |
2664 | @@ -263,7 +263,7 @@ | |||
2665 | 263 | 263 | ||
2666 | 264 | ut_ad(fil_validate_skip()); | 264 | ut_ad(fil_validate_skip()); |
2667 | 265 | 265 | ||
2669 | 266 | @@ -5100,10 +5148,10 @@ | 266 | @@ -5433,10 +5481,10 @@ |
2670 | 267 | srv_set_io_thread_op_info(segment, "native aio handle"); | 267 | srv_set_io_thread_op_info(segment, "native aio handle"); |
2671 | 268 | #ifdef WIN_ASYNC_IO | 268 | #ifdef WIN_ASYNC_IO |
2672 | 269 | ret = os_aio_windows_handle(segment, 0, &fil_node, | 269 | ret = os_aio_windows_handle(segment, 0, &fil_node, |
2673 | @@ -274,9 +274,9 @@ | |||
2674 | 274 | - &message, &type); | 274 | - &message, &type); |
2675 | 275 | + &message, &type, &space_id); | 275 | + &message, &type, &space_id); |
2676 | 276 | #else | 276 | #else |
2677 | 277 | ut_error; | ||
2678 | 277 | ret = 0; /* Eliminate compiler warning */ | 278 | ret = 0; /* Eliminate compiler warning */ |
2681 | 278 | ut_error; | 279 | @@ -5445,7 +5493,22 @@ |
2680 | 279 | @@ -5112,7 +5160,22 @@ | ||
2682 | 280 | srv_set_io_thread_op_info(segment, "simulated aio handle"); | 280 | srv_set_io_thread_op_info(segment, "simulated aio handle"); |
2683 | 281 | 281 | ||
2684 | 282 | ret = os_aio_simulated_handle(segment, &fil_node, | 282 | ret = os_aio_simulated_handle(segment, &fil_node, |
2685 | @@ -295,7 +295,7 @@ | |||
2686 | 295 | + || buf_page_get_state(message) != BUF_BLOCK_FILE_PAGE); | 295 | + || buf_page_get_state(message) != BUF_BLOCK_FILE_PAGE); |
2687 | 296 | + | 296 | + |
2688 | 297 | + srv_set_io_thread_op_info(segment, "complete io for buf page"); | 297 | + srv_set_io_thread_op_info(segment, "complete io for buf page"); |
2690 | 298 | + buf_page_io_complete(message, NULL); | 298 | + buf_page_io_complete(message); |
2691 | 299 | + return; | 299 | + return; |
2692 | 300 | } | 300 | } |
2693 | 301 | 301 | ||
2694 | @@ -303,7 +303,7 @@ | |||
2695 | 303 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc | 303 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc |
2696 | 304 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-04 15:57:13.035513990 +0900 | 304 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-04 15:57:13.035513990 +0900 |
2697 | 305 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-04 15:57:53.084513775 +0900 | 305 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-04 15:57:53.084513775 +0900 |
2699 | 306 | @@ -11999,6 +11999,12 @@ | 306 | @@ -12007,6 +12007,12 @@ |
2700 | 307 | "except for the deletion.", | 307 | "except for the deletion.", |
2701 | 308 | NULL, NULL, 0, &corrupt_table_action_typelib); | 308 | NULL, NULL, 0, &corrupt_table_action_typelib); |
2702 | 309 | 309 | ||
2703 | @@ -316,7 +316,7 @@ | |||
2704 | 316 | static struct st_mysql_sys_var* innobase_system_variables[]= { | 316 | static struct st_mysql_sys_var* innobase_system_variables[]= { |
2705 | 317 | MYSQL_SYSVAR(page_size), | 317 | MYSQL_SYSVAR(page_size), |
2706 | 318 | MYSQL_SYSVAR(log_block_size), | 318 | MYSQL_SYSVAR(log_block_size), |
2708 | 319 | @@ -12089,6 +12095,7 @@ | 319 | @@ -12097,6 +12103,7 @@ |
2709 | 320 | MYSQL_SYSVAR(purge_batch_size), | 320 | MYSQL_SYSVAR(purge_batch_size), |
2710 | 321 | MYSQL_SYSVAR(rollback_segments), | 321 | MYSQL_SYSVAR(rollback_segments), |
2711 | 322 | MYSQL_SYSVAR(corrupt_table_action), | 322 | MYSQL_SYSVAR(corrupt_table_action), |
2712 | @@ -324,7 +324,7 @@ | |||
2713 | 324 | NULL | 324 | NULL |
2714 | 325 | }; | 325 | }; |
2715 | 326 | 326 | ||
2717 | 327 | @@ -12098,7 +12105,7 @@ | 327 | @@ -12106,7 +12113,7 @@ |
2718 | 328 | &innobase_storage_engine, | 328 | &innobase_storage_engine, |
2719 | 329 | innobase_hton_name, | 329 | innobase_hton_name, |
2720 | 330 | plugin_author, | 330 | plugin_author, |
2721 | @@ -336,7 +336,7 @@ | |||
2722 | 336 | diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h | 336 | diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h |
2723 | 337 | --- a/storage/innobase/include/buf0buf.h 2011-02-23 19:00:48.252696774 +0900 | 337 | --- a/storage/innobase/include/buf0buf.h 2011-02-23 19:00:48.252696774 +0900 |
2724 | 338 | +++ b/storage/innobase/include/buf0buf.h 2011-02-23 19:01:19.182655902 +0900 | 338 | +++ b/storage/innobase/include/buf0buf.h 2011-02-23 19:01:19.182655902 +0900 |
2726 | 339 | @@ -1439,6 +1439,7 @@ | 339 | @@ -1438,6 +1438,7 @@ |
2727 | 340 | 0 if the block was never accessed | 340 | 0 if the block was never accessed |
2728 | 341 | in the buffer pool */ | 341 | in the buffer pool */ |
2729 | 342 | /* @} */ | 342 | /* @} */ |
2730 | @@ -468,7 +468,7 @@ | |||
2731 | 468 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h | 468 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h |
2732 | 469 | --- a/storage/innobase/include/srv0srv.h 2011-02-23 19:00:48.212625715 +0900 | 469 | --- a/storage/innobase/include/srv0srv.h 2011-02-23 19:00:48.212625715 +0900 |
2733 | 470 | +++ b/storage/innobase/include/srv0srv.h 2011-02-23 19:01:19.193655990 +0900 | 470 | +++ b/storage/innobase/include/srv0srv.h 2011-02-23 19:01:19.193655990 +0900 |
2735 | 471 | @@ -247,6 +247,8 @@ | 471 | @@ -244,6 +244,8 @@ |
2736 | 472 | extern ulint srv_pass_corrupt_table; | 472 | extern ulint srv_pass_corrupt_table; |
2737 | 473 | 473 | ||
2738 | 474 | extern ulint srv_dict_size_limit; | 474 | extern ulint srv_dict_size_limit; |
2739 | @@ -480,7 +480,7 @@ | |||
2740 | 480 | diff -ruN a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h | 480 | diff -ruN a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h |
2741 | 481 | --- a/storage/innobase/include/sync0sync.h 2011-02-23 19:00:47.875625940 +0900 | 481 | --- a/storage/innobase/include/sync0sync.h 2011-02-23 19:00:47.875625940 +0900 |
2742 | 482 | +++ b/storage/innobase/include/sync0sync.h 2011-02-23 19:01:19.195703856 +0900 | 482 | +++ b/storage/innobase/include/sync0sync.h 2011-02-23 19:01:19.195703856 +0900 |
2744 | 483 | @@ -682,6 +682,7 @@ | 483 | @@ -691,6 +691,7 @@ |
2745 | 484 | #define SYNC_BUF_POOL 150 /* Buffer pool mutex */ | 484 | #define SYNC_BUF_POOL 150 /* Buffer pool mutex */ |
2746 | 485 | #define SYNC_BUF_FLUSH_LIST 145 /* Buffer flush list mutex */ | 485 | #define SYNC_BUF_FLUSH_LIST 145 /* Buffer flush list mutex */ |
2747 | 486 | #define SYNC_DOUBLEWRITE 140 | 486 | #define SYNC_DOUBLEWRITE 140 |
2748 | @@ -493,7 +493,7 @@ | |||
2749 | 493 | +++ b/storage/innobase/include/univ.i 2010-12-04 15:57:53.091592933 +0900 | 493 | +++ b/storage/innobase/include/univ.i 2010-12-04 15:57:53.091592933 +0900 |
2750 | 494 | @@ -53,6 +53,11 @@ | 494 | @@ -53,6 +53,11 @@ |
2751 | 495 | #define INNODB_VERSION_MINOR 1 | 495 | #define INNODB_VERSION_MINOR 1 |
2753 | 496 | #define INNODB_VERSION_BUGFIX 6 | 496 | #define INNODB_VERSION_BUGFIX 7 |
2754 | 497 | 497 | ||
2755 | 498 | +#ifndef PERCONA_INNODB_VERSION | 498 | +#ifndef PERCONA_INNODB_VERSION |
2756 | 499 | +#define PERCONA_INNODB_VERSION 20.1 | 499 | +#define PERCONA_INNODB_VERSION 20.1 |
2757 | @@ -550,7 +550,7 @@ | |||
2758 | 550 | trx_t* trx) | 550 | trx_t* trx) |
2759 | 551 | { | 551 | { |
2760 | 552 | os_aio_array_t* array; | 552 | os_aio_array_t* array; |
2762 | 553 | @@ -4137,7 +4141,7 @@ | 553 | @@ -4139,7 +4143,7 @@ |
2763 | 554 | trx->io_read += n; | 554 | trx->io_read += n; |
2764 | 555 | } | 555 | } |
2765 | 556 | slot = os_aio_array_reserve_slot(type, array, message1, message2, file, | 556 | slot = os_aio_array_reserve_slot(type, array, message1, message2, file, |
2766 | @@ -559,7 +559,7 @@ | |||
2767 | 559 | if (type == OS_FILE_READ) { | 559 | if (type == OS_FILE_READ) { |
2768 | 560 | if (srv_use_native_aio) { | 560 | if (srv_use_native_aio) { |
2769 | 561 | os_n_file_reads++; | 561 | os_n_file_reads++; |
2771 | 562 | @@ -4256,7 +4260,8 @@ | 562 | @@ -4258,7 +4262,8 @@ |
2772 | 563 | parameters are valid and can be used to | 563 | parameters are valid and can be used to |
2773 | 564 | restart the operation, for example */ | 564 | restart the operation, for example */ |
2774 | 565 | void** message2, | 565 | void** message2, |
2775 | @@ -569,7 +569,7 @@ | |||
2776 | 569 | { | 569 | { |
2777 | 570 | ulint orig_seg = segment; | 570 | ulint orig_seg = segment; |
2778 | 571 | os_aio_array_t* array; | 571 | os_aio_array_t* array; |
2780 | 572 | @@ -4329,6 +4334,7 @@ | 572 | @@ -4337,6 +4342,7 @@ |
2781 | 573 | *message2 = slot->message2; | 573 | *message2 = slot->message2; |
2782 | 574 | 574 | ||
2783 | 575 | *type = slot->type; | 575 | *type = slot->type; |
2784 | @@ -577,7 +577,7 @@ | |||
2785 | 577 | 577 | ||
2786 | 578 | if (ret && len == slot->len) { | 578 | if (ret && len == slot->len) { |
2787 | 579 | ret_val = TRUE; | 579 | ret_val = TRUE; |
2789 | 580 | @@ -4569,7 +4575,8 @@ | 580 | @@ -4565,7 +4571,8 @@ |
2790 | 581 | aio operation failed, these output | 581 | aio operation failed, these output |
2791 | 582 | parameters are valid and can be used to | 582 | parameters are valid and can be used to |
2792 | 583 | restart the operation. */ | 583 | restart the operation. */ |
2793 | @@ -587,7 +587,7 @@ | |||
2794 | 587 | { | 587 | { |
2795 | 588 | ulint segment; | 588 | ulint segment; |
2796 | 589 | os_aio_array_t* array; | 589 | os_aio_array_t* array; |
2798 | 590 | @@ -4627,6 +4634,7 @@ | 590 | @@ -4638,6 +4645,7 @@ |
2799 | 591 | *message2 = slot->message2; | 591 | *message2 = slot->message2; |
2800 | 592 | 592 | ||
2801 | 593 | *type = slot->type; | 593 | *type = slot->type; |
2802 | @@ -595,7 +595,7 @@ | |||
2803 | 595 | 595 | ||
2804 | 596 | if ((slot->ret == 0) && (slot->n_bytes == (long)slot->len)) { | 596 | if ((slot->ret == 0) && (slot->n_bytes == (long)slot->len)) { |
2805 | 597 | ret = TRUE; | 597 | ret = TRUE; |
2807 | 598 | @@ -4680,7 +4688,8 @@ | 598 | @@ -4691,7 +4699,8 @@ |
2808 | 599 | parameters are valid and can be used to | 599 | parameters are valid and can be used to |
2809 | 600 | restart the operation, for example */ | 600 | restart the operation, for example */ |
2810 | 601 | void** message2, | 601 | void** message2, |
2811 | @@ -605,7 +605,7 @@ | |||
2812 | 605 | { | 605 | { |
2813 | 606 | os_aio_array_t* array; | 606 | os_aio_array_t* array; |
2814 | 607 | ulint segment; | 607 | ulint segment; |
2816 | 608 | @@ -4958,6 +4967,7 @@ | 608 | @@ -4987,6 +4996,7 @@ |
2817 | 609 | *message2 = slot->message2; | 609 | *message2 = slot->message2; |
2818 | 610 | 610 | ||
2819 | 611 | *type = slot->type; | 611 | *type = slot->type; |
2820 | @@ -624,7 +624,7 @@ | |||
2821 | 624 | 624 | ||
2822 | 625 | /** Provide optional 4.x backwards compatibility for 5.0 and above */ | 625 | /** Provide optional 4.x backwards compatibility for 5.0 and above */ |
2823 | 626 | UNIV_INTERN ibool row_rollback_on_timeout = FALSE; | 626 | UNIV_INTERN ibool row_rollback_on_timeout = FALSE; |
2825 | 627 | @@ -1194,6 +1195,13 @@ | 627 | @@ -1191,6 +1192,13 @@ |
2826 | 628 | 628 | ||
2827 | 629 | thr = que_fork_get_first_thr(prebuilt->ins_graph); | 629 | thr = que_fork_get_first_thr(prebuilt->ins_graph); |
2828 | 630 | 630 | ||
2829 | @@ -649,7 +649,7 @@ | |||
2830 | 649 | 649 | ||
2831 | 650 | rec_offs_init(offsets_); | 650 | rec_offs_init(offsets_); |
2832 | 651 | 651 | ||
2834 | 652 | @@ -3732,6 +3733,17 @@ | 652 | @@ -3737,6 +3738,17 @@ |
2835 | 653 | 653 | ||
2836 | 654 | /* Do some start-of-statement preparations */ | 654 | /* Do some start-of-statement preparations */ |
2837 | 655 | 655 | ||
2838 | @@ -667,7 +667,7 @@ | |||
2839 | 667 | if (!prebuilt->sql_stat_start) { | 667 | if (!prebuilt->sql_stat_start) { |
2840 | 668 | /* No need to set an intention lock or assign a read view */ | 668 | /* No need to set an intention lock or assign a read view */ |
2841 | 669 | 669 | ||
2843 | 670 | @@ -3742,6 +3754,18 @@ | 670 | @@ -3747,6 +3759,18 @@ |
2844 | 671 | " perform a consistent read\n" | 671 | " perform a consistent read\n" |
2845 | 672 | "InnoDB: but the read view is not assigned!\n", | 672 | "InnoDB: but the read view is not assigned!\n", |
2846 | 673 | stderr); | 673 | stderr); |
2847 | @@ -689,7 +689,7 @@ | |||
2848 | 689 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c | 689 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c |
2849 | 690 | --- a/storage/innobase/srv/srv0srv.c 2011-02-23 19:00:48.283695497 +0900 | 690 | --- a/storage/innobase/srv/srv0srv.c 2011-02-23 19:00:48.283695497 +0900 |
2850 | 691 | +++ b/storage/innobase/srv/srv0srv.c 2011-02-23 19:01:19.204696643 +0900 | 691 | +++ b/storage/innobase/srv/srv0srv.c 2011-02-23 19:01:19.204696643 +0900 |
2852 | 692 | @@ -447,6 +447,8 @@ | 692 | @@ -441,6 +441,8 @@ |
2853 | 693 | UNIV_INTERN ulint srv_pass_corrupt_table = 0; /* 0:disable 1:enable */ | 693 | UNIV_INTERN ulint srv_pass_corrupt_table = 0; /* 0:disable 1:enable */ |
2854 | 694 | 694 | ||
2855 | 695 | UNIV_INTERN ulint srv_dict_size_limit = 0; | 695 | UNIV_INTERN ulint srv_dict_size_limit = 0; |
2856 | @@ -713,7 +713,7 @@ | |||
2857 | 713 | diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c | 713 | diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c |
2858 | 714 | --- a/storage/innobase/sync/sync0sync.c 2011-02-25 14:18:55.817202060 +0900 | 714 | --- a/storage/innobase/sync/sync0sync.c 2011-02-25 14:18:55.817202060 +0900 |
2859 | 715 | +++ b/storage/innobase/sync/sync0sync.c 2011-02-25 14:19:44.596202017 +0900 | 715 | +++ b/storage/innobase/sync/sync0sync.c 2011-02-25 14:19:44.596202017 +0900 |
2861 | 716 | @@ -1175,6 +1175,7 @@ | 716 | @@ -1220,6 +1220,7 @@ |
2862 | 717 | case SYNC_LOG_FLUSH_ORDER: | 717 | case SYNC_LOG_FLUSH_ORDER: |
2863 | 718 | case SYNC_THR_LOCAL: | 718 | case SYNC_THR_LOCAL: |
2864 | 719 | case SYNC_ANY_LATCH: | 719 | case SYNC_ANY_LATCH: |
2865 | 720 | 720 | ||
2866 | === modified file 'innodb_io_patches.patch' | |||
2867 | --- innodb_io_patches.patch 2011-05-10 11:57:42 +0000 | |||
2868 | +++ innodb_io_patches.patch 2011-06-20 09:04:39 +0000 | |||
2869 | @@ -84,7 +84,7 @@ | |||
2870 | 84 | /********************************************************************//** | 84 | /********************************************************************//** |
2871 | 85 | Obtain the InnoDB transaction of a MySQL thread. | 85 | Obtain the InnoDB transaction of a MySQL thread. |
2872 | 86 | @return reference to transaction pointer */ | 86 | @return reference to transaction pointer */ |
2874 | 87 | @@ -2423,6 +2440,9 @@ | 87 | @@ -2437,6 +2454,9 @@ |
2875 | 88 | srv_n_read_io_threads = (ulint) innobase_read_io_threads; | 88 | srv_n_read_io_threads = (ulint) innobase_read_io_threads; |
2876 | 89 | srv_n_write_io_threads = (ulint) innobase_write_io_threads; | 89 | srv_n_write_io_threads = (ulint) innobase_write_io_threads; |
2877 | 90 | 90 | ||
2878 | @@ -94,7 +94,7 @@ | |||
2879 | 94 | srv_force_recovery = (ulint) innobase_force_recovery; | 94 | srv_force_recovery = (ulint) innobase_force_recovery; |
2880 | 95 | 95 | ||
2881 | 96 | srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; | 96 | srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; |
2883 | 97 | @@ -11018,7 +11038,7 @@ | 97 | @@ -11025,7 +11045,7 @@ |
2884 | 98 | PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY, | 98 | PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY, |
2885 | 99 | "Purge threads can be either 0 or 1.", | 99 | "Purge threads can be either 0 or 1.", |
2886 | 100 | NULL, NULL, | 100 | NULL, NULL, |
2887 | @@ -103,7 +103,7 @@ | |||
2888 | 103 | 0, /* Minimum value */ | 103 | 0, /* Minimum value */ |
2889 | 104 | 1, 0); /* Maximum value */ | 104 | 1, 0); /* Maximum value */ |
2890 | 105 | 105 | ||
2892 | 106 | @@ -11060,12 +11080,18 @@ | 106 | @@ -11067,12 +11087,18 @@ |
2893 | 107 | innodb_file_format_max_validate, | 107 | innodb_file_format_max_validate, |
2894 | 108 | innodb_file_format_max_update, "Antelope"); | 108 | innodb_file_format_max_update, "Antelope"); |
2895 | 109 | 109 | ||
2896 | @@ -128,7 +128,7 @@ | |||
2897 | 128 | 128 | ||
2898 | 129 | static MYSQL_SYSVAR_STR(flush_method, innobase_file_flush_method, | 129 | static MYSQL_SYSVAR_STR(flush_method, innobase_file_flush_method, |
2899 | 130 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, | 130 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
2901 | 131 | @@ -11160,7 +11186,7 @@ | 131 | @@ -11167,7 +11193,7 @@ |
2902 | 132 | static MYSQL_SYSVAR_LONGLONG(buffer_pool_size, innobase_buffer_pool_size, | 132 | static MYSQL_SYSVAR_LONGLONG(buffer_pool_size, innobase_buffer_pool_size, |
2903 | 133 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, | 133 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
2904 | 134 | "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.", | 134 | "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.", |
2905 | @@ -137,7 +137,7 @@ | |||
2906 | 137 | 137 | ||
2907 | 138 | static MYSQL_SYSVAR_LONG(buffer_pool_instances, innobase_buffer_pool_instances, | 138 | static MYSQL_SYSVAR_LONG(buffer_pool_instances, innobase_buffer_pool_instances, |
2908 | 139 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, | 139 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
2910 | 140 | @@ -11312,6 +11338,95 @@ | 140 | @@ -11319,6 +11345,95 @@ |
2911 | 141 | "trigger a readahead.", | 141 | "trigger a readahead.", |
2912 | 142 | NULL, NULL, 56, 0, 64, 0); | 142 | NULL, NULL, 56, 0, 64, 0); |
2913 | 143 | 143 | ||
2914 | @@ -233,7 +233,7 @@ | |||
2915 | 233 | static struct st_mysql_sys_var* innobase_system_variables[]= { | 233 | static struct st_mysql_sys_var* innobase_system_variables[]= { |
2916 | 234 | MYSQL_SYSVAR(additional_mem_pool_size), | 234 | MYSQL_SYSVAR(additional_mem_pool_size), |
2917 | 235 | MYSQL_SYSVAR(autoextend_increment), | 235 | MYSQL_SYSVAR(autoextend_increment), |
2919 | 236 | @@ -11332,6 +11447,7 @@ | 236 | @@ -11339,6 +11454,7 @@ |
2920 | 237 | MYSQL_SYSVAR(file_format_check), | 237 | MYSQL_SYSVAR(file_format_check), |
2921 | 238 | MYSQL_SYSVAR(file_format_max), | 238 | MYSQL_SYSVAR(file_format_max), |
2922 | 239 | MYSQL_SYSVAR(flush_log_at_trx_commit), | 239 | MYSQL_SYSVAR(flush_log_at_trx_commit), |
2923 | @@ -241,7 +241,7 @@ | |||
2924 | 241 | MYSQL_SYSVAR(flush_method), | 241 | MYSQL_SYSVAR(flush_method), |
2925 | 242 | MYSQL_SYSVAR(force_recovery), | 242 | MYSQL_SYSVAR(force_recovery), |
2926 | 243 | MYSQL_SYSVAR(locks_unsafe_for_binlog), | 243 | MYSQL_SYSVAR(locks_unsafe_for_binlog), |
2928 | 244 | @@ -11369,6 +11485,13 @@ | 244 | @@ -11376,6 +11492,13 @@ |
2929 | 245 | MYSQL_SYSVAR(show_verbose_locks), | 245 | MYSQL_SYSVAR(show_verbose_locks), |
2930 | 246 | MYSQL_SYSVAR(show_locks_held), | 246 | MYSQL_SYSVAR(show_locks_held), |
2931 | 247 | MYSQL_SYSVAR(version), | 247 | MYSQL_SYSVAR(version), |
2932 | @@ -271,7 +271,7 @@ | |||
2933 | 271 | 271 | ||
2934 | 272 | mutex_create(ibuf_pessimistic_insert_mutex_key, | 272 | mutex_create(ibuf_pessimistic_insert_mutex_key, |
2935 | 273 | &ibuf_pessimistic_insert_mutex, | 273 | &ibuf_pessimistic_insert_mutex, |
2937 | 274 | @@ -2764,9 +2766,11 @@ | 274 | @@ -2753,9 +2755,11 @@ |
2938 | 275 | size = ibuf->size; | 275 | size = ibuf->size; |
2939 | 276 | max_size = ibuf->max_size; | 276 | max_size = ibuf->max_size; |
2940 | 277 | 277 | ||
2941 | @@ -299,7 +299,7 @@ | |||
2942 | 299 | diff -ruN a/storage/innobase/include/ha_prototypes.h b/storage/innobase/include/ha_prototypes.h | 299 | diff -ruN a/storage/innobase/include/ha_prototypes.h b/storage/innobase/include/ha_prototypes.h |
2943 | 300 | --- a/storage/innobase/include/ha_prototypes.h 2010-11-03 07:01:13.000000000 +0900 | 300 | --- a/storage/innobase/include/ha_prototypes.h 2010-11-03 07:01:13.000000000 +0900 |
2944 | 301 | +++ b/storage/innobase/include/ha_prototypes.h 2010-12-03 15:10:09.078026360 +0900 | 301 | +++ b/storage/innobase/include/ha_prototypes.h 2010-12-03 15:10:09.078026360 +0900 |
2946 | 302 | @@ -284,5 +284,12 @@ | 302 | @@ -284,6 +284,13 @@ |
2947 | 303 | /*===================*/ | 303 | /*===================*/ |
2948 | 304 | void* thd, /*!< in: thread handle (THD*) */ | 304 | void* thd, /*!< in: thread handle (THD*) */ |
2949 | 305 | ulint value); /*!< in: time waited for the lock */ | 305 | ulint value); /*!< in: time waited for the lock */ |
2950 | @@ -311,11 +311,12 @@ | |||
2951 | 311 | +/*================================*/ | 311 | +/*================================*/ |
2952 | 312 | + void* thd); | 312 | + void* thd); |
2953 | 313 | 313 | ||
2955 | 314 | #endif | 314 | /**********************************************************************//** |
2956 | 315 | Get the current setting of the lower_case_table_names global parameter from | ||
2957 | 315 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h | 316 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h |
2958 | 316 | --- a/storage/innobase/include/srv0srv.h 2010-12-03 15:09:51.291955835 +0900 | 317 | --- a/storage/innobase/include/srv0srv.h 2010-12-03 15:09:51.291955835 +0900 |
2959 | 317 | +++ b/storage/innobase/include/srv0srv.h 2010-12-03 15:10:09.079029047 +0900 | 318 | +++ b/storage/innobase/include/srv0srv.h 2010-12-03 15:10:09.079029047 +0900 |
2961 | 318 | @@ -141,7 +141,8 @@ | 319 | @@ -138,7 +138,8 @@ |
2962 | 319 | extern ulint srv_n_log_files; | 320 | extern ulint srv_n_log_files; |
2963 | 320 | extern ulint srv_log_file_size; | 321 | extern ulint srv_log_file_size; |
2964 | 321 | extern ulint srv_log_buffer_size; | 322 | extern ulint srv_log_buffer_size; |
2965 | @@ -325,7 +326,7 @@ | |||
2966 | 325 | extern char srv_adaptive_flushing; | 326 | extern char srv_adaptive_flushing; |
2967 | 326 | 327 | ||
2968 | 327 | 328 | ||
2970 | 328 | @@ -219,6 +220,16 @@ | 329 | @@ -216,6 +217,16 @@ |
2971 | 329 | extern ulong srv_max_purge_lag; | 330 | extern ulong srv_max_purge_lag; |
2972 | 330 | 331 | ||
2973 | 331 | extern ulong srv_replication_delay; | 332 | extern ulong srv_replication_delay; |
2974 | @@ -342,7 +343,7 @@ | |||
2975 | 342 | /*-------------------------------------------*/ | 343 | /*-------------------------------------------*/ |
2976 | 343 | 344 | ||
2977 | 344 | extern ulint srv_n_rows_inserted; | 345 | extern ulint srv_n_rows_inserted; |
2979 | 345 | @@ -397,8 +408,9 @@ | 346 | @@ -394,8 +405,9 @@ |
2980 | 346 | when writing data files, but do flush | 347 | when writing data files, but do flush |
2981 | 347 | after writing to log files */ | 348 | after writing to log files */ |
2982 | 348 | SRV_UNIX_NOSYNC, /*!< do not flush after writing */ | 349 | SRV_UNIX_NOSYNC, /*!< do not flush after writing */ |
2983 | @@ -540,7 +541,7 @@ | |||
2984 | 540 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c | 541 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c |
2985 | 541 | --- a/storage/innobase/srv/srv0srv.c 2010-12-03 15:09:51.301987792 +0900 | 542 | --- a/storage/innobase/srv/srv0srv.c 2010-12-03 15:09:51.301987792 +0900 |
2986 | 542 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-03 15:13:29.369986988 +0900 | 543 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-03 15:13:29.369986988 +0900 |
2988 | 543 | @@ -189,7 +189,8 @@ | 544 | @@ -183,7 +183,8 @@ |
2989 | 544 | UNIV_INTERN ulint srv_log_file_size = ULINT_MAX; | 545 | UNIV_INTERN ulint srv_log_file_size = ULINT_MAX; |
2990 | 545 | /* size in database pages */ | 546 | /* size in database pages */ |
2991 | 546 | UNIV_INTERN ulint srv_log_buffer_size = ULINT_MAX; | 547 | UNIV_INTERN ulint srv_log_buffer_size = ULINT_MAX; |
2992 | @@ -550,7 +551,7 @@ | |||
2993 | 550 | 551 | ||
2994 | 551 | /* Try to flush dirty pages so as to avoid IO bursts at | 552 | /* Try to flush dirty pages so as to avoid IO bursts at |
2995 | 552 | the checkpoints. */ | 553 | the checkpoints. */ |
2997 | 553 | @@ -408,6 +409,17 @@ | 554 | @@ -402,6 +403,17 @@ |
2998 | 554 | 555 | ||
2999 | 555 | UNIV_INTERN ulong srv_replication_delay = 0; | 556 | UNIV_INTERN ulong srv_replication_delay = 0; |
3000 | 556 | 557 | ||
3001 | @@ -568,7 +569,7 @@ | |||
3002 | 568 | /*-------------------------------------------*/ | 569 | /*-------------------------------------------*/ |
3003 | 569 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; | 570 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; |
3004 | 570 | UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; | 571 | UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; |
3006 | 571 | @@ -2733,6 +2745,7 @@ | 572 | @@ -2742,6 +2754,7 @@ |
3007 | 572 | ulint n_pages_purged = 0; | 573 | ulint n_pages_purged = 0; |
3008 | 573 | ulint n_bytes_merged; | 574 | ulint n_bytes_merged; |
3009 | 574 | ulint n_pages_flushed; | 575 | ulint n_pages_flushed; |
3010 | @@ -576,7 +577,7 @@ | |||
3011 | 576 | ulint n_bytes_archived; | 577 | ulint n_bytes_archived; |
3012 | 577 | ulint n_tables_to_drop; | 578 | ulint n_tables_to_drop; |
3013 | 578 | ulint n_ios; | 579 | ulint n_ios; |
3015 | 579 | @@ -2740,7 +2753,20 @@ | 580 | @@ -2749,7 +2762,20 @@ |
3016 | 580 | ulint n_ios_very_old; | 581 | ulint n_ios_very_old; |
3017 | 581 | ulint n_pend_ios; | 582 | ulint n_pend_ios; |
3018 | 582 | ulint next_itr_time; | 583 | ulint next_itr_time; |
3019 | @@ -597,7 +598,7 @@ | |||
3020 | 597 | 598 | ||
3021 | 598 | #ifdef UNIV_DEBUG_THREAD_CREATION | 599 | #ifdef UNIV_DEBUG_THREAD_CREATION |
3022 | 599 | fprintf(stderr, "Master thread starts, id %lu\n", | 600 | fprintf(stderr, "Master thread starts, id %lu\n", |
3024 | 600 | @@ -2762,6 +2788,9 @@ | 601 | @@ -2771,6 +2797,9 @@ |
3025 | 601 | 602 | ||
3026 | 602 | mutex_exit(&kernel_mutex); | 603 | mutex_exit(&kernel_mutex); |
3027 | 603 | 604 | ||
3028 | @@ -607,7 +608,7 @@ | |||
3029 | 607 | loop: | 608 | loop: |
3030 | 608 | /*****************************************************************/ | 609 | /*****************************************************************/ |
3031 | 609 | /* ---- When there is database activity by users, we cycle in this | 610 | /* ---- When there is database activity by users, we cycle in this |
3033 | 610 | @@ -2792,9 +2821,13 @@ | 611 | @@ -2801,9 +2830,13 @@ |
3034 | 611 | /* Sleep for 1 second on entrying the for loop below the first time. */ | 612 | /* Sleep for 1 second on entrying the for loop below the first time. */ |
3035 | 612 | next_itr_time = ut_time_ms() + 1000; | 613 | next_itr_time = ut_time_ms() + 1000; |
3036 | 613 | 614 | ||
3037 | @@ -621,7 +622,7 @@ | |||
3038 | 621 | /* ALTER TABLE in MySQL requires on Unix that the table handler | 622 | /* ALTER TABLE in MySQL requires on Unix that the table handler |
3039 | 622 | can drop tables lazily after there no longer are SELECT | 623 | can drop tables lazily after there no longer are SELECT |
3040 | 623 | queries to them. */ | 624 | queries to them. */ |
3042 | 624 | @@ -2818,6 +2851,7 @@ | 625 | @@ -2827,6 +2860,7 @@ |
3043 | 625 | srv_main_thread_op_info = "sleeping"; | 626 | srv_main_thread_op_info = "sleeping"; |
3044 | 626 | srv_main_1_second_loops++; | 627 | srv_main_1_second_loops++; |
3045 | 627 | 628 | ||
3046 | @@ -629,7 +630,7 @@ | |||
3047 | 629 | if (next_itr_time > cur_time | 630 | if (next_itr_time > cur_time |
3048 | 630 | && srv_shutdown_state == SRV_SHUTDOWN_NONE) { | 631 | && srv_shutdown_state == SRV_SHUTDOWN_NONE) { |
3049 | 631 | 632 | ||
3051 | 632 | @@ -2828,10 +2862,26 @@ | 633 | @@ -2837,10 +2871,26 @@ |
3052 | 633 | (next_itr_time - cur_time) | 634 | (next_itr_time - cur_time) |
3053 | 634 | * 1000)); | 635 | * 1000)); |
3054 | 635 | srv_main_sleeps++; | 636 | srv_main_sleeps++; |
3055 | @@ -656,7 +657,7 @@ | |||
3056 | 656 | 657 | ||
3057 | 657 | /* Flush logs if needed */ | 658 | /* Flush logs if needed */ |
3058 | 658 | srv_sync_log_buffer_in_background(); | 659 | srv_sync_log_buffer_in_background(); |
3060 | 659 | @@ -2851,7 +2901,7 @@ | 660 | @@ -2860,7 +2910,7 @@ |
3061 | 660 | if (n_pend_ios < SRV_PEND_IO_THRESHOLD | 661 | if (n_pend_ios < SRV_PEND_IO_THRESHOLD |
3062 | 661 | && (n_ios - n_ios_old < SRV_RECENT_IO_ACTIVITY)) { | 662 | && (n_ios - n_ios_old < SRV_RECENT_IO_ACTIVITY)) { |
3063 | 662 | srv_main_thread_op_info = "doing insert buffer merge"; | 663 | srv_main_thread_op_info = "doing insert buffer merge"; |
3064 | @@ -665,7 +666,7 @@ | |||
3065 | 665 | 666 | ||
3066 | 666 | /* Flush logs if needed */ | 667 | /* Flush logs if needed */ |
3067 | 667 | srv_sync_log_buffer_in_background(); | 668 | srv_sync_log_buffer_in_background(); |
3069 | 668 | @@ -2868,7 +2918,11 @@ | 669 | @@ -2877,7 +2927,11 @@ |
3070 | 669 | n_pages_flushed = buf_flush_list( | 670 | n_pages_flushed = buf_flush_list( |
3071 | 670 | PCT_IO(100), IB_ULONGLONG_MAX); | 671 | PCT_IO(100), IB_ULONGLONG_MAX); |
3072 | 671 | 672 | ||
3073 | @@ -678,7 +679,7 @@ | |||
3074 | 678 | 679 | ||
3075 | 679 | /* Try to keep the rate of flushing of dirty | 680 | /* Try to keep the rate of flushing of dirty |
3076 | 680 | pages such that redo log generation does not | 681 | pages such that redo log generation does not |
3078 | 681 | @@ -2884,6 +2938,224 @@ | 682 | @@ -2893,6 +2947,224 @@ |
3079 | 682 | n_flush, | 683 | n_flush, |
3080 | 683 | IB_ULONGLONG_MAX); | 684 | IB_ULONGLONG_MAX); |
3081 | 684 | } | 685 | } |
3082 | @@ -903,7 +904,7 @@ | |||
3083 | 903 | } | 904 | } |
3084 | 904 | 905 | ||
3085 | 905 | if (srv_activity_count == old_activity_count) { | 906 | if (srv_activity_count == old_activity_count) { |
3087 | 906 | @@ -2932,7 +3204,7 @@ | 907 | @@ -2941,7 +3213,7 @@ |
3088 | 907 | even if the server were active */ | 908 | even if the server were active */ |
3089 | 908 | 909 | ||
3090 | 909 | srv_main_thread_op_info = "doing insert buffer merge"; | 910 | srv_main_thread_op_info = "doing insert buffer merge"; |
3091 | @@ -912,7 +913,7 @@ | |||
3092 | 912 | 913 | ||
3093 | 913 | /* Flush logs if needed */ | 914 | /* Flush logs if needed */ |
3094 | 914 | srv_sync_log_buffer_in_background(); | 915 | srv_sync_log_buffer_in_background(); |
3096 | 915 | @@ -3040,7 +3312,7 @@ | 916 | @@ -3049,7 +3321,7 @@ |
3097 | 916 | buf_flush_list below. Otherwise, the system favors | 917 | buf_flush_list below. Otherwise, the system favors |
3098 | 917 | clean pages over cleanup throughput. */ | 918 | clean pages over cleanup throughput. */ |
3099 | 918 | n_bytes_merged = ibuf_contract_for_n_pages(FALSE, | 919 | n_bytes_merged = ibuf_contract_for_n_pages(FALSE, |
3100 | @@ -921,7 +922,7 @@ | |||
3101 | 921 | } | 922 | } |
3102 | 922 | 923 | ||
3103 | 923 | srv_main_thread_op_info = "reserving kernel mutex"; | 924 | srv_main_thread_op_info = "reserving kernel mutex"; |
3105 | 924 | @@ -3184,6 +3456,7 @@ | 925 | @@ -3189,6 +3461,7 @@ |
3106 | 925 | srv_slot_t* slot; | 926 | srv_slot_t* slot; |
3107 | 926 | ulint retries = 0; | 927 | ulint retries = 0; |
3108 | 927 | ulint n_total_purged = ULINT_UNDEFINED; | 928 | ulint n_total_purged = ULINT_UNDEFINED; |
3109 | @@ -929,7 +930,7 @@ | |||
3110 | 929 | 930 | ||
3111 | 930 | ut_a(srv_n_purge_threads == 1); | 931 | ut_a(srv_n_purge_threads == 1); |
3112 | 931 | 932 | ||
3114 | 932 | @@ -3204,9 +3477,12 @@ | 933 | @@ -3209,9 +3482,12 @@ |
3115 | 933 | 934 | ||
3116 | 934 | mutex_exit(&kernel_mutex); | 935 | mutex_exit(&kernel_mutex); |
3117 | 935 | 936 | ||
3118 | @@ -942,7 +943,7 @@ | |||
3119 | 942 | 943 | ||
3120 | 943 | /* If there are very few records to purge or the last | 944 | /* If there are very few records to purge or the last |
3121 | 944 | purge didn't purge any records then wait for activity. | 945 | purge didn't purge any records then wait for activity. |
3123 | 945 | @@ -3253,6 +3529,16 @@ | 946 | @@ -3258,6 +3534,16 @@ |
3124 | 946 | } while (n_pages_purged > 0 && !srv_fast_shutdown); | 947 | } while (n_pages_purged > 0 && !srv_fast_shutdown); |
3125 | 947 | 948 | ||
3126 | 948 | srv_sync_log_buffer_in_background(); | 949 | srv_sync_log_buffer_in_background(); |
3127 | @@ -991,7 +992,7 @@ | |||
3128 | 991 | diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c | 992 | diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c |
3129 | 992 | --- a/storage/innobase/trx/trx0trx.c 2010-11-03 07:01:13.000000000 +0900 | 993 | --- a/storage/innobase/trx/trx0trx.c 2010-11-03 07:01:13.000000000 +0900 |
3130 | 993 | +++ b/storage/innobase/trx/trx0trx.c 2010-12-03 15:10:09.106023937 +0900 | 994 | +++ b/storage/innobase/trx/trx0trx.c 2010-12-03 15:10:09.106023937 +0900 |
3132 | 994 | @@ -924,6 +924,7 @@ | 995 | @@ -984,6 +984,7 @@ |
3133 | 995 | trx->read_view = NULL; | 996 | trx->read_view = NULL; |
3134 | 996 | 997 | ||
3135 | 997 | if (lsn) { | 998 | if (lsn) { |
3136 | @@ -999,7 +1000,7 @@ | |||
3137 | 999 | 1000 | ||
3138 | 1000 | mutex_exit(&kernel_mutex); | 1001 | mutex_exit(&kernel_mutex); |
3139 | 1001 | 1002 | ||
3141 | 1002 | @@ -932,6 +933,12 @@ | 1003 | @@ -992,6 +993,12 @@ |
3142 | 1003 | trx_undo_insert_cleanup(trx); | 1004 | trx_undo_insert_cleanup(trx); |
3143 | 1004 | } | 1005 | } |
3144 | 1005 | 1006 | ||
3145 | @@ -1012,7 +1013,7 @@ | |||
3146 | 1012 | /* NOTE that we could possibly make a group commit more | 1013 | /* NOTE that we could possibly make a group commit more |
3147 | 1013 | efficient here: call os_thread_yield here to allow also other | 1014 | efficient here: call os_thread_yield here to allow also other |
3148 | 1014 | trxs to come to commit! */ | 1015 | trxs to come to commit! */ |
3150 | 1015 | @@ -963,9 +970,9 @@ | 1016 | @@ -1023,9 +1030,9 @@ |
3151 | 1016 | if (trx->flush_log_later) { | 1017 | if (trx->flush_log_later) { |
3152 | 1017 | /* Do nothing yet */ | 1018 | /* Do nothing yet */ |
3153 | 1018 | trx->must_flush_log_later = TRUE; | 1019 | trx->must_flush_log_later = TRUE; |
3154 | @@ -1024,7 +1025,7 @@ | |||
3155 | 1024 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { | 1025 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { |
3156 | 1025 | /* Write the log but do not flush it to disk */ | 1026 | /* Write the log but do not flush it to disk */ |
3157 | 1026 | 1027 | ||
3159 | 1027 | @@ -977,7 +984,7 @@ | 1028 | @@ -1037,7 +1044,7 @@ |
3160 | 1028 | 1029 | ||
3161 | 1029 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); | 1030 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); |
3162 | 1030 | } | 1031 | } |
3163 | @@ -1033,7 +1034,7 @@ | |||
3164 | 1033 | 1034 | ||
3165 | 1034 | /* Write the log but do not flush it to disk */ | 1035 | /* Write the log but do not flush it to disk */ |
3166 | 1035 | 1036 | ||
3168 | 1036 | @@ -1641,16 +1648,23 @@ | 1037 | @@ -1701,16 +1708,23 @@ |
3169 | 1037 | trx_t* trx) /*!< in: trx handle */ | 1038 | trx_t* trx) /*!< in: trx handle */ |
3170 | 1038 | { | 1039 | { |
3171 | 1039 | ib_uint64_t lsn = trx->commit_lsn; | 1040 | ib_uint64_t lsn = trx->commit_lsn; |
3172 | @@ -1059,7 +1060,7 @@ | |||
3173 | 1059 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { | 1060 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { |
3174 | 1060 | /* Write the log but do not flush it to disk */ | 1061 | /* Write the log but do not flush it to disk */ |
3175 | 1061 | 1062 | ||
3177 | 1062 | @@ -1661,7 +1675,7 @@ | 1063 | @@ -1721,7 +1735,7 @@ |
3178 | 1063 | 1064 | ||
3179 | 1064 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); | 1065 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); |
3180 | 1065 | } | 1066 | } |
3181 | @@ -1068,7 +1069,7 @@ | |||
3182 | 1068 | 1069 | ||
3183 | 1069 | /* Write the log but do not flush it to disk */ | 1070 | /* Write the log but do not flush it to disk */ |
3184 | 1070 | 1071 | ||
3186 | 1071 | @@ -1914,6 +1928,8 @@ | 1072 | @@ -1969,6 +1983,8 @@ |
3187 | 1072 | /*--------------------------------------*/ | 1073 | /*--------------------------------------*/ |
3188 | 1073 | 1074 | ||
3189 | 1074 | if (lsn) { | 1075 | if (lsn) { |
3190 | @@ -1077,7 +1078,7 @@ | |||
3191 | 1077 | /* Depending on the my.cnf options, we may now write the log | 1078 | /* Depending on the my.cnf options, we may now write the log |
3192 | 1078 | buffer to the log files, making the prepared state of the | 1079 | buffer to the log files, making the prepared state of the |
3193 | 1079 | transaction durable if the OS does not crash. We may also | 1080 | transaction durable if the OS does not crash. We may also |
3195 | 1080 | @@ -1933,9 +1949,15 @@ | 1081 | @@ -1988,9 +2004,15 @@ |
3196 | 1081 | 1082 | ||
3197 | 1082 | mutex_exit(&kernel_mutex); | 1083 | mutex_exit(&kernel_mutex); |
3198 | 1083 | 1084 | ||
3199 | @@ -1095,7 +1096,7 @@ | |||
3200 | 1095 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { | 1096 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { |
3201 | 1096 | /* Write the log but do not flush it to disk */ | 1097 | /* Write the log but do not flush it to disk */ |
3202 | 1097 | 1098 | ||
3204 | 1098 | @@ -1947,7 +1969,7 @@ | 1099 | @@ -2002,7 +2024,7 @@ |
3205 | 1099 | 1100 | ||
3206 | 1100 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); | 1101 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); |
3207 | 1101 | } | 1102 | } |
3208 | 1102 | 1103 | ||
3209 | === modified file 'innodb_lru_dump_restore.patch' | |||
3210 | --- innodb_lru_dump_restore.patch 2011-05-10 11:57:42 +0000 | |||
3211 | +++ innodb_lru_dump_restore.patch 2011-06-20 09:04:39 +0000 | |||
3212 | @@ -8,7 +8,7 @@ | |||
3213 | 8 | diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c | 8 | diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c |
3214 | 9 | --- a/storage/innobase/buf/buf0lru.c 2010-12-03 15:49:59.185023424 +0900 | 9 | --- a/storage/innobase/buf/buf0lru.c 2010-12-03 15:49:59.185023424 +0900 |
3215 | 10 | +++ b/storage/innobase/buf/buf0lru.c 2010-12-04 15:33:37.626482350 +0900 | 10 | +++ b/storage/innobase/buf/buf0lru.c 2010-12-04 15:33:37.626482350 +0900 |
3217 | 11 | @@ -2245,6 +2245,284 @@ | 11 | @@ -2247,6 +2247,284 @@ |
3218 | 12 | memset(&buf_LRU_stat_cur, 0, sizeof buf_LRU_stat_cur); | 12 | memset(&buf_LRU_stat_cur, 0, sizeof buf_LRU_stat_cur); |
3219 | 13 | } | 13 | } |
3220 | 14 | 14 | ||
3221 | @@ -308,7 +308,7 @@ | |||
3222 | 308 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c | 308 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c |
3223 | 309 | --- a/storage/innobase/fil/fil0fil.c 2010-12-03 17:49:11.581025127 +0900 | 309 | --- a/storage/innobase/fil/fil0fil.c 2010-12-03 17:49:11.581025127 +0900 |
3224 | 310 | +++ b/storage/innobase/fil/fil0fil.c 2010-12-04 15:33:37.632482885 +0900 | 310 | +++ b/storage/innobase/fil/fil0fil.c 2010-12-04 15:33:37.632482885 +0900 |
3226 | 311 | @@ -4965,6 +4965,70 @@ | 311 | @@ -5289,6 +5289,70 @@ |
3227 | 312 | return(DB_SUCCESS); | 312 | return(DB_SUCCESS); |
3228 | 313 | } | 313 | } |
3229 | 314 | 314 | ||
3230 | @@ -382,7 +382,7 @@ | |||
3231 | 382 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc | 382 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc |
3232 | 383 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:49:11.589956135 +0900 | 383 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:49:11.589956135 +0900 |
3233 | 384 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-04 15:33:37.645555490 +0900 | 384 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-04 15:33:37.645555490 +0900 |
3235 | 385 | @@ -11786,6 +11786,12 @@ | 385 | @@ -11793,6 +11793,12 @@ |
3236 | 386 | "Limit the allocated memory for dictionary cache. (0: unlimited)", | 386 | "Limit the allocated memory for dictionary cache. (0: unlimited)", |
3237 | 387 | NULL, NULL, 0, 0, LONG_MAX, 0); | 387 | NULL, NULL, 0, 0, LONG_MAX, 0); |
3238 | 388 | 388 | ||
3239 | @@ -395,7 +395,7 @@ | |||
3240 | 395 | static struct st_mysql_sys_var* innobase_system_variables[]= { | 395 | static struct st_mysql_sys_var* innobase_system_variables[]= { |
3241 | 396 | MYSQL_SYSVAR(additional_mem_pool_size), | 396 | MYSQL_SYSVAR(additional_mem_pool_size), |
3242 | 397 | MYSQL_SYSVAR(autoextend_increment), | 397 | MYSQL_SYSVAR(autoextend_increment), |
3244 | 398 | @@ -11867,6 +11873,7 @@ | 398 | @@ -11874,6 +11880,7 @@ |
3245 | 399 | #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ | 399 | #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ |
3246 | 400 | MYSQL_SYSVAR(read_ahead_threshold), | 400 | MYSQL_SYSVAR(read_ahead_threshold), |
3247 | 401 | MYSQL_SYSVAR(io_capacity), | 401 | MYSQL_SYSVAR(io_capacity), |
3248 | @@ -535,7 +535,7 @@ | |||
3249 | 535 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h | 535 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h |
3250 | 536 | --- a/storage/innobase/include/srv0srv.h 2010-12-03 17:49:11.603969747 +0900 | 536 | --- a/storage/innobase/include/srv0srv.h 2010-12-03 17:49:11.603969747 +0900 |
3251 | 537 | +++ b/storage/innobase/include/srv0srv.h 2010-12-04 15:33:37.685550816 +0900 | 537 | +++ b/storage/innobase/include/srv0srv.h 2010-12-04 15:33:37.685550816 +0900 |
3253 | 538 | @@ -359,6 +359,9 @@ | 538 | @@ -356,6 +356,9 @@ |
3254 | 539 | reading of a disk page */ | 539 | reading of a disk page */ |
3255 | 540 | extern ulint srv_buf_pool_reads; | 540 | extern ulint srv_buf_pool_reads; |
3256 | 541 | 541 | ||
3257 | @@ -545,7 +545,7 @@ | |||
3258 | 545 | /** Status variables to be passed to MySQL */ | 545 | /** Status variables to be passed to MySQL */ |
3259 | 546 | typedef struct export_var_struct export_struc; | 546 | typedef struct export_var_struct export_struc; |
3260 | 547 | 547 | ||
3262 | 548 | @@ -664,6 +667,16 @@ | 548 | @@ -661,6 +664,16 @@ |
3263 | 549 | /*=====================*/ | 549 | /*=====================*/ |
3264 | 550 | void* arg); /*!< in: a dummy parameter required by | 550 | void* arg); /*!< in: a dummy parameter required by |
3265 | 551 | os_thread_create */ | 551 | os_thread_create */ |
3266 | @@ -565,7 +565,7 @@ | |||
3267 | 565 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c | 565 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c |
3268 | 566 | --- a/storage/innobase/srv/srv0srv.c 2010-12-03 17:49:11.620986661 +0900 | 566 | --- a/storage/innobase/srv/srv0srv.c 2010-12-03 17:49:11.620986661 +0900 |
3269 | 567 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-04 15:33:37.708550811 +0900 | 567 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-04 15:33:37.708550811 +0900 |
3271 | 568 | @@ -336,6 +336,9 @@ | 568 | @@ -330,6 +330,9 @@ |
3272 | 569 | reading of a disk page */ | 569 | reading of a disk page */ |
3273 | 570 | UNIV_INTERN ulint srv_buf_pool_reads = 0; | 570 | UNIV_INTERN ulint srv_buf_pool_reads = 0; |
3274 | 571 | 571 | ||
3275 | @@ -575,7 +575,7 @@ | |||
3276 | 575 | /* structure to pass status variables to MySQL */ | 575 | /* structure to pass status variables to MySQL */ |
3277 | 576 | UNIV_INTERN export_struc export_vars; | 576 | UNIV_INTERN export_struc export_vars; |
3278 | 577 | 577 | ||
3280 | 578 | @@ -2691,6 +2694,56 @@ | 578 | @@ -2701,6 +2704,56 @@ |
3281 | 579 | /* We count the number of threads in os_thread_exit(). A created | 579 | /* We count the number of threads in os_thread_exit(). A created |
3282 | 580 | thread should always use that to exit and not use return() to exit. */ | 580 | thread should always use that to exit and not use return() to exit. */ |
3283 | 581 | 581 | ||
3284 | 582 | 582 | ||
3285 | === modified file 'innodb_overwrite_relay_log_info.patch' | |||
3286 | --- innodb_overwrite_relay_log_info.patch 2011-05-10 11:57:42 +0000 | |||
3287 | +++ innodb_overwrite_relay_log_info.patch 2011-06-20 09:04:39 +0000 | |||
3288 | @@ -56,7 +56,7 @@ | |||
3289 | 56 | static my_bool innobase_rollback_on_timeout = FALSE; | 56 | static my_bool innobase_rollback_on_timeout = FALSE; |
3290 | 57 | static my_bool innobase_create_status_file = FALSE; | 57 | static my_bool innobase_create_status_file = FALSE; |
3291 | 58 | static my_bool innobase_stats_on_metadata = TRUE; | 58 | static my_bool innobase_stats_on_metadata = TRUE; |
3293 | 59 | @@ -2234,6 +2254,89 @@ | 59 | @@ -2248,6 +2268,89 @@ |
3294 | 60 | } | 60 | } |
3295 | 61 | #endif /* DBUG_OFF */ | 61 | #endif /* DBUG_OFF */ |
3296 | 62 | 62 | ||
3297 | @@ -146,7 +146,7 @@ | |||
3298 | 146 | /* Check that values don't overflow on 32-bit systems. */ | 146 | /* Check that values don't overflow on 32-bit systems. */ |
3299 | 147 | if (sizeof(ulint) == 4) { | 147 | if (sizeof(ulint) == 4) { |
3300 | 148 | if (innobase_buffer_pool_size > UINT_MAX32) { | 148 | if (innobase_buffer_pool_size > UINT_MAX32) { |
3302 | 149 | @@ -2532,6 +2635,76 @@ | 149 | @@ -2546,6 +2649,76 @@ |
3303 | 150 | goto mem_free_and_error; | 150 | goto mem_free_and_error; |
3304 | 151 | } | 151 | } |
3305 | 152 | 152 | ||
3306 | @@ -223,7 +223,7 @@ | |||
3307 | 223 | innobase_old_blocks_pct = buf_LRU_old_ratio_update( | 223 | innobase_old_blocks_pct = buf_LRU_old_ratio_update( |
3308 | 224 | innobase_old_blocks_pct, TRUE); | 224 | innobase_old_blocks_pct, TRUE); |
3309 | 225 | 225 | ||
3311 | 226 | @@ -2644,6 +2817,25 @@ | 226 | @@ -2658,6 +2831,25 @@ |
3312 | 227 | trx_t* trx) /*!< in: transaction handle */ | 227 | trx_t* trx) /*!< in: transaction handle */ |
3313 | 228 | { | 228 | { |
3314 | 229 | if (trx_is_started(trx)) { | 229 | if (trx_is_started(trx)) { |
3315 | @@ -249,7 +249,7 @@ | |||
3316 | 249 | 249 | ||
3317 | 250 | trx_commit_for_mysql(trx); | 250 | trx_commit_for_mysql(trx); |
3318 | 251 | } | 251 | } |
3320 | 252 | @@ -11007,6 +11199,12 @@ | 252 | @@ -11014,6 +11206,12 @@ |
3321 | 253 | "The common part for InnoDB table spaces.", | 253 | "The common part for InnoDB table spaces.", |
3322 | 254 | NULL, NULL, NULL); | 254 | NULL, NULL, NULL); |
3323 | 255 | 255 | ||
3324 | @@ -262,7 +262,7 @@ | |||
3325 | 262 | static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite, | 262 | static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite, |
3326 | 263 | PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, | 263 | PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, |
3327 | 264 | "Enable InnoDB doublewrite buffer (enabled by default). " | 264 | "Enable InnoDB doublewrite buffer (enabled by default). " |
3329 | 265 | @@ -11467,6 +11665,7 @@ | 265 | @@ -11474,6 +11672,7 @@ |
3330 | 266 | MYSQL_SYSVAR(old_blocks_pct), | 266 | MYSQL_SYSVAR(old_blocks_pct), |
3331 | 267 | MYSQL_SYSVAR(old_blocks_time), | 267 | MYSQL_SYSVAR(old_blocks_time), |
3332 | 268 | MYSQL_SYSVAR(open_files), | 268 | MYSQL_SYSVAR(open_files), |
3333 | @@ -312,7 +312,7 @@ | |||
3334 | 312 | diff -ruN a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h | 312 | diff -ruN a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h |
3335 | 313 | --- a/storage/innobase/include/trx0trx.h 2010-12-03 15:18:48.894955550 +0900 | 313 | --- a/storage/innobase/include/trx0trx.h 2010-12-03 15:18:48.894955550 +0900 |
3336 | 314 | +++ b/storage/innobase/include/trx0trx.h 2010-12-03 15:38:20.323953416 +0900 | 314 | +++ b/storage/innobase/include/trx0trx.h 2010-12-03 15:38:20.323953416 +0900 |
3338 | 315 | @@ -569,6 +569,21 @@ | 315 | @@ -580,6 +580,20 @@ |
3339 | 316 | ib_int64_t mysql_log_offset;/* if MySQL binlog is used, this field | 316 | ib_int64_t mysql_log_offset;/* if MySQL binlog is used, this field |
3340 | 317 | contains the end offset of the binlog | 317 | contains the end offset of the binlog |
3341 | 318 | entry */ | 318 | entry */ |
3342 | @@ -330,14 +330,13 @@ | |||
3343 | 330 | + replication has processed */ | 330 | + replication has processed */ |
3344 | 331 | + const char* mysql_relay_log_file_name; | 331 | + const char* mysql_relay_log_file_name; |
3345 | 332 | + ib_int64_t mysql_relay_log_pos; | 332 | + ib_int64_t mysql_relay_log_pos; |
3350 | 333 | + | 333 | /*------------------------------*/ |
3351 | 334 | os_thread_id_t mysql_thread_id;/* id of the MySQL thread associated | 334 | ulint n_mysql_tables_in_use; /* number of Innobase tables |
3352 | 335 | with this transaction object */ | 335 | used in the processing of the current |
3349 | 336 | ulint mysql_process_no;/* since in Linux, 'top' reports | ||
3353 | 337 | diff -ruN a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c | 336 | diff -ruN a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c |
3354 | 338 | --- a/storage/innobase/trx/trx0sys.c 2010-11-03 07:01:13.000000000 +0900 | 337 | --- a/storage/innobase/trx/trx0sys.c 2010-11-03 07:01:13.000000000 +0900 |
3355 | 339 | +++ b/storage/innobase/trx/trx0sys.c 2010-12-03 15:38:20.325956917 +0900 | 338 | +++ b/storage/innobase/trx/trx0sys.c 2010-12-03 15:38:20.325956917 +0900 |
3357 | 340 | @@ -75,13 +75,16 @@ | 339 | @@ -76,13 +76,16 @@ |
3358 | 341 | file name and position here. */ | 340 | file name and position here. */ |
3359 | 342 | /* @{ */ | 341 | /* @{ */ |
3360 | 343 | /** Master binlog file name */ | 342 | /** Master binlog file name */ |
3361 | @@ -355,7 +354,7 @@ | |||
3362 | 355 | /** If this MySQL server uses binary logging, after InnoDB has been inited | 354 | /** If this MySQL server uses binary logging, after InnoDB has been inited |
3363 | 356 | and if it has done a crash recovery, we store the binlog file name and position | 355 | and if it has done a crash recovery, we store the binlog file name and position |
3364 | 357 | here. */ | 356 | here. */ |
3366 | 358 | @@ -683,23 +686,25 @@ | 357 | @@ -684,23 +687,25 @@ |
3367 | 359 | void | 358 | void |
3368 | 360 | trx_sys_update_mysql_binlog_offset( | 359 | trx_sys_update_mysql_binlog_offset( |
3369 | 361 | /*===============================*/ | 360 | /*===============================*/ |
3370 | @@ -387,7 +386,7 @@ | |||
3371 | 387 | if (mach_read_from_4(sys_header + field | 386 | if (mach_read_from_4(sys_header + field |
3372 | 388 | + TRX_SYS_MYSQL_LOG_MAGIC_N_FLD) | 387 | + TRX_SYS_MYSQL_LOG_MAGIC_N_FLD) |
3373 | 389 | != TRX_SYS_MYSQL_LOG_MAGIC_N) { | 388 | != TRX_SYS_MYSQL_LOG_MAGIC_N) { |
3375 | 390 | @@ -821,13 +826,26 @@ | 389 | @@ -822,13 +827,26 @@ |
3376 | 391 | + TRX_SYS_MYSQL_LOG_OFFSET_LOW), | 390 | + TRX_SYS_MYSQL_LOG_OFFSET_LOW), |
3377 | 392 | sys_header + TRX_SYS_MYSQL_MASTER_LOG_INFO | 391 | sys_header + TRX_SYS_MYSQL_MASTER_LOG_INFO |
3378 | 393 | + TRX_SYS_MYSQL_LOG_NAME); | 392 | + TRX_SYS_MYSQL_LOG_NAME); |
3379 | @@ -415,7 +414,7 @@ | |||
3380 | 415 | 414 | ||
3381 | 416 | trx_sys_mysql_master_log_pos | 415 | trx_sys_mysql_master_log_pos |
3382 | 417 | = (((ib_int64_t) mach_read_from_4( | 416 | = (((ib_int64_t) mach_read_from_4( |
3384 | 418 | @@ -836,6 +854,19 @@ | 417 | @@ -837,6 +855,19 @@ |
3385 | 419 | + ((ib_int64_t) mach_read_from_4( | 418 | + ((ib_int64_t) mach_read_from_4( |
3386 | 420 | sys_header + TRX_SYS_MYSQL_MASTER_LOG_INFO | 419 | sys_header + TRX_SYS_MYSQL_MASTER_LOG_INFO |
3387 | 421 | + TRX_SYS_MYSQL_LOG_OFFSET_LOW)); | 420 | + TRX_SYS_MYSQL_LOG_OFFSET_LOW)); |
3388 | @@ -438,7 +437,7 @@ | |||
3389 | 438 | diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c | 437 | diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c |
3390 | 439 | --- a/storage/innobase/trx/trx0trx.c 2010-12-03 15:37:45.549028990 +0900 | 438 | --- a/storage/innobase/trx/trx0trx.c 2010-12-03 15:37:45.549028990 +0900 |
3391 | 440 | +++ b/storage/innobase/trx/trx0trx.c 2010-12-03 15:38:20.328957217 +0900 | 439 | +++ b/storage/innobase/trx/trx0trx.c 2010-12-03 15:38:20.328957217 +0900 |
3393 | 441 | @@ -135,6 +135,10 @@ | 440 | @@ -138,6 +138,10 @@ |
3394 | 442 | 441 | ||
3395 | 443 | trx->mysql_log_file_name = NULL; | 442 | trx->mysql_log_file_name = NULL; |
3396 | 444 | trx->mysql_log_offset = 0; | 443 | trx->mysql_log_offset = 0; |
3397 | @@ -449,7 +448,7 @@ | |||
3398 | 449 | 448 | ||
3399 | 450 | mutex_create(trx_undo_mutex_key, &trx->undo_mutex, SYNC_TRX_UNDO); | 449 | mutex_create(trx_undo_mutex_key, &trx->undo_mutex, SYNC_TRX_UNDO); |
3400 | 451 | 450 | ||
3402 | 452 | @@ -765,6 +769,7 @@ | 451 | @@ -820,6 +824,7 @@ |
3403 | 453 | { | 452 | { |
3404 | 454 | mtr_t mtr; | 453 | mtr_t mtr; |
3405 | 455 | trx_rseg_t* rseg; | 454 | trx_rseg_t* rseg; |
3406 | @@ -457,7 +456,7 @@ | |||
3407 | 457 | 456 | ||
3408 | 458 | ut_ad(!mutex_own(&kernel_mutex)); | 457 | ut_ad(!mutex_own(&kernel_mutex)); |
3409 | 459 | 458 | ||
3411 | 460 | @@ -818,8 +823,12 @@ | 459 | @@ -873,8 +878,12 @@ |
3412 | 461 | 460 | ||
3413 | 462 | if (trx->mysql_log_file_name | 461 | if (trx->mysql_log_file_name |
3414 | 463 | && trx->mysql_log_file_name[0] != '\0') { | 462 | && trx->mysql_log_file_name[0] != '\0') { |
3415 | @@ -470,7 +469,7 @@ | |||
3416 | 470 | trx->mysql_log_file_name, | 469 | trx->mysql_log_file_name, |
3417 | 471 | trx->mysql_log_offset, | 470 | trx->mysql_log_offset, |
3418 | 472 | TRX_SYS_MYSQL_LOG_INFO, &mtr); | 471 | TRX_SYS_MYSQL_LOG_INFO, &mtr); |
3420 | 473 | @@ -827,6 +836,27 @@ | 472 | @@ -882,6 +891,27 @@ |
3421 | 474 | trx->mysql_log_file_name = NULL; | 473 | trx->mysql_log_file_name = NULL; |
3422 | 475 | } | 474 | } |
3423 | 476 | 475 | ||
3424 | 477 | 476 | ||
3425 | === modified file 'innodb_pass_corrupt_table.patch' | |||
3426 | --- innodb_pass_corrupt_table.patch 2011-05-10 11:57:42 +0000 | |||
3427 | +++ innodb_pass_corrupt_table.patch 2011-06-20 09:04:39 +0000 | |||
3428 | @@ -343,37 +343,35 @@ | |||
3429 | 343 | if (!ready) { | 343 | if (!ready) { |
3430 | 344 | 344 | ||
3431 | 345 | return(block); | 345 | return(block); |
3433 | 346 | @@ -2475,6 +2481,14 @@ | 346 | @@ -2475,6 +2481,13 @@ |
3434 | 347 | return(NULL); | 347 | return(NULL); |
3435 | 348 | } | 348 | } |
3436 | 349 | 349 | ||
3438 | 350 | + if (srv_pass_corrupt_table) { | 350 | + if (srv_pass_corrupt_table <= 1) { |
3439 | 351 | + if (bpage->is_corrupt) { | 351 | + if (bpage->is_corrupt) { |
3440 | 352 | + rw_lock_s_unlock(&buf_pool->page_hash_latch); | 352 | + rw_lock_s_unlock(&buf_pool->page_hash_latch); |
3441 | 353 | + return(NULL); | 353 | + return(NULL); |
3442 | 354 | + } | 354 | + } |
3443 | 355 | + } | 355 | + } |
3444 | 356 | + ut_a(!(bpage->is_corrupt)); | ||
3445 | 357 | + | 356 | + |
3446 | 358 | block_mutex = buf_page_get_mutex_enter(bpage); | 357 | block_mutex = buf_page_get_mutex_enter(bpage); |
3447 | 359 | 358 | ||
3448 | 360 | rw_lock_s_unlock(&buf_pool->page_hash_latch); | 359 | rw_lock_s_unlock(&buf_pool->page_hash_latch); |
3450 | 361 | @@ -3036,6 +3050,14 @@ | 360 | @@ -3036,6 +3049,13 @@ |
3451 | 362 | return(NULL); | 361 | return(NULL); |
3452 | 363 | } | 362 | } |
3453 | 364 | 363 | ||
3455 | 365 | + if (srv_pass_corrupt_table) { | 364 | + if (srv_pass_corrupt_table <= 1) { |
3456 | 366 | + if (block->page.is_corrupt) { | 365 | + if (block->page.is_corrupt) { |
3457 | 367 | + mutex_exit(block_mutex); | 366 | + mutex_exit(block_mutex); |
3458 | 368 | + return(NULL); | 367 | + return(NULL); |
3459 | 369 | + } | 368 | + } |
3460 | 370 | + } | 369 | + } |
3461 | 371 | + ut_a(!(block->page.is_corrupt)); | ||
3462 | 372 | + | 370 | + |
3463 | 373 | switch (buf_block_get_state(block)) { | 371 | switch (buf_block_get_state(block)) { |
3464 | 374 | buf_page_t* bpage; | 372 | buf_page_t* bpage; |
3465 | 375 | ibool success; | 373 | ibool success; |
3467 | 376 | @@ -3710,6 +3732,7 @@ | 374 | @@ -3710,6 +3730,7 @@ |
3468 | 377 | bpage->newest_modification = 0; | 375 | bpage->newest_modification = 0; |
3469 | 378 | bpage->oldest_modification = 0; | 376 | bpage->oldest_modification = 0; |
3470 | 379 | HASH_INVALIDATE(bpage, hash); | 377 | HASH_INVALIDATE(bpage, hash); |
3471 | @@ -381,17 +379,7 @@ | |||
3472 | 381 | #if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG | 379 | #if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG |
3473 | 382 | bpage->file_page_was_freed = FALSE; | 380 | bpage->file_page_was_freed = FALSE; |
3474 | 383 | #endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ | 381 | #endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ |
3486 | 384 | @@ -4220,7 +4243,8 @@ | 382 | @@ -4299,6 +4320,7 @@ |
3476 | 385 | void | ||
3477 | 386 | buf_page_io_complete( | ||
3478 | 387 | /*=================*/ | ||
3479 | 388 | - buf_page_t* bpage) /*!< in: pointer to the block in question */ | ||
3480 | 389 | + buf_page_t* bpage, /*!< in: pointer to the block in question */ | ||
3481 | 390 | + trx_t* trx) | ||
3482 | 391 | { | ||
3483 | 392 | enum buf_io_fix io_type; | ||
3484 | 393 | buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); | ||
3485 | 394 | @@ -4299,6 +4323,7 @@ | ||
3487 | 395 | (ulong) bpage->offset); | 383 | (ulong) bpage->offset); |
3488 | 396 | } | 384 | } |
3489 | 397 | 385 | ||
3490 | @@ -399,27 +387,31 @@ | |||
3491 | 399 | /* From version 3.23.38 up we store the page checksum | 387 | /* From version 3.23.38 up we store the page checksum |
3492 | 400 | to the 4 first bytes of the page end lsn field */ | 388 | to the 4 first bytes of the page end lsn field */ |
3493 | 401 | 389 | ||
3495 | 402 | @@ -4340,6 +4365,19 @@ | 390 | @@ -4340,6 +4362,23 @@ |
3496 | 403 | REFMAN "forcing-innodb-recovery.html\n" | 391 | REFMAN "forcing-innodb-recovery.html\n" |
3497 | 404 | "InnoDB: about forcing recovery.\n", stderr); | 392 | "InnoDB: about forcing recovery.\n", stderr); |
3498 | 405 | 393 | ||
3499 | 406 | + if (srv_pass_corrupt_table && !trx_sys_sys_space(bpage->space) | 394 | + if (srv_pass_corrupt_table && !trx_sys_sys_space(bpage->space) |
3500 | 407 | + && bpage->space < SRV_LOG_SPACE_FIRST_ID) { | 395 | + && bpage->space < SRV_LOG_SPACE_FIRST_ID) { |
3501 | 396 | + trx_t* trx; | ||
3502 | 397 | + | ||
3503 | 408 | + fprintf(stderr, | 398 | + fprintf(stderr, |
3504 | 409 | + "InnoDB: space %u will be treated as corrupt.\n", | 399 | + "InnoDB: space %u will be treated as corrupt.\n", |
3505 | 410 | + bpage->space); | 400 | + bpage->space); |
3506 | 411 | + fil_space_set_corrupt(bpage->space); | 401 | + fil_space_set_corrupt(bpage->space); |
3508 | 412 | + if (trx && trx->dict_operation_lock_mode == 0) { | 402 | + |
3509 | 403 | + trx = innobase_get_trx(); | ||
3510 | 404 | + if (trx && trx->dict_operation_lock_mode == RW_X_LATCH) { | ||
3511 | 405 | + dict_table_set_corrupt_by_space(bpage->space, FALSE); | ||
3512 | 406 | + } else { | ||
3513 | 413 | + dict_table_set_corrupt_by_space(bpage->space, TRUE); | 407 | + dict_table_set_corrupt_by_space(bpage->space, TRUE); |
3514 | 414 | + } else { | ||
3515 | 415 | + dict_table_set_corrupt_by_space(bpage->space, FALSE); | ||
3516 | 416 | + } | 408 | + } |
3517 | 417 | + bpage->is_corrupt = TRUE; | 409 | + bpage->is_corrupt = TRUE; |
3518 | 418 | + } else | 410 | + } else |
3519 | 419 | if (srv_force_recovery < SRV_FORCE_IGNORE_CORRUPT) { | 411 | if (srv_force_recovery < SRV_FORCE_IGNORE_CORRUPT) { |
3520 | 420 | fputs("InnoDB: Ending processing because of" | 412 | fputs("InnoDB: Ending processing because of" |
3521 | 421 | " a corrupt database page.\n", | 413 | " a corrupt database page.\n", |
3523 | 422 | @@ -4347,6 +4385,7 @@ | 414 | @@ -4347,6 +4386,7 @@ |
3524 | 423 | exit(1); | 415 | exit(1); |
3525 | 424 | } | 416 | } |
3526 | 425 | } | 417 | } |
3527 | @@ -427,7 +419,7 @@ | |||
3528 | 427 | 419 | ||
3529 | 428 | if (recv_recovery_is_on()) { | 420 | if (recv_recovery_is_on()) { |
3530 | 429 | /* Pages must be uncompressed for crash recovery. */ | 421 | /* Pages must be uncompressed for crash recovery. */ |
3532 | 430 | @@ -4356,8 +4395,11 @@ | 422 | @@ -4356,8 +4396,11 @@ |
3533 | 431 | 423 | ||
3534 | 432 | if (uncompressed && !recv_no_ibuf_operations) { | 424 | if (uncompressed && !recv_no_ibuf_operations) { |
3535 | 433 | ibuf_merge_or_delete_for_page( | 425 | ibuf_merge_or_delete_for_page( |
3536 | @@ -442,7 +434,7 @@ | |||
3537 | 442 | diff -ruN a/storage/innobase/buf/buf0rea.c b/storage/innobase/buf/buf0rea.c | 434 | diff -ruN a/storage/innobase/buf/buf0rea.c b/storage/innobase/buf/buf0rea.c |
3538 | 443 | --- a/storage/innobase/buf/buf0rea.c 2010-12-04 15:37:50.557553380 +0900 | 435 | --- a/storage/innobase/buf/buf0rea.c 2010-12-04 15:37:50.557553380 +0900 |
3539 | 444 | +++ b/storage/innobase/buf/buf0rea.c 2010-12-04 15:41:09.784467585 +0900 | 436 | +++ b/storage/innobase/buf/buf0rea.c 2010-12-04 15:41:09.784467585 +0900 |
3541 | 445 | @@ -193,12 +193,19 @@ | 437 | @@ -193,7 +193,14 @@ |
3542 | 446 | ((buf_block_t*) bpage)->frame, bpage, trx); | 438 | ((buf_block_t*) bpage)->frame, bpage, trx); |
3543 | 447 | } | 439 | } |
3544 | 448 | thd_wait_end(NULL); | 440 | thd_wait_end(NULL); |
3545 | @@ -457,24 +449,18 @@ | |||
3546 | 457 | 449 | ||
3547 | 458 | if (sync) { | 450 | if (sync) { |
3548 | 459 | /* The i/o is already completed when we arrive from | 451 | /* The i/o is already completed when we arrive from |
3549 | 460 | fil_read */ | ||
3550 | 461 | - buf_page_io_complete(bpage); | ||
3551 | 462 | + buf_page_io_complete(bpage, trx); | ||
3552 | 463 | } | ||
3553 | 464 | |||
3554 | 465 | return(1); | ||
3555 | 466 | diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c | 452 | diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c |
3556 | 467 | --- a/storage/innobase/dict/dict0dict.c 2010-12-03 17:30:16.248987063 +0900 | 453 | --- a/storage/innobase/dict/dict0dict.c 2010-12-03 17:30:16.248987063 +0900 |
3557 | 468 | +++ b/storage/innobase/dict/dict0dict.c 2010-12-04 15:45:23.808513973 +0900 | 454 | +++ b/storage/innobase/dict/dict0dict.c 2010-12-04 15:45:23.808513973 +0900 |
3560 | 469 | @@ -55,6 +55,7 @@ | 455 | @@ -54,6 +54,7 @@ |
3561 | 470 | #include "srv0srv.h" /* srv_lower_case_table_names */ | 456 | #include "row0merge.h" |
3562 | 471 | #include "m_ctype.h" /* my_isspace() */ | 457 | #include "m_ctype.h" /* my_isspace() */ |
3563 | 472 | #include "ha_prototypes.h" /* innobase_strcasecmp(), innobase_casedn_str()*/ | 458 | #include "ha_prototypes.h" /* innobase_strcasecmp(), innobase_casedn_str()*/ |
3564 | 473 | +#include "srv0start.h" /* SRV_LOG_SPACE_FIRST_ID */ | 459 | +#include "srv0start.h" /* SRV_LOG_SPACE_FIRST_ID */ |
3565 | 474 | 460 | ||
3566 | 475 | #include <ctype.h> | 461 | #include <ctype.h> |
3567 | 476 | 462 | ||
3569 | 477 | @@ -751,7 +752,7 @@ | 463 | @@ -750,7 +751,7 @@ |
3570 | 478 | 464 | ||
3571 | 479 | mutex_exit(&(dict_sys->mutex)); | 465 | mutex_exit(&(dict_sys->mutex)); |
3572 | 480 | 466 | ||
3573 | @@ -483,7 +469,7 @@ | |||
3574 | 483 | /* If table->ibd_file_missing == TRUE, this will | 469 | /* If table->ibd_file_missing == TRUE, this will |
3575 | 484 | print an error message and return without doing | 470 | print an error message and return without doing |
3576 | 485 | anything. */ | 471 | anything. */ |
3578 | 486 | @@ -1294,7 +1295,7 @@ | 472 | @@ -1293,7 +1294,7 @@ |
3579 | 487 | + dict_sys->size) > srv_dict_size_limit ) { | 473 | + dict_sys->size) > srv_dict_size_limit ) { |
3580 | 488 | prev_table = UT_LIST_GET_PREV(table_LRU, table); | 474 | prev_table = UT_LIST_GET_PREV(table_LRU, table); |
3581 | 489 | 475 | ||
3582 | @@ -492,7 +478,7 @@ | |||
3583 | 492 | goto next_loop; | 478 | goto next_loop; |
3584 | 493 | 479 | ||
3585 | 494 | cached_foreign_tables = 0; | 480 | cached_foreign_tables = 0; |
3587 | 495 | @@ -4333,6 +4334,12 @@ | 481 | @@ -4332,6 +4333,12 @@ |
3588 | 496 | heap = mem_heap_create(1000); | 482 | heap = mem_heap_create(1000); |
3589 | 497 | 483 | ||
3590 | 498 | while (index) { | 484 | while (index) { |
3591 | @@ -505,7 +491,7 @@ | |||
3592 | 505 | size = btr_get_size(index, BTR_TOTAL_SIZE); | 491 | size = btr_get_size(index, BTR_TOTAL_SIZE); |
3593 | 506 | 492 | ||
3594 | 507 | index->stat_index_size = size; | 493 | index->stat_index_size = size; |
3596 | 508 | @@ -4480,6 +4487,12 @@ | 494 | @@ -4479,6 +4486,12 @@ |
3597 | 509 | heap = mem_heap_create(1000); | 495 | heap = mem_heap_create(1000); |
3598 | 510 | 496 | ||
3599 | 511 | while (index) { | 497 | while (index) { |
3600 | @@ -518,20 +504,21 @@ | |||
3601 | 518 | /*===========================================*/ | 504 | /*===========================================*/ |
3602 | 519 | { | 505 | { |
3603 | 520 | dict_table_t* sys_stats; | 506 | dict_table_t* sys_stats; |
3605 | 521 | @@ -4666,6 +4679,12 @@ | 507 | @@ -4671,6 +4684,13 @@ |
3606 | 522 | || (srv_force_recovery < SRV_FORCE_NO_LOG_REDO | 508 | || (srv_force_recovery < SRV_FORCE_NO_LOG_REDO |
3607 | 523 | && dict_index_is_clust(index)))) { | 509 | && dict_index_is_clust(index)))) { |
3608 | 524 | ulint size; | 510 | ulint size; |
3609 | 525 | + | 511 | + |
3610 | 526 | + if (table->is_corrupt) { | 512 | + if (table->is_corrupt) { |
3611 | 527 | + ut_a(srv_pass_corrupt_table); | 513 | + ut_a(srv_pass_corrupt_table); |
3612 | 514 | + dict_table_stats_unlock(table, RW_X_LATCH); | ||
3613 | 528 | + return; | 515 | + return; |
3614 | 529 | + } | 516 | + } |
3615 | 530 | + | 517 | + |
3616 | 531 | size = btr_get_size(index, BTR_TOTAL_SIZE); | 518 | size = btr_get_size(index, BTR_TOTAL_SIZE); |
3617 | 532 | 519 | ||
3618 | 533 | index->stat_index_size = size; | 520 | index->stat_index_size = size; |
3620 | 534 | @@ -5462,4 +5481,42 @@ | 521 | @@ -5467,4 +5487,42 @@ |
3621 | 535 | rw_lock_free(&dict_table_stats_latches[i]); | 522 | rw_lock_free(&dict_table_stats_latches[i]); |
3622 | 536 | } | 523 | } |
3623 | 537 | } | 524 | } |
3624 | @@ -577,7 +564,7 @@ | |||
3625 | 577 | diff -ruN a/storage/innobase/dict/dict0mem.c b/storage/innobase/dict/dict0mem.c | 564 | diff -ruN a/storage/innobase/dict/dict0mem.c b/storage/innobase/dict/dict0mem.c |
3626 | 578 | --- a/storage/innobase/dict/dict0mem.c 2010-11-03 07:01:13.000000000 +0900 | 565 | --- a/storage/innobase/dict/dict0mem.c 2010-11-03 07:01:13.000000000 +0900 |
3627 | 579 | +++ b/storage/innobase/dict/dict0mem.c 2010-12-04 15:38:18.126549463 +0900 | 566 | +++ b/storage/innobase/dict/dict0mem.c 2010-12-04 15:38:18.126549463 +0900 |
3629 | 580 | @@ -97,6 +97,8 @@ | 567 | @@ -96,6 +96,8 @@ |
3630 | 581 | /* The number of transactions that are either waiting on the | 568 | /* The number of transactions that are either waiting on the |
3631 | 582 | AUTOINC lock or have been granted the lock. */ | 569 | AUTOINC lock or have been granted the lock. */ |
3632 | 583 | table->n_waiting_or_granted_auto_inc_locks = 0; | 570 | table->n_waiting_or_granted_auto_inc_locks = 0; |
3633 | @@ -589,7 +576,7 @@ | |||
3634 | 589 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c | 576 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c |
3635 | 590 | --- a/storage/innobase/fil/fil0fil.c 2010-12-04 15:37:50.564551587 +0900 | 577 | --- a/storage/innobase/fil/fil0fil.c 2010-12-04 15:37:50.564551587 +0900 |
3636 | 591 | +++ b/storage/innobase/fil/fil0fil.c 2010-12-04 15:38:18.128549252 +0900 | 578 | +++ b/storage/innobase/fil/fil0fil.c 2010-12-04 15:38:18.128549252 +0900 |
3638 | 592 | @@ -233,6 +233,7 @@ | 579 | @@ -235,6 +235,7 @@ |
3639 | 593 | file we have written to */ | 580 | file we have written to */ |
3640 | 594 | ibool is_in_unflushed_spaces; /*!< TRUE if this space is | 581 | ibool is_in_unflushed_spaces; /*!< TRUE if this space is |
3641 | 595 | currently in unflushed_spaces */ | 582 | currently in unflushed_spaces */ |
3642 | @@ -597,7 +584,7 @@ | |||
3643 | 597 | UT_LIST_NODE_T(fil_space_t) space_list; | 584 | UT_LIST_NODE_T(fil_space_t) space_list; |
3644 | 598 | /*!< list of all spaces */ | 585 | /*!< list of all spaces */ |
3645 | 599 | ulint magic_n;/*!< FIL_SPACE_MAGIC_N */ | 586 | ulint magic_n;/*!< FIL_SPACE_MAGIC_N */ |
3647 | 600 | @@ -1291,6 +1292,8 @@ | 587 | @@ -1293,6 +1294,8 @@ |
3648 | 601 | ut_fold_string(name), space); | 588 | ut_fold_string(name), space); |
3649 | 602 | space->is_in_unflushed_spaces = FALSE; | 589 | space->is_in_unflushed_spaces = FALSE; |
3650 | 603 | 590 | ||
3651 | @@ -606,18 +593,18 @@ | |||
3652 | 606 | UT_LIST_ADD_LAST(space_list, fil_system->space_list, space); | 593 | UT_LIST_ADD_LAST(space_list, fil_system->space_list, space); |
3653 | 607 | 594 | ||
3654 | 608 | mutex_exit(&fil_system->mutex); | 595 | mutex_exit(&fil_system->mutex); |
3656 | 609 | @@ -4943,6 +4946,22 @@ | 596 | @@ -5267,6 +5270,34 @@ |
3657 | 610 | ut_a(byte_offset % OS_FILE_LOG_BLOCK_SIZE == 0); | 597 | ut_a(byte_offset % OS_FILE_LOG_BLOCK_SIZE == 0); |
3658 | 611 | ut_a((len % OS_FILE_LOG_BLOCK_SIZE) == 0); | 598 | ut_a((len % OS_FILE_LOG_BLOCK_SIZE) == 0); |
3659 | 612 | 599 | ||
3661 | 613 | + if (srv_pass_corrupt_table && space->is_corrupt) { | 600 | + if (srv_pass_corrupt_table == 1 && space->is_corrupt) { |
3662 | 614 | + /* should ignore i/o for the crashed space */ | 601 | + /* should ignore i/o for the crashed space */ |
3663 | 615 | + mutex_enter(&fil_system->mutex); | 602 | + mutex_enter(&fil_system->mutex); |
3664 | 616 | + fil_node_complete_io(node, fil_system, type); | 603 | + fil_node_complete_io(node, fil_system, type); |
3665 | 617 | + mutex_exit(&fil_system->mutex); | 604 | + mutex_exit(&fil_system->mutex); |
3666 | 618 | + if (mode == OS_AIO_NORMAL) { | 605 | + if (mode == OS_AIO_NORMAL) { |
3667 | 619 | + ut_a(space->purpose == FIL_TABLESPACE); | 606 | + ut_a(space->purpose == FIL_TABLESPACE); |
3669 | 620 | + buf_page_io_complete(message, trx); | 607 | + buf_page_io_complete(message); |
3670 | 621 | + } | 608 | + } |
3671 | 622 | + if (type == OS_FILE_READ) { | 609 | + if (type == OS_FILE_READ) { |
3672 | 623 | + return(DB_TABLESPACE_DELETED); | 610 | + return(DB_TABLESPACE_DELETED); |
3673 | @@ -625,11 +612,23 @@ | |||
3674 | 625 | + return(DB_SUCCESS); | 612 | + return(DB_SUCCESS); |
3675 | 626 | + } | 613 | + } |
3676 | 627 | + } else { | 614 | + } else { |
3678 | 628 | + ut_a(!space->is_corrupt); | 615 | + if (srv_pass_corrupt_table > 1 && space->is_corrupt) { |
3679 | 616 | + /* should ignore write i/o for the crashed space */ | ||
3680 | 617 | + if (type == OS_FILE_WRITE) { | ||
3681 | 618 | + mutex_enter(&fil_system->mutex); | ||
3682 | 619 | + fil_node_complete_io(node, fil_system, type); | ||
3683 | 620 | + mutex_exit(&fil_system->mutex); | ||
3684 | 621 | + if (mode == OS_AIO_NORMAL) { | ||
3685 | 622 | + ut_a(space->purpose == FIL_TABLESPACE); | ||
3686 | 623 | + buf_page_io_complete(message); | ||
3687 | 624 | + } | ||
3688 | 625 | + return(DB_SUCCESS); | ||
3689 | 626 | + } | ||
3690 | 627 | + } | ||
3691 | 629 | #ifdef UNIV_HOTBACKUP | 628 | #ifdef UNIV_HOTBACKUP |
3692 | 630 | /* In ibbackup do normal i/o, not aio */ | 629 | /* In ibbackup do normal i/o, not aio */ |
3693 | 631 | if (type == OS_FILE_READ) { | 630 | if (type == OS_FILE_READ) { |
3695 | 632 | @@ -4957,6 +4976,8 @@ | 631 | @@ -5281,6 +5312,8 @@ |
3696 | 633 | ret = os_aio(type, mode | wake_later, node->name, node->handle, buf, | 632 | ret = os_aio(type, mode | wake_later, node->name, node->handle, buf, |
3697 | 634 | offset_low, offset_high, len, node, message, trx); | 633 | offset_low, offset_high, len, node, message, trx); |
3698 | 635 | #endif | 634 | #endif |
3699 | @@ -638,16 +637,7 @@ | |||
3700 | 638 | ut_a(ret); | 637 | ut_a(ret); |
3701 | 639 | 638 | ||
3702 | 640 | if (mode == OS_AIO_SYNC) { | 639 | if (mode == OS_AIO_SYNC) { |
3713 | 641 | @@ -5098,7 +5119,7 @@ | 640 | @@ -5780,3 +5813,46 @@ |
3704 | 642 | |||
3705 | 643 | if (fil_node->space->purpose == FIL_TABLESPACE) { | ||
3706 | 644 | srv_set_io_thread_op_info(segment, "complete io for buf page"); | ||
3707 | 645 | - buf_page_io_complete(message); | ||
3708 | 646 | + buf_page_io_complete(message, NULL); | ||
3709 | 647 | } else { | ||
3710 | 648 | srv_set_io_thread_op_info(segment, "complete io for log"); | ||
3711 | 649 | log_io_complete(message); | ||
3712 | 650 | @@ -5452,3 +5473,46 @@ | ||
3714 | 651 | return 0; | 641 | return 0; |
3715 | 652 | } | 642 | } |
3716 | 653 | } | 643 | } |
3717 | @@ -808,11 +798,11 @@ | |||
3718 | 808 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc | 798 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc |
3719 | 809 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-04 15:37:50.578486593 +0900 | 799 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-04 15:37:50.578486593 +0900 |
3720 | 810 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-04 15:38:18.137549396 +0900 | 800 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-04 15:38:18.137549396 +0900 |
3722 | 811 | @@ -3959,6 +3959,12 @@ | 801 | @@ -3972,6 +3972,12 @@ |
3723 | 812 | DBUG_RETURN(1); | 802 | DBUG_RETURN(1); |
3724 | 813 | } | 803 | } |
3725 | 814 | 804 | ||
3727 | 815 | + if (share->ib_table && share->ib_table->is_corrupt) { | 805 | + if (srv_pass_corrupt_table <= 1 && share->ib_table && share->ib_table->is_corrupt) { |
3728 | 816 | + free_share(share); | 806 | + free_share(share); |
3729 | 817 | + | 807 | + |
3730 | 818 | + DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE); | 808 | + DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE); |
3731 | @@ -821,11 +811,11 @@ | |||
3732 | 821 | /* Create buffers for packing the fields of a record. Why | 811 | /* Create buffers for packing the fields of a record. Why |
3733 | 822 | table->reclength did not work here? Obviously, because char | 812 | table->reclength did not work here? Obviously, because char |
3734 | 823 | fields when packed actually became 1 byte longer, when we also | 813 | fields when packed actually became 1 byte longer, when we also |
3736 | 824 | @@ -3986,6 +3992,19 @@ | 814 | @@ -3999,6 +4005,19 @@ |
3737 | 825 | /* Get pointer to a table object in InnoDB dictionary cache */ | 815 | /* Get pointer to a table object in InnoDB dictionary cache */ |
3738 | 826 | ib_table = dict_table_get(norm_name, TRUE); | 816 | ib_table = dict_table_get(norm_name, TRUE); |
3739 | 827 | 817 | ||
3741 | 828 | + if (ib_table && ib_table->is_corrupt) { | 818 | + if (srv_pass_corrupt_table <= 1 && ib_table && ib_table->is_corrupt) { |
3742 | 829 | + free_share(share); | 819 | + free_share(share); |
3743 | 830 | + my_free(upd_buff); | 820 | + my_free(upd_buff); |
3744 | 831 | + | 821 | + |
3745 | @@ -841,7 +831,7 @@ | |||
3746 | 841 | if (NULL == ib_table) { | 831 | if (NULL == ib_table) { |
3747 | 842 | if (is_part && retries < 10) { | 832 | if (is_part && retries < 10) { |
3748 | 843 | ++retries; | 833 | ++retries; |
3750 | 844 | @@ -5150,6 +5169,10 @@ | 834 | @@ -5163,6 +5182,10 @@ |
3751 | 845 | 835 | ||
3752 | 846 | ha_statistic_increment(&SSV::ha_write_count); | 836 | ha_statistic_increment(&SSV::ha_write_count); |
3753 | 847 | 837 | ||
3754 | @@ -852,7 +842,7 @@ | |||
3755 | 852 | if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT) | 842 | if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT) |
3756 | 853 | table->timestamp_field->set_time(); | 843 | table->timestamp_field->set_time(); |
3757 | 854 | 844 | ||
3759 | 855 | @@ -5367,6 +5390,10 @@ | 845 | @@ -5380,6 +5403,10 @@ |
3760 | 856 | func_exit: | 846 | func_exit: |
3761 | 857 | innobase_active_small(); | 847 | innobase_active_small(); |
3762 | 858 | 848 | ||
3763 | @@ -863,7 +853,7 @@ | |||
3764 | 863 | DBUG_RETURN(error_result); | 853 | DBUG_RETURN(error_result); |
3765 | 864 | } | 854 | } |
3766 | 865 | 855 | ||
3768 | 866 | @@ -5543,6 +5570,10 @@ | 856 | @@ -5556,6 +5583,10 @@ |
3769 | 867 | 857 | ||
3770 | 868 | ha_statistic_increment(&SSV::ha_update_count); | 858 | ha_statistic_increment(&SSV::ha_update_count); |
3771 | 869 | 859 | ||
3772 | @@ -874,7 +864,7 @@ | |||
3773 | 874 | if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE) | 864 | if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE) |
3774 | 875 | table->timestamp_field->set_time(); | 865 | table->timestamp_field->set_time(); |
3775 | 876 | 866 | ||
3777 | 877 | @@ -5632,6 +5663,10 @@ | 867 | @@ -5645,6 +5676,10 @@ |
3778 | 878 | 868 | ||
3779 | 879 | innobase_active_small(); | 869 | innobase_active_small(); |
3780 | 880 | 870 | ||
3781 | @@ -885,7 +875,7 @@ | |||
3782 | 885 | DBUG_RETURN(error); | 875 | DBUG_RETURN(error); |
3783 | 886 | } | 876 | } |
3784 | 887 | 877 | ||
3786 | 888 | @@ -5653,6 +5688,10 @@ | 878 | @@ -5666,6 +5701,10 @@ |
3787 | 889 | 879 | ||
3788 | 890 | ha_statistic_increment(&SSV::ha_delete_count); | 880 | ha_statistic_increment(&SSV::ha_delete_count); |
3789 | 891 | 881 | ||
3790 | @@ -896,7 +886,7 @@ | |||
3791 | 896 | if (!prebuilt->upd_node) { | 886 | if (!prebuilt->upd_node) { |
3792 | 897 | row_get_prebuilt_update_vector(prebuilt); | 887 | row_get_prebuilt_update_vector(prebuilt); |
3793 | 898 | } | 888 | } |
3795 | 899 | @@ -5679,6 +5718,10 @@ | 889 | @@ -5692,6 +5731,10 @@ |
3796 | 900 | 890 | ||
3797 | 901 | innobase_active_small(); | 891 | innobase_active_small(); |
3798 | 902 | 892 | ||
3799 | @@ -907,62 +897,62 @@ | |||
3800 | 907 | DBUG_RETURN(error); | 897 | DBUG_RETURN(error); |
3801 | 908 | } | 898 | } |
3802 | 909 | 899 | ||
3804 | 910 | @@ -5918,6 +5961,10 @@ | 900 | @@ -5931,6 +5974,10 @@ |
3805 | 911 | 901 | ||
3806 | 912 | ha_statistic_increment(&SSV::ha_read_key_count); | 902 | ha_statistic_increment(&SSV::ha_read_key_count); |
3807 | 913 | 903 | ||
3809 | 914 | + if (share->ib_table->is_corrupt) { | 904 | + if (srv_pass_corrupt_table <= 1 && share->ib_table->is_corrupt) { |
3810 | 915 | + DBUG_RETURN(HA_ERR_CRASHED); | 905 | + DBUG_RETURN(HA_ERR_CRASHED); |
3811 | 916 | + } | 906 | + } |
3812 | 917 | + | 907 | + |
3813 | 918 | index = prebuilt->index; | 908 | index = prebuilt->index; |
3814 | 919 | 909 | ||
3815 | 920 | if (UNIV_UNLIKELY(index == NULL)) { | 910 | if (UNIV_UNLIKELY(index == NULL)) { |
3817 | 921 | @@ -5983,6 +6030,10 @@ | 911 | @@ -5996,6 +6043,10 @@ |
3818 | 922 | ret = DB_UNSUPPORTED; | 912 | ret = DB_UNSUPPORTED; |
3819 | 923 | } | 913 | } |
3820 | 924 | 914 | ||
3822 | 925 | + if (share->ib_table->is_corrupt) { | 915 | + if (srv_pass_corrupt_table <= 1 && share->ib_table->is_corrupt) { |
3823 | 926 | + DBUG_RETURN(HA_ERR_CRASHED); | 916 | + DBUG_RETURN(HA_ERR_CRASHED); |
3824 | 927 | + } | 917 | + } |
3825 | 928 | + | 918 | + |
3826 | 929 | switch (ret) { | 919 | switch (ret) { |
3827 | 930 | case DB_SUCCESS: | 920 | case DB_SUCCESS: |
3828 | 931 | error = 0; | 921 | error = 0; |
3830 | 932 | @@ -6098,6 +6149,10 @@ | 922 | @@ -6111,6 +6162,10 @@ |
3831 | 933 | { | 923 | { |
3832 | 934 | DBUG_ENTER("change_active_index"); | 924 | DBUG_ENTER("change_active_index"); |
3833 | 935 | 925 | ||
3835 | 936 | + if (share->ib_table->is_corrupt) { | 926 | + if (srv_pass_corrupt_table <= 1 && share->ib_table->is_corrupt) { |
3836 | 937 | + DBUG_RETURN(HA_ERR_CRASHED); | 927 | + DBUG_RETURN(HA_ERR_CRASHED); |
3837 | 938 | + } | 928 | + } |
3838 | 939 | + | 929 | + |
3839 | 940 | ut_ad(user_thd == ha_thd()); | 930 | ut_ad(user_thd == ha_thd()); |
3840 | 941 | ut_a(prebuilt->trx == thd_to_trx(user_thd)); | 931 | ut_a(prebuilt->trx == thd_to_trx(user_thd)); |
3841 | 942 | 932 | ||
3843 | 943 | @@ -6188,6 +6243,10 @@ | 933 | @@ -6201,6 +6256,10 @@ |
3844 | 944 | 934 | ||
3845 | 945 | DBUG_ENTER("general_fetch"); | 935 | DBUG_ENTER("general_fetch"); |
3846 | 946 | 936 | ||
3848 | 947 | + if (share->ib_table->is_corrupt) { | 937 | + if (srv_pass_corrupt_table <= 1 && share->ib_table->is_corrupt) { |
3849 | 948 | + DBUG_RETURN(HA_ERR_CRASHED); | 938 | + DBUG_RETURN(HA_ERR_CRASHED); |
3850 | 949 | + } | 939 | + } |
3851 | 950 | + | 940 | + |
3852 | 951 | ut_a(prebuilt->trx == thd_to_trx(user_thd)); | 941 | ut_a(prebuilt->trx == thd_to_trx(user_thd)); |
3853 | 952 | 942 | ||
3854 | 953 | innodb_srv_conc_enter_innodb(prebuilt->trx); | 943 | innodb_srv_conc_enter_innodb(prebuilt->trx); |
3856 | 954 | @@ -6197,6 +6256,10 @@ | 944 | @@ -6210,6 +6269,10 @@ |
3857 | 955 | 945 | ||
3858 | 956 | innodb_srv_conc_exit_innodb(prebuilt->trx); | 946 | innodb_srv_conc_exit_innodb(prebuilt->trx); |
3859 | 957 | 947 | ||
3861 | 958 | + if (share->ib_table->is_corrupt) { | 948 | + if (srv_pass_corrupt_table <= 1 && share->ib_table->is_corrupt) { |
3862 | 959 | + DBUG_RETURN(HA_ERR_CRASHED); | 949 | + DBUG_RETURN(HA_ERR_CRASHED); |
3863 | 960 | + } | 950 | + } |
3864 | 961 | + | 951 | + |
3865 | 962 | switch (ret) { | 952 | switch (ret) { |
3866 | 963 | case DB_SUCCESS: | 953 | case DB_SUCCESS: |
3867 | 964 | error = 0; | 954 | error = 0; |
3869 | 965 | @@ -7467,10 +7530,18 @@ | 955 | @@ -7476,10 +7539,18 @@ |
3870 | 966 | 956 | ||
3871 | 967 | update_thd(ha_thd()); | 957 | update_thd(ha_thd()); |
3872 | 968 | 958 | ||
3873 | @@ -981,7 +971,7 @@ | |||
3874 | 981 | error = convert_error_code_to_mysql(error, prebuilt->table->flags, | 971 | error = convert_error_code_to_mysql(error, prebuilt->table->flags, |
3875 | 982 | NULL); | 972 | NULL); |
3876 | 983 | 973 | ||
3878 | 984 | @@ -7975,6 +8046,16 @@ | 974 | @@ -7980,6 +8051,16 @@ |
3879 | 985 | return(ranges + (double) rows / (double) total_rows * time_for_scan); | 975 | return(ranges + (double) rows / (double) total_rows * time_for_scan); |
3880 | 986 | } | 976 | } |
3881 | 987 | 977 | ||
3882 | @@ -998,7 +988,7 @@ | |||
3883 | 998 | /*********************************************************************//** | 988 | /*********************************************************************//** |
3884 | 999 | Calculates the key number used inside MySQL for an Innobase index. We will | 989 | Calculates the key number used inside MySQL for an Innobase index. We will |
3885 | 1000 | first check the "index translation table" for a match of the index to get | 990 | first check the "index translation table" for a match of the index to get |
3887 | 1001 | @@ -8152,7 +8233,7 @@ | 991 | @@ -8157,7 +8238,7 @@ |
3888 | 1002 | ib_table = prebuilt->table; | 992 | ib_table = prebuilt->table; |
3889 | 1003 | 993 | ||
3890 | 1004 | if (flag & HA_STATUS_TIME) { | 994 | if (flag & HA_STATUS_TIME) { |
3891 | @@ -1007,7 +997,7 @@ | |||
3892 | 1007 | /* In sql_show we call with this flag: update | 997 | /* In sql_show we call with this flag: update |
3893 | 1008 | then statistics so that they are up-to-date */ | 998 | then statistics so that they are up-to-date */ |
3894 | 1009 | 999 | ||
3896 | 1010 | @@ -8445,10 +8526,18 @@ | 1000 | @@ -8450,10 +8531,18 @@ |
3897 | 1011 | THD* thd, /*!< in: connection thread handle */ | 1001 | THD* thd, /*!< in: connection thread handle */ |
3898 | 1012 | HA_CHECK_OPT* check_opt) /*!< in: currently ignored */ | 1002 | HA_CHECK_OPT* check_opt) /*!< in: currently ignored */ |
3899 | 1013 | { | 1003 | { |
3900 | @@ -1026,7 +1016,7 @@ | |||
3901 | 1026 | return(0); | 1016 | return(0); |
3902 | 1027 | } | 1017 | } |
3903 | 1028 | 1018 | ||
3905 | 1029 | @@ -8630,6 +8719,10 @@ | 1019 | @@ -8635,6 +8724,10 @@ |
3906 | 1030 | my_error(ER_QUERY_INTERRUPTED, MYF(0)); | 1020 | my_error(ER_QUERY_INTERRUPTED, MYF(0)); |
3907 | 1031 | } | 1021 | } |
3908 | 1032 | 1022 | ||
3909 | @@ -1037,7 +1027,7 @@ | |||
3910 | 1037 | DBUG_RETURN(is_ok ? HA_ADMIN_OK : HA_ADMIN_CORRUPT); | 1027 | DBUG_RETURN(is_ok ? HA_ADMIN_OK : HA_ADMIN_CORRUPT); |
3911 | 1038 | } | 1028 | } |
3912 | 1039 | 1029 | ||
3914 | 1040 | @@ -9400,6 +9493,10 @@ | 1030 | @@ -9405,6 +9498,10 @@ |
3915 | 1041 | 1031 | ||
3916 | 1042 | update_thd(thd); | 1032 | update_thd(thd); |
3917 | 1043 | 1033 | ||
3918 | @@ -1048,7 +1038,7 @@ | |||
3919 | 1048 | if (prebuilt->table->ibd_file_missing && !thd_tablespace_op(thd)) { | 1038 | if (prebuilt->table->ibd_file_missing && !thd_tablespace_op(thd)) { |
3920 | 1049 | ut_print_timestamp(stderr); | 1039 | ut_print_timestamp(stderr); |
3921 | 1050 | fprintf(stderr, | 1040 | fprintf(stderr, |
3923 | 1051 | @@ -11800,6 +11897,25 @@ | 1041 | @@ -11807,6 +11904,26 @@ |
3924 | 1052 | "0 (the default) disables automatic dumps.", | 1042 | "0 (the default) disables automatic dumps.", |
3925 | 1053 | NULL, NULL, 0, 0, UINT_MAX32, 0); | 1043 | NULL, NULL, 0, 0, UINT_MAX32, 0); |
3926 | 1054 | 1044 | ||
3927 | @@ -1056,6 +1046,7 @@ | |||
3928 | 1056 | +{ | 1046 | +{ |
3929 | 1057 | + "assert", /* 0 */ | 1047 | + "assert", /* 0 */ |
3930 | 1058 | + "warn", /* 1 */ | 1048 | + "warn", /* 1 */ |
3931 | 1049 | + "salvage", /* 2 */ | ||
3932 | 1059 | + NullS | 1050 | + NullS |
3933 | 1060 | +}; | 1051 | +}; |
3934 | 1061 | +TYPELIB corrupt_table_action_typelib= | 1052 | +TYPELIB corrupt_table_action_typelib= |
3935 | @@ -1074,7 +1065,7 @@ | |||
3936 | 1074 | static struct st_mysql_sys_var* innobase_system_variables[]= { | 1065 | static struct st_mysql_sys_var* innobase_system_variables[]= { |
3937 | 1075 | MYSQL_SYSVAR(additional_mem_pool_size), | 1066 | MYSQL_SYSVAR(additional_mem_pool_size), |
3938 | 1076 | MYSQL_SYSVAR(autoextend_increment), | 1067 | MYSQL_SYSVAR(autoextend_increment), |
3940 | 1077 | @@ -11886,6 +12002,7 @@ | 1068 | @@ -11893,6 +12010,7 @@ |
3941 | 1078 | MYSQL_SYSVAR(purge_threads), | 1069 | MYSQL_SYSVAR(purge_threads), |
3942 | 1079 | MYSQL_SYSVAR(purge_batch_size), | 1070 | MYSQL_SYSVAR(purge_batch_size), |
3943 | 1080 | MYSQL_SYSVAR(rollback_segments), | 1071 | MYSQL_SYSVAR(rollback_segments), |
3944 | @@ -1136,17 +1127,7 @@ | |||
3945 | 1136 | #endif /* UNIV_DEBUG */ | 1127 | #endif /* UNIV_DEBUG */ |
3946 | 1137 | /*********************************************************************//** | 1128 | /*********************************************************************//** |
3947 | 1138 | Gets the space id of a block. | 1129 | Gets the space id of a block. |
3959 | 1139 | @@ -1118,7 +1118,8 @@ | 1130 | @@ -1433,6 +1433,7 @@ |
3949 | 1140 | void | ||
3950 | 1141 | buf_page_io_complete( | ||
3951 | 1142 | /*=================*/ | ||
3952 | 1143 | - buf_page_t* bpage); /*!< in: pointer to the block in question */ | ||
3953 | 1144 | + buf_page_t* bpage, /*!< in: pointer to the block in question */ | ||
3954 | 1145 | + trx_t* trx); | ||
3955 | 1146 | /********************************************************************//** | ||
3956 | 1147 | Calculates a folded value of a file page address to use in the page hash | ||
3957 | 1148 | table. | ||
3958 | 1149 | @@ -1433,6 +1434,7 @@ | ||
3960 | 1150 | 0 if the block was never accessed | 1131 | 0 if the block was never accessed |
3961 | 1151 | in the buffer pool */ | 1132 | in the buffer pool */ |
3962 | 1152 | /* @} */ | 1133 | /* @} */ |
3963 | @@ -1201,7 +1182,7 @@ | |||
3964 | 1201 | diff -ruN a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h | 1182 | diff -ruN a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h |
3965 | 1202 | --- a/storage/innobase/include/dict0mem.h 2010-11-03 07:01:13.000000000 +0900 | 1183 | --- a/storage/innobase/include/dict0mem.h 2010-11-03 07:01:13.000000000 +0900 |
3966 | 1203 | +++ b/storage/innobase/include/dict0mem.h 2010-12-04 15:38:18.171513956 +0900 | 1184 | +++ b/storage/innobase/include/dict0mem.h 2010-12-04 15:38:18.171513956 +0900 |
3968 | 1204 | @@ -636,6 +636,7 @@ | 1185 | @@ -640,6 +640,7 @@ |
3969 | 1205 | the AUTOINC lock on this table. */ | 1186 | the AUTOINC lock on this table. */ |
3970 | 1206 | /* @} */ | 1187 | /* @} */ |
3971 | 1207 | /*----------------------*/ | 1188 | /*----------------------*/ |
3972 | @@ -1296,7 +1277,7 @@ | |||
3973 | 1296 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h | 1277 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h |
3974 | 1297 | --- a/storage/innobase/include/srv0srv.h 2010-12-04 15:37:50.591516341 +0900 | 1278 | --- a/storage/innobase/include/srv0srv.h 2010-12-04 15:37:50.591516341 +0900 |
3975 | 1298 | +++ b/storage/innobase/include/srv0srv.h 2010-12-04 15:38:18.180563749 +0900 | 1279 | +++ b/storage/innobase/include/srv0srv.h 2010-12-04 15:38:18.180563749 +0900 |
3977 | 1299 | @@ -243,6 +243,7 @@ | 1280 | @@ -240,6 +240,7 @@ |
3978 | 1300 | extern ulint srv_adaptive_flushing_method; | 1281 | extern ulint srv_adaptive_flushing_method; |
3979 | 1301 | 1282 | ||
3980 | 1302 | extern ulint srv_expand_import; | 1283 | extern ulint srv_expand_import; |
3981 | @@ -1354,7 +1335,7 @@ | |||
3982 | 1354 | diff -ruN a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c | 1335 | diff -ruN a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c |
3983 | 1355 | --- a/storage/innobase/row/row0sel.c 2010-11-03 07:01:13.000000000 +0900 | 1336 | --- a/storage/innobase/row/row0sel.c 2010-11-03 07:01:13.000000000 +0900 |
3984 | 1356 | +++ b/storage/innobase/row/row0sel.c 2010-12-04 15:38:18.205551115 +0900 | 1337 | +++ b/storage/innobase/row/row0sel.c 2010-12-04 15:38:18.205551115 +0900 |
3986 | 1357 | @@ -3848,6 +3848,13 @@ | 1338 | @@ -3853,6 +3853,13 @@ |
3987 | 1358 | /* PHASE 4: Look for matching records in a loop */ | 1339 | /* PHASE 4: Look for matching records in a loop */ |
3988 | 1359 | 1340 | ||
3989 | 1360 | rec = btr_pcur_get_rec(pcur); | 1341 | rec = btr_pcur_get_rec(pcur); |
3990 | @@ -1368,10 +1349,35 @@ | |||
3991 | 1368 | ut_ad(!!page_rec_is_comp(rec) == comp); | 1349 | ut_ad(!!page_rec_is_comp(rec) == comp); |
3992 | 1369 | #ifdef UNIV_SEARCH_DEBUG | 1350 | #ifdef UNIV_SEARCH_DEBUG |
3993 | 1370 | /* | 1351 | /* |
3994 | 1352 | @@ -3930,7 +3937,13 @@ | ||
3995 | 1353 | if (UNIV_UNLIKELY(next_offs >= UNIV_PAGE_SIZE - PAGE_DIR)) { | ||
3996 | 1354 | |||
3997 | 1355 | wrong_offs: | ||
3998 | 1356 | - if (srv_force_recovery == 0 || moves_up == FALSE) { | ||
3999 | 1357 | + if (srv_pass_corrupt_table && !trx_sys_sys_space(index->table->space)) { | ||
4000 | 1358 | + index->table->is_corrupt = TRUE; | ||
4001 | 1359 | + fil_space_set_corrupt(index->table->space); | ||
4002 | 1360 | + } | ||
4003 | 1361 | + | ||
4004 | 1362 | + if ((srv_force_recovery == 0 || moves_up == FALSE) | ||
4005 | 1363 | + && srv_pass_corrupt_table <= 1) { | ||
4006 | 1364 | ut_print_timestamp(stderr); | ||
4007 | 1365 | buf_page_print(page_align(rec), 0); | ||
4008 | 1366 | fprintf(stderr, | ||
4009 | 1367 | @@ -3981,7 +3994,8 @@ | ||
4010 | 1368 | |||
4011 | 1369 | offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &heap); | ||
4012 | 1370 | |||
4013 | 1371 | - if (UNIV_UNLIKELY(srv_force_recovery > 0)) { | ||
4014 | 1372 | + if (UNIV_UNLIKELY(srv_force_recovery > 0) | ||
4015 | 1373 | + || (srv_pass_corrupt_table == 2 && index->table->is_corrupt)) { | ||
4016 | 1374 | if (!rec_validate(rec, offsets) | ||
4017 | 1375 | || !btr_index_rec_validate(rec, index, FALSE)) { | ||
4018 | 1376 | fprintf(stderr, | ||
4019 | 1371 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c | 1377 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c |
4020 | 1372 | --- a/storage/innobase/srv/srv0srv.c 2010-12-04 15:37:50.602481253 +0900 | 1378 | --- a/storage/innobase/srv/srv0srv.c 2010-12-04 15:37:50.602481253 +0900 |
4021 | 1373 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-04 15:38:18.209513823 +0900 | 1379 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-04 15:38:18.209513823 +0900 |
4023 | 1374 | @@ -436,6 +436,7 @@ | 1380 | @@ -430,6 +430,7 @@ |
4024 | 1375 | UNIV_INTERN ulint srv_adaptive_flushing_method = 0; /* 0: native 1: estimate 2: keep_average */ | 1381 | UNIV_INTERN ulint srv_adaptive_flushing_method = 0; /* 0: native 1: estimate 2: keep_average */ |
4025 | 1376 | 1382 | ||
4026 | 1377 | UNIV_INTERN ulint srv_expand_import = 0; /* 0:disable 1:enable */ | 1383 | UNIV_INTERN ulint srv_expand_import = 0; /* 0:disable 1:enable */ |
4027 | 1378 | 1384 | ||
4028 | === modified file 'innodb_recovery_patches.patch' | |||
4029 | --- innodb_recovery_patches.patch 2011-05-10 11:57:42 +0000 | |||
4030 | +++ innodb_recovery_patches.patch 2011-06-20 09:04:39 +0000 | |||
4031 | @@ -117,7 +117,7 @@ | |||
4032 | 117 | static my_bool innobase_locks_unsafe_for_binlog = FALSE; | 117 | static my_bool innobase_locks_unsafe_for_binlog = FALSE; |
4033 | 118 | static my_bool innobase_overwrite_relay_log_info = FALSE; | 118 | static my_bool innobase_overwrite_relay_log_info = FALSE; |
4034 | 119 | static my_bool innobase_rollback_on_timeout = FALSE; | 119 | static my_bool innobase_rollback_on_timeout = FALSE; |
4036 | 120 | @@ -2562,6 +2563,8 @@ | 120 | @@ -2576,6 +2577,8 @@ |
4037 | 121 | 121 | ||
4038 | 122 | srv_force_recovery = (ulint) innobase_force_recovery; | 122 | srv_force_recovery = (ulint) innobase_force_recovery; |
4039 | 123 | 123 | ||
4040 | @@ -126,7 +126,7 @@ | |||
4041 | 126 | srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; | 126 | srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; |
4042 | 127 | srv_use_checksums = (ibool) innobase_use_checksums; | 127 | srv_use_checksums = (ibool) innobase_use_checksums; |
4043 | 128 | 128 | ||
4045 | 129 | @@ -11267,6 +11270,11 @@ | 129 | @@ -11274,6 +11277,11 @@ |
4046 | 130 | "The common part for InnoDB table spaces.", | 130 | "The common part for InnoDB table spaces.", |
4047 | 131 | NULL, NULL, NULL); | 131 | NULL, NULL, NULL); |
4048 | 132 | 132 | ||
4049 | @@ -138,7 +138,7 @@ | |||
4050 | 138 | static MYSQL_SYSVAR_BOOL(recovery_update_relay_log, innobase_overwrite_relay_log_info, | 138 | static MYSQL_SYSVAR_BOOL(recovery_update_relay_log, innobase_overwrite_relay_log_info, |
4051 | 139 | PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, | 139 | PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, |
4052 | 140 | "During InnoDB crash recovery on slave overwrite relay-log.info " | 140 | "During InnoDB crash recovery on slave overwrite relay-log.info " |
4054 | 141 | @@ -11740,6 +11748,7 @@ | 141 | @@ -11747,6 +11755,7 @@ |
4055 | 142 | MYSQL_SYSVAR(data_file_path), | 142 | MYSQL_SYSVAR(data_file_path), |
4056 | 143 | MYSQL_SYSVAR(data_home_dir), | 143 | MYSQL_SYSVAR(data_home_dir), |
4057 | 144 | MYSQL_SYSVAR(doublewrite), | 144 | MYSQL_SYSVAR(doublewrite), |
4058 | @@ -192,7 +192,7 @@ | |||
4059 | 192 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h | 192 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h |
4060 | 193 | --- a/storage/innobase/include/srv0srv.h 2010-12-03 17:30:16.321953515 +0900 | 193 | --- a/storage/innobase/include/srv0srv.h 2010-12-03 17:30:16.321953515 +0900 |
4061 | 194 | +++ b/storage/innobase/include/srv0srv.h 2010-12-03 17:30:41.593985184 +0900 | 194 | +++ b/storage/innobase/include/srv0srv.h 2010-12-03 17:30:41.593985184 +0900 |
4063 | 195 | @@ -129,6 +129,8 @@ | 195 | @@ -126,6 +126,8 @@ |
4064 | 196 | extern ulint* srv_data_file_sizes; | 196 | extern ulint* srv_data_file_sizes; |
4065 | 197 | extern ulint* srv_data_file_is_raw_partition; | 197 | extern ulint* srv_data_file_is_raw_partition; |
4066 | 198 | 198 | ||
4067 | @@ -441,8 +441,8 @@ | |||
4068 | 441 | #ifndef UNIV_HOTBACKUP | 441 | #ifndef UNIV_HOTBACKUP |
4069 | 442 | # include "os0sync.h" | 442 | # include "os0sync.h" |
4070 | 443 | # include "os0thread.h" | 443 | # include "os0thread.h" |
4073 | 444 | @@ -4262,6 +4263,18 @@ | 444 | @@ -4260,6 +4261,18 @@ |
4074 | 445 | os_thread_exit(NULL); | 445 | INFINITE); |
4075 | 446 | } | 446 | } |
4076 | 447 | 447 | ||
4077 | 448 | + if (srv_recovery_stats && recv_recovery_is_on() && n_consecutive) { | 448 | + if (srv_recovery_stats && recv_recovery_is_on() && n_consecutive) { |
4078 | @@ -459,11 +459,11 @@ | |||
4079 | 459 | + | 459 | + |
4080 | 460 | os_mutex_enter(array->mutex); | 460 | os_mutex_enter(array->mutex); |
4081 | 461 | 461 | ||
4083 | 462 | slot = os_aio_array_get_nth_slot(array, i + segment * n); | 462 | if (srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS |
4084 | 463 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c | 463 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c |
4085 | 464 | --- a/storage/innobase/srv/srv0srv.c 2010-12-03 17:30:16.339955597 +0900 | 464 | --- a/storage/innobase/srv/srv0srv.c 2010-12-03 17:30:16.339955597 +0900 |
4086 | 465 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-03 17:30:41.604958138 +0900 | 465 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-03 17:30:41.604958138 +0900 |
4088 | 466 | @@ -166,6 +166,8 @@ | 466 | @@ -160,6 +160,8 @@ |
4089 | 467 | /* size in database pages */ | 467 | /* size in database pages */ |
4090 | 468 | UNIV_INTERN ulint* srv_data_file_sizes = NULL; | 468 | UNIV_INTERN ulint* srv_data_file_sizes = NULL; |
4091 | 469 | 469 | ||
4092 | @@ -475,7 +475,7 @@ | |||
4093 | 475 | diff -ruN a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c | 475 | diff -ruN a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c |
4094 | 476 | --- a/storage/innobase/trx/trx0sys.c 2010-12-03 15:41:52.051986524 +0900 | 476 | --- a/storage/innobase/trx/trx0sys.c 2010-12-03 15:41:52.051986524 +0900 |
4095 | 477 | +++ b/storage/innobase/trx/trx0sys.c 2010-12-03 17:30:41.607026818 +0900 | 477 | +++ b/storage/innobase/trx/trx0sys.c 2010-12-03 17:30:41.607026818 +0900 |
4097 | 478 | @@ -566,6 +566,12 @@ | 478 | @@ -567,6 +567,12 @@ |
4098 | 479 | zip_size ? zip_size : UNIV_PAGE_SIZE, | 479 | zip_size ? zip_size : UNIV_PAGE_SIZE, |
4099 | 480 | read_buf, NULL); | 480 | read_buf, NULL); |
4100 | 481 | 481 | ||
4101 | @@ -488,7 +488,7 @@ | |||
4102 | 488 | /* Check if the page is corrupt */ | 488 | /* Check if the page is corrupt */ |
4103 | 489 | 489 | ||
4104 | 490 | if (UNIV_UNLIKELY | 490 | if (UNIV_UNLIKELY |
4106 | 491 | @@ -613,6 +619,13 @@ | 491 | @@ -614,6 +620,13 @@ |
4107 | 492 | zip_size, page_no, 0, | 492 | zip_size, page_no, 0, |
4108 | 493 | zip_size ? zip_size : UNIV_PAGE_SIZE, | 493 | zip_size ? zip_size : UNIV_PAGE_SIZE, |
4109 | 494 | page, NULL); | 494 | page, NULL); |
4110 | 495 | 495 | ||
4111 | === modified file 'innodb_separate_doublewrite.patch' | |||
4112 | --- innodb_separate_doublewrite.patch 2011-05-10 11:57:42 +0000 | |||
4113 | +++ innodb_separate_doublewrite.patch 2011-06-20 09:04:39 +0000 | |||
4114 | @@ -105,7 +105,7 @@ | |||
4115 | 105 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c | 105 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c |
4116 | 106 | --- a/storage/innobase/fil/fil0fil.c 2010-12-04 15:35:29.143813775 +0900 | 106 | --- a/storage/innobase/fil/fil0fil.c 2010-12-04 15:35:29.143813775 +0900 |
4117 | 107 | +++ b/storage/innobase/fil/fil0fil.c 2010-12-04 15:35:58.628498870 +0900 | 107 | +++ b/storage/innobase/fil/fil0fil.c 2010-12-04 15:35:58.628498870 +0900 |
4119 | 108 | @@ -655,7 +655,7 @@ | 108 | @@ -657,7 +657,7 @@ |
4120 | 109 | 109 | ||
4121 | 110 | UT_LIST_ADD_LAST(chain, space->chain, node); | 110 | UT_LIST_ADD_LAST(chain, space->chain, node); |
4122 | 111 | 111 | ||
4123 | @@ -114,7 +114,7 @@ | |||
4124 | 114 | 114 | ||
4125 | 115 | fil_system->max_assigned_id = id; | 115 | fil_system->max_assigned_id = id; |
4126 | 116 | } | 116 | } |
4128 | 117 | @@ -719,14 +719,14 @@ | 117 | @@ -721,14 +721,14 @@ |
4129 | 118 | size_bytes = (((ib_int64_t)size_high) << 32) | 118 | size_bytes = (((ib_int64_t)size_high) << 32) |
4130 | 119 | + (ib_int64_t)size_low; | 119 | + (ib_int64_t)size_low; |
4131 | 120 | #ifdef UNIV_HOTBACKUP | 120 | #ifdef UNIV_HOTBACKUP |
4132 | @@ -131,7 +131,7 @@ | |||
4133 | 131 | 131 | ||
4134 | 132 | if (size_bytes < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { | 132 | if (size_bytes < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { |
4135 | 133 | fprintf(stderr, | 133 | fprintf(stderr, |
4137 | 134 | @@ -772,7 +772,7 @@ | 134 | @@ -774,7 +774,7 @@ |
4138 | 135 | } | 135 | } |
4139 | 136 | 136 | ||
4140 | 137 | if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED | 137 | if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED |
4141 | @@ -140,7 +140,7 @@ | |||
4142 | 140 | fprintf(stderr, | 140 | fprintf(stderr, |
4143 | 141 | "InnoDB: Error: tablespace id %lu" | 141 | "InnoDB: Error: tablespace id %lu" |
4144 | 142 | " in file %s is not sensible\n", | 142 | " in file %s is not sensible\n", |
4146 | 143 | @@ -840,7 +840,7 @@ | 143 | @@ -842,7 +842,7 @@ |
4147 | 144 | 144 | ||
4148 | 145 | system->n_open++; | 145 | system->n_open++; |
4149 | 146 | 146 | ||
4150 | @@ -149,7 +149,7 @@ | |||
4151 | 149 | /* Put the node to the LRU list */ | 149 | /* Put the node to the LRU list */ |
4152 | 150 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); | 150 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); |
4153 | 151 | } | 151 | } |
4155 | 152 | @@ -873,7 +873,7 @@ | 152 | @@ -875,7 +875,7 @@ |
4156 | 153 | ut_a(system->n_open > 0); | 153 | ut_a(system->n_open > 0); |
4157 | 154 | system->n_open--; | 154 | system->n_open--; |
4158 | 155 | 155 | ||
4159 | @@ -158,7 +158,7 @@ | |||
4160 | 158 | ut_a(UT_LIST_GET_LEN(system->LRU) > 0); | 158 | ut_a(UT_LIST_GET_LEN(system->LRU) > 0); |
4161 | 159 | 159 | ||
4162 | 160 | /* The node is in the LRU list, remove it */ | 160 | /* The node is in the LRU list, remove it */ |
4164 | 161 | @@ -959,7 +959,7 @@ | 161 | @@ -961,7 +961,7 @@ |
4165 | 162 | retry: | 162 | retry: |
4166 | 163 | mutex_enter(&fil_system->mutex); | 163 | mutex_enter(&fil_system->mutex); |
4167 | 164 | 164 | ||
4168 | @@ -167,7 +167,7 @@ | |||
4169 | 167 | /* We keep log files and system tablespace files always open; | 167 | /* We keep log files and system tablespace files always open; |
4170 | 168 | this is important in preventing deadlocks in this module, as | 168 | this is important in preventing deadlocks in this module, as |
4171 | 169 | a page read completion often performs another read from the | 169 | a page read completion often performs another read from the |
4173 | 170 | @@ -1190,7 +1190,7 @@ | 170 | @@ -1192,7 +1192,7 @@ |
4174 | 171 | " tablespace memory cache!\n", | 171 | " tablespace memory cache!\n", |
4175 | 172 | (ulong) space->id); | 172 | (ulong) space->id); |
4176 | 173 | 173 | ||
4177 | @@ -176,7 +176,7 @@ | |||
4178 | 176 | 176 | ||
4179 | 177 | mutex_exit(&fil_system->mutex); | 177 | mutex_exit(&fil_system->mutex); |
4180 | 178 | 178 | ||
4182 | 179 | @@ -1252,6 +1252,7 @@ | 179 | @@ -1254,6 +1254,7 @@ |
4183 | 180 | space->mark = FALSE; | 180 | space->mark = FALSE; |
4184 | 181 | 181 | ||
4185 | 182 | if (UNIV_LIKELY(purpose == FIL_TABLESPACE && !recv_recovery_on) | 182 | if (UNIV_LIKELY(purpose == FIL_TABLESPACE && !recv_recovery_on) |
4186 | @@ -184,7 +184,7 @@ | |||
4187 | 184 | && UNIV_UNLIKELY(id > fil_system->max_assigned_id)) { | 184 | && UNIV_UNLIKELY(id > fil_system->max_assigned_id)) { |
4188 | 185 | if (!fil_system->space_id_reuse_warned) { | 185 | if (!fil_system->space_id_reuse_warned) { |
4189 | 186 | fil_system->space_id_reuse_warned = TRUE; | 186 | fil_system->space_id_reuse_warned = TRUE; |
4191 | 187 | @@ -1335,7 +1336,7 @@ | 187 | @@ -1337,7 +1338,7 @@ |
4192 | 188 | (ulong) SRV_LOG_SPACE_FIRST_ID); | 188 | (ulong) SRV_LOG_SPACE_FIRST_ID); |
4193 | 189 | } | 189 | } |
4194 | 190 | 190 | ||
4195 | @@ -193,7 +193,7 @@ | |||
4196 | 193 | 193 | ||
4197 | 194 | if (success) { | 194 | if (success) { |
4198 | 195 | *space_id = fil_system->max_assigned_id = id; | 195 | *space_id = fil_system->max_assigned_id = id; |
4200 | 196 | @@ -1598,6 +1599,8 @@ | 196 | @@ -1600,6 +1601,8 @@ |
4201 | 197 | UT_LIST_INIT(fil_system->LRU); | 197 | UT_LIST_INIT(fil_system->LRU); |
4202 | 198 | 198 | ||
4203 | 199 | fil_system->max_n_open = max_n_open; | 199 | fil_system->max_n_open = max_n_open; |
4204 | @@ -202,7 +202,7 @@ | |||
4205 | 202 | } | 202 | } |
4206 | 203 | 203 | ||
4207 | 204 | /*******************************************************************//** | 204 | /*******************************************************************//** |
4209 | 205 | @@ -1619,7 +1622,7 @@ | 205 | @@ -1621,7 +1624,7 @@ |
4210 | 206 | space = UT_LIST_GET_FIRST(fil_system->space_list); | 206 | space = UT_LIST_GET_FIRST(fil_system->space_list); |
4211 | 207 | 207 | ||
4212 | 208 | while (space != NULL) { | 208 | while (space != NULL) { |
4213 | @@ -211,7 +211,7 @@ | |||
4214 | 211 | node = UT_LIST_GET_FIRST(space->chain); | 211 | node = UT_LIST_GET_FIRST(space->chain); |
4215 | 212 | 212 | ||
4216 | 213 | while (node != NULL) { | 213 | while (node != NULL) { |
4218 | 214 | @@ -1709,6 +1712,10 @@ | 214 | @@ -1711,6 +1714,10 @@ |
4219 | 215 | ut_error; | 215 | ut_error; |
4220 | 216 | } | 216 | } |
4221 | 217 | 217 | ||
4222 | @@ -222,7 +222,7 @@ | |||
4223 | 222 | mutex_enter(&fil_system->mutex); | 222 | mutex_enter(&fil_system->mutex); |
4224 | 223 | 223 | ||
4225 | 224 | if (fil_system->max_assigned_id < max_id) { | 224 | if (fil_system->max_assigned_id < max_id) { |
4227 | 225 | @@ -1727,6 +1734,7 @@ | 225 | @@ -1729,6 +1736,7 @@ |
4228 | 226 | ulint | 226 | ulint |
4229 | 227 | fil_write_lsn_and_arch_no_to_file( | 227 | fil_write_lsn_and_arch_no_to_file( |
4230 | 228 | /*==============================*/ | 228 | /*==============================*/ |
4231 | @@ -230,7 +230,7 @@ | |||
4232 | 230 | ulint sum_of_sizes, /*!< in: combined size of previous files | 230 | ulint sum_of_sizes, /*!< in: combined size of previous files |
4233 | 231 | in space, in database pages */ | 231 | in space, in database pages */ |
4234 | 232 | ib_uint64_t lsn, /*!< in: lsn to write */ | 232 | ib_uint64_t lsn, /*!< in: lsn to write */ |
4236 | 233 | @@ -1736,14 +1744,16 @@ | 233 | @@ -1738,14 +1746,16 @@ |
4237 | 234 | byte* buf1; | 234 | byte* buf1; |
4238 | 235 | byte* buf; | 235 | byte* buf; |
4239 | 236 | 236 | ||
4240 | @@ -249,7 +249,7 @@ | |||
4241 | 249 | 249 | ||
4242 | 250 | mem_free(buf1); | 250 | mem_free(buf1); |
4243 | 251 | 251 | ||
4245 | 252 | @@ -1779,7 +1789,7 @@ | 252 | @@ -1781,7 +1791,7 @@ |
4246 | 253 | always open. */ | 253 | always open. */ |
4247 | 254 | 254 | ||
4248 | 255 | if (space->purpose == FIL_TABLESPACE | 255 | if (space->purpose == FIL_TABLESPACE |
4249 | @@ -258,7 +258,7 @@ | |||
4250 | 258 | sum_of_sizes = 0; | 258 | sum_of_sizes = 0; |
4251 | 259 | 259 | ||
4252 | 260 | node = UT_LIST_GET_FIRST(space->chain); | 260 | node = UT_LIST_GET_FIRST(space->chain); |
4254 | 261 | @@ -1787,7 +1797,7 @@ | 261 | @@ -1789,7 +1799,7 @@ |
4255 | 262 | mutex_exit(&fil_system->mutex); | 262 | mutex_exit(&fil_system->mutex); |
4256 | 263 | 263 | ||
4257 | 264 | err = fil_write_lsn_and_arch_no_to_file( | 264 | err = fil_write_lsn_and_arch_no_to_file( |
4258 | @@ -267,7 +267,7 @@ | |||
4259 | 267 | if (err != DB_SUCCESS) { | 267 | if (err != DB_SUCCESS) { |
4260 | 268 | 268 | ||
4261 | 269 | return(err); | 269 | return(err); |
4263 | 270 | @@ -3834,7 +3844,7 @@ | 270 | @@ -4158,7 +4168,7 @@ |
4264 | 271 | } | 271 | } |
4265 | 272 | 272 | ||
4266 | 273 | #ifndef UNIV_HOTBACKUP | 273 | #ifndef UNIV_HOTBACKUP |
4267 | @@ -276,7 +276,7 @@ | |||
4268 | 276 | fprintf(stderr, | 276 | fprintf(stderr, |
4269 | 277 | "InnoDB: Error: tablespace id %lu in file %s" | 277 | "InnoDB: Error: tablespace id %lu in file %s" |
4270 | 278 | " is not sensible\n", | 278 | " is not sensible\n", |
4272 | 279 | @@ -3843,7 +3853,7 @@ | 279 | @@ -4167,7 +4177,7 @@ |
4273 | 280 | goto func_exit; | 280 | goto func_exit; |
4274 | 281 | } | 281 | } |
4275 | 282 | #else | 282 | #else |
4276 | @@ -285,7 +285,7 @@ | |||
4277 | 285 | char* new_path; | 285 | char* new_path; |
4278 | 286 | 286 | ||
4279 | 287 | fprintf(stderr, | 287 | fprintf(stderr, |
4281 | 288 | @@ -4664,7 +4674,7 @@ | 288 | @@ -4988,7 +4998,7 @@ |
4282 | 289 | } | 289 | } |
4283 | 290 | 290 | ||
4284 | 291 | if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE | 291 | if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE |
4285 | @@ -294,7 +294,7 @@ | |||
4286 | 294 | /* The node is in the LRU list, remove it */ | 294 | /* The node is in the LRU list, remove it */ |
4287 | 295 | 295 | ||
4288 | 296 | ut_a(UT_LIST_GET_LEN(system->LRU) > 0); | 296 | ut_a(UT_LIST_GET_LEN(system->LRU) > 0); |
4290 | 297 | @@ -4710,7 +4720,7 @@ | 297 | @@ -5034,7 +5044,7 @@ |
4291 | 298 | } | 298 | } |
4292 | 299 | 299 | ||
4293 | 300 | if (node->n_pending == 0 && node->space->purpose == FIL_TABLESPACE | 300 | if (node->n_pending == 0 && node->space->purpose == FIL_TABLESPACE |
4294 | @@ -303,7 +303,7 @@ | |||
4295 | 303 | /* The node must be put back to the LRU list */ | 303 | /* The node must be put back to the LRU list */ |
4296 | 304 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); | 304 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); |
4297 | 305 | } | 305 | } |
4299 | 306 | @@ -5316,7 +5326,7 @@ | 306 | @@ -5644,7 +5654,7 @@ |
4300 | 307 | ut_a(fil_node->n_pending == 0); | 307 | ut_a(fil_node->n_pending == 0); |
4301 | 308 | ut_a(fil_node->open); | 308 | ut_a(fil_node->open); |
4302 | 309 | ut_a(fil_node->space->purpose == FIL_TABLESPACE); | 309 | ut_a(fil_node->space->purpose == FIL_TABLESPACE); |
4303 | @@ -348,7 +348,7 @@ | |||
4304 | 348 | 348 | ||
4305 | 349 | /* The highest file format being used in the database. The value can be | 349 | /* The highest file format being used in the database. The value can be |
4306 | 350 | set by user, however, it will be adjusted to the newer file format if | 350 | set by user, however, it will be adjusted to the newer file format if |
4308 | 351 | @@ -2458,6 +2459,8 @@ | 351 | @@ -2472,6 +2473,8 @@ |
4309 | 352 | goto error; | 352 | goto error; |
4310 | 353 | } | 353 | } |
4311 | 354 | 354 | ||
4312 | @@ -357,7 +357,7 @@ | |||
4313 | 357 | srv_use_sys_stats_table = (ibool) innobase_use_sys_stats_table; | 357 | srv_use_sys_stats_table = (ibool) innobase_use_sys_stats_table; |
4314 | 358 | 358 | ||
4315 | 359 | /* -------------- Log files ---------------------------*/ | 359 | /* -------------- Log files ---------------------------*/ |
4317 | 360 | @@ -11634,6 +11637,11 @@ | 360 | @@ -11641,6 +11644,11 @@ |
4318 | 361 | "Path to individual files and their sizes.", | 361 | "Path to individual files and their sizes.", |
4319 | 362 | NULL, NULL, NULL); | 362 | NULL, NULL, NULL); |
4320 | 363 | 363 | ||
4321 | @@ -369,7 +369,7 @@ | |||
4322 | 369 | static MYSQL_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode, | 369 | static MYSQL_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode, |
4323 | 370 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, | 370 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
4324 | 371 | "The AUTOINC lock modes supported by InnoDB: " | 371 | "The AUTOINC lock modes supported by InnoDB: " |
4326 | 372 | @@ -11801,6 +11809,7 @@ | 372 | @@ -11808,6 +11816,7 @@ |
4327 | 373 | MYSQL_SYSVAR(commit_concurrency), | 373 | MYSQL_SYSVAR(commit_concurrency), |
4328 | 374 | MYSQL_SYSVAR(concurrency_tickets), | 374 | MYSQL_SYSVAR(concurrency_tickets), |
4329 | 375 | MYSQL_SYSVAR(data_file_path), | 375 | MYSQL_SYSVAR(data_file_path), |
4330 | @@ -403,7 +403,7 @@ | |||
4331 | 403 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h | 403 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h |
4332 | 404 | --- a/storage/innobase/include/srv0srv.h 2010-12-04 15:35:29.177480351 +0900 | 404 | --- a/storage/innobase/include/srv0srv.h 2010-12-04 15:35:29.177480351 +0900 |
4333 | 405 | +++ b/storage/innobase/include/srv0srv.h 2010-12-04 15:35:58.646556250 +0900 | 405 | +++ b/storage/innobase/include/srv0srv.h 2010-12-04 15:35:58.646556250 +0900 |
4335 | 406 | @@ -132,6 +132,8 @@ | 406 | @@ -129,6 +129,8 @@ |
4336 | 407 | extern ulint* srv_data_file_sizes; | 407 | extern ulint* srv_data_file_sizes; |
4337 | 408 | extern ulint* srv_data_file_is_raw_partition; | 408 | extern ulint* srv_data_file_is_raw_partition; |
4338 | 409 | 409 | ||
4339 | @@ -519,7 +519,7 @@ | |||
4340 | 519 | diff -ruN a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c | 519 | diff -ruN a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c |
4341 | 520 | --- a/storage/innobase/row/row0mysql.c 2010-12-03 17:30:16.334989510 +0900 | 520 | --- a/storage/innobase/row/row0mysql.c 2010-12-03 17:30:16.334989510 +0900 |
4342 | 521 | +++ b/storage/innobase/row/row0mysql.c 2010-12-04 15:35:58.652496484 +0900 | 521 | +++ b/storage/innobase/row/row0mysql.c 2010-12-04 15:35:58.652496484 +0900 |
4344 | 522 | @@ -3449,7 +3449,7 @@ | 522 | @@ -3447,7 +3447,7 @@ |
4345 | 523 | /* Do not drop possible .ibd tablespace if something went | 523 | /* Do not drop possible .ibd tablespace if something went |
4346 | 524 | wrong: we do not want to delete valuable data of the user */ | 524 | wrong: we do not want to delete valuable data of the user */ |
4347 | 525 | 525 | ||
4348 | @@ -531,7 +531,7 @@ | |||
4349 | 531 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c | 531 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c |
4350 | 532 | --- a/storage/innobase/srv/srv0srv.c 2010-12-04 15:35:29.180483212 +0900 | 532 | --- a/storage/innobase/srv/srv0srv.c 2010-12-04 15:35:29.180483212 +0900 |
4351 | 533 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-04 15:35:58.656550107 +0900 | 533 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-04 15:35:58.656550107 +0900 |
4353 | 534 | @@ -169,6 +169,8 @@ | 534 | @@ -163,6 +163,8 @@ |
4354 | 535 | /* size in database pages */ | 535 | /* size in database pages */ |
4355 | 536 | UNIV_INTERN ulint* srv_data_file_sizes = NULL; | 536 | UNIV_INTERN ulint* srv_data_file_sizes = NULL; |
4356 | 537 | 537 | ||
4357 | @@ -768,7 +768,7 @@ | |||
4358 | 768 | diff -ruN a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c | 768 | diff -ruN a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c |
4359 | 769 | --- a/storage/innobase/trx/trx0sys.c 2010-12-03 17:32:15.651024019 +0900 | 769 | --- a/storage/innobase/trx/trx0sys.c 2010-12-03 17:32:15.651024019 +0900 |
4360 | 770 | +++ b/storage/innobase/trx/trx0sys.c 2010-12-04 15:35:58.664550291 +0900 | 770 | +++ b/storage/innobase/trx/trx0sys.c 2010-12-04 15:35:58.664550291 +0900 |
4362 | 771 | @@ -414,6 +414,152 @@ | 771 | @@ -415,6 +415,152 @@ |
4363 | 772 | 772 | ||
4364 | 773 | goto start_again; | 773 | goto start_again; |
4365 | 774 | } | 774 | } |
4366 | @@ -921,7 +921,7 @@ | |||
4367 | 921 | } | 921 | } |
4368 | 922 | 922 | ||
4369 | 923 | /****************************************************************//** | 923 | /****************************************************************//** |
4371 | 924 | @@ -437,10 +583,19 @@ | 924 | @@ -438,10 +584,19 @@ |
4372 | 925 | ulint source_page_no; | 925 | ulint source_page_no; |
4373 | 926 | byte* page; | 926 | byte* page; |
4374 | 927 | byte* doublewrite; | 927 | byte* doublewrite; |
4375 | @@ -941,7 +941,7 @@ | |||
4376 | 941 | /* We do the file i/o past the buffer pool */ | 941 | /* We do the file i/o past the buffer pool */ |
4377 | 942 | 942 | ||
4378 | 943 | unaligned_read_buf = ut_malloc(2 * UNIV_PAGE_SIZE); | 943 | unaligned_read_buf = ut_malloc(2 * UNIV_PAGE_SIZE); |
4380 | 944 | @@ -449,7 +604,7 @@ | 944 | @@ -450,7 +605,7 @@ |
4381 | 945 | /* Read the trx sys header to check if we are using the doublewrite | 945 | /* Read the trx sys header to check if we are using the doublewrite |
4382 | 946 | buffer */ | 946 | buffer */ |
4383 | 947 | 947 | ||
4384 | @@ -950,7 +950,7 @@ | |||
4385 | 950 | UNIV_PAGE_SIZE, read_buf, NULL); | 950 | UNIV_PAGE_SIZE, read_buf, NULL); |
4386 | 951 | doublewrite = read_buf + TRX_SYS_DOUBLEWRITE; | 951 | doublewrite = read_buf + TRX_SYS_DOUBLEWRITE; |
4387 | 952 | 952 | ||
4389 | 953 | @@ -487,10 +642,10 @@ | 953 | @@ -488,10 +643,10 @@ |
4390 | 954 | 954 | ||
4391 | 955 | /* Read the pages from the doublewrite buffer to memory */ | 955 | /* Read the pages from the doublewrite buffer to memory */ |
4392 | 956 | 956 | ||
4393 | @@ -963,7 +963,7 @@ | |||
4394 | 963 | TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * UNIV_PAGE_SIZE, | 963 | TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * UNIV_PAGE_SIZE, |
4395 | 964 | buf + TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * UNIV_PAGE_SIZE, | 964 | buf + TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * UNIV_PAGE_SIZE, |
4396 | 965 | NULL); | 965 | NULL); |
4398 | 966 | @@ -546,7 +701,8 @@ | 966 | @@ -547,7 +702,8 @@ |
4399 | 967 | " doublewrite buf.\n", | 967 | " doublewrite buf.\n", |
4400 | 968 | (ulong) space_id, (ulong) page_no, (ulong) i); | 968 | (ulong) space_id, (ulong) page_no, (ulong) i); |
4401 | 969 | 969 | ||
4402 | @@ -973,7 +973,7 @@ | |||
4403 | 973 | && ((page_no >= block1 | 973 | && ((page_no >= block1 |
4404 | 974 | && page_no | 974 | && page_no |
4405 | 975 | < block1 + TRX_SYS_DOUBLEWRITE_BLOCK_SIZE) | 975 | < block1 + TRX_SYS_DOUBLEWRITE_BLOCK_SIZE) |
4407 | 976 | @@ -1015,6 +1171,83 @@ | 976 | @@ -1016,6 +1172,83 @@ |
4408 | 977 | } | 977 | } |
4409 | 978 | 978 | ||
4410 | 979 | /*****************************************************************//** | 979 | /*****************************************************************//** |
4411 | @@ -1057,7 +1057,7 @@ | |||
4412 | 1057 | Creates and initializes the central memory structures for the transaction | 1057 | Creates and initializes the central memory structures for the transaction |
4413 | 1058 | system. This is called when the database is started. */ | 1058 | system. This is called when the database is started. */ |
4414 | 1059 | UNIV_INTERN | 1059 | UNIV_INTERN |
4416 | 1060 | @@ -1386,6 +1619,26 @@ | 1060 | @@ -1387,6 +1620,26 @@ |
4417 | 1061 | /* Does nothing at the moment */ | 1061 | /* Does nothing at the moment */ |
4418 | 1062 | } | 1062 | } |
4419 | 1063 | 1063 | ||
4420 | 1064 | 1064 | ||
4421 | === modified file 'innodb_show_lock_name.patch' | |||
4422 | --- innodb_show_lock_name.patch 2011-05-10 11:57:42 +0000 | |||
4423 | +++ innodb_show_lock_name.patch 2011-06-20 09:04:39 +0000 | |||
4424 | @@ -8,7 +8,7 @@ | |||
4425 | 8 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc | 8 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc |
4426 | 9 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:34:35.285040381 +0900 | 9 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:34:35.285040381 +0900 |
4427 | 10 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:35:12.974975252 +0900 | 10 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:35:12.974975252 +0900 |
4429 | 11 | @@ -9588,9 +9588,8 @@ | 11 | @@ -9593,9 +9593,8 @@ |
4430 | 12 | rw_lock_wait_time += mutex->lspent_time; | 12 | rw_lock_wait_time += mutex->lspent_time; |
4431 | 13 | } | 13 | } |
4432 | 14 | #else /* UNIV_DEBUG */ | 14 | #else /* UNIV_DEBUG */ |
4433 | @@ -20,7 +20,7 @@ | |||
4434 | 20 | buf2len= (uint) my_snprintf(buf2, sizeof(buf2), "os_waits=%lu", | 20 | buf2len= (uint) my_snprintf(buf2, sizeof(buf2), "os_waits=%lu", |
4435 | 21 | (ulong) mutex->count_os_wait); | 21 | (ulong) mutex->count_os_wait); |
4436 | 22 | 22 | ||
4438 | 23 | @@ -9605,10 +9604,8 @@ | 23 | @@ -9610,10 +9609,8 @@ |
4439 | 24 | 24 | ||
4440 | 25 | if (block_mutex) { | 25 | if (block_mutex) { |
4441 | 26 | buf1len = (uint) my_snprintf(buf1, sizeof buf1, | 26 | buf1len = (uint) my_snprintf(buf1, sizeof buf1, |
4442 | @@ -33,7 +33,7 @@ | |||
4443 | 33 | buf2len = (uint) my_snprintf(buf2, sizeof buf2, | 33 | buf2len = (uint) my_snprintf(buf2, sizeof buf2, |
4444 | 34 | "os_waits=%lu", | 34 | "os_waits=%lu", |
4445 | 35 | (ulong) block_mutex_oswait_count); | 35 | (ulong) block_mutex_oswait_count); |
4447 | 36 | @@ -9637,9 +9634,8 @@ | 36 | @@ -9642,9 +9639,8 @@ |
4448 | 37 | continue; | 37 | continue; |
4449 | 38 | } | 38 | } |
4450 | 39 | 39 | ||
4451 | @@ -45,7 +45,7 @@ | |||
4452 | 45 | buf2len = my_snprintf(buf2, sizeof buf2, "os_waits=%lu", | 45 | buf2len = my_snprintf(buf2, sizeof buf2, "os_waits=%lu", |
4453 | 46 | (ulong) lock->count_os_wait); | 46 | (ulong) lock->count_os_wait); |
4454 | 47 | 47 | ||
4456 | 48 | @@ -9653,10 +9649,8 @@ | 48 | @@ -9658,10 +9654,8 @@ |
4457 | 49 | 49 | ||
4458 | 50 | if (block_lock) { | 50 | if (block_lock) { |
4459 | 51 | buf1len = (uint) my_snprintf(buf1, sizeof buf1, | 51 | buf1len = (uint) my_snprintf(buf1, sizeof buf1, |
4460 | @@ -248,7 +248,7 @@ | |||
4461 | 248 | /******************************************************************//** | 248 | /******************************************************************//** |
4462 | 249 | NOTE! Please use the corresponding macro mutex_enter(), not directly | 249 | NOTE! Please use the corresponding macro mutex_enter(), not directly |
4463 | 250 | this function! | 250 | this function! |
4465 | 251 | @@ -722,9 +722,9 @@ | 251 | @@ -731,9 +731,9 @@ |
4466 | 252 | ulint line; /*!< Line where the mutex was locked */ | 252 | ulint line; /*!< Line where the mutex was locked */ |
4467 | 253 | ulint level; /*!< Level in the global latching order */ | 253 | ulint level; /*!< Level in the global latching order */ |
4468 | 254 | #endif /* UNIV_SYNC_DEBUG */ | 254 | #endif /* UNIV_SYNC_DEBUG */ |
4469 | @@ -259,7 +259,7 @@ | |||
4470 | 259 | os_thread_id_t thread_id; /*!< The thread id of the thread | 259 | os_thread_id_t thread_id; /*!< The thread id of the thread |
4471 | 260 | which locked the mutex. */ | 260 | which locked the mutex. */ |
4472 | 261 | ulint magic_n; /*!< MUTEX_MAGIC_N */ | 261 | ulint magic_n; /*!< MUTEX_MAGIC_N */ |
4474 | 262 | @@ -739,9 +739,9 @@ | 262 | @@ -748,9 +748,9 @@ |
4475 | 263 | ulong count_os_yield; /*!< count of os_wait */ | 263 | ulong count_os_yield; /*!< count of os_wait */ |
4476 | 264 | ulonglong lspent_time; /*!< mutex os_wait timer msec */ | 264 | ulonglong lspent_time; /*!< mutex os_wait timer msec */ |
4477 | 265 | ulonglong lmax_spent_time;/*!< mutex os_wait timer msec */ | 265 | ulonglong lmax_spent_time;/*!< mutex os_wait timer msec */ |
4478 | 266 | 266 | ||
4479 | === modified file 'innodb_show_status.patch' | |||
4480 | --- innodb_show_status.patch 2011-05-10 11:57:42 +0000 | |||
4481 | +++ innodb_show_status.patch 2011-06-20 09:04:39 +0000 | |||
4482 | @@ -62,7 +62,7 @@ | |||
4483 | 62 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c | 62 | diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c |
4484 | 63 | --- a/storage/innobase/fil/fil0fil.c 2010-11-03 07:01:13.000000000 +0900 | 63 | --- a/storage/innobase/fil/fil0fil.c 2010-11-03 07:01:13.000000000 +0900 |
4485 | 64 | +++ b/storage/innobase/fil/fil0fil.c 2010-12-03 15:07:31.790357112 +0900 | 64 | +++ b/storage/innobase/fil/fil0fil.c 2010-12-03 15:07:31.790357112 +0900 |
4487 | 65 | @@ -4884,3 +4884,30 @@ | 65 | @@ -4888,3 +4888,30 @@ |
4488 | 66 | 66 | ||
4489 | 67 | fil_system = NULL; | 67 | fil_system = NULL; |
4490 | 68 | } | 68 | } |
4491 | @@ -105,7 +105,7 @@ | |||
4492 | 105 | {"buffer_pool_pages_free", | 105 | {"buffer_pool_pages_free", |
4493 | 106 | (char*) &export_vars.innodb_buffer_pool_pages_free, SHOW_LONG}, | 106 | (char*) &export_vars.innodb_buffer_pool_pages_free, SHOW_LONG}, |
4494 | 107 | #ifdef UNIV_DEBUG | 107 | #ifdef UNIV_DEBUG |
4496 | 108 | @@ -11074,6 +11076,16 @@ | 108 | @@ -11081,6 +11083,16 @@ |
4497 | 109 | "Force InnoDB to not use next-key locking, to use only row-level locking.", | 109 | "Force InnoDB to not use next-key locking, to use only row-level locking.", |
4498 | 110 | NULL, NULL, FALSE); | 110 | NULL, NULL, FALSE); |
4499 | 111 | 111 | ||
4500 | @@ -122,7 +122,7 @@ | |||
4501 | 122 | #ifdef UNIV_LOG_ARCHIVE | 122 | #ifdef UNIV_LOG_ARCHIVE |
4502 | 123 | static MYSQL_SYSVAR_STR(log_arch_dir, innobase_log_arch_dir, | 123 | static MYSQL_SYSVAR_STR(log_arch_dir, innobase_log_arch_dir, |
4503 | 124 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, | 124 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
4505 | 125 | @@ -11261,7 +11273,7 @@ | 125 | @@ -11268,7 +11280,7 @@ |
4506 | 126 | 126 | ||
4507 | 127 | static MYSQL_SYSVAR_STR(version, innodb_version_str, | 127 | static MYSQL_SYSVAR_STR(version, innodb_version_str, |
4508 | 128 | PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_READONLY, | 128 | PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_READONLY, |
4509 | @@ -131,7 +131,7 @@ | |||
4510 | 131 | 131 | ||
4511 | 132 | static MYSQL_SYSVAR_BOOL(use_sys_malloc, srv_use_sys_malloc, | 132 | static MYSQL_SYSVAR_BOOL(use_sys_malloc, srv_use_sys_malloc, |
4512 | 133 | PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, | 133 | PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, |
4514 | 134 | @@ -11354,6 +11366,8 @@ | 134 | @@ -11361,6 +11373,8 @@ |
4515 | 135 | MYSQL_SYSVAR(thread_concurrency), | 135 | MYSQL_SYSVAR(thread_concurrency), |
4516 | 136 | MYSQL_SYSVAR(thread_sleep_delay), | 136 | MYSQL_SYSVAR(thread_sleep_delay), |
4517 | 137 | MYSQL_SYSVAR(autoinc_lock_mode), | 137 | MYSQL_SYSVAR(autoinc_lock_mode), |
4518 | @@ -186,7 +186,7 @@ | |||
4519 | 186 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h | 186 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h |
4520 | 187 | --- a/storage/innobase/include/srv0srv.h 2010-11-03 07:01:13.000000000 +0900 | 187 | --- a/storage/innobase/include/srv0srv.h 2010-11-03 07:01:13.000000000 +0900 |
4521 | 188 | +++ b/storage/innobase/include/srv0srv.h 2010-12-03 15:07:31.813958103 +0900 | 188 | +++ b/storage/innobase/include/srv0srv.h 2010-12-03 15:07:31.813958103 +0900 |
4523 | 189 | @@ -145,6 +145,9 @@ | 189 | @@ -142,6 +142,9 @@ |
4524 | 190 | extern char srv_adaptive_flushing; | 190 | extern char srv_adaptive_flushing; |
4525 | 191 | 191 | ||
4526 | 192 | 192 | ||
4527 | @@ -196,7 +196,7 @@ | |||
4528 | 196 | /* The sort order table of the MySQL latin1_swedish_ci character set | 196 | /* The sort order table of the MySQL latin1_swedish_ci character set |
4529 | 197 | collation */ | 197 | collation */ |
4530 | 198 | extern const byte* srv_latin1_ordering; | 198 | extern const byte* srv_latin1_ordering; |
4532 | 199 | @@ -326,6 +329,8 @@ | 199 | @@ -323,6 +326,8 @@ |
4533 | 200 | buffer pool to disk */ | 200 | buffer pool to disk */ |
4534 | 201 | extern ulint srv_buf_pool_flushed; | 201 | extern ulint srv_buf_pool_flushed; |
4535 | 202 | 202 | ||
4536 | @@ -205,7 +205,7 @@ | |||
4537 | 205 | /** Number of buffer pool reads that led to the | 205 | /** Number of buffer pool reads that led to the |
4538 | 206 | reading of a disk page */ | 206 | reading of a disk page */ |
4539 | 207 | extern ulint srv_buf_pool_reads; | 207 | extern ulint srv_buf_pool_reads; |
4541 | 208 | @@ -705,6 +710,7 @@ | 208 | @@ -702,6 +707,7 @@ |
4542 | 209 | ulint innodb_buffer_pool_reads; /*!< srv_buf_pool_reads */ | 209 | ulint innodb_buffer_pool_reads; /*!< srv_buf_pool_reads */ |
4543 | 210 | ulint innodb_buffer_pool_wait_free; /*!< srv_buf_pool_wait_free */ | 210 | ulint innodb_buffer_pool_wait_free; /*!< srv_buf_pool_wait_free */ |
4544 | 211 | ulint innodb_buffer_pool_pages_flushed; /*!< srv_buf_pool_flushed */ | 211 | ulint innodb_buffer_pool_pages_flushed; /*!< srv_buf_pool_flushed */ |
4545 | @@ -309,7 +309,7 @@ | |||
4546 | 309 | #include "mysql/plugin.h" | 309 | #include "mysql/plugin.h" |
4547 | 310 | #include "mysql/service_thd_wait.h" | 310 | #include "mysql/service_thd_wait.h" |
4548 | 311 | 311 | ||
4550 | 312 | @@ -194,6 +195,9 @@ | 312 | @@ -188,6 +189,9 @@ |
4551 | 313 | the checkpoints. */ | 313 | the checkpoints. */ |
4552 | 314 | UNIV_INTERN char srv_adaptive_flushing = TRUE; | 314 | UNIV_INTERN char srv_adaptive_flushing = TRUE; |
4553 | 315 | 315 | ||
4554 | @@ -319,7 +319,7 @@ | |||
4555 | 319 | /** Maximum number of times allowed to conditionally acquire | 319 | /** Maximum number of times allowed to conditionally acquire |
4556 | 320 | mutex before switching to blocking wait on the mutex */ | 320 | mutex before switching to blocking wait on the mutex */ |
4557 | 321 | #define MAX_MUTEX_NOWAIT 20 | 321 | #define MAX_MUTEX_NOWAIT 20 |
4559 | 322 | @@ -320,6 +324,7 @@ | 322 | @@ -314,6 +318,7 @@ |
4560 | 323 | /* variable to count the number of pages that were written from buffer | 323 | /* variable to count the number of pages that were written from buffer |
4561 | 324 | pool to the disk */ | 324 | pool to the disk */ |
4562 | 325 | UNIV_INTERN ulint srv_buf_pool_flushed = 0; | 325 | UNIV_INTERN ulint srv_buf_pool_flushed = 0; |
4563 | @@ -327,7 +327,7 @@ | |||
4564 | 327 | 327 | ||
4565 | 328 | /** Number of buffer pool reads that led to the | 328 | /** Number of buffer pool reads that led to the |
4566 | 329 | reading of a disk page */ | 329 | reading of a disk page */ |
4568 | 330 | @@ -1814,6 +1819,13 @@ | 330 | @@ -1823,6 +1828,13 @@ |
4569 | 331 | ulint n_reserved; | 331 | ulint n_reserved; |
4570 | 332 | ibool ret; | 332 | ibool ret; |
4571 | 333 | 333 | ||
4572 | @@ -341,7 +341,7 @@ | |||
4573 | 341 | mutex_enter(&srv_innodb_monitor_mutex); | 341 | mutex_enter(&srv_innodb_monitor_mutex); |
4574 | 342 | 342 | ||
4575 | 343 | current_time = time(NULL); | 343 | current_time = time(NULL); |
4577 | 344 | @@ -1862,31 +1874,6 @@ | 344 | @@ -1871,31 +1883,6 @@ |
4578 | 345 | 345 | ||
4579 | 346 | mutex_exit(&dict_foreign_err_mutex); | 346 | mutex_exit(&dict_foreign_err_mutex); |
4580 | 347 | 347 | ||
4581 | @@ -373,7 +373,7 @@ | |||
4582 | 373 | fputs("--------\n" | 373 | fputs("--------\n" |
4583 | 374 | "FILE I/O\n" | 374 | "FILE I/O\n" |
4584 | 375 | "--------\n", file); | 375 | "--------\n", file); |
4586 | 376 | @@ -1917,10 +1904,78 @@ | 376 | @@ -1926,10 +1913,78 @@ |
4587 | 377 | "BUFFER POOL AND MEMORY\n" | 377 | "BUFFER POOL AND MEMORY\n" |
4588 | 378 | "----------------------\n", file); | 378 | "----------------------\n", file); |
4589 | 379 | fprintf(file, | 379 | fprintf(file, |
4590 | @@ -456,7 +456,7 @@ | |||
4591 | 456 | fprintf(file, "Dictionary memory allocated " ULINTPF "\n", | 456 | fprintf(file, "Dictionary memory allocated " ULINTPF "\n", |
4592 | 457 | dict_sys->size); | 457 | dict_sys->size); |
4593 | 458 | 458 | ||
4595 | 459 | @@ -1936,6 +1991,16 @@ | 459 | @@ -1945,6 +2000,16 @@ |
4596 | 460 | fprintf(file, "%lu read views open inside InnoDB\n", | 460 | fprintf(file, "%lu read views open inside InnoDB\n", |
4597 | 461 | UT_LIST_GET_LEN(trx_sys->view_list)); | 461 | UT_LIST_GET_LEN(trx_sys->view_list)); |
4598 | 462 | 462 | ||
4599 | @@ -473,7 +473,7 @@ | |||
4600 | 473 | n_reserved = fil_space_get_n_reserved_extents(0); | 473 | n_reserved = fil_space_get_n_reserved_extents(0); |
4601 | 474 | if (n_reserved > 0) { | 474 | if (n_reserved > 0) { |
4602 | 475 | fprintf(file, | 475 | fprintf(file, |
4604 | 476 | @@ -1979,6 +2044,31 @@ | 476 | @@ -1988,6 +2053,31 @@ |
4605 | 477 | srv_n_rows_deleted_old = srv_n_rows_deleted; | 477 | srv_n_rows_deleted_old = srv_n_rows_deleted; |
4606 | 478 | srv_n_rows_read_old = srv_n_rows_read; | 478 | srv_n_rows_read_old = srv_n_rows_read; |
4607 | 479 | 479 | ||
4608 | @@ -505,7 +505,7 @@ | |||
4609 | 505 | fputs("----------------------------\n" | 505 | fputs("----------------------------\n" |
4610 | 506 | "END OF INNODB MONITOR OUTPUT\n" | 506 | "END OF INNODB MONITOR OUTPUT\n" |
4611 | 507 | "============================\n", file); | 507 | "============================\n", file); |
4613 | 508 | @@ -2022,6 +2112,7 @@ | 508 | @@ -2031,6 +2121,7 @@ |
4614 | 509 | = srv_buf_pool_write_requests; | 509 | = srv_buf_pool_write_requests; |
4615 | 510 | export_vars.innodb_buffer_pool_wait_free = srv_buf_pool_wait_free; | 510 | export_vars.innodb_buffer_pool_wait_free = srv_buf_pool_wait_free; |
4616 | 511 | export_vars.innodb_buffer_pool_pages_flushed = srv_buf_pool_flushed; | 511 | export_vars.innodb_buffer_pool_pages_flushed = srv_buf_pool_flushed; |
4617 | 512 | 512 | ||
4618 | === modified file 'innodb_show_status_extend.patch' | |||
4619 | --- innodb_show_status_extend.patch 2011-05-10 11:57:42 +0000 | |||
4620 | +++ innodb_show_status_extend.patch 2011-06-20 09:04:39 +0000 | |||
4621 | @@ -245,7 +245,7 @@ | |||
4622 | 245 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h | 245 | diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h |
4623 | 246 | --- a/storage/innobase/include/srv0srv.h 2011-01-21 19:53:42.380638228 +0900 | 246 | --- a/storage/innobase/include/srv0srv.h 2011-01-21 19:53:42.380638228 +0900 |
4624 | 247 | +++ b/storage/innobase/include/srv0srv.h 2011-01-21 19:54:44.662600032 +0900 | 247 | +++ b/storage/innobase/include/srv0srv.h 2011-01-21 19:54:44.662600032 +0900 |
4626 | 248 | @@ -738,6 +738,11 @@ | 248 | @@ -735,6 +735,11 @@ |
4627 | 249 | 249 | ||
4628 | 250 | /** Status variables to be passed to MySQL */ | 250 | /** Status variables to be passed to MySQL */ |
4629 | 251 | struct export_var_struct{ | 251 | struct export_var_struct{ |
4630 | @@ -257,7 +257,7 @@ | |||
4631 | 257 | ulint innodb_data_pending_reads; /*!< Pending reads */ | 257 | ulint innodb_data_pending_reads; /*!< Pending reads */ |
4632 | 258 | ulint innodb_data_pending_writes; /*!< Pending writes */ | 258 | ulint innodb_data_pending_writes; /*!< Pending writes */ |
4633 | 259 | ulint innodb_data_pending_fsyncs; /*!< Pending fsyncs */ | 259 | ulint innodb_data_pending_fsyncs; /*!< Pending fsyncs */ |
4635 | 260 | @@ -755,6 +760,9 @@ | 260 | @@ -752,6 +757,9 @@ |
4636 | 261 | #ifdef UNIV_DEBUG | 261 | #ifdef UNIV_DEBUG |
4637 | 262 | ulint innodb_buffer_pool_pages_latched; /*!< Latched pages */ | 262 | ulint innodb_buffer_pool_pages_latched; /*!< Latched pages */ |
4638 | 263 | #endif /* UNIV_DEBUG */ | 263 | #endif /* UNIV_DEBUG */ |
4639 | @@ -267,7 +267,7 @@ | |||
4640 | 267 | ulint innodb_buffer_pool_read_requests; /*!< buf_pool->stat.n_page_gets */ | 267 | ulint innodb_buffer_pool_read_requests; /*!< buf_pool->stat.n_page_gets */ |
4641 | 268 | ulint innodb_buffer_pool_reads; /*!< srv_buf_pool_reads */ | 268 | ulint innodb_buffer_pool_reads; /*!< srv_buf_pool_reads */ |
4642 | 269 | ulint innodb_buffer_pool_wait_free; /*!< srv_buf_pool_wait_free */ | 269 | ulint innodb_buffer_pool_wait_free; /*!< srv_buf_pool_wait_free */ |
4644 | 270 | @@ -763,13 +771,43 @@ | 270 | @@ -760,13 +768,43 @@ |
4645 | 271 | ulint innodb_buffer_pool_write_requests;/*!< srv_buf_pool_write_requests */ | 271 | ulint innodb_buffer_pool_write_requests;/*!< srv_buf_pool_write_requests */ |
4646 | 272 | ulint innodb_buffer_pool_read_ahead; /*!< srv_read_ahead */ | 272 | ulint innodb_buffer_pool_read_ahead; /*!< srv_read_ahead */ |
4647 | 273 | ulint innodb_buffer_pool_read_ahead_evicted;/*!< srv_read_ahead evicted*/ | 273 | ulint innodb_buffer_pool_read_ahead_evicted;/*!< srv_read_ahead evicted*/ |
4648 | @@ -311,7 +311,7 @@ | |||
4649 | 311 | ulint innodb_os_log_written; /*!< srv_os_log_written */ | 311 | ulint innodb_os_log_written; /*!< srv_os_log_written */ |
4650 | 312 | ulint innodb_os_log_fsyncs; /*!< fil_n_log_flushes */ | 312 | ulint innodb_os_log_fsyncs; /*!< fil_n_log_flushes */ |
4651 | 313 | ulint innodb_os_log_pending_writes; /*!< srv_os_log_pending_writes */ | 313 | ulint innodb_os_log_pending_writes; /*!< srv_os_log_pending_writes */ |
4653 | 314 | @@ -778,6 +816,8 @@ | 314 | @@ -775,6 +813,8 @@ |
4654 | 315 | ulint innodb_pages_created; /*!< buf_pool->stat.n_pages_created */ | 315 | ulint innodb_pages_created; /*!< buf_pool->stat.n_pages_created */ |
4655 | 316 | ulint innodb_pages_read; /*!< buf_pool->stat.n_pages_read */ | 316 | ulint innodb_pages_read; /*!< buf_pool->stat.n_pages_read */ |
4656 | 317 | ulint innodb_pages_written; /*!< buf_pool->stat.n_pages_written */ | 317 | ulint innodb_pages_written; /*!< buf_pool->stat.n_pages_written */ |
4657 | @@ -320,7 +320,7 @@ | |||
4658 | 320 | ulint innodb_row_lock_waits; /*!< srv_n_lock_wait_count */ | 320 | ulint innodb_row_lock_waits; /*!< srv_n_lock_wait_count */ |
4659 | 321 | ulint innodb_row_lock_current_waits; /*!< srv_n_lock_wait_current_count */ | 321 | ulint innodb_row_lock_current_waits; /*!< srv_n_lock_wait_current_count */ |
4660 | 322 | ib_int64_t innodb_row_lock_time; /*!< srv_n_lock_wait_time | 322 | ib_int64_t innodb_row_lock_time; /*!< srv_n_lock_wait_time |
4662 | 323 | @@ -787,11 +827,18 @@ | 323 | @@ -784,11 +824,18 @@ |
4663 | 324 | / srv_n_lock_wait_count */ | 324 | / srv_n_lock_wait_count */ |
4664 | 325 | ulint innodb_row_lock_time_max; /*!< srv_n_lock_max_wait_time | 325 | ulint innodb_row_lock_time_max; /*!< srv_n_lock_max_wait_time |
4665 | 326 | / 1000 */ | 326 | / 1000 */ |
4666 | @@ -342,7 +342,7 @@ | |||
4667 | 342 | diff -ruN a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h | 342 | diff -ruN a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h |
4668 | 343 | --- a/storage/innobase/include/sync0sync.h 2011-01-21 19:48:45.982637372 +0900 | 343 | --- a/storage/innobase/include/sync0sync.h 2011-01-21 19:48:45.982637372 +0900 |
4669 | 344 | +++ b/storage/innobase/include/sync0sync.h 2011-01-21 19:54:44.664638235 +0900 | 344 | +++ b/storage/innobase/include/sync0sync.h 2011-01-21 19:54:44.664638235 +0900 |
4671 | 345 | @@ -760,6 +760,10 @@ | 345 | @@ -769,6 +769,10 @@ |
4672 | 346 | 346 | ||
4673 | 347 | #define SYNC_SPIN_ROUNDS srv_n_spin_wait_rounds | 347 | #define SYNC_SPIN_ROUNDS srv_n_spin_wait_rounds |
4674 | 348 | 348 | ||
4675 | @@ -391,7 +391,7 @@ | |||
4676 | 391 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c | 391 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c |
4677 | 392 | --- a/storage/innobase/srv/srv0srv.c 2011-01-21 19:53:42.390637840 +0900 | 392 | --- a/storage/innobase/srv/srv0srv.c 2011-01-21 19:53:42.390637840 +0900 |
4678 | 393 | +++ b/storage/innobase/srv/srv0srv.c 2011-01-21 19:54:44.673637084 +0900 | 393 | +++ b/storage/innobase/srv/srv0srv.c 2011-01-21 19:54:44.673637084 +0900 |
4680 | 394 | @@ -2248,12 +2248,49 @@ | 394 | @@ -2258,12 +2258,49 @@ |
4681 | 395 | ulint LRU_len; | 395 | ulint LRU_len; |
4682 | 396 | ulint free_len; | 396 | ulint free_len; |
4683 | 397 | ulint flush_list_len; | 397 | ulint flush_list_len; |
4684 | @@ -441,7 +441,7 @@ | |||
4685 | 441 | export_vars.innodb_data_pending_reads | 441 | export_vars.innodb_data_pending_reads |
4686 | 442 | = os_n_pending_reads; | 442 | = os_n_pending_reads; |
4687 | 443 | export_vars.innodb_data_pending_writes | 443 | export_vars.innodb_data_pending_writes |
4689 | 444 | @@ -2290,6 +2327,92 @@ | 444 | @@ -2300,6 +2337,92 @@ |
4690 | 445 | 445 | ||
4691 | 446 | export_vars.innodb_buffer_pool_pages_misc | 446 | export_vars.innodb_buffer_pool_pages_misc |
4692 | 447 | = buf_pool_get_n_pages() - LRU_len - free_len; | 447 | = buf_pool_get_n_pages() - LRU_len - free_len; |
4693 | 448 | 448 | ||
4694 | === modified file 'innodb_show_sys_tables.patch' | |||
4695 | --- innodb_show_sys_tables.patch 2011-05-23 03:13:18 +0000 | |||
4696 | +++ innodb_show_sys_tables.patch 2011-06-20 09:04:39 +0000 | |||
4697 | @@ -41,7 +41,7 @@ | |||
4698 | 41 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc | 41 | diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc |
4699 | 42 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-03 15:53:54.615040167 +0900 | 42 | --- a/storage/innobase/handler/ha_innodb.cc 2010-12-03 15:53:54.615040167 +0900 |
4700 | 43 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-03 16:07:26.851357007 +0900 | 43 | +++ b/storage/innobase/handler/ha_innodb.cc 2010-12-03 16:07:26.851357007 +0900 |
4702 | 44 | @@ -11765,7 +11765,14 @@ | 44 | @@ -11772,7 +11772,14 @@ |
4703 | 45 | i_s_innodb_cmp, | 45 | i_s_innodb_cmp, |
4704 | 46 | i_s_innodb_cmp_reset, | 46 | i_s_innodb_cmp_reset, |
4705 | 47 | i_s_innodb_cmpmem, | 47 | i_s_innodb_cmpmem, |
4706 | 48 | 48 | ||
4707 | === modified file 'innodb_split_buf_pool_mutex.patch' | |||
4708 | --- innodb_split_buf_pool_mutex.patch 2011-05-10 11:57:42 +0000 | |||
4709 | +++ innodb_split_buf_pool_mutex.patch 2011-06-20 09:04:39 +0000 | |||
4710 | @@ -2282,7 +2282,7 @@ | |||
4711 | 2282 | return(count); | 2282 | return(count); |
4712 | 2283 | } | 2283 | } |
4713 | 2284 | @@ -1722,13 +1754,15 @@ | 2284 | @@ -1722,13 +1754,15 @@ |
4715 | 2285 | || sync_thread_levels_empty_gen(TRUE)); | 2285 | || sync_thread_levels_empty_except_dict()); |
4716 | 2286 | #endif /* UNIV_SYNC_DEBUG */ | 2286 | #endif /* UNIV_SYNC_DEBUG */ |
4717 | 2287 | 2287 | ||
4718 | 2288 | - buf_pool_mutex_enter(buf_pool); | 2288 | - buf_pool_mutex_enter(buf_pool); |
4719 | @@ -3033,8 +3033,19 @@ | |||
4720 | 3033 | b->state = b->oldest_modification | 3033 | b->state = b->oldest_modification |
4721 | 3034 | ? BUF_BLOCK_ZIP_DIRTY | 3034 | ? BUF_BLOCK_ZIP_DIRTY |
4722 | 3035 | : BUF_BLOCK_ZIP_PAGE; | 3035 | : BUF_BLOCK_ZIP_PAGE; |
4724 | 3036 | @@ -1614,7 +1748,9 @@ | 3036 | @@ -1597,6 +1731,7 @@ |
4725 | 3037 | buf_LRU_add_block_low(b, buf_page_is_old(b)); | ||
4726 | 3038 | } | ||
4727 | 3039 | |||
4728 | 3040 | + mutex_enter(&buf_pool->zip_mutex); | ||
4729 | 3041 | if (b->state == BUF_BLOCK_ZIP_PAGE) { | ||
4730 | 3042 | buf_LRU_insert_zip_clean(b); | ||
4731 | 3043 | } else { | ||
4732 | 3044 | @@ -1612,9 +1747,12 @@ | ||
4733 | 3045 | buf_pool->mutex and block_mutex. */ | ||
4734 | 3046 | b->buf_fix_count++; | ||
4735 | 3037 | b->io_fix = BUF_IO_READ; | 3047 | b->io_fix = BUF_IO_READ; |
4736 | 3048 | + mutex_exit(&buf_pool->zip_mutex); | ||
4737 | 3038 | } | 3049 | } |
4738 | 3039 | 3050 | ||
4739 | 3040 | - buf_pool_mutex_exit(buf_pool); | 3051 | - buf_pool_mutex_exit(buf_pool); |
4740 | @@ -3044,7 +3055,7 @@ | |||
4741 | 3044 | mutex_exit(block_mutex); | 3055 | mutex_exit(block_mutex); |
4742 | 3045 | 3056 | ||
4743 | 3046 | /* Remove possible adaptive hash index on the page. | 3057 | /* Remove possible adaptive hash index on the page. |
4745 | 3047 | @@ -1646,7 +1782,9 @@ | 3058 | @@ -1646,7 +1784,9 @@ |
4746 | 3048 | : BUF_NO_CHECKSUM_MAGIC); | 3059 | : BUF_NO_CHECKSUM_MAGIC); |
4747 | 3049 | } | 3060 | } |
4748 | 3050 | 3061 | ||
4749 | @@ -3055,7 +3066,7 @@ | |||
4750 | 3055 | mutex_enter(block_mutex); | 3066 | mutex_enter(block_mutex); |
4751 | 3056 | 3067 | ||
4752 | 3057 | if (b) { | 3068 | if (b) { |
4754 | 3058 | @@ -1656,13 +1794,17 @@ | 3069 | @@ -1656,13 +1796,17 @@ |
4755 | 3059 | mutex_exit(&buf_pool->zip_mutex); | 3070 | mutex_exit(&buf_pool->zip_mutex); |
4756 | 3060 | } | 3071 | } |
4757 | 3061 | 3072 | ||
4758 | @@ -3074,7 +3085,7 @@ | |||
4759 | 3074 | } | 3085 | } |
4760 | 3075 | 3086 | ||
4761 | 3076 | return(BUF_LRU_FREED); | 3087 | return(BUF_LRU_FREED); |
4763 | 3077 | @@ -1674,13 +1816,14 @@ | 3088 | @@ -1674,13 +1818,14 @@ |
4764 | 3078 | void | 3089 | void |
4765 | 3079 | buf_LRU_block_free_non_file_page( | 3090 | buf_LRU_block_free_non_file_page( |
4766 | 3080 | /*=============================*/ | 3091 | /*=============================*/ |
4767 | @@ -3091,7 +3102,7 @@ | |||
4768 | 3091 | ut_ad(mutex_own(&block->mutex)); | 3102 | ut_ad(mutex_own(&block->mutex)); |
4769 | 3092 | 3103 | ||
4770 | 3093 | switch (buf_block_get_state(block)) { | 3104 | switch (buf_block_get_state(block)) { |
4772 | 3094 | @@ -1714,18 +1857,21 @@ | 3105 | @@ -1714,18 +1859,21 @@ |
4773 | 3095 | if (data) { | 3106 | if (data) { |
4774 | 3096 | block->page.zip.data = NULL; | 3107 | block->page.zip.data = NULL; |
4775 | 3097 | mutex_exit(&block->mutex); | 3108 | mutex_exit(&block->mutex); |
4776 | @@ -3117,7 +3128,7 @@ | |||
4777 | 3117 | 3128 | ||
4778 | 3118 | UNIV_MEM_ASSERT_AND_FREE(block->frame, UNIV_PAGE_SIZE); | 3129 | UNIV_MEM_ASSERT_AND_FREE(block->frame, UNIV_PAGE_SIZE); |
4779 | 3119 | } | 3130 | } |
4781 | 3120 | @@ -1755,7 +1901,11 @@ | 3131 | @@ -1755,7 +1903,11 @@ |
4782 | 3121 | buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); | 3132 | buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); |
4783 | 3122 | 3133 | ||
4784 | 3123 | ut_ad(bpage); | 3134 | ut_ad(bpage); |
4785 | @@ -3130,7 +3141,7 @@ | |||
4786 | 3130 | ut_ad(mutex_own(buf_page_get_mutex(bpage))); | 3141 | ut_ad(mutex_own(buf_page_get_mutex(bpage))); |
4787 | 3131 | 3142 | ||
4788 | 3132 | ut_a(buf_page_get_io_fix(bpage) == BUF_IO_NONE); | 3143 | ut_a(buf_page_get_io_fix(bpage) == BUF_IO_NONE); |
4790 | 3133 | @@ -1863,7 +2013,9 @@ | 3144 | @@ -1863,7 +2015,9 @@ |
4791 | 3134 | 3145 | ||
4792 | 3135 | #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG | 3146 | #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG |
4793 | 3136 | mutex_exit(buf_page_get_mutex(bpage)); | 3147 | mutex_exit(buf_page_get_mutex(bpage)); |
4794 | @@ -3141,7 +3152,7 @@ | |||
4795 | 3141 | buf_print(); | 3152 | buf_print(); |
4796 | 3142 | buf_LRU_print(); | 3153 | buf_LRU_print(); |
4797 | 3143 | buf_validate(); | 3154 | buf_validate(); |
4799 | 3144 | @@ -1884,18 +2036,18 @@ | 3155 | @@ -1884,18 +2038,18 @@ |
4800 | 3145 | ut_a(bpage->zip.data); | 3156 | ut_a(bpage->zip.data); |
4801 | 3146 | ut_a(buf_page_get_zip_size(bpage)); | 3157 | ut_a(buf_page_get_zip_size(bpage)); |
4802 | 3147 | 3158 | ||
4803 | @@ -3165,7 +3176,7 @@ | |||
4804 | 3165 | 3176 | ||
4805 | 3166 | UNIV_MEM_UNDESC(bpage); | 3177 | UNIV_MEM_UNDESC(bpage); |
4806 | 3167 | return(BUF_BLOCK_ZIP_FREE); | 3178 | return(BUF_BLOCK_ZIP_FREE); |
4808 | 3168 | @@ -1918,13 +2070,13 @@ | 3179 | @@ -1918,13 +2072,13 @@ |
4809 | 3169 | ut_ad(!bpage->in_flush_list); | 3180 | ut_ad(!bpage->in_flush_list); |
4810 | 3170 | ut_ad(!bpage->in_LRU_list); | 3181 | ut_ad(!bpage->in_LRU_list); |
4811 | 3171 | mutex_exit(&((buf_block_t*) bpage)->mutex); | 3182 | mutex_exit(&((buf_block_t*) bpage)->mutex); |
4812 | @@ -3182,7 +3193,7 @@ | |||
4813 | 3182 | mutex_enter(&((buf_block_t*) bpage)->mutex); | 3193 | mutex_enter(&((buf_block_t*) bpage)->mutex); |
4814 | 3183 | page_zip_set_size(&bpage->zip, 0); | 3194 | page_zip_set_size(&bpage->zip, 0); |
4815 | 3184 | } | 3195 | } |
4817 | 3185 | @@ -1950,18 +2102,19 @@ | 3196 | @@ -1950,18 +2104,19 @@ |
4818 | 3186 | void | 3197 | void |
4819 | 3187 | buf_LRU_block_free_hashed_page( | 3198 | buf_LRU_block_free_hashed_page( |
4820 | 3188 | /*===========================*/ | 3199 | /*===========================*/ |
4821 | @@ -3206,7 +3217,7 @@ | |||
4822 | 3206 | } | 3217 | } |
4823 | 3207 | 3218 | ||
4824 | 3208 | /**********************************************************************//** | 3219 | /**********************************************************************//** |
4826 | 3209 | @@ -1988,7 +2141,8 @@ | 3220 | @@ -1988,7 +2143,8 @@ |
4827 | 3210 | } | 3221 | } |
4828 | 3211 | 3222 | ||
4829 | 3212 | if (adjust) { | 3223 | if (adjust) { |
4830 | @@ -3216,7 +3227,7 @@ | |||
4831 | 3216 | 3227 | ||
4832 | 3217 | if (ratio != buf_pool->LRU_old_ratio) { | 3228 | if (ratio != buf_pool->LRU_old_ratio) { |
4833 | 3218 | buf_pool->LRU_old_ratio = ratio; | 3229 | buf_pool->LRU_old_ratio = ratio; |
4835 | 3219 | @@ -2000,7 +2154,8 @@ | 3230 | @@ -2000,7 +2156,8 @@ |
4836 | 3220 | } | 3231 | } |
4837 | 3221 | } | 3232 | } |
4838 | 3222 | 3233 | ||
4839 | @@ -3226,7 +3237,7 @@ | |||
4840 | 3226 | } else { | 3237 | } else { |
4841 | 3227 | buf_pool->LRU_old_ratio = ratio; | 3238 | buf_pool->LRU_old_ratio = ratio; |
4842 | 3228 | } | 3239 | } |
4844 | 3229 | @@ -2105,7 +2260,8 @@ | 3240 | @@ -2105,7 +2262,8 @@ |
4845 | 3230 | ulint new_len; | 3241 | ulint new_len; |
4846 | 3231 | 3242 | ||
4847 | 3232 | ut_ad(buf_pool); | 3243 | ut_ad(buf_pool); |
4848 | @@ -3236,7 +3247,7 @@ | |||
4849 | 3236 | 3247 | ||
4850 | 3237 | if (UT_LIST_GET_LEN(buf_pool->LRU) >= BUF_LRU_OLD_MIN_LEN) { | 3248 | if (UT_LIST_GET_LEN(buf_pool->LRU) >= BUF_LRU_OLD_MIN_LEN) { |
4851 | 3238 | 3249 | ||
4853 | 3239 | @@ -2166,16 +2322,22 @@ | 3250 | @@ -2166,16 +2324,22 @@ |
4854 | 3240 | 3251 | ||
4855 | 3241 | ut_a(buf_pool->LRU_old_len == old_len); | 3252 | ut_a(buf_pool->LRU_old_len == old_len); |
4856 | 3242 | 3253 | ||
4857 | @@ -3261,7 +3272,7 @@ | |||
4858 | 3261 | UT_LIST_VALIDATE(unzip_LRU, buf_block_t, buf_pool->unzip_LRU, | 3272 | UT_LIST_VALIDATE(unzip_LRU, buf_block_t, buf_pool->unzip_LRU, |
4859 | 3262 | ut_ad(ut_list_node_313->in_unzip_LRU_list | 3273 | ut_ad(ut_list_node_313->in_unzip_LRU_list |
4860 | 3263 | && ut_list_node_313->page.in_LRU_list)); | 3274 | && ut_list_node_313->page.in_LRU_list)); |
4862 | 3264 | @@ -2189,7 +2351,8 @@ | 3275 | @@ -2189,7 +2353,8 @@ |
4863 | 3265 | ut_a(buf_page_belongs_to_unzip_LRU(&block->page)); | 3276 | ut_a(buf_page_belongs_to_unzip_LRU(&block->page)); |
4864 | 3266 | } | 3277 | } |
4865 | 3267 | 3278 | ||
4866 | @@ -3271,7 +3282,7 @@ | |||
4867 | 3271 | } | 3282 | } |
4868 | 3272 | 3283 | ||
4869 | 3273 | /**********************************************************************//** | 3284 | /**********************************************************************//** |
4871 | 3274 | @@ -2225,7 +2388,8 @@ | 3285 | @@ -2225,7 +2390,8 @@ |
4872 | 3275 | const buf_page_t* bpage; | 3286 | const buf_page_t* bpage; |
4873 | 3276 | 3287 | ||
4874 | 3277 | ut_ad(buf_pool); | 3288 | ut_ad(buf_pool); |
4875 | @@ -3281,7 +3292,7 @@ | |||
4876 | 3281 | 3292 | ||
4877 | 3282 | bpage = UT_LIST_GET_FIRST(buf_pool->LRU); | 3293 | bpage = UT_LIST_GET_FIRST(buf_pool->LRU); |
4878 | 3283 | 3294 | ||
4880 | 3284 | @@ -2282,7 +2446,8 @@ | 3295 | @@ -2282,7 +2448,8 @@ |
4881 | 3285 | bpage = UT_LIST_GET_NEXT(LRU, bpage); | 3296 | bpage = UT_LIST_GET_NEXT(LRU, bpage); |
4882 | 3286 | } | 3297 | } |
4883 | 3287 | 3298 | ||
4884 | @@ -3388,7 +3399,7 @@ | |||
4885 | 3388 | diff -ruN a/storage/innobase/ibuf/ibuf0ibuf.c b/storage/innobase/ibuf/ibuf0ibuf.c | 3399 | diff -ruN a/storage/innobase/ibuf/ibuf0ibuf.c b/storage/innobase/ibuf/ibuf0ibuf.c |
4886 | 3389 | --- a/storage/innobase/ibuf/ibuf0ibuf.c 2010-12-03 15:48:03.068954202 +0900 | 3400 | --- a/storage/innobase/ibuf/ibuf0ibuf.c 2010-12-03 15:48:03.068954202 +0900 |
4887 | 3390 | +++ b/storage/innobase/ibuf/ibuf0ibuf.c 2010-12-03 15:48:29.335988682 +0900 | 3401 | +++ b/storage/innobase/ibuf/ibuf0ibuf.c 2010-12-03 15:48:29.335988682 +0900 |
4889 | 3391 | @@ -3832,9 +3832,11 @@ | 3402 | @@ -3821,9 +3821,11 @@ |
4890 | 3392 | ulint fold = buf_page_address_fold(space, page_no); | 3403 | ulint fold = buf_page_address_fold(space, page_no); |
4891 | 3393 | buf_pool_t* buf_pool = buf_pool_get(space, page_no); | 3404 | buf_pool_t* buf_pool = buf_pool_get(space, page_no); |
4892 | 3394 | 3405 | ||
4893 | @@ -3897,7 +3908,7 @@ | |||
4894 | 3897 | extern mysql_pfs_key_t cache_last_read_mutex_key; | 3908 | extern mysql_pfs_key_t cache_last_read_mutex_key; |
4895 | 3898 | extern mysql_pfs_key_t dict_foreign_err_mutex_key; | 3909 | extern mysql_pfs_key_t dict_foreign_err_mutex_key; |
4896 | 3899 | extern mysql_pfs_key_t dict_sys_mutex_key; | 3910 | extern mysql_pfs_key_t dict_sys_mutex_key; |
4898 | 3900 | @@ -659,7 +663,7 @@ | 3911 | @@ -668,7 +672,7 @@ |
4899 | 3901 | #define SYNC_TRX_SYS_HEADER 290 | 3912 | #define SYNC_TRX_SYS_HEADER 290 |
4900 | 3902 | #define SYNC_PURGE_QUEUE 200 | 3913 | #define SYNC_PURGE_QUEUE 200 |
4901 | 3903 | #define SYNC_LOG 170 | 3914 | #define SYNC_LOG 170 |
4902 | @@ -3906,7 +3917,7 @@ | |||
4903 | 3906 | #define SYNC_RECV 168 | 3917 | #define SYNC_RECV 168 |
4904 | 3907 | #define SYNC_WORK_QUEUE 162 | 3918 | #define SYNC_WORK_QUEUE 162 |
4905 | 3908 | #define SYNC_SEARCH_SYS_CONF 161 /* for assigning btr_search_enabled */ | 3919 | #define SYNC_SEARCH_SYS_CONF 161 /* for assigning btr_search_enabled */ |
4907 | 3909 | @@ -669,8 +673,13 @@ | 3920 | @@ -678,8 +682,13 @@ |
4908 | 3910 | SYNC_SEARCH_SYS, as memory allocation | 3921 | SYNC_SEARCH_SYS, as memory allocation |
4909 | 3911 | can call routines there! Otherwise | 3922 | can call routines there! Otherwise |
4910 | 3912 | the level is SYNC_MEM_HASH. */ | 3923 | the level is SYNC_MEM_HASH. */ |
4911 | @@ -3921,7 +3932,7 @@ | |||
4912 | 3921 | #define SYNC_BUF_FLUSH_LIST 145 /* Buffer flush list mutex */ | 3932 | #define SYNC_BUF_FLUSH_LIST 145 /* Buffer flush list mutex */ |
4913 | 3922 | #define SYNC_DOUBLEWRITE 140 | 3933 | #define SYNC_DOUBLEWRITE 140 |
4914 | 3923 | #define SYNC_ANY_LATCH 135 | 3934 | #define SYNC_ANY_LATCH 135 |
4916 | 3924 | @@ -702,7 +711,7 @@ | 3935 | @@ -711,7 +720,7 @@ |
4917 | 3925 | os_fast_mutex; /*!< We use this OS mutex in place of lock_word | 3936 | os_fast_mutex; /*!< We use this OS mutex in place of lock_word |
4918 | 3926 | when atomic operations are not enabled */ | 3937 | when atomic operations are not enabled */ |
4919 | 3927 | #endif | 3938 | #endif |
4920 | @@ -3933,7 +3944,7 @@ | |||
4921 | 3933 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c | 3944 | diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c |
4922 | 3934 | --- a/storage/innobase/srv/srv0srv.c 2010-12-03 15:48:03.080956216 +0900 | 3945 | --- a/storage/innobase/srv/srv0srv.c 2010-12-03 15:48:03.080956216 +0900 |
4923 | 3935 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-03 15:48:29.355023766 +0900 | 3946 | +++ b/storage/innobase/srv/srv0srv.c 2010-12-03 15:48:29.355023766 +0900 |
4925 | 3936 | @@ -3089,7 +3089,7 @@ | 3947 | @@ -3098,7 +3098,7 @@ |
4926 | 3937 | level += log_sys->max_checkpoint_age | 3948 | level += log_sys->max_checkpoint_age |
4927 | 3938 | - (lsn - oldest_modification); | 3949 | - (lsn - oldest_modification); |
4928 | 3939 | } | 3950 | } |
4929 | @@ -3942,7 +3953,7 @@ | |||
4930 | 3942 | n_blocks++; | 3953 | n_blocks++; |
4931 | 3943 | } | 3954 | } |
4932 | 3944 | 3955 | ||
4934 | 3945 | @@ -3175,7 +3175,7 @@ | 3956 | @@ -3184,7 +3184,7 @@ |
4935 | 3946 | found = TRUE; | 3957 | found = TRUE; |
4936 | 3947 | break; | 3958 | break; |
4937 | 3948 | } | 3959 | } |
4938 | @@ -3987,7 +3998,7 @@ | |||
4939 | 3987 | } | 3998 | } |
4940 | 3988 | 3999 | ||
4941 | 3989 | /******************************************************************//** | 4000 | /******************************************************************//** |
4943 | 3990 | @@ -1189,7 +1199,12 @@ | 4001 | @@ -1234,7 +1244,12 @@ |
4944 | 3991 | ut_error; | 4002 | ut_error; |
4945 | 3992 | } | 4003 | } |
4946 | 3993 | break; | 4004 | break; |
4947 | @@ -4000,7 +4011,7 @@ | |||
4948 | 4000 | case SYNC_BUF_POOL: | 4011 | case SYNC_BUF_POOL: |
4949 | 4001 | /* We can have multiple mutexes of this type therefore we | 4012 | /* We can have multiple mutexes of this type therefore we |
4950 | 4002 | can only check whether the greater than condition holds. */ | 4013 | can only check whether the greater than condition holds. */ |
4952 | 4003 | @@ -1207,7 +1222,8 @@ | 4014 | @@ -1252,7 +1267,8 @@ |
4953 | 4004 | buffer block (block->mutex or buf_pool->zip_mutex). */ | 4015 | buffer block (block->mutex or buf_pool->zip_mutex). */ |
4954 | 4005 | if (!sync_thread_levels_g(array, level, FALSE)) { | 4016 | if (!sync_thread_levels_g(array, level, FALSE)) { |
4955 | 4006 | ut_a(sync_thread_levels_g(array, level - 1, TRUE)); | 4017 | ut_a(sync_thread_levels_g(array, level - 1, TRUE)); |
4956 | 4007 | 4018 | ||
4957 | === modified file 'innodb_stats.patch' | |||
4958 | --- innodb_stats.patch 2011-05-23 03:13:18 +0000 | |||
4959 | +++ innodb_stats.patch 2011-06-20 09:04:39 +0000 | |||
4960 | @@ -350,7 +350,7 @@ | |||
4961 | 350 | diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c | 350 | diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c |
4962 | 351 | --- a/storage/innobase/dict/dict0dict.c 2010-12-03 15:48:03.040222428 +0900 | 351 | --- a/storage/innobase/dict/dict0dict.c 2010-12-03 15:48:03.040222428 +0900 |
4963 | 352 | +++ b/storage/innobase/dict/dict0dict.c 2010-12-03 17:19:24.841947690 +0900 | 352 | +++ b/storage/innobase/dict/dict0dict.c 2010-12-03 17:19:24.841947690 +0900 |
4965 | 353 | @@ -756,7 +756,7 @@ | 353 | @@ -755,7 +755,7 @@ |
4966 | 354 | print an error message and return without doing | 354 | print an error message and return without doing |
4967 | 355 | anything. */ | 355 | anything. */ |
4968 | 356 | dict_update_statistics(table, TRUE /* only update stats | 356 | dict_update_statistics(table, TRUE /* only update stats |
4969 | @@ -359,7 +359,7 @@ | |||
4970 | 359 | } | 359 | } |
4971 | 360 | 360 | ||
4972 | 361 | return(table); | 361 | return(table); |
4974 | 362 | @@ -4310,6 +4310,289 @@ | 362 | @@ -4309,6 +4309,295 @@ |
4975 | 363 | } | 363 | } |
4976 | 364 | 364 | ||
4977 | 365 | /*********************************************************************//** | 365 | /*********************************************************************//** |
4978 | @@ -592,6 +592,8 @@ | |||
4979 | 592 | + break; | 592 | + break; |
4980 | 593 | + } | 593 | + } |
4981 | 594 | + | 594 | + |
4982 | 595 | + btr_pcur_store_position(&pcur, &mtr); | ||
4983 | 596 | + | ||
4984 | 595 | + if (rec_get_deleted_flag(rec, 0)) { | 597 | + if (rec_get_deleted_flag(rec, 0)) { |
4985 | 596 | + /* don't count */ | 598 | + /* don't count */ |
4986 | 597 | + i--; | 599 | + i--; |
4987 | @@ -626,6 +628,10 @@ | |||
4988 | 626 | + rests--; | 628 | + rests--; |
4989 | 627 | + | 629 | + |
4990 | 628 | +next_rec: | 630 | +next_rec: |
4991 | 631 | + mtr_commit(&mtr); | ||
4992 | 632 | + mtr_start(&mtr); | ||
4993 | 633 | + btr_pcur_restore_position(BTR_MODIFY_LEAF, &pcur, &mtr); | ||
4994 | 634 | + | ||
4995 | 629 | + btr_pcur_move_to_next_user_rec(&pcur, &mtr); | 635 | + btr_pcur_move_to_next_user_rec(&pcur, &mtr); |
4996 | 630 | + } | 636 | + } |
4997 | 631 | + btr_pcur_close(&pcur); | 637 | + btr_pcur_close(&pcur); |
4998 | @@ -649,7 +655,7 @@ | |||
4999 | 649 | Calculates new estimates for table and index statistics. The statistics | 655 | Calculates new estimates for table and index statistics. The statistics |
5000 | 650 | are used in query optimization. */ | 656 | are used in query optimization. */ |
The diff has been truncated for viewing.
https:/ /code.launchpad .net/~tsarev/ percona- server/ 5.5.13- merge/+ merge/65172