Merge lp:~akopytov/percona-xtrabackup/rebase-2.1-on-newer-server-versions into lp:percona-xtrabackup/2.1
- rebase-2.1-on-newer-server-versions
- Merge into 2.1
Proposed by
Alexey Kopytov
Status: | Merged | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Laurynas Biveinis | ||||||||||||||||
Approved revision: | no longer in the source branch. | ||||||||||||||||
Merged at revision: | 630 | ||||||||||||||||
Proposed branch: | lp:~akopytov/percona-xtrabackup/rebase-2.1-on-newer-server-versions | ||||||||||||||||
Merge into: | lp:percona-xtrabackup/2.1 | ||||||||||||||||
Diff against target: |
4471 lines (+762/-724) 12 files modified
Makefile (+9/-39) patches/innodb51.patch (+87/-88) patches/innodb55.patch (+99/-92) patches/innodb56.patch (+70/-67) patches/xtradb51.patch (+114/-119) patches/xtradb55.patch (+238/-228) src/Makefile (+1/-1) src/compact.cc (+1/-1) src/innodb_int.cc (+58/-2) src/innodb_int.h (+52/-2) src/xtrabackup.cc (+8/-12) utils/build.sh (+25/-73) |
||||||||||||||||
To merge this branch: | bzr merge lp:~akopytov/percona-xtrabackup/rebase-2.1-on-newer-server-versions | ||||||||||||||||
Related bugs: |
|
||||||||||||||||
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Laurynas Biveinis (community) | Approve | ||
Review via email: mp+176200@code.launchpad.net |
Commit message
Description of the change
Rebased XtraBackup on MySQL versions 5.1.70, 5.5.30, 5.6.11 and Percona
Server versions 5.1.70-rel14.8 and 5.5.31-rel30.3.
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote : | # |
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote : | # |
Indentation or tabs vs spaces in diff lines 4377 to the end?
review:
Needs Fixing
Revision history for this message
Alexey Kopytov (akopytov) wrote : | # |
I have standardized on spaces for indentation for XB shell scripts, because that's what the majority of code uses. I fix that in existing code whenever I have to touch a line. I deliberately kept tabs on the lines I didn't have to touch to simplify the patch.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote : | # |
OK
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Makefile' | |||
2 | --- Makefile 2013-06-18 08:07:48 +0000 | |||
3 | +++ Makefile 2013-07-22 14:01:36 +0000 | |||
4 | @@ -4,61 +4,31 @@ | |||
5 | 4 | 4 | ||
6 | 5 | # Here we specify what server versions we build against | 5 | # Here we specify what server versions we build against |
7 | 6 | 6 | ||
15 | 7 | MYSQL_51_SOURCE=mysql-5.1.59.tar.gz | 7 | MYSQL_51_SOURCE=mysql-5.1.70.tar.gz |
16 | 8 | MYSQL_55_SOURCE=mysql-5.5.17.tar.gz | 8 | MYSQL_55_SOURCE=mysql-5.5.31.tar.gz |
17 | 9 | MYSQL_56_SOURCE=mysql-5.6.10.tar.gz | 9 | MYSQL_56_SOURCE=mysql-5.6.11.tar.gz |
18 | 10 | PS_51_VERSION=5.1.59-13.0 | 10 | PS_51_SOURCE=Percona-Server-5.1.70-rel14.8.tar.gz |
19 | 11 | PS_51_SOURCE=Percona-Server-XtraBackup-$(PS_51_VERSION).tar.gz | 11 | PS_55_SOURCE=Percona-Server-5.5.31-rel30.3.tar.gz |
13 | 12 | PS_55_VERSION=5.5.16-22.0 | ||
14 | 13 | PS_55_SOURCE=Percona-Server-XtraBackup-$(PS_55_VERSION).tar.gz | ||
20 | 14 | BZR_REVNO=$(shell bzr revno 2>/dev/null || cat REVNO) | 12 | BZR_REVNO=$(shell bzr revno 2>/dev/null || cat REVNO) |
21 | 15 | XTRABACKUP_VERSION=$(shell sed -e 's/XTRABACKUP_VERSION=//' < VERSION) | 13 | XTRABACKUP_VERSION=$(shell sed -e 's/XTRABACKUP_VERSION=//' < VERSION) |
22 | 16 | 14 | ||
23 | 17 | # targets for fetching server source tarballs | 15 | # targets for fetching server source tarballs |
24 | 18 | 16 | ||
30 | 19 | SERVER_SOURCE_TARBALLS=$(MYSQL_51_SOURCE) $(MYSQL_55_SOURCE) $(MYSQL_56_SOURCE) | 17 | SERVER_SOURCE_TARBALLS=$(MYSQL_51_SOURCE) $(MYSQL_55_SOURCE) \ |
31 | 20 | PS_SERVER=$(PS_51_SOURCE) $(PS_55_SOURCE) | 18 | $(MYSQL_56_SOURCE) $(PS_51_SOURCE) $(PS_55_SOURCE) |
27 | 21 | |||
28 | 22 | # PS server source tarballs are inadequate | ||
29 | 23 | # for these older versions, so we have to make them ourselves | ||
32 | 24 | 19 | ||
33 | 25 | .PHONY: ps51source ps55source | 20 | .PHONY: ps51source ps55source |
34 | 26 | 21 | ||
35 | 27 | ps51source: $(PS_51_SOURCE) | 22 | ps51source: $(PS_51_SOURCE) |
36 | 28 | 23 | ||
37 | 29 | |||
38 | 30 | $(PS_51_SOURCE): | ||
39 | 31 | rm -rf percona-server-5.1-xtrabackup | ||
40 | 32 | bzr branch -r tag:Percona-Server-$(PS_51_VERSION) lp:percona-server/5.1 percona-server-5.1-xtrabackup | ||
41 | 33 | cd percona-server-5.1-xtrabackup && bzr export percona-server-5.1-xtrabackup.tar.gz | ||
42 | 34 | mv percona-server-5.1-xtrabackup/percona-server-5.1-xtrabackup.tar.gz . | ||
43 | 35 | rm -rf percona-server-5.1-xtrabackup | ||
44 | 36 | tar xfz percona-server-5.1-xtrabackup.tar.gz | ||
45 | 37 | cd percona-server-5.1-xtrabackup && make mysql-$(shell echo $(PS_51_VERSION) | sed -e 's/-.*//').tar.gz | ||
46 | 38 | rm percona-server-5.1-xtrabackup.tar.gz | ||
47 | 39 | tar cfz $(PS_51_SOURCE) percona-server-5.1-xtrabackup | ||
48 | 40 | rm -rf percona-server-5.1-xtrabackup | ||
49 | 41 | |||
50 | 42 | ps55source: $(PS_55_SOURCE) | 24 | ps55source: $(PS_55_SOURCE) |
51 | 43 | 25 | ||
52 | 44 | $(PS_55_SOURCE): | ||
53 | 45 | rm -rf percona-server-5.5-xtrabackup | ||
54 | 46 | bzr branch -r tag:Percona-Server-$(PS_55_VERSION) lp:percona-server/5.5 percona-server-5.5-xtrabackup | ||
55 | 47 | cd percona-server-5.5-xtrabackup && bzr export percona-server-5.5-xtrabackup.tar.gz | ||
56 | 48 | mv percona-server-5.5-xtrabackup/percona-server-5.5-xtrabackup.tar.gz . | ||
57 | 49 | rm -rf percona-server-5.5-xtrabackup | ||
58 | 50 | tar xfz percona-server-5.5-xtrabackup.tar.gz | ||
59 | 51 | cd percona-server-5.5-xtrabackup && make mysql-$(shell echo $(PS_55_VERSION) | sed -e 's/-.*//').tar.gz | ||
60 | 52 | rm percona-server-5.5-xtrabackup.tar.gz | ||
61 | 53 | tar cfz $(PS_55_SOURCE) percona-server-5.5-xtrabackup | ||
62 | 54 | rm -rf percona-server-5.5-xtrabackup | ||
63 | 55 | |||
64 | 56 | # source dist targets | 26 | # source dist targets |
65 | 57 | 27 | ||
67 | 58 | dist: $(SERVER_SOURCE_TARBALLS) $(PS_SERVER) | 28 | dist: $(SERVER_SOURCE_TARBALLS) |
68 | 59 | bzr export percona-xtrabackup-$(XTRABACKUP_VERSION).tar.gz | 29 | bzr export percona-xtrabackup-$(XTRABACKUP_VERSION).tar.gz |
69 | 60 | tar xfz percona-xtrabackup-$(XTRABACKUP_VERSION).tar.gz | 30 | tar xfz percona-xtrabackup-$(XTRABACKUP_VERSION).tar.gz |
71 | 61 | cp $(SERVER_SOURCE_TARBALLS) $(PS_SERVER) percona-xtrabackup-$(XTRABACKUP_VERSION)/ | 31 | cp $(SERVER_SOURCE_TARBALLS) percona-xtrabackup-$(XTRABACKUP_VERSION)/ |
72 | 62 | echo $(BZR_REVNO) > percona-xtrabackup-$(XTRABACKUP_VERSION)/REVNO | 32 | echo $(BZR_REVNO) > percona-xtrabackup-$(XTRABACKUP_VERSION)/REVNO |
73 | 63 | rm percona-xtrabackup-$(XTRABACKUP_VERSION).tar.gz | 33 | rm percona-xtrabackup-$(XTRABACKUP_VERSION).tar.gz |
74 | 64 | tar cfz percona-xtrabackup-$(XTRABACKUP_VERSION)-$(BZR_REVNO).tar.gz percona-xtrabackup-$(XTRABACKUP_VERSION) | 34 | tar cfz percona-xtrabackup-$(XTRABACKUP_VERSION)-$(BZR_REVNO).tar.gz percona-xtrabackup-$(XTRABACKUP_VERSION) |
75 | 65 | 35 | ||
76 | === modified file 'patches/innodb51.patch' | |||
77 | --- patches/innodb51.patch 2013-05-07 13:32:47 +0000 | |||
78 | +++ patches/innodb51.patch 2013-07-22 14:01:36 +0000 | |||
79 | @@ -9,7 +9,7 @@ | |||
80 | 9 | buf_block_t* | 9 | buf_block_t* |
81 | 10 | btr_root_block_get( | 10 | btr_root_block_get( |
82 | 11 | /*===============*/ | 11 | /*===============*/ |
84 | 12 | @@ -1122,7 +1122,7 @@ | 12 | @@ -1169,7 +1169,7 @@ |
85 | 13 | /************************************************************//** | 13 | /************************************************************//** |
86 | 14 | Returns the child page of a node pointer and x-latches it. | 14 | Returns the child page of a node pointer and x-latches it. |
87 | 15 | @return child page, x-latched */ | 15 | @return child page, x-latched */ |
88 | @@ -18,16 +18,6 @@ | |||
89 | 18 | buf_block_t* | 18 | buf_block_t* |
90 | 19 | btr_node_ptr_get_child( | 19 | btr_node_ptr_get_child( |
91 | 20 | /*===================*/ | 20 | /*===================*/ |
92 | 21 | --- a/storage/innodb_plugin/btr/btr0cur.c | ||
93 | 22 | +++ b/storage/innodb_plugin/btr/btr0cur.c | ||
94 | 23 | @@ -3308,6 +3308,7 @@ | ||
95 | 24 | byte* field; | ||
96 | 25 | |||
97 | 26 | field = rec_get_nth_field(rec, offsets, i, &rec_len); | ||
98 | 27 | + (void)field; | ||
99 | 28 | |||
100 | 29 | if (rec_len != UNIV_SQL_NULL) { | ||
101 | 30 | n_not_null[i]++; | ||
102 | 31 | --- a/storage/innodb_plugin/buf/buf0buf.c | 21 | --- a/storage/innodb_plugin/buf/buf0buf.c |
103 | 32 | +++ b/storage/innodb_plugin/buf/buf0buf.c | 22 | +++ b/storage/innodb_plugin/buf/buf0buf.c |
104 | 33 | @@ -51,6 +51,7 @@ | 23 | @@ -51,6 +51,7 @@ |
105 | @@ -38,7 +28,7 @@ | |||
106 | 38 | 28 | ||
107 | 39 | /* | 29 | /* |
108 | 40 | IMPLEMENTATION OF THE BUFFER POOL | 30 | IMPLEMENTATION OF THE BUFFER POOL |
110 | 41 | @@ -358,7 +359,7 @@ | 31 | @@ -350,7 +351,7 @@ |
111 | 42 | return(TRUE); | 32 | return(TRUE); |
112 | 43 | } | 33 | } |
113 | 44 | 34 | ||
114 | @@ -47,7 +37,7 @@ | |||
115 | 47 | if (recv_lsn_checks_on) { | 37 | if (recv_lsn_checks_on) { |
116 | 48 | ib_uint64_t current_lsn; | 38 | ib_uint64_t current_lsn; |
117 | 49 | 39 | ||
119 | 50 | @@ -670,6 +671,7 @@ | 40 | @@ -662,6 +663,7 @@ |
120 | 51 | block->page.in_flush_list = FALSE; | 41 | block->page.in_flush_list = FALSE; |
121 | 52 | block->page.in_free_list = FALSE; | 42 | block->page.in_free_list = FALSE; |
122 | 53 | block->page.in_LRU_list = FALSE; | 43 | block->page.in_LRU_list = FALSE; |
123 | @@ -55,7 +45,7 @@ | |||
124 | 55 | block->in_unzip_LRU_list = FALSE; | 45 | block->in_unzip_LRU_list = FALSE; |
125 | 56 | #endif /* UNIV_DEBUG */ | 46 | #endif /* UNIV_DEBUG */ |
126 | 57 | #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG | 47 | #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG |
128 | 58 | @@ -1690,7 +1692,9 @@ | 48 | @@ -1588,7 +1590,9 @@ |
129 | 59 | ut_ad(zip_size == fil_space_get_zip_size(space)); | 49 | ut_ad(zip_size == fil_space_get_zip_size(space)); |
130 | 60 | ut_ad(ut_is_2pow(zip_size)); | 50 | ut_ad(ut_is_2pow(zip_size)); |
131 | 61 | #ifndef UNIV_LOG_DEBUG | 51 | #ifndef UNIV_LOG_DEBUG |
132 | @@ -66,7 +56,7 @@ | |||
133 | 66 | #endif | 56 | #endif |
134 | 67 | buf_pool->stat.n_page_gets++; | 57 | buf_pool->stat.n_page_gets++; |
135 | 68 | loop: | 58 | loop: |
137 | 69 | @@ -2802,6 +2806,12 @@ | 59 | @@ -2704,6 +2708,12 @@ |
138 | 70 | frame = ((buf_block_t*) bpage)->frame; | 60 | frame = ((buf_block_t*) bpage)->frame; |
139 | 71 | } | 61 | } |
140 | 72 | 62 | ||
141 | @@ -79,7 +69,7 @@ | |||
142 | 79 | /* If this page is not uninitialized and not in the | 69 | /* If this page is not uninitialized and not in the |
143 | 80 | doublewrite buffer, then the page number and space id | 70 | doublewrite buffer, then the page number and space id |
144 | 81 | should be the same as in block. */ | 71 | should be the same as in block. */ |
146 | 82 | @@ -2894,7 +2904,8 @@ | 72 | @@ -2796,7 +2806,8 @@ |
147 | 83 | recv_recover_page(TRUE, (buf_block_t*) bpage); | 73 | recv_recover_page(TRUE, (buf_block_t*) bpage); |
148 | 84 | } | 74 | } |
149 | 85 | 75 | ||
150 | @@ -199,7 +189,7 @@ | |||
151 | 199 | 189 | ||
152 | 200 | /* | 190 | /* |
153 | 201 | IMPLEMENTATION OF THE TABLESPACE MEMORY CACHE | 191 | IMPLEMENTATION OF THE TABLESPACE MEMORY CACHE |
155 | 202 | @@ -287,7 +289,7 @@ | 192 | @@ -288,7 +290,7 @@ |
156 | 203 | 193 | ||
157 | 204 | /** The tablespace memory cache. This variable is NULL before the module is | 194 | /** The tablespace memory cache. This variable is NULL before the module is |
158 | 205 | initialized. */ | 195 | initialized. */ |
159 | @@ -208,7 +198,7 @@ | |||
160 | 208 | 198 | ||
161 | 209 | 199 | ||
162 | 210 | /********************************************************************//** | 200 | /********************************************************************//** |
164 | 211 | @@ -298,7 +300,7 @@ | 201 | @@ -299,7 +301,7 @@ |
165 | 212 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys | 202 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
166 | 213 | mutex. */ | 203 | mutex. */ |
167 | 214 | static | 204 | static |
168 | @@ -217,7 +207,7 @@ | |||
169 | 217 | fil_node_prepare_for_io( | 207 | fil_node_prepare_for_io( |
170 | 218 | /*====================*/ | 208 | /*====================*/ |
171 | 219 | fil_node_t* node, /*!< in: file node */ | 209 | fil_node_t* node, /*!< in: file node */ |
173 | 220 | @@ -623,7 +625,7 @@ | 210 | @@ -624,7 +626,7 @@ |
174 | 221 | Opens a the file of a node of a tablespace. The caller must own the fil_system | 211 | Opens a the file of a node of a tablespace. The caller must own the fil_system |
175 | 222 | mutex. */ | 212 | mutex. */ |
176 | 223 | static | 213 | static |
177 | @@ -226,7 +216,7 @@ | |||
178 | 226 | fil_node_open_file( | 216 | fil_node_open_file( |
179 | 227 | /*===============*/ | 217 | /*===============*/ |
180 | 228 | fil_node_t* node, /*!< in: file node */ | 218 | fil_node_t* node, /*!< in: file node */ |
182 | 229 | @@ -657,7 +659,17 @@ | 219 | @@ -658,7 +660,17 @@ |
183 | 230 | node->name, OS_FILE_OPEN, OS_FILE_READ_ONLY, &success); | 220 | node->name, OS_FILE_OPEN, OS_FILE_READ_ONLY, &success); |
184 | 231 | if (!success) { | 221 | if (!success) { |
185 | 232 | /* The following call prints an error message */ | 222 | /* The following call prints an error message */ |
186 | @@ -245,7 +235,7 @@ | |||
187 | 245 | 235 | ||
188 | 246 | ut_print_timestamp(stderr); | 236 | ut_print_timestamp(stderr); |
189 | 247 | 237 | ||
191 | 248 | @@ -718,12 +730,15 @@ | 238 | @@ -719,12 +731,15 @@ |
192 | 249 | 239 | ||
193 | 250 | if (UNIV_UNLIKELY(space_id != space->id)) { | 240 | if (UNIV_UNLIKELY(space_id != space->id)) { |
194 | 251 | fprintf(stderr, | 241 | fprintf(stderr, |
195 | @@ -264,7 +254,7 @@ | |||
196 | 264 | } | 254 | } |
197 | 265 | 255 | ||
198 | 266 | if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED | 256 | if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED |
200 | 267 | @@ -747,8 +762,8 @@ | 257 | @@ -748,8 +763,8 @@ |
201 | 268 | } | 258 | } |
202 | 269 | 259 | ||
203 | 270 | if (size_bytes >= 1024 * 1024) { | 260 | if (size_bytes >= 1024 * 1024) { |
204 | @@ -275,7 +265,7 @@ | |||
205 | 275 | } | 265 | } |
206 | 276 | 266 | ||
207 | 277 | if (!(flags & DICT_TF_ZSSIZE_MASK)) { | 267 | if (!(flags & DICT_TF_ZSSIZE_MASK)) { |
209 | 278 | @@ -793,6 +808,8 @@ | 268 | @@ -794,6 +809,8 @@ |
210 | 279 | /* Put the node to the LRU list */ | 269 | /* Put the node to the LRU list */ |
211 | 280 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); | 270 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); |
212 | 281 | } | 271 | } |
213 | @@ -284,7 +274,7 @@ | |||
214 | 284 | } | 274 | } |
215 | 285 | 275 | ||
216 | 286 | /**********************************************************************//** | 276 | /**********************************************************************//** |
218 | 287 | @@ -1418,7 +1435,12 @@ | 277 | @@ -1438,7 +1455,12 @@ |
219 | 288 | the file yet; the following calls will open it and update the | 278 | the file yet; the following calls will open it and update the |
220 | 289 | size fields */ | 279 | size fields */ |
221 | 290 | 280 | ||
222 | @@ -298,7 +288,7 @@ | |||
223 | 298 | fil_node_complete_io(node, fil_system, OS_FILE_READ); | 288 | fil_node_complete_io(node, fil_system, OS_FILE_READ); |
224 | 299 | } | 289 | } |
225 | 300 | 290 | ||
227 | 301 | @@ -1470,7 +1492,12 @@ | 291 | @@ -1490,7 +1512,12 @@ |
228 | 302 | the file yet; the following calls will open it and update the | 292 | the file yet; the following calls will open it and update the |
229 | 303 | size fields */ | 293 | size fields */ |
230 | 304 | 294 | ||
231 | @@ -312,7 +302,7 @@ | |||
232 | 312 | fil_node_complete_io(node, fil_system, OS_FILE_READ); | 302 | fil_node_complete_io(node, fil_system, OS_FILE_READ); |
233 | 313 | } | 303 | } |
234 | 314 | 304 | ||
236 | 315 | @@ -1910,7 +1937,7 @@ | 305 | @@ -1929,7 +1956,7 @@ |
237 | 316 | mem_free(path); | 306 | mem_free(path); |
238 | 317 | } | 307 | } |
239 | 318 | 308 | ||
240 | @@ -321,7 +311,7 @@ | |||
241 | 321 | /********************************************************//** | 311 | /********************************************************//** |
242 | 322 | Writes a log record about an .ibd file create/rename/delete. */ | 312 | Writes a log record about an .ibd file create/rename/delete. */ |
243 | 323 | static | 313 | static |
245 | 324 | @@ -2134,7 +2161,7 @@ | 314 | @@ -2153,7 +2180,7 @@ |
246 | 325 | if (fil_create_new_single_table_tablespace( | 315 | if (fil_create_new_single_table_tablespace( |
247 | 326 | space_id, name, FALSE, flags, | 316 | space_id, name, FALSE, flags, |
248 | 327 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { | 317 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { |
249 | @@ -330,7 +320,7 @@ | |||
250 | 330 | } | 320 | } |
251 | 331 | } | 321 | } |
252 | 332 | 322 | ||
254 | 333 | @@ -2297,7 +2324,7 @@ | 323 | @@ -2317,7 +2344,7 @@ |
255 | 334 | } | 324 | } |
256 | 335 | 325 | ||
257 | 336 | if (success) { | 326 | if (success) { |
258 | @@ -339,16 +329,16 @@ | |||
259 | 339 | /* Write a log record about the deletion of the .ibd | 329 | /* Write a log record about the deletion of the .ibd |
260 | 340 | file, so that ibbackup can replay it in the | 330 | file, so that ibbackup can replay it in the |
261 | 341 | --apply-log phase. We use a dummy mtr and the familiar | 331 | --apply-log phase. We use a dummy mtr and the familiar |
263 | 342 | @@ -2598,7 +2625,7 @@ | 332 | @@ -2618,7 +2645,7 @@ |
264 | 343 | 333 | ||
265 | 344 | mutex_exit(&fil_system->mutex); | 334 | mutex_exit(&fil_system->mutex); |
266 | 345 | 335 | ||
267 | 346 | -#ifndef UNIV_HOTBACKUP | 336 | -#ifndef UNIV_HOTBACKUP |
268 | 347 | +#ifdef UNDEFINED | 337 | +#ifdef UNDEFINED |
270 | 348 | if (success) { | 338 | if (success && !recv_recovery_on) { |
271 | 349 | mtr_t mtr; | 339 | mtr_t mtr; |
272 | 350 | 340 | ||
274 | 351 | @@ -2788,7 +2815,7 @@ | 341 | @@ -2808,7 +2835,7 @@ |
275 | 352 | 342 | ||
276 | 353 | fil_node_create(path, size, space_id, FALSE); | 343 | fil_node_create(path, size, space_id, FALSE); |
277 | 354 | 344 | ||
278 | @@ -357,7 +347,7 @@ | |||
279 | 357 | { | 347 | { |
280 | 358 | mtr_t mtr; | 348 | mtr_t mtr; |
281 | 359 | 349 | ||
283 | 360 | @@ -3041,19 +3068,97 @@ | 350 | @@ -3061,19 +3088,97 @@ |
284 | 361 | "InnoDB: open the tablespace file ", stderr); | 351 | "InnoDB: open the tablespace file ", stderr); |
285 | 362 | ut_print_filename(stderr, filepath); | 352 | ut_print_filename(stderr, filepath); |
286 | 363 | fputs("!\n" | 353 | fputs("!\n" |
287 | @@ -465,7 +455,7 @@ | |||
288 | 465 | return(FALSE); | 455 | return(FALSE); |
289 | 466 | } | 456 | } |
290 | 467 | 457 | ||
292 | 468 | @@ -3284,7 +3389,7 @@ | 458 | @@ -3304,7 +3409,7 @@ |
293 | 469 | cannot be ok. */ | 459 | cannot be ok. */ |
294 | 470 | 460 | ||
295 | 471 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; | 461 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; |
296 | @@ -474,7 +464,7 @@ | |||
297 | 474 | if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { | 464 | if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { |
298 | 475 | fprintf(stderr, | 465 | fprintf(stderr, |
299 | 476 | "InnoDB: Error: the size of single-table tablespace" | 466 | "InnoDB: Error: the size of single-table tablespace" |
301 | 477 | @@ -3414,7 +3519,51 @@ | 467 | @@ -3434,7 +3539,51 @@ |
302 | 478 | 468 | ||
303 | 479 | fil_node_create(filepath, 0, space_id, FALSE); | 469 | fil_node_create(filepath, 0, space_id, FALSE); |
304 | 480 | func_exit: | 470 | func_exit: |
305 | @@ -527,7 +517,7 @@ | |||
306 | 527 | ut_free(buf2); | 517 | ut_free(buf2); |
307 | 528 | mem_free(filepath); | 518 | mem_free(filepath); |
308 | 529 | } | 519 | } |
310 | 530 | @@ -3425,7 +3574,7 @@ | 520 | @@ -3445,7 +3594,7 @@ |
311 | 531 | idea is to read as much good data as we can and jump over bad data. | 521 | idea is to read as much good data as we can and jump over bad data. |
312 | 532 | @return 0 if ok, -1 if error even after the retries, 1 if at the end | 522 | @return 0 if ok, -1 if error even after the retries, 1 if at the end |
313 | 533 | of the directory */ | 523 | of the directory */ |
314 | @@ -536,7 +526,7 @@ | |||
315 | 536 | int | 526 | int |
316 | 537 | fil_file_readdir_next_file( | 527 | fil_file_readdir_next_file( |
317 | 538 | /*=======================*/ | 528 | /*=======================*/ |
319 | 539 | @@ -3469,7 +3618,7 @@ | 529 | @@ -3489,7 +3638,7 @@ |
320 | 540 | @return DB_SUCCESS or error number */ | 530 | @return DB_SUCCESS or error number */ |
321 | 541 | UNIV_INTERN | 531 | UNIV_INTERN |
322 | 542 | ulint | 532 | ulint |
323 | @@ -545,7 +535,7 @@ | |||
324 | 545 | /*===================================*/ | 535 | /*===================================*/ |
325 | 546 | { | 536 | { |
326 | 547 | int ret; | 537 | int ret; |
328 | 548 | @@ -3525,7 +3674,9 @@ | 538 | @@ -3545,7 +3694,9 @@ |
329 | 549 | dbinfo.name); | 539 | dbinfo.name); |
330 | 550 | srv_normalize_path_for_win(dbpath); | 540 | srv_normalize_path_for_win(dbpath); |
331 | 551 | 541 | ||
332 | @@ -556,7 +546,7 @@ | |||
333 | 556 | 546 | ||
334 | 557 | if (dbdir != NULL) { | 547 | if (dbdir != NULL) { |
335 | 558 | /* printf("Opened dir %s\n", dbinfo.name); */ | 548 | /* printf("Opened dir %s\n", dbinfo.name); */ |
337 | 559 | @@ -3551,8 +3702,11 @@ | 549 | @@ -3571,8 +3722,11 @@ |
338 | 560 | ".ibd")) { | 550 | ".ibd")) { |
339 | 561 | /* The name ends in .ibd; try opening | 551 | /* The name ends in .ibd; try opening |
340 | 562 | the file */ | 552 | the file */ |
341 | @@ -569,7 +559,7 @@ | |||
342 | 569 | } | 559 | } |
343 | 570 | next_file_item: | 560 | next_file_item: |
344 | 571 | ret = fil_file_readdir_next_file(&err, | 561 | ret = fil_file_readdir_next_file(&err, |
346 | 572 | @@ -3724,15 +3878,97 @@ | 562 | @@ -3744,15 +3898,97 @@ |
347 | 573 | "InnoDB: in InnoDB data dictionary" | 563 | "InnoDB: in InnoDB data dictionary" |
348 | 574 | " has tablespace id %lu,\n" | 564 | " has tablespace id %lu,\n" |
349 | 575 | "InnoDB: but tablespace with that id" | 565 | "InnoDB: but tablespace with that id" |
350 | @@ -675,7 +665,7 @@ | |||
351 | 675 | } else { | 665 | } else { |
352 | 676 | ut_print_timestamp(stderr); | 666 | ut_print_timestamp(stderr); |
353 | 677 | fputs(" InnoDB: Error: table ", stderr); | 667 | fputs(" InnoDB: Error: table ", stderr); |
355 | 678 | @@ -4121,7 +4357,7 @@ | 668 | @@ -4141,7 +4377,7 @@ |
356 | 679 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys | 669 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
357 | 680 | mutex. */ | 670 | mutex. */ |
358 | 681 | static | 671 | static |
359 | @@ -684,7 +674,7 @@ | |||
360 | 684 | fil_node_prepare_for_io( | 674 | fil_node_prepare_for_io( |
361 | 685 | /*====================*/ | 675 | /*====================*/ |
362 | 686 | fil_node_t* node, /*!< in: file node */ | 676 | fil_node_t* node, /*!< in: file node */ |
364 | 687 | @@ -4141,10 +4377,13 @@ | 677 | @@ -4161,10 +4397,13 @@ |
365 | 688 | } | 678 | } |
366 | 689 | 679 | ||
367 | 690 | if (node->open == FALSE) { | 680 | if (node->open == FALSE) { |
368 | @@ -699,7 +689,7 @@ | |||
369 | 699 | } | 689 | } |
370 | 700 | 690 | ||
371 | 701 | if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE | 691 | if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE |
373 | 702 | @@ -4157,6 +4396,8 @@ | 692 | @@ -4177,6 +4416,8 @@ |
374 | 703 | } | 693 | } |
375 | 704 | 694 | ||
376 | 705 | node->n_pending++; | 695 | node->n_pending++; |
377 | @@ -708,7 +698,7 @@ | |||
378 | 708 | } | 698 | } |
379 | 709 | 699 | ||
380 | 710 | /********************************************************************//** | 700 | /********************************************************************//** |
382 | 711 | @@ -4292,7 +4533,9 @@ | 701 | @@ -4312,7 +4553,9 @@ |
383 | 712 | ut_ad(recv_no_ibuf_operations || (type == OS_FILE_WRITE) | 702 | ut_ad(recv_no_ibuf_operations || (type == OS_FILE_WRITE) |
384 | 713 | || !ibuf_bitmap_page(zip_size, block_offset) | 703 | || !ibuf_bitmap_page(zip_size, block_offset) |
385 | 714 | || sync || is_log); | 704 | || sync || is_log); |
386 | @@ -719,7 +709,7 @@ | |||
387 | 719 | || ibuf_page(space_id, zip_size, block_offset, NULL)); | 709 | || ibuf_page(space_id, zip_size, block_offset, NULL)); |
388 | 720 | # endif /* UNIV_LOG_DEBUG */ | 710 | # endif /* UNIV_LOG_DEBUG */ |
389 | 721 | if (sync) { | 711 | if (sync) { |
391 | 722 | @@ -4341,6 +4584,16 @@ | 712 | @@ -4361,6 +4604,16 @@ |
392 | 723 | 713 | ||
393 | 724 | ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE)); | 714 | ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE)); |
394 | 725 | 715 | ||
395 | @@ -736,6 +726,26 @@ | |||
396 | 736 | node = UT_LIST_GET_FIRST(space->chain); | 726 | node = UT_LIST_GET_FIRST(space->chain); |
397 | 737 | 727 | ||
398 | 738 | for (;;) { | 728 | for (;;) { |
399 | 729 | @@ -4869,6 +5122,12 @@ | ||
400 | 730 | const char* tmp_name) /*!< in: temp table name used while | ||
401 | 731 | swapping */ | ||
402 | 732 | { | ||
403 | 733 | + (void)old_space_id; | ||
404 | 734 | + (void)old_name; | ||
405 | 735 | + (void)new_space_id; | ||
406 | 736 | + (void)new_name; | ||
407 | 737 | + (void)tmp_name; | ||
408 | 738 | +#ifdef UNDEFINED | ||
409 | 739 | mtr_t mtr; | ||
410 | 740 | mtr_start(&mtr); | ||
411 | 741 | fil_op_write_log(MLOG_FILE_RENAME, old_space_id, | ||
412 | 742 | @@ -4876,5 +5135,6 @@ | ||
413 | 743 | fil_op_write_log(MLOG_FILE_RENAME, new_space_id, | ||
414 | 744 | 0, 0, new_name, old_name, &mtr); | ||
415 | 745 | mtr_commit(&mtr); | ||
416 | 746 | +#endif | ||
417 | 747 | } | ||
418 | 748 | |||
419 | 739 | --- a/storage/innodb_plugin/ibuf/ibuf0ibuf.c | 749 | --- a/storage/innodb_plugin/ibuf/ibuf0ibuf.c |
420 | 740 | +++ b/storage/innodb_plugin/ibuf/ibuf0ibuf.c | 750 | +++ b/storage/innodb_plugin/ibuf/ibuf0ibuf.c |
421 | 741 | @@ -1061,6 +1061,9 @@ | 751 | @@ -1061,6 +1061,9 @@ |
422 | @@ -748,7 +758,7 @@ | |||
423 | 748 | if (ibuf_fixed_addr_page(space, zip_size, page_no)) { | 758 | if (ibuf_fixed_addr_page(space, zip_size, page_no)) { |
424 | 749 | 759 | ||
425 | 750 | return(TRUE); | 760 | return(TRUE); |
427 | 751 | @@ -2277,6 +2280,9 @@ | 761 | @@ -2275,6 +2278,9 @@ |
428 | 752 | ulint n_bytes; | 762 | ulint n_bytes; |
429 | 753 | ulint n_pag2; | 763 | ulint n_pag2; |
430 | 754 | 764 | ||
431 | @@ -760,7 +770,7 @@ | |||
432 | 760 | 770 | ||
433 | 761 | --- a/storage/innodb_plugin/include/fil0fil.h | 771 | --- a/storage/innodb_plugin/include/fil0fil.h |
434 | 762 | +++ b/storage/innodb_plugin/include/fil0fil.h | 772 | +++ b/storage/innodb_plugin/include/fil0fil.h |
436 | 763 | @@ -504,7 +504,7 @@ | 773 | @@ -505,7 +505,7 @@ |
437 | 764 | @return DB_SUCCESS or error number */ | 774 | @return DB_SUCCESS or error number */ |
438 | 765 | UNIV_INTERN | 775 | UNIV_INTERN |
439 | 766 | ulint | 776 | ulint |
440 | @@ -771,7 +781,7 @@ | |||
441 | 771 | Returns TRUE if a single-table tablespace does not exist in the memory cache, | 781 | Returns TRUE if a single-table tablespace does not exist in the memory cache, |
442 | 772 | --- a/storage/innodb_plugin/include/mem0mem.ic | 782 | --- a/storage/innodb_plugin/include/mem0mem.ic |
443 | 773 | +++ b/storage/innodb_plugin/include/mem0mem.ic | 783 | +++ b/storage/innodb_plugin/include/mem0mem.ic |
445 | 774 | @@ -367,7 +367,7 @@ | 784 | @@ -363,7 +363,7 @@ |
446 | 775 | buf = (byte*)buf + MEM_FIELD_HEADER_SIZE; | 785 | buf = (byte*)buf + MEM_FIELD_HEADER_SIZE; |
447 | 776 | 786 | ||
448 | 777 | /* Check that the field lengths agree */ | 787 | /* Check that the field lengths agree */ |
449 | @@ -782,7 +792,7 @@ | |||
450 | 782 | return(buf); | 792 | return(buf); |
451 | 783 | --- a/storage/innodb_plugin/include/mtr0mtr.ic | 793 | --- a/storage/innodb_plugin/include/mtr0mtr.ic |
452 | 784 | +++ b/storage/innodb_plugin/include/mtr0mtr.ic | 794 | +++ b/storage/innodb_plugin/include/mtr0mtr.ic |
454 | 785 | @@ -160,7 +160,7 @@ | 795 | @@ -161,7 +161,7 @@ |
455 | 786 | while (offset > 0) { | 796 | while (offset > 0) { |
456 | 787 | offset -= sizeof(mtr_memo_slot_t); | 797 | offset -= sizeof(mtr_memo_slot_t); |
457 | 788 | 798 | ||
458 | @@ -989,7 +999,7 @@ | |||
459 | 989 | ibool | 999 | ibool |
460 | 990 | log_block_checksum_is_ok_or_old_format( | 1000 | log_block_checksum_is_ok_or_old_format( |
461 | 991 | /*===================================*/ | 1001 | /*===================================*/ |
463 | 992 | @@ -1486,6 +1487,7 @@ | 1002 | @@ -1492,6 +1493,7 @@ |
464 | 993 | buf_block_get_page_no(block)); | 1003 | buf_block_get_page_no(block)); |
465 | 994 | 1004 | ||
466 | 995 | if ((recv_addr == NULL) | 1005 | if ((recv_addr == NULL) |
467 | @@ -997,7 +1007,7 @@ | |||
468 | 997 | || (recv_addr->state == RECV_BEING_PROCESSED) | 1007 | || (recv_addr->state == RECV_BEING_PROCESSED) |
469 | 998 | || (recv_addr->state == RECV_PROCESSED)) { | 1008 | || (recv_addr->state == RECV_PROCESSED)) { |
470 | 999 | 1009 | ||
472 | 1000 | @@ -1575,9 +1577,16 @@ | 1010 | @@ -1581,9 +1583,16 @@ |
473 | 1001 | if (page_zip) { | 1011 | if (page_zip) { |
474 | 1002 | memset(FIL_PAGE_LSN + page_zip->data, 0, 8); | 1012 | memset(FIL_PAGE_LSN + page_zip->data, 0, 8); |
475 | 1003 | } | 1013 | } |
476 | @@ -1015,7 +1025,7 @@ | |||
477 | 1015 | 1025 | ||
478 | 1016 | ib_uint64_t end_lsn; | 1026 | ib_uint64_t end_lsn; |
479 | 1017 | 1027 | ||
481 | 1018 | @@ -1762,6 +1771,18 @@ | 1028 | @@ -1769,6 +1778,18 @@ |
482 | 1019 | ulint zip_size = fil_space_get_zip_size(space); | 1029 | ulint zip_size = fil_space_get_zip_size(space); |
483 | 1020 | ulint page_no = recv_addr->page_no; | 1030 | ulint page_no = recv_addr->page_no; |
484 | 1021 | 1031 | ||
485 | @@ -1034,7 +1044,7 @@ | |||
486 | 1034 | if (recv_addr->state == RECV_NOT_PROCESSED) { | 1044 | if (recv_addr->state == RECV_NOT_PROCESSED) { |
487 | 1035 | if (!has_printed) { | 1045 | if (!has_printed) { |
488 | 1036 | ut_print_timestamp(stderr); | 1046 | ut_print_timestamp(stderr); |
490 | 1037 | @@ -1795,7 +1816,7 @@ | 1047 | @@ -1802,7 +1823,7 @@ |
491 | 1038 | 1048 | ||
492 | 1039 | mutex_enter(&(recv_sys->mutex)); | 1049 | mutex_enter(&(recv_sys->mutex)); |
493 | 1040 | } | 1050 | } |
494 | @@ -1043,7 +1053,7 @@ | |||
495 | 1043 | recv_addr = HASH_GET_NEXT(addr_hash, recv_addr); | 1053 | recv_addr = HASH_GET_NEXT(addr_hash, recv_addr); |
496 | 1044 | } | 1054 | } |
497 | 1045 | 1055 | ||
499 | 1046 | @@ -2297,7 +2318,7 @@ | 1056 | @@ -2304,7 +2325,7 @@ |
500 | 1047 | || type == MLOG_FILE_RENAME | 1057 | || type == MLOG_FILE_RENAME |
501 | 1048 | || type == MLOG_FILE_DELETE) { | 1058 | || type == MLOG_FILE_DELETE) { |
502 | 1049 | ut_a(space); | 1059 | ut_a(space); |
503 | @@ -1052,7 +1062,7 @@ | |||
504 | 1052 | if (recv_replay_file_ops) { | 1062 | if (recv_replay_file_ops) { |
505 | 1053 | 1063 | ||
506 | 1054 | /* In ibbackup --apply-log, replay an .ibd file | 1064 | /* In ibbackup --apply-log, replay an .ibd file |
508 | 1055 | @@ -2320,7 +2341,7 @@ | 1065 | @@ -2327,7 +2348,7 @@ |
509 | 1056 | ut_error; | 1066 | ut_error; |
510 | 1057 | } | 1067 | } |
511 | 1058 | } | 1068 | } |
512 | @@ -1061,7 +1071,7 @@ | |||
513 | 1061 | /* In normal mysqld crash recovery we do not try to | 1071 | /* In normal mysqld crash recovery we do not try to |
514 | 1062 | replay file operations */ | 1072 | replay file operations */ |
515 | 1063 | #ifdef UNIV_LOG_LSN_DEBUG | 1073 | #ifdef UNIV_LOG_LSN_DEBUG |
517 | 1064 | @@ -2737,8 +2758,11 @@ | 1074 | @@ -2744,8 +2765,11 @@ |
518 | 1065 | 1075 | ||
519 | 1066 | fprintf(stderr, | 1076 | fprintf(stderr, |
520 | 1067 | "InnoDB: Doing recovery: scanned up to" | 1077 | "InnoDB: Doing recovery: scanned up to" |
521 | @@ -1075,7 +1085,7 @@ | |||
522 | 1075 | } | 1085 | } |
523 | 1076 | } | 1086 | } |
524 | 1077 | 1087 | ||
526 | 1078 | @@ -2841,7 +2865,7 @@ | 1088 | @@ -2848,7 +2872,7 @@ |
527 | 1079 | "InnoDB: Reading tablespace information" | 1089 | "InnoDB: Reading tablespace information" |
528 | 1080 | " from the .ibd files...\n"); | 1090 | " from the .ibd files...\n"); |
529 | 1081 | 1091 | ||
530 | @@ -1084,7 +1094,7 @@ | |||
531 | 1084 | 1094 | ||
532 | 1085 | /* If we are using the doublewrite method, we will | 1095 | /* If we are using the doublewrite method, we will |
533 | 1086 | check if there are half-written pages in data files, | 1096 | check if there are half-written pages in data files, |
535 | 1087 | @@ -2850,12 +2874,14 @@ | 1097 | @@ -2857,12 +2881,14 @@ |
536 | 1088 | 1098 | ||
537 | 1089 | if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { | 1099 | if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { |
538 | 1090 | 1100 | ||
539 | @@ -1100,7 +1110,7 @@ | |||
540 | 1100 | } | 1110 | } |
541 | 1101 | } | 1111 | } |
542 | 1102 | 1112 | ||
544 | 1103 | @@ -3005,6 +3031,7 @@ | 1113 | @@ -3012,6 +3038,7 @@ |
545 | 1104 | recv_sys->recovered_lsn = checkpoint_lsn; | 1114 | recv_sys->recovered_lsn = checkpoint_lsn; |
546 | 1105 | 1115 | ||
547 | 1106 | srv_start_lsn = checkpoint_lsn; | 1116 | srv_start_lsn = checkpoint_lsn; |
548 | @@ -1108,7 +1118,7 @@ | |||
549 | 1108 | } | 1118 | } |
550 | 1109 | 1119 | ||
551 | 1110 | contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn, | 1120 | contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn, |
553 | 1111 | @@ -3286,6 +3313,7 @@ | 1121 | @@ -3293,6 +3320,7 @@ |
554 | 1112 | that the data dictionary tables will be free of any locks. | 1122 | that the data dictionary tables will be free of any locks. |
555 | 1113 | The data dictionary latch should guarantee that there is at | 1123 | The data dictionary latch should guarantee that there is at |
556 | 1114 | most one data dictionary transaction active at a time. */ | 1124 | most one data dictionary transaction active at a time. */ |
557 | @@ -1127,7 +1137,7 @@ | |||
558 | 1127 | #if defined(UNIV_HOTBACKUP) || defined(__WIN__) || defined(__NETWARE__) | 1137 | #if defined(UNIV_HOTBACKUP) || defined(__WIN__) || defined(__NETWARE__) |
559 | 1128 | /* InnoDB Hot Backup does not lock the data files. | 1138 | /* InnoDB Hot Backup does not lock the data files. |
560 | 1129 | * On Windows, mandatory locking is used. | 1139 | * On Windows, mandatory locking is used. |
562 | 1130 | @@ -1316,8 +1316,9 @@ | 1140 | @@ -1324,8 +1324,9 @@ |
563 | 1131 | attributes = 0; | 1141 | attributes = 0; |
564 | 1132 | ut_error; | 1142 | ut_error; |
565 | 1133 | } | 1143 | } |
566 | @@ -1138,7 +1148,7 @@ | |||
567 | 1138 | GENERIC_READ | GENERIC_WRITE, /* read and write | 1148 | GENERIC_READ | GENERIC_WRITE, /* read and write |
568 | 1139 | access */ | 1149 | access */ |
569 | 1140 | share_mode, /* File can be read also by other | 1150 | share_mode, /* File can be read also by other |
571 | 1141 | @@ -1376,7 +1377,11 @@ | 1151 | @@ -1391,7 +1392,11 @@ |
572 | 1142 | if (create_mode == OS_FILE_OPEN || create_mode == OS_FILE_OPEN_RAW | 1152 | if (create_mode == OS_FILE_OPEN || create_mode == OS_FILE_OPEN_RAW |
573 | 1143 | || create_mode == OS_FILE_OPEN_RETRY) { | 1153 | || create_mode == OS_FILE_OPEN_RETRY) { |
574 | 1144 | mode_str = "OPEN"; | 1154 | mode_str = "OPEN"; |
575 | @@ -1151,7 +1161,7 @@ | |||
576 | 1151 | } else if (create_mode == OS_FILE_CREATE) { | 1161 | } else if (create_mode == OS_FILE_CREATE) { |
577 | 1152 | mode_str = "CREATE"; | 1162 | mode_str = "CREATE"; |
578 | 1153 | create_flag = O_RDWR | O_CREAT | O_EXCL; | 1163 | create_flag = O_RDWR | O_CREAT | O_EXCL; |
580 | 1154 | @@ -2545,6 +2550,9 @@ | 1164 | @@ -2560,6 +2565,9 @@ |
581 | 1155 | ut_a((offset & 0xFFFFFFFFUL) == offset); | 1165 | ut_a((offset & 0xFFFFFFFFUL) == offset); |
582 | 1156 | ut_a((n & 0xFFFFFFFFUL) == n); | 1166 | ut_a((n & 0xFFFFFFFFUL) == n); |
583 | 1157 | 1167 | ||
584 | @@ -1161,7 +1171,7 @@ | |||
585 | 1161 | os_n_file_writes++; | 1171 | os_n_file_writes++; |
586 | 1162 | 1172 | ||
587 | 1163 | ut_ad(file); | 1173 | ut_ad(file); |
589 | 1164 | @@ -2669,6 +2677,9 @@ | 1174 | @@ -2684,6 +2692,9 @@ |
590 | 1165 | #else | 1175 | #else |
591 | 1166 | ssize_t ret; | 1176 | ssize_t ret; |
592 | 1167 | 1177 | ||
593 | @@ -1193,7 +1203,7 @@ | |||
594 | 1193 | 1203 | ||
595 | 1194 | --- a/storage/innodb_plugin/srv/srv0srv.c | 1204 | --- a/storage/innodb_plugin/srv/srv0srv.c |
596 | 1195 | +++ b/storage/innodb_plugin/srv/srv0srv.c | 1205 | +++ b/storage/innodb_plugin/srv/srv0srv.c |
598 | 1196 | @@ -374,6 +374,10 @@ | 1206 | @@ -383,6 +383,10 @@ |
599 | 1197 | 1207 | ||
600 | 1198 | UNIV_INTERN ulong srv_replication_delay = 0; | 1208 | UNIV_INTERN ulong srv_replication_delay = 0; |
601 | 1199 | 1209 | ||
602 | @@ -1204,7 +1214,7 @@ | |||
603 | 1204 | /*-------------------------------------------*/ | 1214 | /*-------------------------------------------*/ |
604 | 1205 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; | 1215 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; |
605 | 1206 | UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; | 1216 | UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; |
607 | 1207 | @@ -1002,7 +1006,7 @@ | 1217 | @@ -1011,7 +1015,7 @@ |
608 | 1208 | } | 1218 | } |
609 | 1209 | 1219 | ||
610 | 1210 | /* Initialize some INFORMATION SCHEMA internal structures */ | 1220 | /* Initialize some INFORMATION SCHEMA internal structures */ |
611 | @@ -1213,7 +1223,7 @@ | |||
612 | 1213 | } | 1223 | } |
613 | 1214 | 1224 | ||
614 | 1215 | /*********************************************************************//** | 1225 | /*********************************************************************//** |
616 | 1216 | @@ -1013,6 +1017,7 @@ | 1226 | @@ -1022,6 +1026,7 @@ |
617 | 1217 | /*==========*/ | 1227 | /*==========*/ |
618 | 1218 | { | 1228 | { |
619 | 1219 | os_fast_mutex_free(&srv_conc_mutex); | 1229 | os_fast_mutex_free(&srv_conc_mutex); |
620 | @@ -1221,7 +1231,7 @@ | |||
621 | 1221 | mem_free(srv_conc_slots); | 1231 | mem_free(srv_conc_slots); |
622 | 1222 | srv_conc_slots = NULL; | 1232 | srv_conc_slots = NULL; |
623 | 1223 | 1233 | ||
625 | 1224 | @@ -1026,6 +1031,7 @@ | 1234 | @@ -1035,6 +1040,7 @@ |
626 | 1225 | srv_mysql_table = NULL; | 1235 | srv_mysql_table = NULL; |
627 | 1226 | 1236 | ||
628 | 1227 | trx_i_s_cache_free(trx_i_s_cache); | 1237 | trx_i_s_cache_free(trx_i_s_cache); |
629 | @@ -1334,9 +1344,9 @@ | |||
630 | 1334 | srv_was_started = TRUE; | 1344 | srv_was_started = TRUE; |
631 | 1335 | --- a/storage/innodb_plugin/trx/trx0purge.c | 1345 | --- a/storage/innodb_plugin/trx/trx0purge.c |
632 | 1336 | +++ b/storage/innodb_plugin/trx/trx0purge.c | 1346 | +++ b/storage/innodb_plugin/trx/trx0purge.c |
634 | 1337 | @@ -1087,6 +1087,9 @@ | 1347 | @@ -1093,6 +1093,9 @@ |
635 | 1338 | /* que_thr_t* thr2; */ | 1348 | /* que_thr_t* thr2; */ |
637 | 1339 | ulint old_pages_handled; | 1349 | ulonglong old_pages_handled; |
638 | 1340 | 1350 | ||
639 | 1341 | + if (srv_fake_write) | 1351 | + if (srv_fake_write) |
640 | 1342 | + return(0); | 1352 | + return(0); |
641 | @@ -1360,7 +1370,7 @@ | |||
642 | 1360 | 1370 | ||
643 | 1361 | --- a/storage/innodb_plugin/trx/trx0sys.c | 1371 | --- a/storage/innodb_plugin/trx/trx0sys.c |
644 | 1362 | +++ b/storage/innodb_plugin/trx/trx0sys.c | 1372 | +++ b/storage/innodb_plugin/trx/trx0sys.c |
646 | 1363 | @@ -1586,12 +1586,14 @@ | 1373 | @@ -1583,12 +1583,14 @@ |
647 | 1364 | mem_free(trx_doublewrite); | 1374 | mem_free(trx_doublewrite); |
648 | 1365 | trx_doublewrite = NULL; | 1375 | trx_doublewrite = NULL; |
649 | 1366 | 1376 | ||
650 | @@ -1375,7 +1385,7 @@ | |||
651 | 1375 | 1385 | ||
652 | 1376 | /* There can't be any active transactions. */ | 1386 | /* There can't be any active transactions. */ |
653 | 1377 | rseg = UT_LIST_GET_FIRST(trx_sys->rseg_list); | 1387 | rseg = UT_LIST_GET_FIRST(trx_sys->rseg_list); |
655 | 1378 | @@ -1617,10 +1619,12 @@ | 1388 | @@ -1614,10 +1616,12 @@ |
656 | 1379 | UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view); | 1389 | UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view); |
657 | 1380 | } | 1390 | } |
658 | 1381 | 1391 | ||
659 | @@ -1425,9 +1435,9 @@ | |||
660 | 1425 | 1435 | ||
661 | 1426 | /* | 1436 | /* |
662 | 1427 | WAIT ARRAY | 1437 | WAIT ARRAY |
666 | 1428 | @@ -927,6 +928,13 @@ | 1438 | @@ -932,6 +933,13 @@ |
667 | 1429 | ibool fatal = FALSE; | 1439 | return(FALSE); |
668 | 1430 | double longest_diff = 0; | 1440 | } |
669 | 1431 | 1441 | ||
670 | 1432 | + if (srv_rebuild_indexes) { | 1442 | + if (srv_rebuild_indexes) { |
671 | 1433 | + | 1443 | + |
672 | @@ -1436,12 +1446,12 @@ | |||
673 | 1436 | + return(FALSE); | 1446 | + return(FALSE); |
674 | 1437 | + } | 1447 | + } |
675 | 1438 | + | 1448 | + |
676 | 1449 | sync_array_enter(sync_primary_wait_array); | ||
677 | 1450 | |||
678 | 1439 | for (i = 0; i < sync_primary_wait_array->n_cells; i++) { | 1451 | for (i = 0; i < sync_primary_wait_array->n_cells; i++) { |
679 | 1440 | |||
680 | 1441 | double diff; | ||
681 | 1442 | --- a/storage/innodb_plugin/include/buf0buf.h | 1452 | --- a/storage/innodb_plugin/include/buf0buf.h |
682 | 1443 | +++ b/storage/innodb_plugin/include/buf0buf.h | 1453 | +++ b/storage/innodb_plugin/include/buf0buf.h |
684 | 1444 | @@ -1191,6 +1191,8 @@ | 1454 | @@ -1270,6 +1270,8 @@ |
685 | 1445 | frees a page in buffer pool */ | 1455 | frees a page in buffer pool */ |
686 | 1446 | # endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ | 1456 | # endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ |
687 | 1447 | #endif /* !UNIV_HOTBACKUP */ | 1457 | #endif /* !UNIV_HOTBACKUP */ |
688 | @@ -1493,14 +1503,3 @@ | |||
689 | 1493 | 1503 | ||
690 | 1494 | UNIV_MEM_FREE(buf, n); | 1504 | UNIV_MEM_FREE(buf, n); |
691 | 1495 | } | 1505 | } |
692 | 1496 | --- a/configure.in | ||
693 | 1497 | +++ b/configure.in | ||
694 | 1498 | @@ -22,7 +22,7 @@ | ||
695 | 1499 | AM_INIT_AUTOMAKE([1.9 tar-ustar]) | ||
696 | 1500 | AC_PROG_LIBTOOL | ||
697 | 1501 | |||
698 | 1502 | -AM_CONFIG_HEADER([include/config.h]) | ||
699 | 1503 | +AC_CONFIG_HEADERS([include/config.h]) | ||
700 | 1504 | |||
701 | 1505 | # Request support for automake silent-rules if available. | ||
702 | 1506 | # Default to verbose output. One can use the configure-time | ||
703 | 1507 | 1506 | ||
704 | === modified file 'patches/innodb55.patch' | |||
705 | --- patches/innodb55.patch 2013-05-07 13:32:47 +0000 | |||
706 | +++ patches/innodb55.patch 2013-07-22 14:01:36 +0000 | |||
707 | @@ -1,6 +1,6 @@ | |||
708 | 1 | --- a/storage/innobase/btr/btr0btr.c | 1 | --- a/storage/innobase/btr/btr0btr.c |
709 | 2 | +++ b/storage/innobase/btr/btr0btr.c | 2 | +++ b/storage/innobase/btr/btr0btr.c |
711 | 3 | @@ -674,7 +674,7 @@ | 3 | @@ -698,7 +698,7 @@ |
712 | 4 | /**************************************************************//** | 4 | /**************************************************************//** |
713 | 5 | Gets the root node of a tree and x-latches it. | 5 | Gets the root node of a tree and x-latches it. |
714 | 6 | @return root page, x-latched */ | 6 | @return root page, x-latched */ |
715 | @@ -9,7 +9,7 @@ | |||
716 | 9 | buf_block_t* | 9 | buf_block_t* |
717 | 10 | btr_root_block_get( | 10 | btr_root_block_get( |
718 | 11 | /*===============*/ | 11 | /*===============*/ |
720 | 12 | @@ -1123,7 +1123,7 @@ | 12 | @@ -1183,7 +1183,7 @@ |
721 | 13 | /************************************************************//** | 13 | /************************************************************//** |
722 | 14 | Returns the child page of a node pointer and x-latches it. | 14 | Returns the child page of a node pointer and x-latches it. |
723 | 15 | @return child page, x-latched */ | 15 | @return child page, x-latched */ |
724 | @@ -28,7 +28,7 @@ | |||
725 | 28 | 28 | ||
726 | 29 | /* | 29 | /* |
727 | 30 | IMPLEMENTATION OF THE BUFFER POOL | 30 | IMPLEMENTATION OF THE BUFFER POOL |
729 | 31 | @@ -518,7 +519,7 @@ | 31 | @@ -538,7 +539,7 @@ |
730 | 32 | return(TRUE); | 32 | return(TRUE); |
731 | 33 | } | 33 | } |
732 | 34 | 34 | ||
733 | @@ -37,7 +37,7 @@ | |||
734 | 37 | if (recv_lsn_checks_on) { | 37 | if (recv_lsn_checks_on) { |
735 | 38 | ib_uint64_t current_lsn; | 38 | ib_uint64_t current_lsn; |
736 | 39 | 39 | ||
738 | 40 | @@ -881,6 +882,7 @@ | 40 | @@ -918,6 +919,7 @@ |
739 | 41 | block->page.in_flush_list = FALSE; | 41 | block->page.in_flush_list = FALSE; |
740 | 42 | block->page.in_free_list = FALSE; | 42 | block->page.in_free_list = FALSE; |
741 | 43 | block->page.in_LRU_list = FALSE; | 43 | block->page.in_LRU_list = FALSE; |
742 | @@ -45,7 +45,7 @@ | |||
743 | 45 | block->in_unzip_LRU_list = FALSE; | 45 | block->in_unzip_LRU_list = FALSE; |
744 | 46 | #endif /* UNIV_DEBUG */ | 46 | #endif /* UNIV_DEBUG */ |
745 | 47 | #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG | 47 | #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG |
747 | 48 | @@ -2299,7 +2301,8 @@ | 48 | @@ -2256,7 +2258,8 @@ |
748 | 49 | ut_ad(zip_size == fil_space_get_zip_size(space)); | 49 | ut_ad(zip_size == fil_space_get_zip_size(space)); |
749 | 50 | ut_ad(ut_is_2pow(zip_size)); | 50 | ut_ad(ut_is_2pow(zip_size)); |
750 | 51 | #ifndef UNIV_LOG_DEBUG | 51 | #ifndef UNIV_LOG_DEBUG |
751 | @@ -55,7 +55,7 @@ | |||
752 | 55 | || ibuf_page_low(space, zip_size, offset, | 55 | || ibuf_page_low(space, zip_size, offset, |
753 | 56 | FALSE, file, line, NULL)); | 56 | FALSE, file, line, NULL)); |
754 | 57 | #endif | 57 | #endif |
756 | 58 | @@ -3567,6 +3570,13 @@ | 58 | @@ -3535,6 +3538,13 @@ |
757 | 59 | frame = ((buf_block_t*) bpage)->frame; | 59 | frame = ((buf_block_t*) bpage)->frame; |
758 | 60 | } | 60 | } |
759 | 61 | 61 | ||
760 | @@ -69,7 +69,7 @@ | |||
761 | 69 | /* If this page is not uninitialized and not in the | 69 | /* If this page is not uninitialized and not in the |
762 | 70 | doublewrite buffer, then the page number and space id | 70 | doublewrite buffer, then the page number and space id |
763 | 71 | should be the same as in block. */ | 71 | should be the same as in block. */ |
765 | 72 | @@ -3668,7 +3678,8 @@ | 72 | @@ -3637,7 +3647,8 @@ |
766 | 73 | recv_recover_page(TRUE, (buf_block_t*) bpage); | 73 | recv_recover_page(TRUE, (buf_block_t*) bpage); |
767 | 74 | } | 74 | } |
768 | 75 | 75 | ||
769 | @@ -81,7 +81,7 @@ | |||
770 | 81 | bpage->offset, buf_page_get_zip_size(bpage), | 81 | bpage->offset, buf_page_get_zip_size(bpage), |
771 | 82 | --- a/storage/innobase/buf/buf0rea.c | 82 | --- a/storage/innobase/buf/buf0rea.c |
772 | 83 | +++ b/storage/innobase/buf/buf0rea.c | 83 | +++ b/storage/innobase/buf/buf0rea.c |
774 | 84 | @@ -124,6 +124,45 @@ | 84 | @@ -162,6 +162,45 @@ |
775 | 85 | bpage = buf_page_init_for_read(err, mode, space, zip_size, unzip, | 85 | bpage = buf_page_init_for_read(err, mode, space, zip_size, unzip, |
776 | 86 | tablespace_version, offset); | 86 | tablespace_version, offset); |
777 | 87 | if (bpage == NULL) { | 87 | if (bpage == NULL) { |
778 | @@ -127,7 +127,7 @@ | |||
779 | 127 | 127 | ||
780 | 128 | return(0); | 128 | return(0); |
781 | 129 | } | 129 | } |
783 | 130 | @@ -768,6 +807,50 @@ | 130 | @@ -820,6 +859,50 @@ |
784 | 131 | /* It is a single table tablespace and the .ibd file is | 131 | /* It is a single table tablespace and the .ibd file is |
785 | 132 | missing: do nothing */ | 132 | missing: do nothing */ |
786 | 133 | 133 | ||
787 | @@ -189,7 +189,7 @@ | |||
788 | 189 | #ifndef UNIV_HOTBACKUP | 189 | #ifndef UNIV_HOTBACKUP |
789 | 190 | # include "buf0lru.h" | 190 | # include "buf0lru.h" |
790 | 191 | # include "ibuf0ibuf.h" | 191 | # include "ibuf0ibuf.h" |
792 | 192 | @@ -297,7 +299,7 @@ | 192 | @@ -300,7 +302,7 @@ |
793 | 193 | 193 | ||
794 | 194 | /** The tablespace memory cache. This variable is NULL before the module is | 194 | /** The tablespace memory cache. This variable is NULL before the module is |
795 | 195 | initialized. */ | 195 | initialized. */ |
796 | @@ -198,7 +198,7 @@ | |||
797 | 198 | 198 | ||
798 | 199 | #ifdef UNIV_DEBUG | 199 | #ifdef UNIV_DEBUG |
799 | 200 | /** Try fil_validate() every this many times */ | 200 | /** Try fil_validate() every this many times */ |
801 | 201 | @@ -336,7 +338,7 @@ | 201 | @@ -339,7 +341,7 @@ |
802 | 202 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys | 202 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
803 | 203 | mutex. */ | 203 | mutex. */ |
804 | 204 | static | 204 | static |
805 | @@ -207,7 +207,7 @@ | |||
806 | 207 | fil_node_prepare_for_io( | 207 | fil_node_prepare_for_io( |
807 | 208 | /*====================*/ | 208 | /*====================*/ |
808 | 209 | fil_node_t* node, /*!< in: file node */ | 209 | fil_node_t* node, /*!< in: file node */ |
810 | 210 | @@ -661,7 +663,7 @@ | 210 | @@ -664,7 +666,7 @@ |
811 | 211 | Opens a the file of a node of a tablespace. The caller must own the fil_system | 211 | Opens a the file of a node of a tablespace. The caller must own the fil_system |
812 | 212 | mutex. */ | 212 | mutex. */ |
813 | 213 | static | 213 | static |
814 | @@ -216,7 +216,7 @@ | |||
815 | 216 | fil_node_open_file( | 216 | fil_node_open_file( |
816 | 217 | /*===============*/ | 217 | /*===============*/ |
817 | 218 | fil_node_t* node, /*!< in: file node */ | 218 | fil_node_t* node, /*!< in: file node */ |
819 | 219 | @@ -696,7 +698,17 @@ | 219 | @@ -699,7 +701,17 @@ |
820 | 220 | OS_FILE_READ_ONLY, &success); | 220 | OS_FILE_READ_ONLY, &success); |
821 | 221 | if (!success) { | 221 | if (!success) { |
822 | 222 | /* The following call prints an error message */ | 222 | /* The following call prints an error message */ |
823 | @@ -235,7 +235,7 @@ | |||
824 | 235 | 235 | ||
825 | 236 | ut_print_timestamp(stderr); | 236 | ut_print_timestamp(stderr); |
826 | 237 | 237 | ||
828 | 238 | @@ -757,12 +769,15 @@ | 238 | @@ -760,12 +772,15 @@ |
829 | 239 | 239 | ||
830 | 240 | if (UNIV_UNLIKELY(space_id != space->id)) { | 240 | if (UNIV_UNLIKELY(space_id != space->id)) { |
831 | 241 | fprintf(stderr, | 241 | fprintf(stderr, |
832 | @@ -254,7 +254,7 @@ | |||
833 | 254 | } | 254 | } |
834 | 255 | 255 | ||
835 | 256 | if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED | 256 | if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED |
837 | 257 | @@ -786,8 +801,8 @@ | 257 | @@ -789,8 +804,8 @@ |
838 | 258 | } | 258 | } |
839 | 259 | 259 | ||
840 | 260 | if (size_bytes >= 1024 * 1024) { | 260 | if (size_bytes >= 1024 * 1024) { |
841 | @@ -265,7 +265,7 @@ | |||
842 | 265 | } | 265 | } |
843 | 266 | 266 | ||
844 | 267 | if (!(flags & DICT_TF_ZSSIZE_MASK)) { | 267 | if (!(flags & DICT_TF_ZSSIZE_MASK)) { |
846 | 268 | @@ -838,6 +853,8 @@ | 268 | @@ -841,6 +856,8 @@ |
847 | 269 | /* Put the node to the LRU list */ | 269 | /* Put the node to the LRU list */ |
848 | 270 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); | 270 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); |
849 | 271 | } | 271 | } |
850 | @@ -274,7 +274,7 @@ | |||
851 | 274 | } | 274 | } |
852 | 275 | 275 | ||
853 | 276 | /**********************************************************************//** | 276 | /**********************************************************************//** |
855 | 277 | @@ -1464,7 +1481,12 @@ | 277 | @@ -1504,7 +1521,12 @@ |
856 | 278 | the file yet; the following calls will open it and update the | 278 | the file yet; the following calls will open it and update the |
857 | 279 | size fields */ | 279 | size fields */ |
858 | 280 | 280 | ||
859 | @@ -288,7 +288,7 @@ | |||
860 | 288 | fil_node_complete_io(node, fil_system, OS_FILE_READ); | 288 | fil_node_complete_io(node, fil_system, OS_FILE_READ); |
861 | 289 | } | 289 | } |
862 | 290 | 290 | ||
864 | 291 | @@ -1516,7 +1538,12 @@ | 291 | @@ -1573,7 +1595,12 @@ |
865 | 292 | the file yet; the following calls will open it and update the | 292 | the file yet; the following calls will open it and update the |
866 | 293 | size fields */ | 293 | size fields */ |
867 | 294 | 294 | ||
868 | @@ -302,7 +302,7 @@ | |||
869 | 302 | fil_node_complete_io(node, fil_system, OS_FILE_READ); | 302 | fil_node_complete_io(node, fil_system, OS_FILE_READ); |
870 | 303 | } | 303 | } |
871 | 304 | 304 | ||
873 | 305 | @@ -1957,7 +1984,7 @@ | 305 | @@ -2021,7 +2048,7 @@ |
874 | 306 | mem_free(path); | 306 | mem_free(path); |
875 | 307 | } | 307 | } |
876 | 308 | 308 | ||
877 | @@ -311,7 +311,7 @@ | |||
878 | 311 | /********************************************************//** | 311 | /********************************************************//** |
879 | 312 | Writes a log record about an .ibd file create/rename/delete. */ | 312 | Writes a log record about an .ibd file create/rename/delete. */ |
880 | 313 | static | 313 | static |
882 | 314 | @@ -2181,7 +2208,7 @@ | 314 | @@ -2245,7 +2272,7 @@ |
883 | 315 | if (fil_create_new_single_table_tablespace( | 315 | if (fil_create_new_single_table_tablespace( |
884 | 316 | space_id, name, FALSE, flags, | 316 | space_id, name, FALSE, flags, |
885 | 317 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { | 317 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { |
886 | @@ -320,7 +320,7 @@ | |||
887 | 320 | } | 320 | } |
888 | 321 | } | 321 | } |
889 | 322 | 322 | ||
891 | 323 | @@ -2344,7 +2371,7 @@ | 323 | @@ -2434,7 +2461,7 @@ |
892 | 324 | } | 324 | } |
893 | 325 | 325 | ||
894 | 326 | if (success) { | 326 | if (success) { |
895 | @@ -329,16 +329,16 @@ | |||
896 | 329 | /* Write a log record about the deletion of the .ibd | 329 | /* Write a log record about the deletion of the .ibd |
897 | 330 | file, so that ibbackup can replay it in the | 330 | file, so that ibbackup can replay it in the |
898 | 331 | --apply-log phase. We use a dummy mtr and the familiar | 331 | --apply-log phase. We use a dummy mtr and the familiar |
900 | 332 | @@ -2645,7 +2672,7 @@ | 332 | @@ -2735,7 +2762,7 @@ |
901 | 333 | 333 | ||
902 | 334 | mutex_exit(&fil_system->mutex); | 334 | mutex_exit(&fil_system->mutex); |
903 | 335 | 335 | ||
904 | 336 | -#ifndef UNIV_HOTBACKUP | 336 | -#ifndef UNIV_HOTBACKUP |
905 | 337 | +#ifdef UNDEFINED | 337 | +#ifdef UNDEFINED |
907 | 338 | if (success) { | 338 | if (success && !recv_recovery_on) { |
908 | 339 | mtr_t mtr; | 339 | mtr_t mtr; |
909 | 340 | 340 | ||
911 | 341 | @@ -2836,7 +2863,7 @@ | 341 | @@ -2926,7 +2953,7 @@ |
912 | 342 | 342 | ||
913 | 343 | fil_node_create(path, size, space_id, FALSE); | 343 | fil_node_create(path, size, space_id, FALSE); |
914 | 344 | 344 | ||
915 | @@ -347,7 +347,7 @@ | |||
916 | 347 | { | 347 | { |
917 | 348 | mtr_t mtr; | 348 | mtr_t mtr; |
918 | 349 | 349 | ||
920 | 350 | @@ -3091,19 +3118,97 @@ | 350 | @@ -3181,19 +3208,97 @@ |
921 | 351 | "InnoDB: open the tablespace file ", stderr); | 351 | "InnoDB: open the tablespace file ", stderr); |
922 | 352 | ut_print_filename(stderr, filepath); | 352 | ut_print_filename(stderr, filepath); |
923 | 353 | fputs("!\n" | 353 | fputs("!\n" |
924 | @@ -455,7 +455,7 @@ | |||
925 | 455 | return(FALSE); | 455 | return(FALSE); |
926 | 456 | } | 456 | } |
927 | 457 | 457 | ||
929 | 458 | @@ -3335,7 +3440,7 @@ | 458 | @@ -3425,7 +3530,7 @@ |
930 | 459 | cannot be ok. */ | 459 | cannot be ok. */ |
931 | 460 | 460 | ||
932 | 461 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; | 461 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; |
933 | @@ -464,7 +464,7 @@ | |||
934 | 464 | if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { | 464 | if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { |
935 | 465 | fprintf(stderr, | 465 | fprintf(stderr, |
936 | 466 | "InnoDB: Error: the size of single-table tablespace" | 466 | "InnoDB: Error: the size of single-table tablespace" |
938 | 467 | @@ -3465,7 +3570,51 @@ | 467 | @@ -3555,7 +3660,51 @@ |
939 | 468 | 468 | ||
940 | 469 | fil_node_create(filepath, 0, space_id, FALSE); | 469 | fil_node_create(filepath, 0, space_id, FALSE); |
941 | 470 | func_exit: | 470 | func_exit: |
942 | @@ -517,7 +517,7 @@ | |||
943 | 517 | ut_free(buf2); | 517 | ut_free(buf2); |
944 | 518 | mem_free(filepath); | 518 | mem_free(filepath); |
945 | 519 | } | 519 | } |
947 | 520 | @@ -3476,7 +3625,7 @@ | 520 | @@ -3566,7 +3715,7 @@ |
948 | 521 | idea is to read as much good data as we can and jump over bad data. | 521 | idea is to read as much good data as we can and jump over bad data. |
949 | 522 | @return 0 if ok, -1 if error even after the retries, 1 if at the end | 522 | @return 0 if ok, -1 if error even after the retries, 1 if at the end |
950 | 523 | of the directory */ | 523 | of the directory */ |
951 | @@ -526,7 +526,7 @@ | |||
952 | 526 | int | 526 | int |
953 | 527 | fil_file_readdir_next_file( | 527 | fil_file_readdir_next_file( |
954 | 528 | /*=======================*/ | 528 | /*=======================*/ |
956 | 529 | @@ -3520,7 +3669,7 @@ | 529 | @@ -3610,7 +3759,7 @@ |
957 | 530 | @return DB_SUCCESS or error number */ | 530 | @return DB_SUCCESS or error number */ |
958 | 531 | UNIV_INTERN | 531 | UNIV_INTERN |
959 | 532 | ulint | 532 | ulint |
960 | @@ -535,7 +535,7 @@ | |||
961 | 535 | /*===================================*/ | 535 | /*===================================*/ |
962 | 536 | { | 536 | { |
963 | 537 | int ret; | 537 | int ret; |
965 | 538 | @@ -3576,7 +3725,9 @@ | 538 | @@ -3666,7 +3815,9 @@ |
966 | 539 | dbinfo.name); | 539 | dbinfo.name); |
967 | 540 | srv_normalize_path_for_win(dbpath); | 540 | srv_normalize_path_for_win(dbpath); |
968 | 541 | 541 | ||
969 | @@ -546,7 +546,7 @@ | |||
970 | 546 | 546 | ||
971 | 547 | if (dbdir != NULL) { | 547 | if (dbdir != NULL) { |
972 | 548 | /* printf("Opened dir %s\n", dbinfo.name); */ | 548 | /* printf("Opened dir %s\n", dbinfo.name); */ |
974 | 549 | @@ -3602,8 +3753,11 @@ | 549 | @@ -3692,8 +3843,11 @@ |
975 | 550 | ".ibd")) { | 550 | ".ibd")) { |
976 | 551 | /* The name ends in .ibd; try opening | 551 | /* The name ends in .ibd; try opening |
977 | 552 | the file */ | 552 | the file */ |
978 | @@ -559,7 +559,7 @@ | |||
979 | 559 | } | 559 | } |
980 | 560 | next_file_item: | 560 | next_file_item: |
981 | 561 | ret = fil_file_readdir_next_file(&err, | 561 | ret = fil_file_readdir_next_file(&err, |
983 | 562 | @@ -3775,15 +3929,97 @@ | 562 | @@ -3865,15 +4019,97 @@ |
984 | 563 | "InnoDB: in InnoDB data dictionary" | 563 | "InnoDB: in InnoDB data dictionary" |
985 | 564 | " has tablespace id %lu,\n" | 564 | " has tablespace id %lu,\n" |
986 | 565 | "InnoDB: but tablespace with that id" | 565 | "InnoDB: but tablespace with that id" |
987 | @@ -665,7 +665,7 @@ | |||
988 | 665 | } else { | 665 | } else { |
989 | 666 | ut_print_timestamp(stderr); | 666 | ut_print_timestamp(stderr); |
990 | 667 | fputs(" InnoDB: Error: table ", stderr); | 667 | fputs(" InnoDB: Error: table ", stderr); |
992 | 668 | @@ -4172,7 +4408,7 @@ | 668 | @@ -4262,7 +4498,7 @@ |
993 | 669 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys | 669 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
994 | 670 | mutex. */ | 670 | mutex. */ |
995 | 671 | static | 671 | static |
996 | @@ -674,7 +674,7 @@ | |||
997 | 674 | fil_node_prepare_for_io( | 674 | fil_node_prepare_for_io( |
998 | 675 | /*====================*/ | 675 | /*====================*/ |
999 | 676 | fil_node_t* node, /*!< in: file node */ | 676 | fil_node_t* node, /*!< in: file node */ |
1001 | 677 | @@ -4192,10 +4428,13 @@ | 677 | @@ -4282,10 +4518,13 @@ |
1002 | 678 | } | 678 | } |
1003 | 679 | 679 | ||
1004 | 680 | if (node->open == FALSE) { | 680 | if (node->open == FALSE) { |
1005 | @@ -689,7 +689,7 @@ | |||
1006 | 689 | } | 689 | } |
1007 | 690 | 690 | ||
1008 | 691 | if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE | 691 | if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE |
1010 | 692 | @@ -4208,6 +4447,8 @@ | 692 | @@ -4298,6 +4537,8 @@ |
1011 | 693 | } | 693 | } |
1012 | 694 | 694 | ||
1013 | 695 | node->n_pending++; | 695 | node->n_pending++; |
1014 | @@ -698,7 +698,7 @@ | |||
1015 | 698 | } | 698 | } |
1016 | 699 | 699 | ||
1017 | 700 | /********************************************************************//** | 700 | /********************************************************************//** |
1019 | 701 | @@ -4390,6 +4631,16 @@ | 701 | @@ -4482,6 +4723,16 @@ |
1020 | 702 | 702 | ||
1021 | 703 | ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE)); | 703 | ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE)); |
1022 | 704 | 704 | ||
1023 | @@ -715,9 +715,29 @@ | |||
1024 | 715 | node = UT_LIST_GET_FIRST(space->chain); | 715 | node = UT_LIST_GET_FIRST(space->chain); |
1025 | 716 | 716 | ||
1026 | 717 | for (;;) { | 717 | for (;;) { |
1027 | 718 | @@ -4997,6 +5248,12 @@ | ||
1028 | 719 | const char* tmp_name) /*!< in: temp table name used while | ||
1029 | 720 | swapping */ | ||
1030 | 721 | { | ||
1031 | 722 | + (void)old_space_id; | ||
1032 | 723 | + (void)old_name; | ||
1033 | 724 | + (void)new_space_id; | ||
1034 | 725 | + (void)new_name; | ||
1035 | 726 | + (void)tmp_name; | ||
1036 | 727 | +#ifdef UNDEFINED | ||
1037 | 728 | mtr_t mtr; | ||
1038 | 729 | mtr_start(&mtr); | ||
1039 | 730 | fil_op_write_log(MLOG_FILE_RENAME, old_space_id, | ||
1040 | 731 | @@ -5004,5 +5261,6 @@ | ||
1041 | 732 | fil_op_write_log(MLOG_FILE_RENAME, new_space_id, | ||
1042 | 733 | 0, 0, new_name, old_name, &mtr); | ||
1043 | 734 | mtr_commit(&mtr); | ||
1044 | 735 | +#endif | ||
1045 | 736 | } | ||
1046 | 737 | |||
1047 | 718 | --- a/storage/innobase/ibuf/ibuf0ibuf.c | 738 | --- a/storage/innobase/ibuf/ibuf0ibuf.c |
1048 | 719 | +++ b/storage/innobase/ibuf/ibuf0ibuf.c | 739 | +++ b/storage/innobase/ibuf/ibuf0ibuf.c |
1050 | 720 | @@ -1148,6 +1148,9 @@ | 740 | @@ -1157,6 +1157,9 @@ |
1051 | 721 | ut_ad(!recv_no_ibuf_operations); | 741 | ut_ad(!recv_no_ibuf_operations); |
1052 | 722 | ut_ad(x_latch || mtr == NULL); | 742 | ut_ad(x_latch || mtr == NULL); |
1053 | 723 | 743 | ||
1054 | @@ -727,7 +747,7 @@ | |||
1055 | 727 | if (ibuf_fixed_addr_page(space, zip_size, page_no)) { | 747 | if (ibuf_fixed_addr_page(space, zip_size, page_no)) { |
1056 | 728 | 748 | ||
1057 | 729 | return(TRUE); | 749 | return(TRUE); |
1059 | 730 | @@ -2715,6 +2718,9 @@ | 750 | @@ -2729,6 +2732,9 @@ |
1060 | 731 | ulint n_bytes; | 751 | ulint n_bytes; |
1061 | 732 | ulint n_pag2; | 752 | ulint n_pag2; |
1062 | 733 | 753 | ||
1063 | @@ -739,7 +759,7 @@ | |||
1064 | 739 | 759 | ||
1065 | 740 | --- a/storage/innobase/include/fil0fil.h | 760 | --- a/storage/innobase/include/fil0fil.h |
1066 | 741 | +++ b/storage/innobase/include/fil0fil.h | 761 | +++ b/storage/innobase/include/fil0fil.h |
1068 | 742 | @@ -505,7 +505,7 @@ | 762 | @@ -513,7 +513,7 @@ |
1069 | 743 | @return DB_SUCCESS or error number */ | 763 | @return DB_SUCCESS or error number */ |
1070 | 744 | UNIV_INTERN | 764 | UNIV_INTERN |
1071 | 745 | ulint | 765 | ulint |
1072 | @@ -803,16 +823,16 @@ | |||
1073 | 803 | 823 | ||
1074 | 804 | if (log_sys->n_pending_checkpoint_writes > 0) { | 824 | if (log_sys->n_pending_checkpoint_writes > 0) { |
1075 | 805 | /* A checkpoint write is running */ | 825 | /* A checkpoint write is running */ |
1077 | 806 | @@ -3114,6 +3116,7 @@ | 826 | @@ -3141,6 +3143,7 @@ |
1078 | 807 | shutdown, because the InnoDB layer may have committed or | 827 | shutdown, because the InnoDB layer may have committed or |
1079 | 808 | prepared transactions and we don't want to lose them. */ | 828 | prepared transactions and we don't want to lose them. */ |
1080 | 809 | 829 | ||
1081 | 810 | + if (!srv_apply_log_only) { | 830 | + if (!srv_apply_log_only) { |
1082 | 811 | server_busy = trx_n_mysql_transactions > 0 | 831 | server_busy = trx_n_mysql_transactions > 0 |
1083 | 812 | || UT_LIST_GET_LEN(trx_sys->trx_list) > trx_n_prepared; | 832 | || UT_LIST_GET_LEN(trx_sys->trx_list) > trx_n_prepared; |
1087 | 813 | mutex_exit(&kernel_mutex); | 833 | |
1088 | 814 | @@ -3121,6 +3124,10 @@ | 834 | @@ -3193,6 +3196,10 @@ |
1089 | 815 | if (server_busy || srv_is_any_background_thread_active()) { | 835 | |
1090 | 816 | goto loop; | 836 | goto loop; |
1091 | 817 | } | 837 | } |
1092 | 818 | + } | 838 | + } |
1093 | @@ -902,7 +922,7 @@ | |||
1094 | 902 | ibool | 922 | ibool |
1095 | 903 | log_block_checksum_is_ok_or_old_format( | 923 | log_block_checksum_is_ok_or_old_format( |
1096 | 904 | /*===================================*/ | 924 | /*===================================*/ |
1098 | 905 | @@ -1496,6 +1497,7 @@ | 925 | @@ -1502,6 +1503,7 @@ |
1099 | 906 | buf_block_get_page_no(block)); | 926 | buf_block_get_page_no(block)); |
1100 | 907 | 927 | ||
1101 | 908 | if ((recv_addr == NULL) | 928 | if ((recv_addr == NULL) |
1102 | @@ -910,7 +930,7 @@ | |||
1103 | 910 | || (recv_addr->state == RECV_BEING_PROCESSED) | 930 | || (recv_addr->state == RECV_BEING_PROCESSED) |
1104 | 911 | || (recv_addr->state == RECV_PROCESSED)) { | 931 | || (recv_addr->state == RECV_PROCESSED)) { |
1105 | 912 | 932 | ||
1107 | 913 | @@ -1585,9 +1587,16 @@ | 933 | @@ -1591,9 +1593,16 @@ |
1108 | 914 | if (page_zip) { | 934 | if (page_zip) { |
1109 | 915 | memset(FIL_PAGE_LSN + page_zip->data, 0, 8); | 935 | memset(FIL_PAGE_LSN + page_zip->data, 0, 8); |
1110 | 916 | } | 936 | } |
1111 | @@ -928,7 +948,7 @@ | |||
1112 | 928 | 948 | ||
1113 | 929 | ib_uint64_t end_lsn; | 949 | ib_uint64_t end_lsn; |
1114 | 930 | 950 | ||
1116 | 931 | @@ -1774,6 +1783,18 @@ | 951 | @@ -1780,6 +1789,18 @@ |
1117 | 932 | ulint zip_size = fil_space_get_zip_size(space); | 952 | ulint zip_size = fil_space_get_zip_size(space); |
1118 | 933 | ulint page_no = recv_addr->page_no; | 953 | ulint page_no = recv_addr->page_no; |
1119 | 934 | 954 | ||
1120 | @@ -947,7 +967,7 @@ | |||
1121 | 947 | if (recv_addr->state == RECV_NOT_PROCESSED) { | 967 | if (recv_addr->state == RECV_NOT_PROCESSED) { |
1122 | 948 | if (!has_printed) { | 968 | if (!has_printed) { |
1123 | 949 | ut_print_timestamp(stderr); | 969 | ut_print_timestamp(stderr); |
1125 | 950 | @@ -1807,7 +1828,7 @@ | 970 | @@ -1813,7 +1834,7 @@ |
1126 | 951 | 971 | ||
1127 | 952 | mutex_enter(&(recv_sys->mutex)); | 972 | mutex_enter(&(recv_sys->mutex)); |
1128 | 953 | } | 973 | } |
1129 | @@ -956,7 +976,7 @@ | |||
1130 | 956 | recv_addr = HASH_GET_NEXT(addr_hash, recv_addr); | 976 | recv_addr = HASH_GET_NEXT(addr_hash, recv_addr); |
1131 | 957 | } | 977 | } |
1132 | 958 | 978 | ||
1134 | 959 | @@ -2308,7 +2329,7 @@ | 979 | @@ -2314,7 +2335,7 @@ |
1135 | 960 | || type == MLOG_FILE_RENAME | 980 | || type == MLOG_FILE_RENAME |
1136 | 961 | || type == MLOG_FILE_DELETE) { | 981 | || type == MLOG_FILE_DELETE) { |
1137 | 962 | ut_a(space); | 982 | ut_a(space); |
1138 | @@ -965,7 +985,7 @@ | |||
1139 | 965 | if (recv_replay_file_ops) { | 985 | if (recv_replay_file_ops) { |
1140 | 966 | 986 | ||
1141 | 967 | /* In ibbackup --apply-log, replay an .ibd file | 987 | /* In ibbackup --apply-log, replay an .ibd file |
1143 | 968 | @@ -2331,7 +2352,7 @@ | 988 | @@ -2337,7 +2358,7 @@ |
1144 | 969 | ut_error; | 989 | ut_error; |
1145 | 970 | } | 990 | } |
1146 | 971 | } | 991 | } |
1147 | @@ -974,7 +994,7 @@ | |||
1148 | 974 | /* In normal mysqld crash recovery we do not try to | 994 | /* In normal mysqld crash recovery we do not try to |
1149 | 975 | replay file operations */ | 995 | replay file operations */ |
1150 | 976 | #ifdef UNIV_LOG_LSN_DEBUG | 996 | #ifdef UNIV_LOG_LSN_DEBUG |
1152 | 977 | @@ -2748,8 +2769,11 @@ | 997 | @@ -2754,8 +2775,11 @@ |
1153 | 978 | 998 | ||
1154 | 979 | fprintf(stderr, | 999 | fprintf(stderr, |
1155 | 980 | "InnoDB: Doing recovery: scanned up to" | 1000 | "InnoDB: Doing recovery: scanned up to" |
1156 | @@ -988,7 +1008,7 @@ | |||
1157 | 988 | } | 1008 | } |
1158 | 989 | } | 1009 | } |
1159 | 990 | 1010 | ||
1161 | 991 | @@ -2854,7 +2878,7 @@ | 1011 | @@ -2860,7 +2884,7 @@ |
1162 | 992 | "InnoDB: Reading tablespace information" | 1012 | "InnoDB: Reading tablespace information" |
1163 | 993 | " from the .ibd files...\n"); | 1013 | " from the .ibd files...\n"); |
1164 | 994 | 1014 | ||
1165 | @@ -997,7 +1017,7 @@ | |||
1166 | 997 | 1017 | ||
1167 | 998 | /* If we are using the doublewrite method, we will | 1018 | /* If we are using the doublewrite method, we will |
1168 | 999 | check if there are half-written pages in data files, | 1019 | check if there are half-written pages in data files, |
1170 | 1000 | @@ -2863,12 +2887,14 @@ | 1020 | @@ -2869,12 +2893,14 @@ |
1171 | 1001 | 1021 | ||
1172 | 1002 | if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { | 1022 | if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { |
1173 | 1003 | 1023 | ||
1174 | @@ -1013,7 +1033,7 @@ | |||
1175 | 1013 | } | 1033 | } |
1176 | 1014 | } | 1034 | } |
1177 | 1015 | 1035 | ||
1179 | 1016 | @@ -3018,6 +3044,7 @@ | 1036 | @@ -3024,6 +3050,7 @@ |
1180 | 1017 | recv_sys->recovered_lsn = checkpoint_lsn; | 1037 | recv_sys->recovered_lsn = checkpoint_lsn; |
1181 | 1018 | 1038 | ||
1182 | 1019 | srv_start_lsn = checkpoint_lsn; | 1039 | srv_start_lsn = checkpoint_lsn; |
1183 | @@ -1021,7 +1041,7 @@ | |||
1184 | 1021 | } | 1041 | } |
1185 | 1022 | 1042 | ||
1186 | 1023 | contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn, | 1043 | contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn, |
1188 | 1024 | @@ -3299,6 +3326,7 @@ | 1044 | @@ -3305,6 +3332,7 @@ |
1189 | 1025 | that the data dictionary tables will be free of any locks. | 1045 | that the data dictionary tables will be free of any locks. |
1190 | 1026 | The data dictionary latch should guarantee that there is at | 1046 | The data dictionary latch should guarantee that there is at |
1191 | 1027 | most one data dictionary transaction active at a time. */ | 1047 | most one data dictionary transaction active at a time. */ |
1192 | @@ -1031,7 +1051,7 @@ | |||
1193 | 1031 | 1051 | ||
1194 | 1032 | --- a/storage/innobase/os/os0file.c | 1052 | --- a/storage/innobase/os/os0file.c |
1195 | 1033 | +++ b/storage/innobase/os/os0file.c | 1053 | +++ b/storage/innobase/os/os0file.c |
1197 | 1034 | @@ -656,7 +656,7 @@ | 1054 | @@ -658,7 +658,7 @@ |
1198 | 1035 | } | 1055 | } |
1199 | 1036 | 1056 | ||
1200 | 1037 | #undef USE_FILE_LOCK | 1057 | #undef USE_FILE_LOCK |
1201 | @@ -1040,7 +1060,7 @@ | |||
1202 | 1040 | #if defined(UNIV_HOTBACKUP) || defined(__WIN__) | 1060 | #if defined(UNIV_HOTBACKUP) || defined(__WIN__) |
1203 | 1041 | /* InnoDB Hot Backup does not lock the data files. | 1061 | /* InnoDB Hot Backup does not lock the data files. |
1204 | 1042 | * On Windows, mandatory locking is used. | 1062 | * On Windows, mandatory locking is used. |
1206 | 1043 | @@ -1456,8 +1456,9 @@ | 1063 | @@ -1465,8 +1465,9 @@ |
1207 | 1044 | attributes = 0; | 1064 | attributes = 0; |
1208 | 1045 | ut_error; | 1065 | ut_error; |
1209 | 1046 | } | 1066 | } |
1210 | @@ -1051,7 +1071,7 @@ | |||
1211 | 1051 | GENERIC_READ | GENERIC_WRITE, /* read and write | 1071 | GENERIC_READ | GENERIC_WRITE, /* read and write |
1212 | 1052 | access */ | 1072 | access */ |
1213 | 1053 | share_mode, /* File can be read also by other | 1073 | share_mode, /* File can be read also by other |
1215 | 1054 | @@ -1516,7 +1517,11 @@ | 1074 | @@ -1531,7 +1532,11 @@ |
1216 | 1055 | if (create_mode == OS_FILE_OPEN || create_mode == OS_FILE_OPEN_RAW | 1075 | if (create_mode == OS_FILE_OPEN || create_mode == OS_FILE_OPEN_RAW |
1217 | 1056 | || create_mode == OS_FILE_OPEN_RETRY) { | 1076 | || create_mode == OS_FILE_OPEN_RETRY) { |
1218 | 1057 | mode_str = "OPEN"; | 1077 | mode_str = "OPEN"; |
1219 | @@ -1064,7 +1084,7 @@ | |||
1220 | 1064 | } else if (create_mode == OS_FILE_CREATE) { | 1084 | } else if (create_mode == OS_FILE_CREATE) { |
1221 | 1065 | mode_str = "CREATE"; | 1085 | mode_str = "CREATE"; |
1222 | 1066 | create_flag = O_RDWR | O_CREAT | O_EXCL; | 1086 | create_flag = O_RDWR | O_CREAT | O_EXCL; |
1224 | 1067 | @@ -2694,6 +2699,9 @@ | 1087 | @@ -2709,6 +2714,9 @@ |
1225 | 1068 | ut_a((offset & 0xFFFFFFFFUL) == offset); | 1088 | ut_a((offset & 0xFFFFFFFFUL) == offset); |
1226 | 1069 | ut_a((n & 0xFFFFFFFFUL) == n); | 1089 | ut_a((n & 0xFFFFFFFFUL) == n); |
1227 | 1070 | 1090 | ||
1228 | @@ -1074,7 +1094,7 @@ | |||
1229 | 1074 | os_n_file_writes++; | 1094 | os_n_file_writes++; |
1230 | 1075 | 1095 | ||
1231 | 1076 | ut_ad(file); | 1096 | ut_ad(file); |
1233 | 1077 | @@ -2818,6 +2826,9 @@ | 1097 | @@ -2833,6 +2841,9 @@ |
1234 | 1078 | #else | 1098 | #else |
1235 | 1079 | ssize_t ret; | 1099 | ssize_t ret; |
1236 | 1080 | 1100 | ||
1237 | @@ -1105,7 +1125,7 @@ | |||
1238 | 1105 | } | 1125 | } |
1239 | 1106 | --- a/storage/innobase/srv/srv0srv.c | 1126 | --- a/storage/innobase/srv/srv0srv.c |
1240 | 1107 | +++ b/storage/innobase/srv/srv0srv.c | 1127 | +++ b/storage/innobase/srv/srv0srv.c |
1242 | 1108 | @@ -399,6 +399,10 @@ | 1128 | @@ -405,6 +405,10 @@ |
1243 | 1109 | 1129 | ||
1244 | 1110 | UNIV_INTERN ulong srv_replication_delay = 0; | 1130 | UNIV_INTERN ulong srv_replication_delay = 0; |
1245 | 1111 | 1131 | ||
1246 | @@ -1116,7 +1136,7 @@ | |||
1247 | 1116 | /*-------------------------------------------*/ | 1136 | /*-------------------------------------------*/ |
1248 | 1117 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; | 1137 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; |
1249 | 1118 | UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; | 1138 | UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; |
1251 | 1119 | @@ -1078,7 +1082,7 @@ | 1139 | @@ -1084,7 +1088,7 @@ |
1252 | 1120 | } | 1140 | } |
1253 | 1121 | 1141 | ||
1254 | 1122 | /* Initialize some INFORMATION SCHEMA internal structures */ | 1142 | /* Initialize some INFORMATION SCHEMA internal structures */ |
1255 | @@ -1125,7 +1145,7 @@ | |||
1256 | 1125 | } | 1145 | } |
1257 | 1126 | 1146 | ||
1258 | 1127 | /*********************************************************************//** | 1147 | /*********************************************************************//** |
1260 | 1128 | @@ -1089,6 +1093,7 @@ | 1148 | @@ -1095,6 +1099,7 @@ |
1261 | 1129 | /*==========*/ | 1149 | /*==========*/ |
1262 | 1130 | { | 1150 | { |
1263 | 1131 | os_fast_mutex_free(&srv_conc_mutex); | 1151 | os_fast_mutex_free(&srv_conc_mutex); |
1264 | @@ -1133,7 +1153,7 @@ | |||
1265 | 1133 | mem_free(srv_conc_slots); | 1153 | mem_free(srv_conc_slots); |
1266 | 1134 | srv_conc_slots = NULL; | 1154 | srv_conc_slots = NULL; |
1267 | 1135 | 1155 | ||
1269 | 1136 | @@ -1102,6 +1107,7 @@ | 1156 | @@ -1108,6 +1113,7 @@ |
1270 | 1137 | srv_mysql_table = NULL; | 1157 | srv_mysql_table = NULL; |
1271 | 1138 | 1158 | ||
1272 | 1139 | trx_i_s_cache_free(trx_i_s_cache); | 1159 | trx_i_s_cache_free(trx_i_s_cache); |
1273 | @@ -1141,7 +1161,7 @@ | |||
1274 | 1141 | } | 1161 | } |
1275 | 1142 | 1162 | ||
1276 | 1143 | /*********************************************************************//** | 1163 | /*********************************************************************//** |
1278 | 1144 | @@ -1717,7 +1723,7 @@ | 1164 | @@ -1727,7 +1733,7 @@ |
1279 | 1145 | } | 1165 | } |
1280 | 1146 | 1166 | ||
1281 | 1147 | /* Record the lock wait time for this thread */ | 1167 | /* Record the lock wait time for this thread */ |
1282 | @@ -1187,7 +1207,7 @@ | |||
1283 | 1187 | ulint | 1207 | ulint |
1284 | 1188 | open_or_create_data_files( | 1208 | open_or_create_data_files( |
1285 | 1189 | /*======================*/ | 1209 | /*======================*/ |
1287 | 1190 | @@ -1419,7 +1422,7 @@ | 1210 | @@ -1448,7 +1451,7 @@ |
1288 | 1191 | } | 1211 | } |
1289 | 1192 | #endif /* UNIV_LOG_ARCHIVE */ | 1212 | #endif /* UNIV_LOG_ARCHIVE */ |
1290 | 1193 | 1213 | ||
1291 | @@ -1196,7 +1216,7 @@ | |||
1292 | 1196 | ut_print_timestamp(stderr); | 1216 | ut_print_timestamp(stderr); |
1293 | 1197 | fprintf(stderr, | 1217 | fprintf(stderr, |
1294 | 1198 | " InnoDB: Error: combined size of log files" | 1218 | " InnoDB: Error: combined size of log files" |
1296 | 1199 | @@ -1714,6 +1717,10 @@ | 1219 | @@ -1743,6 +1746,10 @@ |
1297 | 1200 | are initialized in trx_sys_init_at_db_start(). */ | 1220 | are initialized in trx_sys_init_at_db_start(). */ |
1298 | 1201 | 1221 | ||
1299 | 1202 | recv_recovery_from_checkpoint_finish(); | 1222 | recv_recovery_from_checkpoint_finish(); |
1300 | @@ -1207,7 +1227,7 @@ | |||
1301 | 1207 | if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) { | 1227 | if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) { |
1302 | 1208 | /* The following call is necessary for the insert | 1228 | /* The following call is necessary for the insert |
1303 | 1209 | buffer to work with multiple tablespaces. We must | 1229 | buffer to work with multiple tablespaces. We must |
1305 | 1210 | @@ -1873,6 +1880,17 @@ | 1230 | @@ -1902,6 +1909,17 @@ |
1306 | 1211 | if (!srv_auto_extend_last_data_file | 1231 | if (!srv_auto_extend_last_data_file |
1307 | 1212 | && sum_of_data_file_sizes != tablespace_size_in_header) { | 1232 | && sum_of_data_file_sizes != tablespace_size_in_header) { |
1308 | 1213 | 1233 | ||
1309 | @@ -1225,7 +1245,7 @@ | |||
1310 | 1225 | ut_print_timestamp(stderr); | 1245 | ut_print_timestamp(stderr); |
1311 | 1226 | fprintf(stderr, | 1246 | fprintf(stderr, |
1312 | 1227 | " InnoDB: Error: tablespace size" | 1247 | " InnoDB: Error: tablespace size" |
1314 | 1228 | @@ -1952,6 +1970,7 @@ | 1248 | @@ -1981,6 +1999,7 @@ |
1315 | 1229 | 1249 | ||
1316 | 1230 | return(DB_ERROR); | 1250 | return(DB_ERROR); |
1317 | 1231 | } | 1251 | } |
1318 | @@ -1233,7 +1253,7 @@ | |||
1319 | 1233 | } | 1253 | } |
1320 | 1234 | 1254 | ||
1321 | 1235 | /* Check that os_fast_mutexes work as expected */ | 1255 | /* Check that os_fast_mutexes work as expected */ |
1323 | 1236 | @@ -1976,6 +1995,10 @@ | 1256 | @@ -2005,6 +2024,10 @@ |
1324 | 1237 | 1257 | ||
1325 | 1238 | os_fast_mutex_free(&srv_os_test_mutex); | 1258 | os_fast_mutex_free(&srv_os_test_mutex); |
1326 | 1239 | 1259 | ||
1327 | @@ -1244,7 +1264,7 @@ | |||
1328 | 1244 | if (srv_print_verbose_log) { | 1264 | if (srv_print_verbose_log) { |
1329 | 1245 | ut_print_timestamp(stderr); | 1265 | ut_print_timestamp(stderr); |
1330 | 1246 | fprintf(stderr, | 1266 | fprintf(stderr, |
1332 | 1247 | @@ -2064,6 +2087,7 @@ | 1267 | @@ -2093,6 +2116,7 @@ |
1333 | 1248 | ibuf_update_max_tablespace_id(); | 1268 | ibuf_update_max_tablespace_id(); |
1334 | 1249 | } | 1269 | } |
1335 | 1250 | 1270 | ||
1336 | @@ -1268,7 +1288,7 @@ | |||
1337 | 1268 | 1288 | ||
1338 | 1269 | --- a/storage/innobase/trx/trx0sys.c | 1289 | --- a/storage/innobase/trx/trx0sys.c |
1339 | 1270 | +++ b/storage/innobase/trx/trx0sys.c | 1290 | +++ b/storage/innobase/trx/trx0sys.c |
1341 | 1271 | @@ -1655,12 +1655,14 @@ | 1291 | @@ -1656,12 +1656,14 @@ |
1342 | 1272 | mem_free(trx_doublewrite); | 1292 | mem_free(trx_doublewrite); |
1343 | 1273 | trx_doublewrite = NULL; | 1293 | trx_doublewrite = NULL; |
1344 | 1274 | 1294 | ||
1345 | @@ -1283,7 +1303,7 @@ | |||
1346 | 1283 | 1303 | ||
1347 | 1284 | /* There can't be any active transactions. */ | 1304 | /* There can't be any active transactions. */ |
1348 | 1285 | rseg = UT_LIST_GET_FIRST(trx_sys->rseg_list); | 1305 | rseg = UT_LIST_GET_FIRST(trx_sys->rseg_list); |
1350 | 1286 | @@ -1686,10 +1688,12 @@ | 1306 | @@ -1687,10 +1689,12 @@ |
1351 | 1287 | UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view); | 1307 | UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view); |
1352 | 1288 | } | 1308 | } |
1353 | 1289 | 1309 | ||
1354 | @@ -1325,7 +1345,7 @@ | |||
1355 | 1325 | "InnoDB: Since" | 1345 | "InnoDB: Since" |
1356 | 1326 | --- a/storage/innobase/trx/trx0purge.c | 1346 | --- a/storage/innobase/trx/trx0purge.c |
1357 | 1327 | +++ b/storage/innobase/trx/trx0purge.c | 1347 | +++ b/storage/innobase/trx/trx0purge.c |
1359 | 1328 | @@ -1129,6 +1129,9 @@ | 1348 | @@ -1141,6 +1141,9 @@ |
1360 | 1329 | que_thr_t* thr; | 1349 | que_thr_t* thr; |
1361 | 1330 | ulint old_pages_handled; | 1350 | ulint old_pages_handled; |
1362 | 1331 | 1351 | ||
1363 | @@ -1335,19 +1355,6 @@ | |||
1364 | 1335 | ut_a(purge_sys->trx->n_active_thrs == 0); | 1355 | ut_a(purge_sys->trx->n_active_thrs == 0); |
1365 | 1336 | 1356 | ||
1366 | 1337 | rw_lock_x_lock(&purge_sys->latch); | 1357 | rw_lock_x_lock(&purge_sys->latch); |
1367 | 1338 | --- a/configure.cmake | ||
1368 | 1339 | +++ b/configure.cmake | ||
1369 | 1340 | @@ -149,7 +149,9 @@ | ||
1370 | 1341 | SET(CMAKE_REQUIRED_LIBRARIES | ||
1371 | 1342 | ${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT}) | ||
1372 | 1343 | |||
1373 | 1344 | - LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES) | ||
1374 | 1345 | + IF(CMAKE_REQUIRED_LIBRARIES) | ||
1375 | 1346 | + LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES) | ||
1376 | 1347 | + ENDIF() | ||
1377 | 1348 | LINK_LIBRARIES(${CMAKE_THREAD_LIBS_INIT}) | ||
1378 | 1349 | |||
1379 | 1350 | OPTION(WITH_LIBWRAP "Compile with tcp wrappers support" OFF) | ||
1380 | 1351 | --- a/storage/innobase/sync/sync0arr.c | 1358 | --- a/storage/innobase/sync/sync0arr.c |
1381 | 1352 | +++ b/storage/innobase/sync/sync0arr.c | 1359 | +++ b/storage/innobase/sync/sync0arr.c |
1382 | 1353 | @@ -41,6 +41,7 @@ | 1360 | @@ -41,6 +41,7 @@ |
1383 | @@ -1358,9 +1365,9 @@ | |||
1384 | 1358 | 1365 | ||
1385 | 1359 | /* | 1366 | /* |
1386 | 1360 | WAIT ARRAY | 1367 | WAIT ARRAY |
1390 | 1361 | @@ -928,6 +929,13 @@ | 1368 | @@ -929,6 +930,13 @@ |
1391 | 1362 | ibool fatal = FALSE; | 1369 | return(FALSE); |
1392 | 1363 | double longest_diff = 0; | 1370 | } |
1393 | 1364 | 1371 | ||
1394 | 1365 | + if (srv_rebuild_indexes) { | 1372 | + if (srv_rebuild_indexes) { |
1395 | 1366 | + | 1373 | + |
1396 | @@ -1374,7 +1381,7 @@ | |||
1397 | 1374 | extremely slowly. UNIV_DEBUG_VALGRIND does not necessary mean that | 1381 | extremely slowly. UNIV_DEBUG_VALGRIND does not necessary mean that |
1398 | 1375 | --- a/storage/innobase/include/buf0buf.h | 1382 | --- a/storage/innobase/include/buf0buf.h |
1399 | 1376 | +++ b/storage/innobase/include/buf0buf.h | 1383 | +++ b/storage/innobase/include/buf0buf.h |
1401 | 1377 | @@ -1441,6 +1441,8 @@ | 1384 | @@ -1531,6 +1531,8 @@ |
1402 | 1378 | frees a page in buffer pool */ | 1385 | frees a page in buffer pool */ |
1403 | 1379 | # endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ | 1386 | # endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ |
1404 | 1380 | #endif /* !UNIV_HOTBACKUP */ | 1387 | #endif /* !UNIV_HOTBACKUP */ |
1405 | @@ -1385,7 +1392,7 @@ | |||
1406 | 1385 | /** The buffer control block structure */ | 1392 | /** The buffer control block structure */ |
1407 | 1386 | --- a/storage/innobase/mem/mem0dbg.c | 1393 | --- a/storage/innobase/mem/mem0dbg.c |
1408 | 1387 | +++ b/storage/innobase/mem/mem0dbg.c | 1394 | +++ b/storage/innobase/mem/mem0dbg.c |
1410 | 1388 | @@ -280,18 +280,10 @@ | 1395 | @@ -282,18 +282,10 @@ |
1411 | 1389 | byte* buf, /*!< in: pointer to buffer */ | 1396 | byte* buf, /*!< in: pointer to buffer */ |
1412 | 1390 | ulint n) /*!< in: length of buffer */ | 1397 | ulint n) /*!< in: length of buffer */ |
1413 | 1391 | { | 1398 | { |
1414 | @@ -1406,7 +1413,7 @@ | |||
1415 | 1406 | 1413 | ||
1416 | 1407 | UNIV_MEM_INVALID(buf, n); | 1414 | UNIV_MEM_INVALID(buf, n); |
1417 | 1408 | } | 1415 | } |
1419 | 1409 | @@ -306,17 +298,10 @@ | 1416 | @@ -308,17 +300,10 @@ |
1420 | 1410 | byte* buf, /*!< in: pointer to buffer */ | 1417 | byte* buf, /*!< in: pointer to buffer */ |
1421 | 1411 | ulint n) /*!< in: length of buffer */ | 1418 | ulint n) /*!< in: length of buffer */ |
1422 | 1412 | { | 1419 | { |
1423 | 1413 | 1420 | ||
1424 | === modified file 'patches/innodb56.patch' | |||
1425 | --- patches/innodb56.patch 2013-07-10 12:29:40 +0000 | |||
1426 | +++ patches/innodb56.patch 2013-07-22 14:01:36 +0000 | |||
1427 | @@ -52,7 +52,7 @@ | |||
1428 | 52 | block->in_unzip_LRU_list = FALSE; | 52 | block->in_unzip_LRU_list = FALSE; |
1429 | 53 | #endif /* UNIV_DEBUG */ | 53 | #endif /* UNIV_DEBUG */ |
1430 | 54 | #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG | 54 | #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG |
1432 | 55 | @@ -3951,6 +3959,13 @@ | 55 | @@ -3963,6 +3971,13 @@ |
1433 | 56 | frame = ((buf_block_t*) bpage)->frame; | 56 | frame = ((buf_block_t*) bpage)->frame; |
1434 | 57 | } | 57 | } |
1435 | 58 | 58 | ||
1436 | @@ -66,7 +66,7 @@ | |||
1437 | 66 | /* If this page is not uninitialized and not in the | 66 | /* If this page is not uninitialized and not in the |
1438 | 67 | doublewrite buffer, then the page number and space id | 67 | doublewrite buffer, then the page number and space id |
1439 | 68 | should be the same as in block. */ | 68 | should be the same as in block. */ |
1441 | 69 | @@ -4068,7 +4083,7 @@ | 69 | @@ -4080,7 +4095,7 @@ |
1442 | 70 | recv_recover_page(TRUE, (buf_block_t*) bpage); | 70 | recv_recover_page(TRUE, (buf_block_t*) bpage); |
1443 | 71 | } | 71 | } |
1444 | 72 | 72 | ||
1445 | @@ -177,7 +177,7 @@ | |||
1446 | 177 | } | 177 | } |
1447 | 178 | 178 | ||
1448 | 179 | /**********************************************************************//** | 179 | /**********************************************************************//** |
1450 | 180 | @@ -1491,7 +1510,12 @@ | 180 | @@ -1506,7 +1525,12 @@ |
1451 | 181 | the file yet; the following calls will open it and update the | 181 | the file yet; the following calls will open it and update the |
1452 | 182 | size fields */ | 182 | size fields */ |
1453 | 183 | 183 | ||
1454 | @@ -191,7 +191,7 @@ | |||
1455 | 191 | fil_node_complete_io(node, fil_system, OS_FILE_READ); | 191 | fil_node_complete_io(node, fil_system, OS_FILE_READ); |
1456 | 192 | } | 192 | } |
1457 | 193 | 193 | ||
1459 | 194 | @@ -2095,7 +2119,7 @@ | 194 | @@ -2109,7 +2133,7 @@ |
1460 | 195 | mem_free(path); | 195 | mem_free(path); |
1461 | 196 | } | 196 | } |
1462 | 197 | 197 | ||
1463 | @@ -200,7 +200,7 @@ | |||
1464 | 200 | /********************************************************//** | 200 | /********************************************************//** |
1465 | 201 | Writes a log record about an .ibd file create/rename/delete. */ | 201 | Writes a log record about an .ibd file create/rename/delete. */ |
1466 | 202 | static | 202 | static |
1468 | 203 | @@ -2329,7 +2353,7 @@ | 203 | @@ -2343,7 +2367,7 @@ |
1469 | 204 | space_id, name, path, flags, | 204 | space_id, name, path, flags, |
1470 | 205 | DICT_TF2_USE_TABLESPACE, | 205 | DICT_TF2_USE_TABLESPACE, |
1471 | 206 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { | 206 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { |
1472 | @@ -209,7 +209,7 @@ | |||
1473 | 209 | } | 209 | } |
1474 | 210 | } | 210 | } |
1475 | 211 | 211 | ||
1477 | 212 | @@ -2687,7 +2711,7 @@ | 212 | @@ -2702,7 +2726,7 @@ |
1478 | 213 | } | 213 | } |
1479 | 214 | 214 | ||
1480 | 215 | if (err == DB_SUCCESS) { | 215 | if (err == DB_SUCCESS) { |
1481 | @@ -218,7 +218,7 @@ | |||
1482 | 218 | /* Write a log record about the deletion of the .ibd | 218 | /* Write a log record about the deletion of the .ibd |
1483 | 219 | file, so that ibbackup can replay it in the | 219 | file, so that ibbackup can replay it in the |
1484 | 220 | --apply-log phase. We use a dummy mtr and the familiar | 220 | --apply-log phase. We use a dummy mtr and the familiar |
1486 | 221 | @@ -3042,7 +3066,7 @@ | 221 | @@ -3057,7 +3081,7 @@ |
1487 | 222 | 222 | ||
1488 | 223 | mutex_exit(&fil_system->mutex); | 223 | mutex_exit(&fil_system->mutex); |
1489 | 224 | 224 | ||
1490 | @@ -227,7 +227,7 @@ | |||
1491 | 227 | if (success && !recv_recovery_on) { | 227 | if (success && !recv_recovery_on) { |
1492 | 228 | mtr_t mtr; | 228 | mtr_t mtr; |
1493 | 229 | 229 | ||
1495 | 230 | @@ -3426,7 +3450,7 @@ | 230 | @@ -3441,7 +3465,7 @@ |
1496 | 231 | goto error_exit_1; | 231 | goto error_exit_1; |
1497 | 232 | } | 232 | } |
1498 | 233 | 233 | ||
1499 | @@ -236,7 +236,7 @@ | |||
1500 | 236 | { | 236 | { |
1501 | 237 | mtr_t mtr; | 237 | mtr_t mtr; |
1502 | 238 | ulint mlog_file_flag = 0; | 238 | ulint mlog_file_flag = 0; |
1504 | 239 | @@ -3504,6 +3528,97 @@ | 239 | @@ -3519,6 +3543,97 @@ |
1505 | 240 | #endif /* UNIV_LOG_ARCHIVE */ | 240 | #endif /* UNIV_LOG_ARCHIVE */ |
1506 | 241 | }; | 241 | }; |
1507 | 242 | 242 | ||
1508 | @@ -334,7 +334,7 @@ | |||
1509 | 334 | /********************************************************************//** | 334 | /********************************************************************//** |
1510 | 335 | Tries to open a single-table tablespace and optionally checks that the | 335 | Tries to open a single-table tablespace and optionally checks that the |
1511 | 336 | space id in it is correct. If this does not succeed, print an error message | 336 | space id in it is correct. If this does not succeed, print an error message |
1513 | 337 | @@ -3569,6 +3684,9 @@ | 337 | @@ -3584,6 +3699,9 @@ |
1514 | 338 | in the default location. If it is remote, it should not be here. */ | 338 | in the default location. If it is remote, it should not be here. */ |
1515 | 339 | def.filepath = fil_make_ibd_name(tablename, false); | 339 | def.filepath = fil_make_ibd_name(tablename, false); |
1516 | 340 | 340 | ||
1517 | @@ -344,7 +344,7 @@ | |||
1518 | 344 | /* The path_in was read from SYS_DATAFILES. */ | 344 | /* The path_in was read from SYS_DATAFILES. */ |
1519 | 345 | if (path_in) { | 345 | if (path_in) { |
1520 | 346 | if (strcmp(def.filepath, path_in)) { | 346 | if (strcmp(def.filepath, path_in)) { |
1522 | 347 | @@ -3616,6 +3734,7 @@ | 347 | @@ -3631,6 +3749,7 @@ |
1523 | 348 | tablespaces_found++; | 348 | tablespaces_found++; |
1524 | 349 | } | 349 | } |
1525 | 350 | } | 350 | } |
1526 | @@ -352,7 +352,7 @@ | |||
1527 | 352 | 352 | ||
1528 | 353 | /* Always look for a file at the default location. */ | 353 | /* Always look for a file at the default location. */ |
1529 | 354 | ut_a(def.filepath); | 354 | ut_a(def.filepath); |
1531 | 355 | @@ -3712,11 +3831,15 @@ | 355 | @@ -3727,11 +3846,15 @@ |
1532 | 356 | /* The following call prints an error message */ | 356 | /* The following call prints an error message */ |
1533 | 357 | os_file_get_last_error(true); | 357 | os_file_get_last_error(true); |
1534 | 358 | 358 | ||
1535 | @@ -369,7 +369,7 @@ | |||
1536 | 369 | 369 | ||
1537 | 370 | err = DB_CORRUPTION; | 370 | err = DB_CORRUPTION; |
1538 | 371 | 371 | ||
1540 | 372 | @@ -3974,6 +4097,9 @@ | 372 | @@ -3989,6 +4112,9 @@ |
1541 | 373 | #ifdef UNIV_HOTBACKUP | 373 | #ifdef UNIV_HOTBACKUP |
1542 | 374 | fil_space_t* space; | 374 | fil_space_t* space; |
1543 | 375 | #endif | 375 | #endif |
1544 | @@ -379,7 +379,7 @@ | |||
1545 | 379 | 379 | ||
1546 | 380 | memset(&def, 0, sizeof(def)); | 380 | memset(&def, 0, sizeof(def)); |
1547 | 381 | memset(&remote, 0, sizeof(remote)); | 381 | memset(&remote, 0, sizeof(remote)); |
1549 | 382 | @@ -4018,6 +4144,9 @@ | 382 | @@ -4033,6 +4159,9 @@ |
1550 | 383 | # endif /* !UNIV_HOTBACKUP */ | 383 | # endif /* !UNIV_HOTBACKUP */ |
1551 | 384 | #endif | 384 | #endif |
1552 | 385 | 385 | ||
1553 | @@ -389,7 +389,7 @@ | |||
1554 | 389 | /* Check for a link file which locates a remote tablespace. */ | 389 | /* Check for a link file which locates a remote tablespace. */ |
1555 | 390 | remote.success = fil_open_linked_file( | 390 | remote.success = fil_open_linked_file( |
1556 | 391 | tablename, &remote.filepath, &remote.file); | 391 | tablename, &remote.filepath, &remote.file); |
1558 | 392 | @@ -4028,8 +4157,20 @@ | 392 | @@ -4043,8 +4172,20 @@ |
1559 | 393 | if (!remote.success) { | 393 | if (!remote.success) { |
1560 | 394 | os_file_close(remote.file); | 394 | os_file_close(remote.file); |
1561 | 395 | mem_free(remote.filepath); | 395 | mem_free(remote.filepath); |
1562 | @@ -410,7 +410,7 @@ | |||
1563 | 410 | 410 | ||
1564 | 411 | 411 | ||
1565 | 412 | /* Try to open the tablespace in the datadir. */ | 412 | /* Try to open the tablespace in the datadir. */ |
1567 | 413 | @@ -4042,6 +4183,17 @@ | 413 | @@ -4057,6 +4198,17 @@ |
1568 | 414 | fil_validate_single_table_tablespace(tablename, &def); | 414 | fil_validate_single_table_tablespace(tablename, &def); |
1569 | 415 | if (!def.success) { | 415 | if (!def.success) { |
1570 | 416 | os_file_close(def.file); | 416 | os_file_close(def.file); |
1571 | @@ -428,7 +428,7 @@ | |||
1572 | 428 | } | 428 | } |
1573 | 429 | } | 429 | } |
1574 | 430 | 430 | ||
1576 | 431 | @@ -4114,7 +4266,7 @@ | 431 | @@ -4129,7 +4281,7 @@ |
1577 | 432 | /* At this point, only one tablespace is open */ | 432 | /* At this point, only one tablespace is open */ |
1578 | 433 | ut_a(def.success == !remote.success); | 433 | ut_a(def.success == !remote.success); |
1579 | 434 | 434 | ||
1580 | @@ -437,7 +437,7 @@ | |||
1581 | 437 | 437 | ||
1582 | 438 | /* Get and test the file size. */ | 438 | /* Get and test the file size. */ |
1583 | 439 | size = os_file_get_size(fsp->file); | 439 | size = os_file_get_size(fsp->file); |
1585 | 440 | @@ -4133,9 +4285,9 @@ | 440 | @@ -4148,9 +4300,9 @@ |
1586 | 441 | 441 | ||
1587 | 442 | /* Every .ibd file is created >= 4 pages in size. Smaller files | 442 | /* Every .ibd file is created >= 4 pages in size. Smaller files |
1588 | 443 | cannot be ok. */ | 443 | cannot be ok. */ |
1589 | @@ -449,7 +449,7 @@ | |||
1590 | 449 | ib_logf(IB_LOG_LEVEL_ERROR, | 449 | ib_logf(IB_LOG_LEVEL_ERROR, |
1591 | 450 | "The size of single-table tablespace file %s " | 450 | "The size of single-table tablespace file %s " |
1592 | 451 | "is only " UINT64PF ", should be at least %lu!", | 451 | "is only " UINT64PF ", should be at least %lu!", |
1594 | 452 | @@ -4216,7 +4368,7 @@ | 452 | @@ -4231,7 +4383,7 @@ |
1595 | 453 | } | 453 | } |
1596 | 454 | mutex_exit(&fil_system->mutex); | 454 | mutex_exit(&fil_system->mutex); |
1597 | 455 | #endif /* UNIV_HOTBACKUP */ | 455 | #endif /* UNIV_HOTBACKUP */ |
1598 | @@ -458,7 +458,7 @@ | |||
1599 | 458 | tablename, fsp->id, fsp->flags, FIL_TABLESPACE); | 458 | tablename, fsp->id, fsp->flags, FIL_TABLESPACE); |
1600 | 459 | 459 | ||
1601 | 460 | if (!file_space_create_success) { | 460 | if (!file_space_create_success) { |
1603 | 461 | @@ -4243,13 +4395,55 @@ | 461 | @@ -4258,13 +4410,55 @@ |
1604 | 462 | } | 462 | } |
1605 | 463 | 463 | ||
1606 | 464 | func_exit: | 464 | func_exit: |
1607 | @@ -518,7 +518,7 @@ | |||
1608 | 518 | mem_free(tablename); | 518 | mem_free(tablename); |
1609 | 519 | if (remote.success) { | 519 | if (remote.success) { |
1610 | 520 | mem_free(remote.filepath); | 520 | mem_free(remote.filepath); |
1612 | 521 | @@ -4263,7 +4457,7 @@ | 521 | @@ -4278,7 +4472,7 @@ |
1613 | 522 | idea is to read as much good data as we can and jump over bad data. | 522 | idea is to read as much good data as we can and jump over bad data. |
1614 | 523 | @return 0 if ok, -1 if error even after the retries, 1 if at the end | 523 | @return 0 if ok, -1 if error even after the retries, 1 if at the end |
1615 | 524 | of the directory */ | 524 | of the directory */ |
1616 | @@ -527,7 +527,7 @@ | |||
1617 | 527 | int | 527 | int |
1618 | 528 | fil_file_readdir_next_file( | 528 | fil_file_readdir_next_file( |
1619 | 529 | /*=======================*/ | 529 | /*=======================*/ |
1621 | 530 | @@ -4303,7 +4497,7 @@ | 530 | @@ -4318,7 +4512,7 @@ |
1622 | 531 | @return DB_SUCCESS or error number */ | 531 | @return DB_SUCCESS or error number */ |
1623 | 532 | UNIV_INTERN | 532 | UNIV_INTERN |
1624 | 533 | dberr_t | 533 | dberr_t |
1625 | @@ -536,7 +536,7 @@ | |||
1626 | 536 | /*===================================*/ | 536 | /*===================================*/ |
1627 | 537 | { | 537 | { |
1628 | 538 | int ret; | 538 | int ret; |
1630 | 539 | @@ -4359,7 +4553,9 @@ | 539 | @@ -4374,7 +4568,9 @@ |
1631 | 540 | "%s/%s", fil_path_to_mysql_datadir, dbinfo.name); | 540 | "%s/%s", fil_path_to_mysql_datadir, dbinfo.name); |
1632 | 541 | srv_normalize_path_for_win(dbpath); | 541 | srv_normalize_path_for_win(dbpath); |
1633 | 542 | 542 | ||
1634 | @@ -547,7 +547,7 @@ | |||
1635 | 547 | 547 | ||
1636 | 548 | if (dbdir != NULL) { | 548 | if (dbdir != NULL) { |
1637 | 549 | 549 | ||
1639 | 550 | @@ -4380,9 +4576,15 @@ | 550 | @@ -4395,9 +4591,15 @@ |
1640 | 551 | && (0 == strcmp(fileinfo.name | 551 | && (0 == strcmp(fileinfo.name |
1641 | 552 | + strlen(fileinfo.name) - 4, | 552 | + strlen(fileinfo.name) - 4, |
1642 | 553 | ".ibd") | 553 | ".ibd") |
1643 | @@ -565,7 +565,7 @@ | |||
1644 | 565 | /* The name ends in .ibd or .isl; | 565 | /* The name ends in .ibd or .isl; |
1645 | 566 | try opening the file */ | 566 | try opening the file */ |
1646 | 567 | fil_load_single_table_tablespace( | 567 | fil_load_single_table_tablespace( |
1648 | 568 | @@ -4538,6 +4740,7 @@ | 568 | @@ -4553,6 +4755,7 @@ |
1649 | 569 | { | 569 | { |
1650 | 570 | fil_space_t* fnamespace; | 570 | fil_space_t* fnamespace; |
1651 | 571 | fil_space_t* space; | 571 | fil_space_t* space; |
1652 | @@ -573,7 +573,7 @@ | |||
1653 | 573 | 573 | ||
1654 | 574 | ut_ad(fil_system); | 574 | ut_ad(fil_system); |
1655 | 575 | 575 | ||
1657 | 576 | @@ -4615,6 +4818,10 @@ | 576 | @@ -4630,6 +4833,10 @@ |
1658 | 577 | if (fnamespace == NULL) { | 577 | if (fnamespace == NULL) { |
1659 | 578 | if (print_error_if_does_not_exist) { | 578 | if (print_error_if_does_not_exist) { |
1660 | 579 | fil_report_missing_tablespace(name, id); | 579 | fil_report_missing_tablespace(name, id); |
1661 | @@ -584,7 +584,7 @@ | |||
1662 | 584 | } | 584 | } |
1663 | 585 | } else { | 585 | } else { |
1664 | 586 | ut_print_timestamp(stderr); | 586 | ut_print_timestamp(stderr); |
1666 | 587 | @@ -4638,6 +4845,10 @@ | 587 | @@ -4653,6 +4860,10 @@ |
1667 | 588 | 588 | ||
1668 | 589 | mutex_exit(&fil_system->mutex); | 589 | mutex_exit(&fil_system->mutex); |
1669 | 590 | 590 | ||
1670 | @@ -595,7 +595,7 @@ | |||
1671 | 595 | return(FALSE); | 595 | return(FALSE); |
1672 | 596 | } | 596 | } |
1673 | 597 | 597 | ||
1675 | 598 | @@ -4728,6 +4939,7 @@ | 598 | @@ -4743,6 +4954,7 @@ |
1676 | 599 | ulint page_size; | 599 | ulint page_size; |
1677 | 600 | ulint pages_added; | 600 | ulint pages_added; |
1678 | 601 | ibool success; | 601 | ibool success; |
1679 | @@ -603,7 +603,7 @@ | |||
1680 | 603 | 603 | ||
1681 | 604 | ut_ad(!srv_read_only_mode); | 604 | ut_ad(!srv_read_only_mode); |
1682 | 605 | 605 | ||
1684 | 606 | @@ -4772,13 +4984,17 @@ | 606 | @@ -4787,13 +4999,17 @@ |
1685 | 607 | goto retry; | 607 | goto retry; |
1686 | 608 | } | 608 | } |
1687 | 609 | 609 | ||
1688 | @@ -622,7 +622,7 @@ | |||
1689 | 622 | start_page_no = space->size; | 622 | start_page_no = space->size; |
1690 | 623 | file_start_page_no = space->size - node->size; | 623 | file_start_page_no = space->size - node->size; |
1691 | 624 | 624 | ||
1693 | 625 | @@ -5024,7 +5240,7 @@ | 625 | @@ -5039,7 +5255,7 @@ |
1694 | 626 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys | 626 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
1695 | 627 | mutex. */ | 627 | mutex. */ |
1696 | 628 | static | 628 | static |
1697 | @@ -631,7 +631,7 @@ | |||
1698 | 631 | fil_node_prepare_for_io( | 631 | fil_node_prepare_for_io( |
1699 | 632 | /*====================*/ | 632 | /*====================*/ |
1700 | 633 | fil_node_t* node, /*!< in: file node */ | 633 | fil_node_t* node, /*!< in: file node */ |
1702 | 634 | @@ -5044,9 +5260,12 @@ | 634 | @@ -5059,9 +5275,12 @@ |
1703 | 635 | } | 635 | } |
1704 | 636 | 636 | ||
1705 | 637 | if (node->open == FALSE) { | 637 | if (node->open == FALSE) { |
1706 | @@ -645,7 +645,7 @@ | |||
1707 | 645 | } | 645 | } |
1708 | 646 | 646 | ||
1709 | 647 | if (node->n_pending == 0 && fil_space_belongs_in_lru(space)) { | 647 | if (node->n_pending == 0 && fil_space_belongs_in_lru(space)) { |
1711 | 648 | @@ -5058,6 +5277,8 @@ | 648 | @@ -5073,6 +5292,8 @@ |
1712 | 649 | } | 649 | } |
1713 | 650 | 650 | ||
1714 | 651 | node->n_pending++; | 651 | node->n_pending++; |
1715 | @@ -654,7 +654,7 @@ | |||
1716 | 654 | } | 654 | } |
1717 | 655 | 655 | ||
1718 | 656 | /********************************************************************//** | 656 | /********************************************************************//** |
1720 | 657 | @@ -5259,6 +5480,16 @@ | 657 | @@ -5274,6 +5495,16 @@ |
1721 | 658 | 658 | ||
1722 | 659 | ut_ad(mode != OS_AIO_IBUF || space->purpose == FIL_TABLESPACE); | 659 | ut_ad(mode != OS_AIO_IBUF || space->purpose == FIL_TABLESPACE); |
1723 | 660 | 660 | ||
1724 | @@ -671,7 +671,7 @@ | |||
1725 | 671 | node = UT_LIST_GET_FIRST(space->chain); | 671 | node = UT_LIST_GET_FIRST(space->chain); |
1726 | 672 | 672 | ||
1727 | 673 | for (;;) { | 673 | for (;;) { |
1729 | 674 | @@ -5290,7 +5521,11 @@ | 674 | @@ -5305,7 +5536,11 @@ |
1730 | 675 | } | 675 | } |
1731 | 676 | 676 | ||
1732 | 677 | /* Open file if closed */ | 677 | /* Open file if closed */ |
1733 | @@ -684,7 +684,7 @@ | |||
1734 | 684 | 684 | ||
1735 | 685 | /* Check that at least the start offset is within the bounds of a | 685 | /* Check that at least the start offset is within the bounds of a |
1736 | 686 | single-table tablespace, including rollback tablespaces. */ | 686 | single-table tablespace, including rollback tablespaces. */ |
1738 | 687 | @@ -6164,6 +6399,7 @@ | 687 | @@ -6179,6 +6414,7 @@ |
1739 | 688 | return(err); | 688 | return(err); |
1740 | 689 | } | 689 | } |
1741 | 690 | 690 | ||
1742 | @@ -692,11 +692,10 @@ | |||
1743 | 692 | /****************************************************************//** | 692 | /****************************************************************//** |
1744 | 693 | Generate redo logs for swapping two .ibd files */ | 693 | Generate redo logs for swapping two .ibd files */ |
1745 | 694 | UNIV_INTERN | 694 | UNIV_INTERN |
1749 | 695 | @@ -6187,4 +6423,4 @@ | 695 | @@ -6205,3 +6441,4 @@ |
1750 | 696 | 0, 0, new_name, old_name, &mtr); | 696 | 0, 0, new_name, old_name, mtr); |
1751 | 697 | mtr_commit(&mtr); | 697 | } |
1752 | 698 | } | 698 | } |
1753 | 699 | - | ||
1754 | 700 | +#endif | 699 | +#endif |
1755 | 701 | --- a/storage/innobase/handler/ha_innodb.cc | 700 | --- a/storage/innobase/handler/ha_innodb.cc |
1756 | 702 | +++ b/storage/innobase/handler/ha_innodb.cc | 701 | +++ b/storage/innobase/handler/ha_innodb.cc |
1757 | @@ -709,7 +708,7 @@ | |||
1758 | 709 | 708 | ||
1759 | 710 | if (thd && thd_sql_command(thd) == SQLCOM_DROP_TABLE) { | 709 | if (thd && thd_sql_command(thd) == SQLCOM_DROP_TABLE) { |
1760 | 711 | 710 | ||
1762 | 712 | @@ -2423,43 +2423,19 @@ | 711 | @@ -2459,43 +2459,19 @@ |
1763 | 713 | ulint buflen, /*!< in: length of buf, in bytes */ | 712 | ulint buflen, /*!< in: length of buf, in bytes */ |
1764 | 714 | const char* id, /*!< in: identifier to convert */ | 713 | const char* id, /*!< in: identifier to convert */ |
1765 | 715 | ulint idlen, /*!< in: length of id, in bytes */ | 714 | ulint idlen, /*!< in: length of id, in bytes */ |
1766 | @@ -758,7 +757,7 @@ | |||
1767 | 758 | if (UNIV_UNLIKELY(idlen > buflen)) { | 757 | if (UNIV_UNLIKELY(idlen > buflen)) { |
1768 | 759 | idlen = buflen; | 758 | idlen = buflen; |
1769 | 760 | } | 759 | } |
1771 | 761 | @@ -16642,45 +16618,24 @@ | 760 | @@ -16774,45 +16750,24 @@ |
1772 | 762 | void | 761 | void |
1773 | 763 | ib_logf( | 762 | ib_logf( |
1774 | 764 | /*====*/ | 763 | /*====*/ |
1775 | @@ -1022,20 +1021,6 @@ | |||
1776 | 1022 | #if defined(UNIV_HOTBACKUP) || defined(__WIN__) | 1021 | #if defined(UNIV_HOTBACKUP) || defined(__WIN__) |
1777 | 1023 | /* InnoDB Hot Backup does not lock the data files. | 1022 | /* InnoDB Hot Backup does not lock the data files. |
1778 | 1024 | * On Windows, mandatory locking is used. | 1023 | * On Windows, mandatory locking is used. |
1779 | 1025 | --- a/storage/innobase/row/row0merge.cc | ||
1780 | 1026 | +++ b/storage/innobase/row/row0merge.cc | ||
1781 | 1027 | @@ -3227,9 +3227,11 @@ | ||
1782 | 1028 | goto err_exit; | ||
1783 | 1029 | } | ||
1784 | 1030 | |||
1785 | 1031 | +#if 0 | ||
1786 | 1032 | /* Generate the redo logs for file operations */ | ||
1787 | 1033 | fil_mtr_rename_log(old_table->space, old_name, | ||
1788 | 1034 | new_table->space, new_table->name, tmp_name); | ||
1789 | 1035 | +#endif | ||
1790 | 1036 | |||
1791 | 1037 | /* What if the redo logs are flushed to disk here? This is | ||
1792 | 1038 | tested with following crash point */ | ||
1793 | 1039 | --- a/storage/innobase/srv/srv0srv.cc | 1024 | --- a/storage/innobase/srv/srv0srv.cc |
1794 | 1040 | +++ b/storage/innobase/srv/srv0srv.cc | 1025 | +++ b/storage/innobase/srv/srv0srv.cc |
1795 | 1041 | @@ -349,6 +349,10 @@ | 1026 | @@ -349,6 +349,10 @@ |
1796 | @@ -1049,7 +1034,7 @@ | |||
1797 | 1049 | /*-------------------------------------------*/ | 1034 | /*-------------------------------------------*/ |
1798 | 1050 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; | 1035 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; |
1799 | 1051 | UNIV_INTERN ulong srv_spin_wait_delay = 6; | 1036 | UNIV_INTERN ulong srv_spin_wait_delay = 6; |
1801 | 1052 | @@ -1808,7 +1812,8 @@ | 1037 | @@ -1814,7 +1818,8 @@ |
1802 | 1053 | if (ret == SRV_NONE | 1038 | if (ret == SRV_NONE |
1803 | 1054 | && srv_shutdown_state != SRV_SHUTDOWN_NONE | 1039 | && srv_shutdown_state != SRV_SHUTDOWN_NONE |
1804 | 1055 | && trx_purge_state() != PURGE_STATE_DISABLED | 1040 | && trx_purge_state() != PURGE_STATE_DISABLED |
1805 | @@ -1173,7 +1158,7 @@ | |||
1806 | 1173 | if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) { | 1158 | if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) { |
1807 | 1174 | /* The following call is necessary for the insert | 1159 | /* The following call is necessary for the insert |
1808 | 1175 | buffer to work with multiple tablespaces. We must | 1160 | buffer to work with multiple tablespaces. We must |
1810 | 1176 | @@ -2439,7 +2452,9 @@ | 1161 | @@ -2439,7 +2453,9 @@ |
1811 | 1177 | value. Important to note that we can do it ONLY after | 1162 | value. Important to note that we can do it ONLY after |
1812 | 1178 | we have finished the recovery process so that the | 1163 | we have finished the recovery process so that the |
1813 | 1179 | image of TRX_SYS_PAGE_NO is not stale. */ | 1164 | image of TRX_SYS_PAGE_NO is not stale. */ |
1814 | @@ -1184,7 +1169,7 @@ | |||
1815 | 1184 | } | 1169 | } |
1816 | 1185 | 1170 | ||
1817 | 1186 | if (!create_new_db && sum_of_new_sizes > 0) { | 1171 | if (!create_new_db && sum_of_new_sizes > 0) { |
1819 | 1187 | @@ -2647,6 +2662,7 @@ | 1172 | @@ -2647,6 +2663,7 @@ |
1820 | 1188 | && srv_auto_extend_last_data_file | 1173 | && srv_auto_extend_last_data_file |
1821 | 1189 | && sum_of_data_file_sizes < tablespace_size_in_header) { | 1174 | && sum_of_data_file_sizes < tablespace_size_in_header) { |
1822 | 1190 | 1175 | ||
1823 | @@ -1192,7 +1177,7 @@ | |||
1824 | 1192 | ut_print_timestamp(stderr); | 1177 | ut_print_timestamp(stderr); |
1825 | 1193 | fprintf(stderr, | 1178 | fprintf(stderr, |
1826 | 1194 | " InnoDB: Error: tablespace size stored in header" | 1179 | " InnoDB: Error: tablespace size stored in header" |
1828 | 1195 | @@ -2683,6 +2698,7 @@ | 1180 | @@ -2683,6 +2700,7 @@ |
1829 | 1196 | 1181 | ||
1830 | 1197 | return(DB_ERROR); | 1182 | return(DB_ERROR); |
1831 | 1198 | } | 1183 | } |
1832 | @@ -1200,7 +1185,7 @@ | |||
1833 | 1200 | } | 1185 | } |
1834 | 1201 | 1186 | ||
1835 | 1202 | /* Check that os_fast_mutexes work as expected */ | 1187 | /* Check that os_fast_mutexes work as expected */ |
1837 | 1203 | @@ -2707,6 +2723,10 @@ | 1188 | @@ -2707,6 +2725,10 @@ |
1838 | 1204 | 1189 | ||
1839 | 1205 | os_fast_mutex_free(&srv_os_test_mutex); | 1190 | os_fast_mutex_free(&srv_os_test_mutex); |
1840 | 1206 | 1191 | ||
1841 | @@ -1211,7 +1196,7 @@ | |||
1842 | 1211 | if (srv_print_verbose_log) { | 1196 | if (srv_print_verbose_log) { |
1843 | 1212 | ib_logf(IB_LOG_LEVEL_INFO, | 1197 | ib_logf(IB_LOG_LEVEL_INFO, |
1844 | 1213 | "%s started; log sequence number " LSN_PF "", | 1198 | "%s started; log sequence number " LSN_PF "", |
1846 | 1214 | @@ -2739,6 +2759,7 @@ | 1199 | @@ -2739,6 +2761,7 @@ |
1847 | 1215 | fts_optimize_init(); | 1200 | fts_optimize_init(); |
1848 | 1216 | } | 1201 | } |
1849 | 1217 | 1202 | ||
1850 | @@ -1219,7 +1204,7 @@ | |||
1851 | 1219 | srv_was_started = TRUE; | 1204 | srv_was_started = TRUE; |
1852 | 1220 | 1205 | ||
1853 | 1221 | return(DB_SUCCESS); | 1206 | return(DB_SUCCESS); |
1855 | 1222 | @@ -2794,7 +2815,7 @@ | 1207 | @@ -2794,7 +2817,7 @@ |
1856 | 1223 | return(DB_SUCCESS); | 1208 | return(DB_SUCCESS); |
1857 | 1224 | } | 1209 | } |
1858 | 1225 | 1210 | ||
1859 | @@ -1285,7 +1270,7 @@ | |||
1860 | 1285 | total_trx = UT_LIST_GET_LEN(trx_sys->rw_trx_list) | 1270 | total_trx = UT_LIST_GET_LEN(trx_sys->rw_trx_list) |
1861 | 1286 | --- a/storage/innobase/trx/trx0trx.cc | 1271 | --- a/storage/innobase/trx/trx0trx.cc |
1862 | 1287 | +++ b/storage/innobase/trx/trx0trx.cc | 1272 | +++ b/storage/innobase/trx/trx0trx.cc |
1864 | 1288 | @@ -2053,7 +2053,8 @@ | 1273 | @@ -2084,7 +2084,8 @@ |
1865 | 1289 | scenario where some undo generated by a transaction, | 1274 | scenario where some undo generated by a transaction, |
1866 | 1290 | has XA stuff, and other undo, generated by the same | 1275 | has XA stuff, and other undo, generated by the same |
1867 | 1291 | transaction, doesn't. */ | 1276 | transaction, doesn't. */ |
1868 | @@ -1320,7 +1305,7 @@ | |||
1869 | 1320 | 1305 | ||
1870 | 1321 | /* | 1306 | /* |
1871 | 1322 | WAIT ARRAY | 1307 | WAIT ARRAY |
1873 | 1323 | @@ -903,6 +904,13 @@ | 1308 | @@ -899,6 +900,13 @@ |
1874 | 1324 | ibool fatal = FALSE; | 1309 | ibool fatal = FALSE; |
1875 | 1325 | double longest_diff = 0; | 1310 | double longest_diff = 0; |
1876 | 1326 | 1311 | ||
1877 | @@ -1336,7 +1321,7 @@ | |||
1878 | 1336 | return(FALSE); | 1321 | return(FALSE); |
1879 | 1337 | --- a/storage/innobase/include/buf0buf.h | 1322 | --- a/storage/innobase/include/buf0buf.h |
1880 | 1338 | +++ b/storage/innobase/include/buf0buf.h | 1323 | +++ b/storage/innobase/include/buf0buf.h |
1882 | 1339 | @@ -1583,6 +1583,8 @@ | 1324 | @@ -1580,6 +1580,8 @@ |
1883 | 1340 | or buf_block_t::mutex. */ | 1325 | or buf_block_t::mutex. */ |
1884 | 1341 | # endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ | 1326 | # endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ |
1885 | 1342 | #endif /* !UNIV_HOTBACKUP */ | 1327 | #endif /* !UNIV_HOTBACKUP */ |
1886 | @@ -1390,7 +1375,7 @@ | |||
1887 | 1390 | } | 1375 | } |
1888 | 1391 | --- a/storage/innobase/include/srv0start.h | 1376 | --- a/storage/innobase/include/srv0start.h |
1889 | 1392 | +++ b/storage/innobase/include/srv0start.h | 1377 | +++ b/storage/innobase/include/srv0start.h |
1891 | 1393 | @@ -77,6 +77,23 @@ | 1378 | @@ -68,6 +68,23 @@ |
1892 | 1394 | srv_add_path_separator_if_needed( | 1379 | srv_add_path_separator_if_needed( |
1893 | 1395 | /*=============================*/ | 1380 | /*=============================*/ |
1894 | 1396 | char* str); /*!< in: null-terminated character string */ | 1381 | char* str); /*!< in: null-terminated character string */ |
1895 | @@ -1416,7 +1401,7 @@ | |||
1896 | 1416 | Starts Innobase and creates a new database if database files | 1401 | Starts Innobase and creates a new database if database files |
1897 | 1417 | --- a/configure.cmake | 1402 | --- a/configure.cmake |
1898 | 1418 | +++ b/configure.cmake | 1403 | +++ b/configure.cmake |
1900 | 1419 | @@ -965,14 +965,6 @@ | 1404 | @@ -979,14 +979,6 @@ |
1901 | 1420 | ENDIF() | 1405 | ENDIF() |
1902 | 1421 | 1406 | ||
1903 | 1422 | CHECK_C_SOURCE_COMPILES(" | 1407 | CHECK_C_SOURCE_COMPILES(" |
1904 | @@ -1448,3 +1433,21 @@ | |||
1905 | 1448 | return tmp && tmp->init ? &tmp->dbug : 0; | 1433 | return tmp && tmp->init ? &tmp->dbug : 0; |
1906 | 1449 | } | 1434 | } |
1907 | 1450 | #endif /* DBUG_OFF */ | 1435 | #endif /* DBUG_OFF */ |
1908 | 1436 | --- a/storage/innobase/handler/handler0alter.cc | ||
1909 | 1437 | +++ b/storage/innobase/handler/handler0alter.cc | ||
1910 | 1438 | @@ -5434,6 +5434,7 @@ | ||
1911 | 1439 | = static_cast<ha_innobase_inplace_ctx*>(*pctx); | ||
1912 | 1440 | |||
1913 | 1441 | DBUG_ASSERT(ctx->need_rebuild()); | ||
1914 | 1442 | +#if 0 | ||
1915 | 1443 | /* Generate the redo log for the file | ||
1916 | 1444 | operations that will be performed in | ||
1917 | 1445 | commit_cache_rebuild(). */ | ||
1918 | 1446 | @@ -5442,6 +5443,7 @@ | ||
1919 | 1447 | ctx->new_table->space, | ||
1920 | 1448 | ctx->new_table->name, | ||
1921 | 1449 | ctx->tmp_name, &mtr); | ||
1922 | 1450 | +#endif | ||
1923 | 1451 | DBUG_INJECT_CRASH("ib_commit_inplace_crash", | ||
1924 | 1452 | crash_inject_count++); | ||
1925 | 1453 | } | ||
1926 | 1451 | 1454 | ||
1927 | === modified file 'patches/xtradb51.patch' | |||
1928 | --- patches/xtradb51.patch 2013-05-07 13:32:47 +0000 | |||
1929 | +++ patches/xtradb51.patch 2013-07-22 14:01:36 +0000 | |||
1930 | @@ -1,6 +1,6 @@ | |||
1931 | 1 | --- a/storage/innodb_plugin/btr/btr0btr.c | 1 | --- a/storage/innodb_plugin/btr/btr0btr.c |
1932 | 2 | +++ b/storage/innodb_plugin/btr/btr0btr.c | 2 | +++ b/storage/innodb_plugin/btr/btr0btr.c |
1934 | 3 | @@ -674,7 +674,7 @@ | 3 | @@ -680,7 +680,7 @@ |
1935 | 4 | /**************************************************************//** | 4 | /**************************************************************//** |
1936 | 5 | Gets the root node of a tree and x-latches it. | 5 | Gets the root node of a tree and x-latches it. |
1937 | 6 | @return root page, x-latched */ | 6 | @return root page, x-latched */ |
1938 | @@ -9,7 +9,7 @@ | |||
1939 | 9 | buf_block_t* | 9 | buf_block_t* |
1940 | 10 | btr_root_block_get( | 10 | btr_root_block_get( |
1941 | 11 | /*===============*/ | 11 | /*===============*/ |
1943 | 12 | @@ -1134,7 +1134,7 @@ | 12 | @@ -1198,7 +1198,7 @@ |
1944 | 13 | /************************************************************//** | 13 | /************************************************************//** |
1945 | 14 | Returns the child page of a node pointer and x-latches it. | 14 | Returns the child page of a node pointer and x-latches it. |
1946 | 15 | @return child page, x-latched */ | 15 | @return child page, x-latched */ |
1947 | @@ -28,7 +28,7 @@ | |||
1948 | 28 | 28 | ||
1949 | 29 | /* prototypes for new functions added to ha_innodb.cc */ | 29 | /* prototypes for new functions added to ha_innodb.cc */ |
1950 | 30 | trx_t* innobase_get_trx(); | 30 | trx_t* innobase_get_trx(); |
1952 | 31 | @@ -412,7 +413,7 @@ | 31 | @@ -414,7 +415,7 @@ |
1953 | 32 | return(TRUE); | 32 | return(TRUE); |
1954 | 33 | } | 33 | } |
1955 | 34 | 34 | ||
1956 | @@ -37,7 +37,7 @@ | |||
1957 | 37 | if (recv_lsn_checks_on) { | 37 | if (recv_lsn_checks_on) { |
1958 | 38 | ib_uint64_t current_lsn; | 38 | ib_uint64_t current_lsn; |
1959 | 39 | 39 | ||
1961 | 40 | @@ -744,6 +745,7 @@ | 40 | @@ -746,6 +747,7 @@ |
1962 | 41 | block->page.zip_list.prev = NULL; | 41 | block->page.zip_list.prev = NULL; |
1963 | 42 | block->page.zip_list.next = NULL; | 42 | block->page.zip_list.next = NULL; |
1964 | 43 | block->page.in_LRU_list = FALSE; | 43 | block->page.in_LRU_list = FALSE; |
1965 | @@ -45,7 +45,7 @@ | |||
1966 | 45 | block->in_unzip_LRU_list = FALSE; | 45 | block->in_unzip_LRU_list = FALSE; |
1967 | 46 | #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG | 46 | #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG |
1968 | 47 | block->n_pointers = 0; | 47 | block->n_pointers = 0; |
1970 | 48 | @@ -1888,7 +1890,9 @@ | 48 | @@ -1787,7 +1789,9 @@ |
1971 | 49 | ut_ad(zip_size == fil_space_get_zip_size(space)); | 49 | ut_ad(zip_size == fil_space_get_zip_size(space)); |
1972 | 50 | ut_ad(ut_is_2pow(zip_size)); | 50 | ut_ad(ut_is_2pow(zip_size)); |
1973 | 51 | #ifndef UNIV_LOG_DEBUG | 51 | #ifndef UNIV_LOG_DEBUG |
1974 | @@ -56,7 +56,7 @@ | |||
1975 | 56 | #endif | 56 | #endif |
1976 | 57 | if (innobase_get_slow_log()) { | 57 | if (innobase_get_slow_log()) { |
1977 | 58 | trx = innobase_get_trx(); | 58 | trx = innobase_get_trx(); |
1979 | 59 | @@ -3190,6 +3194,13 @@ | 59 | @@ -3096,6 +3100,13 @@ |
1980 | 60 | frame = ((buf_block_t*) bpage)->frame; | 60 | frame = ((buf_block_t*) bpage)->frame; |
1981 | 61 | } | 61 | } |
1982 | 62 | 62 | ||
1983 | @@ -70,7 +70,7 @@ | |||
1984 | 70 | /* If this page is not uninitialized and not in the | 70 | /* If this page is not uninitialized and not in the |
1985 | 71 | doublewrite buffer, then the page number and space id | 71 | doublewrite buffer, then the page number and space id |
1986 | 72 | should be the same as in block. */ | 72 | should be the same as in block. */ |
1988 | 73 | @@ -3302,7 +3313,8 @@ | 73 | @@ -3208,7 +3219,8 @@ |
1989 | 74 | recv_recover_page(TRUE, (buf_block_t*) bpage); | 74 | recv_recover_page(TRUE, (buf_block_t*) bpage); |
1990 | 75 | } | 75 | } |
1991 | 76 | 76 | ||
1992 | @@ -82,7 +82,7 @@ | |||
1993 | 82 | (srv_pass_corrupt_table && bpage->is_corrupt) ? NULL : | 82 | (srv_pass_corrupt_table && bpage->is_corrupt) ? NULL : |
1994 | 83 | --- a/storage/innodb_plugin/fil/fil0fil.c | 83 | --- a/storage/innodb_plugin/fil/fil0fil.c |
1995 | 84 | +++ b/storage/innodb_plugin/fil/fil0fil.c | 84 | +++ b/storage/innodb_plugin/fil/fil0fil.c |
1997 | 85 | @@ -297,7 +297,7 @@ | 85 | @@ -298,7 +298,7 @@ |
1998 | 86 | 86 | ||
1999 | 87 | /** The tablespace memory cache. This variable is NULL before the module is | 87 | /** The tablespace memory cache. This variable is NULL before the module is |
2000 | 88 | initialized. */ | 88 | initialized. */ |
2001 | @@ -91,7 +91,7 @@ | |||
2002 | 91 | 91 | ||
2003 | 92 | 92 | ||
2004 | 93 | /********************************************************************//** | 93 | /********************************************************************//** |
2006 | 94 | @@ -308,7 +308,7 @@ | 94 | @@ -309,7 +309,7 @@ |
2007 | 95 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys | 95 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
2008 | 96 | mutex. */ | 96 | mutex. */ |
2009 | 97 | static | 97 | static |
2010 | @@ -100,7 +100,7 @@ | |||
2011 | 100 | fil_node_prepare_for_io( | 100 | fil_node_prepare_for_io( |
2012 | 101 | /*====================*/ | 101 | /*====================*/ |
2013 | 102 | fil_node_t* node, /*!< in: file node */ | 102 | fil_node_t* node, /*!< in: file node */ |
2015 | 103 | @@ -633,7 +633,7 @@ | 103 | @@ -634,7 +634,7 @@ |
2016 | 104 | Opens a the file of a node of a tablespace. The caller must own the fil_system | 104 | Opens a the file of a node of a tablespace. The caller must own the fil_system |
2017 | 105 | mutex. */ | 105 | mutex. */ |
2018 | 106 | static | 106 | static |
2019 | @@ -109,7 +109,7 @@ | |||
2020 | 109 | fil_node_open_file( | 109 | fil_node_open_file( |
2021 | 110 | /*===============*/ | 110 | /*===============*/ |
2022 | 111 | fil_node_t* node, /*!< in: file node */ | 111 | fil_node_t* node, /*!< in: file node */ |
2024 | 112 | @@ -667,7 +667,17 @@ | 112 | @@ -668,7 +668,17 @@ |
2025 | 113 | node->name, OS_FILE_OPEN, OS_FILE_READ_ONLY, &success); | 113 | node->name, OS_FILE_OPEN, OS_FILE_READ_ONLY, &success); |
2026 | 114 | if (!success) { | 114 | if (!success) { |
2027 | 115 | /* The following call prints an error message */ | 115 | /* The following call prints an error message */ |
2028 | @@ -128,7 +128,7 @@ | |||
2029 | 128 | 128 | ||
2030 | 129 | ut_print_timestamp(stderr); | 129 | ut_print_timestamp(stderr); |
2031 | 130 | 130 | ||
2033 | 131 | @@ -728,12 +738,14 @@ | 131 | @@ -729,12 +739,14 @@ |
2034 | 132 | 132 | ||
2035 | 133 | if (UNIV_UNLIKELY(space_id != space->id)) { | 133 | if (UNIV_UNLIKELY(space_id != space->id)) { |
2036 | 134 | fprintf(stderr, | 134 | fprintf(stderr, |
2037 | @@ -147,7 +147,7 @@ | |||
2038 | 147 | } | 147 | } |
2039 | 148 | 148 | ||
2040 | 149 | if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED | 149 | if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED |
2042 | 150 | @@ -757,8 +769,8 @@ | 150 | @@ -758,8 +770,8 @@ |
2043 | 151 | } | 151 | } |
2044 | 152 | 152 | ||
2045 | 153 | if (size_bytes >= 1024 * 1024) { | 153 | if (size_bytes >= 1024 * 1024) { |
2046 | @@ -158,7 +158,7 @@ | |||
2047 | 158 | } | 158 | } |
2048 | 159 | 159 | ||
2049 | 160 | if (!(flags & DICT_TF_ZSSIZE_MASK)) { | 160 | if (!(flags & DICT_TF_ZSSIZE_MASK)) { |
2051 | 161 | @@ -803,6 +815,8 @@ | 161 | @@ -804,6 +816,8 @@ |
2052 | 162 | /* Put the node to the LRU list */ | 162 | /* Put the node to the LRU list */ |
2053 | 163 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); | 163 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); |
2054 | 164 | } | 164 | } |
2055 | @@ -167,7 +167,7 @@ | |||
2056 | 167 | } | 167 | } |
2057 | 168 | 168 | ||
2058 | 169 | /**********************************************************************//** | 169 | /**********************************************************************//** |
2060 | 170 | @@ -1431,7 +1445,12 @@ | 170 | @@ -1451,7 +1465,12 @@ |
2061 | 171 | the file yet; the following calls will open it and update the | 171 | the file yet; the following calls will open it and update the |
2062 | 172 | size fields */ | 172 | size fields */ |
2063 | 173 | 173 | ||
2064 | @@ -181,7 +181,7 @@ | |||
2065 | 181 | fil_node_complete_io(node, fil_system, OS_FILE_READ); | 181 | fil_node_complete_io(node, fil_system, OS_FILE_READ); |
2066 | 182 | } | 182 | } |
2067 | 183 | 183 | ||
2069 | 184 | @@ -1483,7 +1502,12 @@ | 184 | @@ -1503,7 +1522,12 @@ |
2070 | 185 | the file yet; the following calls will open it and update the | 185 | the file yet; the following calls will open it and update the |
2071 | 186 | size fields */ | 186 | size fields */ |
2072 | 187 | 187 | ||
2073 | @@ -195,7 +195,7 @@ | |||
2074 | 195 | fil_node_complete_io(node, fil_system, OS_FILE_READ); | 195 | fil_node_complete_io(node, fil_system, OS_FILE_READ); |
2075 | 196 | } | 196 | } |
2076 | 197 | 197 | ||
2078 | 198 | @@ -1933,7 +1957,7 @@ | 198 | @@ -1952,7 +1976,7 @@ |
2079 | 199 | mem_free(path); | 199 | mem_free(path); |
2080 | 200 | } | 200 | } |
2081 | 201 | 201 | ||
2082 | @@ -204,7 +204,7 @@ | |||
2083 | 204 | /********************************************************//** | 204 | /********************************************************//** |
2084 | 205 | Writes a log record about an .ibd file create/rename/delete. */ | 205 | Writes a log record about an .ibd file create/rename/delete. */ |
2085 | 206 | static | 206 | static |
2087 | 207 | @@ -2157,7 +2181,7 @@ | 207 | @@ -2176,7 +2200,7 @@ |
2088 | 208 | if (fil_create_new_single_table_tablespace( | 208 | if (fil_create_new_single_table_tablespace( |
2089 | 209 | space_id, name, FALSE, flags, | 209 | space_id, name, FALSE, flags, |
2090 | 210 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { | 210 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { |
2091 | @@ -213,7 +213,7 @@ | |||
2092 | 213 | } | 213 | } |
2093 | 214 | } | 214 | } |
2094 | 215 | 215 | ||
2096 | 216 | @@ -2324,7 +2348,7 @@ | 216 | @@ -2344,7 +2368,7 @@ |
2097 | 217 | } | 217 | } |
2098 | 218 | 218 | ||
2099 | 219 | if (success) { | 219 | if (success) { |
2100 | @@ -222,16 +222,16 @@ | |||
2101 | 222 | /* Write a log record about the deletion of the .ibd | 222 | /* Write a log record about the deletion of the .ibd |
2102 | 223 | file, so that ibbackup can replay it in the | 223 | file, so that ibbackup can replay it in the |
2103 | 224 | --apply-log phase. We use a dummy mtr and the familiar | 224 | --apply-log phase. We use a dummy mtr and the familiar |
2105 | 225 | @@ -2625,7 +2649,7 @@ | 225 | @@ -2645,7 +2669,7 @@ |
2106 | 226 | 226 | ||
2107 | 227 | mutex_exit(&fil_system->mutex); | 227 | mutex_exit(&fil_system->mutex); |
2108 | 228 | 228 | ||
2109 | 229 | -#ifndef UNIV_HOTBACKUP | 229 | -#ifndef UNIV_HOTBACKUP |
2110 | 230 | +#ifdef UNDEFINED | 230 | +#ifdef UNDEFINED |
2112 | 231 | if (success) { | 231 | if (success && !recv_recovery_on) { |
2113 | 232 | mtr_t mtr; | 232 | mtr_t mtr; |
2114 | 233 | 233 | ||
2116 | 234 | @@ -2815,7 +2839,7 @@ | 234 | @@ -2835,7 +2859,7 @@ |
2117 | 235 | 235 | ||
2118 | 236 | fil_node_create(path, size, space_id, FALSE); | 236 | fil_node_create(path, size, space_id, FALSE); |
2119 | 237 | 237 | ||
2120 | @@ -240,7 +240,7 @@ | |||
2121 | 240 | { | 240 | { |
2122 | 241 | mtr_t mtr; | 241 | mtr_t mtr; |
2123 | 242 | 242 | ||
2125 | 243 | @@ -3159,19 +3183,97 @@ | 243 | @@ -3182,19 +3206,97 @@ |
2126 | 244 | "InnoDB: open the tablespace file ", stderr); | 244 | "InnoDB: open the tablespace file ", stderr); |
2127 | 245 | ut_print_filename(stderr, filepath); | 245 | ut_print_filename(stderr, filepath); |
2128 | 246 | fputs("!\n" | 246 | fputs("!\n" |
2129 | @@ -348,7 +348,7 @@ | |||
2130 | 348 | return(FALSE); | 348 | return(FALSE); |
2131 | 349 | } | 349 | } |
2132 | 350 | 350 | ||
2134 | 351 | @@ -4106,7 +4208,7 @@ | 351 | @@ -4138,7 +4240,7 @@ |
2135 | 352 | cannot be ok. */ | 352 | cannot be ok. */ |
2136 | 353 | 353 | ||
2137 | 354 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; | 354 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; |
2138 | @@ -357,7 +357,7 @@ | |||
2139 | 357 | if (size < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) { | 357 | if (size < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) { |
2140 | 358 | fprintf(stderr, | 358 | fprintf(stderr, |
2141 | 359 | "InnoDB: Error: the size of single-table tablespace" | 359 | "InnoDB: Error: the size of single-table tablespace" |
2143 | 360 | @@ -4236,7 +4338,51 @@ | 360 | @@ -4268,7 +4370,51 @@ |
2144 | 361 | 361 | ||
2145 | 362 | fil_node_create(filepath, 0, space_id, FALSE); | 362 | fil_node_create(filepath, 0, space_id, FALSE); |
2146 | 363 | func_exit: | 363 | func_exit: |
2147 | @@ -410,7 +410,7 @@ | |||
2148 | 410 | ut_free(buf2); | 410 | ut_free(buf2); |
2149 | 411 | mem_free(filepath); | 411 | mem_free(filepath); |
2150 | 412 | } | 412 | } |
2152 | 413 | @@ -4247,7 +4393,7 @@ | 413 | @@ -4279,7 +4425,7 @@ |
2153 | 414 | idea is to read as much good data as we can and jump over bad data. | 414 | idea is to read as much good data as we can and jump over bad data. |
2154 | 415 | @return 0 if ok, -1 if error even after the retries, 1 if at the end | 415 | @return 0 if ok, -1 if error even after the retries, 1 if at the end |
2155 | 416 | of the directory */ | 416 | of the directory */ |
2156 | @@ -419,7 +419,7 @@ | |||
2157 | 419 | int | 419 | int |
2158 | 420 | fil_file_readdir_next_file( | 420 | fil_file_readdir_next_file( |
2159 | 421 | /*=======================*/ | 421 | /*=======================*/ |
2161 | 422 | @@ -4291,7 +4437,7 @@ | 422 | @@ -4323,7 +4469,7 @@ |
2162 | 423 | @return DB_SUCCESS or error number */ | 423 | @return DB_SUCCESS or error number */ |
2163 | 424 | UNIV_INTERN | 424 | UNIV_INTERN |
2164 | 425 | ulint | 425 | ulint |
2165 | @@ -428,7 +428,7 @@ | |||
2166 | 428 | /*===================================*/ | 428 | /*===================================*/ |
2167 | 429 | { | 429 | { |
2168 | 430 | int ret; | 430 | int ret; |
2170 | 431 | @@ -4347,7 +4493,9 @@ | 431 | @@ -4379,7 +4525,9 @@ |
2171 | 432 | dbinfo.name); | 432 | dbinfo.name); |
2172 | 433 | srv_normalize_path_for_win(dbpath); | 433 | srv_normalize_path_for_win(dbpath); |
2173 | 434 | 434 | ||
2174 | @@ -439,7 +439,7 @@ | |||
2175 | 439 | 439 | ||
2176 | 440 | if (dbdir != NULL) { | 440 | if (dbdir != NULL) { |
2177 | 441 | /* printf("Opened dir %s\n", dbinfo.name); */ | 441 | /* printf("Opened dir %s\n", dbinfo.name); */ |
2179 | 442 | @@ -4373,8 +4521,11 @@ | 442 | @@ -4405,8 +4553,11 @@ |
2180 | 443 | ".ibd")) { | 443 | ".ibd")) { |
2181 | 444 | /* The name ends in .ibd; try opening | 444 | /* The name ends in .ibd; try opening |
2182 | 445 | the file */ | 445 | the file */ |
2183 | @@ -452,7 +452,7 @@ | |||
2184 | 452 | } | 452 | } |
2185 | 453 | next_file_item: | 453 | next_file_item: |
2186 | 454 | ret = fil_file_readdir_next_file(&err, | 454 | ret = fil_file_readdir_next_file(&err, |
2188 | 455 | @@ -4546,15 +4697,97 @@ | 455 | @@ -4578,15 +4729,97 @@ |
2189 | 456 | "InnoDB: in InnoDB data dictionary" | 456 | "InnoDB: in InnoDB data dictionary" |
2190 | 457 | " has tablespace id %lu,\n" | 457 | " has tablespace id %lu,\n" |
2191 | 458 | "InnoDB: but tablespace with that id" | 458 | "InnoDB: but tablespace with that id" |
2192 | @@ -558,7 +558,7 @@ | |||
2193 | 558 | } else { | 558 | } else { |
2194 | 559 | ut_print_timestamp(stderr); | 559 | ut_print_timestamp(stderr); |
2195 | 560 | fputs(" InnoDB: Error: table ", stderr); | 560 | fputs(" InnoDB: Error: table ", stderr); |
2197 | 561 | @@ -4953,7 +5186,7 @@ | 561 | @@ -4985,7 +5218,7 @@ |
2198 | 562 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys | 562 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
2199 | 563 | mutex. */ | 563 | mutex. */ |
2200 | 564 | static | 564 | static |
2201 | @@ -567,7 +567,7 @@ | |||
2202 | 567 | fil_node_prepare_for_io( | 567 | fil_node_prepare_for_io( |
2203 | 568 | /*====================*/ | 568 | /*====================*/ |
2204 | 569 | fil_node_t* node, /*!< in: file node */ | 569 | fil_node_t* node, /*!< in: file node */ |
2206 | 570 | @@ -4973,10 +5206,13 @@ | 570 | @@ -5005,10 +5238,13 @@ |
2207 | 571 | } | 571 | } |
2208 | 572 | 572 | ||
2209 | 573 | if (node->open == FALSE) { | 573 | if (node->open == FALSE) { |
2210 | @@ -582,7 +582,7 @@ | |||
2211 | 582 | } | 582 | } |
2212 | 583 | 583 | ||
2213 | 584 | if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE | 584 | if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE |
2215 | 585 | @@ -4989,6 +5225,8 @@ | 585 | @@ -5021,6 +5257,8 @@ |
2216 | 586 | } | 586 | } |
2217 | 587 | 587 | ||
2218 | 588 | node->n_pending++; | 588 | node->n_pending++; |
2219 | @@ -591,7 +591,7 @@ | |||
2220 | 591 | } | 591 | } |
2221 | 592 | 592 | ||
2222 | 593 | /********************************************************************//** | 593 | /********************************************************************//** |
2224 | 594 | @@ -5125,7 +5363,9 @@ | 594 | @@ -5157,7 +5395,9 @@ |
2225 | 595 | ut_ad(recv_no_ibuf_operations || (type == OS_FILE_WRITE) | 595 | ut_ad(recv_no_ibuf_operations || (type == OS_FILE_WRITE) |
2226 | 596 | || !ibuf_bitmap_page(zip_size, block_offset) | 596 | || !ibuf_bitmap_page(zip_size, block_offset) |
2227 | 597 | || sync || is_log); | 597 | || sync || is_log); |
2228 | @@ -602,7 +602,7 @@ | |||
2229 | 602 | || ibuf_page(space_id, zip_size, block_offset, NULL)); | 602 | || ibuf_page(space_id, zip_size, block_offset, NULL)); |
2230 | 603 | # endif /* UNIV_LOG_DEBUG */ | 603 | # endif /* UNIV_LOG_DEBUG */ |
2231 | 604 | if (sync) { | 604 | if (sync) { |
2233 | 605 | @@ -5190,6 +5430,16 @@ | 605 | @@ -5222,6 +5462,16 @@ |
2234 | 606 | 606 | ||
2235 | 607 | ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE)); | 607 | ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE)); |
2236 | 608 | 608 | ||
2237 | @@ -619,9 +619,24 @@ | |||
2238 | 619 | node = UT_LIST_GET_FIRST(space->chain); | 619 | node = UT_LIST_GET_FIRST(space->chain); |
2239 | 620 | 620 | ||
2240 | 621 | for (;;) { | 621 | for (;;) { |
2241 | 622 | @@ -5924,6 +6174,7 @@ | ||
2242 | 623 | const char* tmp_name) /*!< in: temp table name used while | ||
2243 | 624 | swapping */ | ||
2244 | 625 | { | ||
2245 | 626 | +#ifdef UNDEFINED | ||
2246 | 627 | mtr_t mtr; | ||
2247 | 628 | mtr_start(&mtr); | ||
2248 | 629 | fil_op_write_log(MLOG_FILE_RENAME, old_space_id, | ||
2249 | 630 | @@ -5931,5 +6182,6 @@ | ||
2250 | 631 | fil_op_write_log(MLOG_FILE_RENAME, new_space_id, | ||
2251 | 632 | 0, 0, new_name, old_name, &mtr); | ||
2252 | 633 | mtr_commit(&mtr); | ||
2253 | 634 | +#endif | ||
2254 | 635 | } | ||
2255 | 636 | |||
2256 | 622 | --- a/storage/innodb_plugin/handler/ha_innodb.cc | 637 | --- a/storage/innodb_plugin/handler/ha_innodb.cc |
2257 | 623 | +++ b/storage/innodb_plugin/handler/ha_innodb.cc | 638 | +++ b/storage/innodb_plugin/handler/ha_innodb.cc |
2259 | 624 | @@ -365,12 +365,6 @@ | 639 | @@ -388,12 +388,6 @@ |
2260 | 625 | "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.", | 640 | "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.", |
2261 | 626 | NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0); | 641 | NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0); |
2262 | 627 | 642 | ||
2263 | @@ -634,7 +649,7 @@ | |||
2264 | 634 | static MYSQL_THDVAR_BOOL(fake_changes, PLUGIN_VAR_OPCMDARG, | 649 | static MYSQL_THDVAR_BOOL(fake_changes, PLUGIN_VAR_OPCMDARG, |
2265 | 635 | "In the transaction after enabled, UPDATE, INSERT and DELETE only move the cursor to the records " | 650 | "In the transaction after enabled, UPDATE, INSERT and DELETE only move the cursor to the records " |
2266 | 636 | "and do nothing other operations (no changes, no ibuf, no undo, no transaction log) in the transaction. " | 651 | "and do nothing other operations (no changes, no ibuf, no undo, no transaction log) in the transaction. " |
2268 | 637 | @@ -760,17 +754,6 @@ | 652 | @@ -789,17 +783,6 @@ |
2269 | 638 | } | 653 | } |
2270 | 639 | 654 | ||
2271 | 640 | /******************************************************************//** | 655 | /******************************************************************//** |
2272 | @@ -652,7 +667,7 @@ | |||
2273 | 652 | Returns true if expand_fast_index_creation is enabled for the current | 667 | Returns true if expand_fast_index_creation is enabled for the current |
2274 | 653 | session. | 668 | session. |
2275 | 654 | @return the value of the server's expand_fast_index_creation variable */ | 669 | @return the value of the server's expand_fast_index_creation variable */ |
2277 | 655 | @@ -11966,7 +11949,6 @@ | 670 | @@ -12551,7 +12534,6 @@ |
2278 | 656 | MYSQL_SYSVAR(flush_neighbor_pages), | 671 | MYSQL_SYSVAR(flush_neighbor_pages), |
2279 | 657 | MYSQL_SYSVAR(read_ahead), | 672 | MYSQL_SYSVAR(read_ahead), |
2280 | 658 | MYSQL_SYSVAR(adaptive_checkpoint), | 673 | MYSQL_SYSVAR(adaptive_checkpoint), |
2281 | @@ -672,7 +687,7 @@ | |||
2282 | 672 | if (ibuf_fixed_addr_page(space, zip_size, page_no)) { | 687 | if (ibuf_fixed_addr_page(space, zip_size, page_no)) { |
2283 | 673 | 688 | ||
2284 | 674 | return(TRUE); | 689 | return(TRUE); |
2286 | 675 | @@ -2280,6 +2283,9 @@ | 690 | @@ -2278,6 +2281,9 @@ |
2287 | 676 | ulint n_bytes; | 691 | ulint n_bytes; |
2288 | 677 | ulint n_pag2; | 692 | ulint n_pag2; |
2289 | 678 | 693 | ||
2290 | @@ -684,7 +699,7 @@ | |||
2291 | 684 | 699 | ||
2292 | 685 | --- a/storage/innodb_plugin/include/fil0fil.h | 700 | --- a/storage/innodb_plugin/include/fil0fil.h |
2293 | 686 | +++ b/storage/innodb_plugin/include/fil0fil.h | 701 | +++ b/storage/innodb_plugin/include/fil0fil.h |
2295 | 687 | @@ -505,7 +505,7 @@ | 702 | @@ -509,7 +509,7 @@ |
2296 | 688 | @return DB_SUCCESS or error number */ | 703 | @return DB_SUCCESS or error number */ |
2297 | 689 | UNIV_INTERN | 704 | UNIV_INTERN |
2298 | 690 | ulint | 705 | ulint |
2299 | @@ -712,7 +727,7 @@ | |||
2300 | 712 | @return the value of the server's innodb_expand_fast_index_creation variable */ | 727 | @return the value of the server's innodb_expand_fast_index_creation variable */ |
2301 | 713 | --- a/storage/innodb_plugin/include/log0recv.h | 728 | --- a/storage/innodb_plugin/include/log0recv.h |
2302 | 714 | +++ b/storage/innodb_plugin/include/log0recv.h | 729 | +++ b/storage/innodb_plugin/include/log0recv.h |
2304 | 715 | @@ -444,7 +444,7 @@ | 730 | @@ -481,7 +481,7 @@ |
2305 | 716 | /* defined in os0file.c */ | 731 | /* defined in os0file.c */ |
2306 | 717 | #define OS_AIO_MERGE_N_CONSECUTIVE 64 | 732 | #define OS_AIO_MERGE_N_CONSECUTIVE 64 |
2307 | 718 | /* defined in log0recv.c */ | 733 | /* defined in log0recv.c */ |
2308 | @@ -723,7 +738,7 @@ | |||
2309 | 723 | 738 | ||
2310 | 724 | --- a/storage/innodb_plugin/include/mem0mem.ic | 739 | --- a/storage/innodb_plugin/include/mem0mem.ic |
2311 | 725 | +++ b/storage/innodb_plugin/include/mem0mem.ic | 740 | +++ b/storage/innodb_plugin/include/mem0mem.ic |
2313 | 726 | @@ -367,7 +367,7 @@ | 741 | @@ -363,7 +363,7 @@ |
2314 | 727 | buf = (byte*)buf + MEM_FIELD_HEADER_SIZE; | 742 | buf = (byte*)buf + MEM_FIELD_HEADER_SIZE; |
2315 | 728 | 743 | ||
2316 | 729 | /* Check that the field lengths agree */ | 744 | /* Check that the field lengths agree */ |
2317 | @@ -734,7 +749,7 @@ | |||
2318 | 734 | return(buf); | 749 | return(buf); |
2319 | 735 | --- a/storage/innodb_plugin/include/srv0srv.h | 750 | --- a/storage/innodb_plugin/include/srv0srv.h |
2320 | 736 | +++ b/storage/innodb_plugin/include/srv0srv.h | 751 | +++ b/storage/innodb_plugin/include/srv0srv.h |
2322 | 737 | @@ -226,6 +226,11 @@ | 752 | @@ -243,6 +243,11 @@ |
2323 | 738 | 753 | ||
2324 | 739 | extern ulong srv_replication_delay; | 754 | extern ulong srv_replication_delay; |
2325 | 740 | 755 | ||
2326 | @@ -816,7 +831,7 @@ | |||
2327 | 816 | 831 | ||
2328 | 817 | --- a/storage/innodb_plugin/log/log0log.c | 832 | --- a/storage/innodb_plugin/log/log0log.c |
2329 | 818 | +++ b/storage/innodb_plugin/log/log0log.c | 833 | +++ b/storage/innodb_plugin/log/log0log.c |
2331 | 819 | @@ -1370,7 +1370,7 @@ | 834 | @@ -1449,7 +1449,7 @@ |
2332 | 820 | #endif /* UNIV_DEBUG */ | 835 | #endif /* UNIV_DEBUG */ |
2333 | 821 | ulint unlock; | 836 | ulint unlock; |
2334 | 822 | 837 | ||
2335 | @@ -825,7 +840,7 @@ | |||
2336 | 825 | /* Recovery is running and no operations on the log files are | 840 | /* Recovery is running and no operations on the log files are |
2337 | 826 | allowed yet (the variable name .._no_ibuf_.. is misleading) */ | 841 | allowed yet (the variable name .._no_ibuf_.. is misleading) */ |
2338 | 827 | 842 | ||
2340 | 828 | @@ -2032,7 +2032,7 @@ | 843 | @@ -2117,7 +2117,7 @@ |
2341 | 829 | return(TRUE); | 844 | return(TRUE); |
2342 | 830 | } | 845 | } |
2343 | 831 | 846 | ||
2344 | @@ -834,7 +849,7 @@ | |||
2345 | 834 | 849 | ||
2346 | 835 | if (log_sys->n_pending_checkpoint_writes > 0) { | 850 | if (log_sys->n_pending_checkpoint_writes > 0) { |
2347 | 836 | /* A checkpoint write is running */ | 851 | /* A checkpoint write is running */ |
2349 | 837 | @@ -3127,6 +3127,7 @@ | 852 | @@ -3232,6 +3232,7 @@ |
2350 | 838 | shutdown, because the InnoDB layer may have committed or | 853 | shutdown, because the InnoDB layer may have committed or |
2351 | 839 | prepared transactions and we don't want to lose them. */ | 854 | prepared transactions and we don't want to lose them. */ |
2352 | 840 | 855 | ||
2353 | @@ -842,7 +857,7 @@ | |||
2354 | 842 | if (trx_n_mysql_transactions > 0 | 857 | if (trx_n_mysql_transactions > 0 |
2355 | 843 | || UT_LIST_GET_LEN(trx_sys->trx_list) > trx_n_prepared) { | 858 | || UT_LIST_GET_LEN(trx_sys->trx_list) > trx_n_prepared) { |
2356 | 844 | 859 | ||
2358 | 845 | @@ -3134,6 +3135,7 @@ | 860 | @@ -3239,6 +3240,7 @@ |
2359 | 846 | 861 | ||
2360 | 847 | goto loop; | 862 | goto loop; |
2361 | 848 | } | 863 | } |
2362 | @@ -885,7 +900,7 @@ | |||
2363 | 885 | 900 | ||
2364 | 886 | /** The recovery system */ | 901 | /** The recovery system */ |
2365 | 887 | UNIV_INTERN recv_sys_t* recv_sys = NULL; | 902 | UNIV_INTERN recv_sys_t* recv_sys = NULL; |
2367 | 888 | @@ -621,7 +622,7 @@ | 903 | @@ -622,7 +623,7 @@ |
2368 | 889 | /***********************************************************************//** | 904 | /***********************************************************************//** |
2369 | 890 | Checks the consistency of the checkpoint info | 905 | Checks the consistency of the checkpoint info |
2370 | 891 | @return TRUE if ok */ | 906 | @return TRUE if ok */ |
2371 | @@ -894,7 +909,7 @@ | |||
2372 | 894 | ibool | 909 | ibool |
2373 | 895 | recv_check_cp_is_consistent( | 910 | recv_check_cp_is_consistent( |
2374 | 896 | /*========================*/ | 911 | /*========================*/ |
2376 | 897 | @@ -651,7 +652,7 @@ | 912 | @@ -652,7 +653,7 @@ |
2377 | 898 | /********************************************************//** | 913 | /********************************************************//** |
2378 | 899 | Looks for the maximum consistent checkpoint from the log groups. | 914 | Looks for the maximum consistent checkpoint from the log groups. |
2379 | 900 | @return error code or DB_SUCCESS */ | 915 | @return error code or DB_SUCCESS */ |
2380 | @@ -903,16 +918,7 @@ | |||
2381 | 903 | ulint | 918 | ulint |
2382 | 904 | recv_find_max_checkpoint( | 919 | recv_find_max_checkpoint( |
2383 | 905 | /*=====================*/ | 920 | /*=====================*/ |
2394 | 906 | @@ -840,7 +841,7 @@ | 921 | @@ -1636,9 +1637,16 @@ |
2385 | 907 | InnoDB-3.23.52 where the checksum field contains the log block number. | ||
2386 | 908 | @return TRUE if ok, or if the log block may be in the format of InnoDB | ||
2387 | 909 | version predating 3.23.52 */ | ||
2388 | 910 | -static | ||
2389 | 911 | +//static | ||
2390 | 912 | ibool | ||
2391 | 913 | log_block_checksum_is_ok_or_old_format( | ||
2392 | 914 | /*===================================*/ | ||
2393 | 915 | @@ -1629,9 +1630,16 @@ | ||
2395 | 916 | if (page_zip) { | 922 | if (page_zip) { |
2396 | 917 | memset(FIL_PAGE_LSN + page_zip->data, 0, 8); | 923 | memset(FIL_PAGE_LSN + page_zip->data, 0, 8); |
2397 | 918 | } | 924 | } |
2398 | @@ -930,7 +936,7 @@ | |||
2399 | 930 | 936 | ||
2400 | 931 | ib_uint64_t end_lsn; | 937 | ib_uint64_t end_lsn; |
2401 | 932 | 938 | ||
2403 | 933 | @@ -1830,6 +1838,18 @@ | 939 | @@ -1838,6 +1846,18 @@ |
2404 | 934 | ulint zip_size = fil_space_get_zip_size(space); | 940 | ulint zip_size = fil_space_get_zip_size(space); |
2405 | 935 | ulint page_no = recv_addr->page_no; | 941 | ulint page_no = recv_addr->page_no; |
2406 | 936 | 942 | ||
2407 | @@ -949,7 +955,7 @@ | |||
2408 | 949 | if (recv_addr->state == RECV_NOT_PROCESSED) { | 955 | if (recv_addr->state == RECV_NOT_PROCESSED) { |
2409 | 950 | if (!has_printed) { | 956 | if (!has_printed) { |
2410 | 951 | ut_print_timestamp(stderr); | 957 | ut_print_timestamp(stderr); |
2412 | 952 | @@ -1863,7 +1883,7 @@ | 958 | @@ -1871,7 +1891,7 @@ |
2413 | 953 | 959 | ||
2414 | 954 | mutex_enter(&(recv_sys->mutex)); | 960 | mutex_enter(&(recv_sys->mutex)); |
2415 | 955 | } | 961 | } |
2416 | @@ -958,7 +964,7 @@ | |||
2417 | 958 | recv_addr = HASH_GET_NEXT(addr_hash, recv_addr); | 964 | recv_addr = HASH_GET_NEXT(addr_hash, recv_addr); |
2418 | 959 | } | 965 | } |
2419 | 960 | 966 | ||
2421 | 961 | @@ -2369,7 +2389,7 @@ | 967 | @@ -2377,7 +2397,7 @@ |
2422 | 962 | || type == MLOG_FILE_RENAME | 968 | || type == MLOG_FILE_RENAME |
2423 | 963 | || type == MLOG_FILE_DELETE) { | 969 | || type == MLOG_FILE_DELETE) { |
2424 | 964 | ut_a(space); | 970 | ut_a(space); |
2425 | @@ -967,7 +973,7 @@ | |||
2426 | 967 | if (recv_replay_file_ops) { | 973 | if (recv_replay_file_ops) { |
2427 | 968 | 974 | ||
2428 | 969 | /* In ibbackup --apply-log, replay an .ibd file | 975 | /* In ibbackup --apply-log, replay an .ibd file |
2430 | 970 | @@ -2392,7 +2412,7 @@ | 976 | @@ -2400,7 +2420,7 @@ |
2431 | 971 | ut_error; | 977 | ut_error; |
2432 | 972 | } | 978 | } |
2433 | 973 | } | 979 | } |
2434 | @@ -976,7 +982,7 @@ | |||
2435 | 976 | /* In normal mysqld crash recovery we do not try to | 982 | /* In normal mysqld crash recovery we do not try to |
2436 | 977 | replay file operations */ | 983 | replay file operations */ |
2437 | 978 | #ifdef UNIV_LOG_LSN_DEBUG | 984 | #ifdef UNIV_LOG_LSN_DEBUG |
2439 | 979 | @@ -2809,8 +2829,11 @@ | 985 | @@ -2817,8 +2837,11 @@ |
2440 | 980 | 986 | ||
2441 | 981 | fprintf(stderr, | 987 | fprintf(stderr, |
2442 | 982 | "InnoDB: Doing recovery: scanned up to" | 988 | "InnoDB: Doing recovery: scanned up to" |
2443 | @@ -990,7 +996,7 @@ | |||
2444 | 990 | } | 996 | } |
2445 | 991 | } | 997 | } |
2446 | 992 | 998 | ||
2448 | 993 | @@ -2913,7 +2936,7 @@ | 999 | @@ -2921,7 +2944,7 @@ |
2449 | 994 | "InnoDB: Reading tablespace information" | 1000 | "InnoDB: Reading tablespace information" |
2450 | 995 | " from the .ibd files...\n"); | 1001 | " from the .ibd files...\n"); |
2451 | 996 | 1002 | ||
2452 | @@ -999,7 +1005,7 @@ | |||
2453 | 999 | 1005 | ||
2454 | 1000 | /* If we are using the doublewrite method, we will | 1006 | /* If we are using the doublewrite method, we will |
2455 | 1001 | check if there are half-written pages in data files, | 1007 | check if there are half-written pages in data files, |
2457 | 1002 | @@ -2922,12 +2945,14 @@ | 1008 | @@ -2930,12 +2953,14 @@ |
2458 | 1003 | 1009 | ||
2459 | 1004 | if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { | 1010 | if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { |
2460 | 1005 | 1011 | ||
2461 | @@ -1015,7 +1021,7 @@ | |||
2462 | 1015 | } | 1021 | } |
2463 | 1016 | } | 1022 | } |
2464 | 1017 | 1023 | ||
2466 | 1018 | @@ -3095,6 +3120,7 @@ | 1024 | @@ -3103,6 +3128,7 @@ |
2467 | 1019 | recv_sys->recovered_lsn = checkpoint_lsn; | 1025 | recv_sys->recovered_lsn = checkpoint_lsn; |
2468 | 1020 | 1026 | ||
2469 | 1021 | srv_start_lsn = checkpoint_lsn; | 1027 | srv_start_lsn = checkpoint_lsn; |
2470 | @@ -1023,7 +1029,7 @@ | |||
2471 | 1023 | } | 1029 | } |
2472 | 1024 | 1030 | ||
2473 | 1025 | contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn, | 1031 | contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn, |
2475 | 1026 | @@ -3453,6 +3479,7 @@ | 1032 | @@ -3461,6 +3487,7 @@ |
2476 | 1027 | that the data dictionary tables will be free of any locks. | 1033 | that the data dictionary tables will be free of any locks. |
2477 | 1028 | The data dictionary latch should guarantee that there is at | 1034 | The data dictionary latch should guarantee that there is at |
2478 | 1029 | most one data dictionary transaction active at a time. */ | 1035 | most one data dictionary transaction active at a time. */ |
2479 | @@ -1042,7 +1048,7 @@ | |||
2480 | 1042 | #if defined(UNIV_HOTBACKUP) || defined(__WIN__) || defined(__NETWARE__) | 1048 | #if defined(UNIV_HOTBACKUP) || defined(__WIN__) || defined(__NETWARE__) |
2481 | 1043 | /* InnoDB Hot Backup does not lock the data files. | 1049 | /* InnoDB Hot Backup does not lock the data files. |
2482 | 1044 | * On Windows, mandatory locking is used. | 1050 | * On Windows, mandatory locking is used. |
2484 | 1045 | @@ -1357,8 +1357,9 @@ | 1051 | @@ -1365,8 +1365,9 @@ |
2485 | 1046 | attributes = 0; | 1052 | attributes = 0; |
2486 | 1047 | ut_error; | 1053 | ut_error; |
2487 | 1048 | } | 1054 | } |
2488 | @@ -1053,7 +1059,7 @@ | |||
2489 | 1053 | GENERIC_READ | GENERIC_WRITE, /* read and write | 1059 | GENERIC_READ | GENERIC_WRITE, /* read and write |
2490 | 1054 | access */ | 1060 | access */ |
2491 | 1055 | share_mode, /* File can be read also by other | 1061 | share_mode, /* File can be read also by other |
2493 | 1056 | @@ -1417,7 +1418,11 @@ | 1062 | @@ -1432,7 +1433,11 @@ |
2494 | 1057 | if (create_mode == OS_FILE_OPEN || create_mode == OS_FILE_OPEN_RAW | 1063 | if (create_mode == OS_FILE_OPEN || create_mode == OS_FILE_OPEN_RAW |
2495 | 1058 | || create_mode == OS_FILE_OPEN_RETRY) { | 1064 | || create_mode == OS_FILE_OPEN_RETRY) { |
2496 | 1059 | mode_str = "OPEN"; | 1065 | mode_str = "OPEN"; |
2497 | @@ -1066,7 +1072,7 @@ | |||
2498 | 1066 | } else if (create_mode == OS_FILE_CREATE) { | 1072 | } else if (create_mode == OS_FILE_CREATE) { |
2499 | 1067 | mode_str = "CREATE"; | 1073 | mode_str = "CREATE"; |
2500 | 1068 | create_flag = O_RDWR | O_CREAT | O_EXCL; | 1074 | create_flag = O_RDWR | O_CREAT | O_EXCL; |
2502 | 1069 | @@ -2682,6 +2687,9 @@ | 1075 | @@ -2716,6 +2721,9 @@ |
2503 | 1070 | ut_a((offset & 0xFFFFFFFFUL) == offset); | 1076 | ut_a((offset & 0xFFFFFFFFUL) == offset); |
2504 | 1071 | ut_a((n & 0xFFFFFFFFUL) == n); | 1077 | ut_a((n & 0xFFFFFFFFUL) == n); |
2505 | 1072 | 1078 | ||
2506 | @@ -1076,7 +1082,7 @@ | |||
2507 | 1076 | os_n_file_writes++; | 1082 | os_n_file_writes++; |
2508 | 1077 | 1083 | ||
2509 | 1078 | ut_ad(file); | 1084 | ut_ad(file); |
2511 | 1079 | @@ -2806,6 +2814,9 @@ | 1085 | @@ -2840,6 +2848,9 @@ |
2512 | 1080 | #else | 1086 | #else |
2513 | 1081 | ssize_t ret; | 1087 | ssize_t ret; |
2514 | 1082 | 1088 | ||
2515 | @@ -1108,9 +1114,9 @@ | |||
2516 | 1108 | 1114 | ||
2517 | 1109 | --- a/storage/innodb_plugin/srv/srv0srv.c | 1115 | --- a/storage/innodb_plugin/srv/srv0srv.c |
2518 | 1110 | +++ b/storage/innodb_plugin/srv/srv0srv.c | 1116 | +++ b/storage/innodb_plugin/srv/srv0srv.c |
2522 | 1111 | @@ -86,11 +86,6 @@ | 1117 | @@ -96,11 +96,6 @@ |
2523 | 1112 | #include "trx0i_s.h" | 1118 | # include "my_sys.h" /* DEBUG_SYNC_C */ |
2524 | 1113 | #include "os0sync.h" /* for HAVE_ATOMIC_BUILTINS */ | 1119 | #endif |
2525 | 1114 | 1120 | ||
2526 | 1115 | -/* prototypes of new functions added to ha_innodb.cc for kill_idle_transaction */ | 1121 | -/* prototypes of new functions added to ha_innodb.cc for kill_idle_transaction */ |
2527 | 1116 | -ibool innobase_thd_is_idle(const void* thd); | 1122 | -ibool innobase_thd_is_idle(const void* thd); |
2528 | @@ -1120,7 +1126,7 @@ | |||
2529 | 1120 | /* prototypes for new functions added to ha_innodb.cc */ | 1126 | /* prototypes for new functions added to ha_innodb.cc */ |
2530 | 1121 | ibool innobase_get_slow_log(); | 1127 | ibool innobase_get_slow_log(); |
2531 | 1122 | 1128 | ||
2533 | 1123 | @@ -415,6 +410,11 @@ | 1129 | @@ -438,6 +433,11 @@ |
2534 | 1124 | 1130 | ||
2535 | 1125 | UNIV_INTERN ulong srv_replication_delay = 0; | 1131 | UNIV_INTERN ulong srv_replication_delay = 0; |
2536 | 1126 | 1132 | ||
2537 | @@ -1132,7 +1138,7 @@ | |||
2538 | 1132 | UNIV_INTERN long long srv_ibuf_max_size = 0; | 1138 | UNIV_INTERN long long srv_ibuf_max_size = 0; |
2539 | 1133 | UNIV_INTERN ulint srv_ibuf_active_contract = 0; /* 0:disable 1:enable */ | 1139 | UNIV_INTERN ulint srv_ibuf_active_contract = 0; /* 0:disable 1:enable */ |
2540 | 1134 | UNIV_INTERN ulint srv_ibuf_accel_rate = 100; | 1140 | UNIV_INTERN ulint srv_ibuf_accel_rate = 100; |
2542 | 1135 | @@ -1065,7 +1065,7 @@ | 1141 | @@ -1095,7 +1095,7 @@ |
2543 | 1136 | } | 1142 | } |
2544 | 1137 | 1143 | ||
2545 | 1138 | /* Initialize some INFORMATION SCHEMA internal structures */ | 1144 | /* Initialize some INFORMATION SCHEMA internal structures */ |
2546 | @@ -1141,7 +1147,7 @@ | |||
2547 | 1141 | } | 1147 | } |
2548 | 1142 | 1148 | ||
2549 | 1143 | /*********************************************************************//** | 1149 | /*********************************************************************//** |
2551 | 1144 | @@ -1076,6 +1076,7 @@ | 1150 | @@ -1106,6 +1106,7 @@ |
2552 | 1145 | /*==========*/ | 1151 | /*==========*/ |
2553 | 1146 | { | 1152 | { |
2554 | 1147 | os_fast_mutex_free(&srv_conc_mutex); | 1153 | os_fast_mutex_free(&srv_conc_mutex); |
2555 | @@ -1149,7 +1155,7 @@ | |||
2556 | 1149 | mem_free(srv_conc_slots); | 1155 | mem_free(srv_conc_slots); |
2557 | 1150 | srv_conc_slots = NULL; | 1156 | srv_conc_slots = NULL; |
2558 | 1151 | 1157 | ||
2560 | 1152 | @@ -1089,6 +1090,7 @@ | 1158 | @@ -1119,6 +1120,7 @@ |
2561 | 1153 | srv_mysql_table = NULL; | 1159 | srv_mysql_table = NULL; |
2562 | 1154 | 1160 | ||
2563 | 1155 | trx_i_s_cache_free(trx_i_s_cache); | 1161 | trx_i_s_cache_free(trx_i_s_cache); |
2564 | @@ -1157,7 +1163,7 @@ | |||
2565 | 1157 | } | 1163 | } |
2566 | 1158 | 1164 | ||
2567 | 1159 | /*********************************************************************//** | 1165 | /*********************************************************************//** |
2569 | 1160 | @@ -2570,36 +2572,6 @@ | 1166 | @@ -2634,36 +2636,6 @@ |
2570 | 1161 | old_sema = sema; | 1167 | old_sema = sema; |
2571 | 1162 | } | 1168 | } |
2572 | 1163 | 1169 | ||
2573 | @@ -1196,7 +1202,7 @@ | |||
2574 | 1196 | 1202 | ||
2575 | 1197 | --- a/storage/innodb_plugin/srv/srv0start.c | 1203 | --- a/storage/innodb_plugin/srv/srv0start.c |
2576 | 1198 | +++ b/storage/innodb_plugin/srv/srv0start.c | 1204 | +++ b/storage/innodb_plugin/srv/srv0start.c |
2578 | 1199 | @@ -62,6 +62,7 @@ | 1205 | @@ -63,6 +63,7 @@ |
2579 | 1200 | #include "ibuf0ibuf.h" | 1206 | #include "ibuf0ibuf.h" |
2580 | 1201 | #include "srv0start.h" | 1207 | #include "srv0start.h" |
2581 | 1202 | #include "srv0srv.h" | 1208 | #include "srv0srv.h" |
2582 | @@ -1204,7 +1210,7 @@ | |||
2583 | 1204 | #ifndef UNIV_HOTBACKUP | 1210 | #ifndef UNIV_HOTBACKUP |
2584 | 1205 | # include "os0proc.h" | 1211 | # include "os0proc.h" |
2585 | 1206 | # include "sync0sync.h" | 1212 | # include "sync0sync.h" |
2587 | 1207 | @@ -95,6 +96,8 @@ | 1213 | @@ -96,6 +97,8 @@ |
2588 | 1208 | /** Log sequence number at shutdown */ | 1214 | /** Log sequence number at shutdown */ |
2589 | 1209 | UNIV_INTERN ib_uint64_t srv_shutdown_lsn; | 1215 | UNIV_INTERN ib_uint64_t srv_shutdown_lsn; |
2590 | 1210 | 1216 | ||
2591 | @@ -1213,7 +1219,7 @@ | |||
2592 | 1213 | #ifdef HAVE_DARWIN_THREADS | 1219 | #ifdef HAVE_DARWIN_THREADS |
2593 | 1214 | # include <sys/utsname.h> | 1220 | # include <sys/utsname.h> |
2594 | 1215 | /** TRUE if the F_FULLFSYNC option is available */ | 1221 | /** TRUE if the F_FULLFSYNC option is available */ |
2596 | 1216 | @@ -545,7 +548,7 @@ | 1222 | @@ -540,7 +543,7 @@ |
2597 | 1217 | /*********************************************************************//** | 1223 | /*********************************************************************//** |
2598 | 1218 | Creates or opens the log files and closes them. | 1224 | Creates or opens the log files and closes them. |
2599 | 1219 | @return DB_SUCCESS or error code */ | 1225 | @return DB_SUCCESS or error code */ |
2600 | @@ -1222,7 +1228,7 @@ | |||
2601 | 1222 | ulint | 1228 | ulint |
2602 | 1223 | open_or_create_log_file( | 1229 | open_or_create_log_file( |
2603 | 1224 | /*====================*/ | 1230 | /*====================*/ |
2605 | 1225 | @@ -703,7 +706,7 @@ | 1231 | @@ -698,7 +701,7 @@ |
2606 | 1226 | /*********************************************************************//** | 1232 | /*********************************************************************//** |
2607 | 1227 | Creates or opens database data files and closes them. | 1233 | Creates or opens database data files and closes them. |
2608 | 1228 | @return DB_SUCCESS or error code */ | 1234 | @return DB_SUCCESS or error code */ |
2609 | @@ -1231,7 +1237,7 @@ | |||
2610 | 1231 | ulint | 1237 | ulint |
2611 | 1232 | open_or_create_data_files( | 1238 | open_or_create_data_files( |
2612 | 1233 | /*======================*/ | 1239 | /*======================*/ |
2614 | 1234 | @@ -1782,6 +1785,10 @@ | 1240 | @@ -1804,6 +1807,10 @@ |
2615 | 1235 | are initialized in trx_sys_init_at_db_start(). */ | 1241 | are initialized in trx_sys_init_at_db_start(). */ |
2616 | 1236 | 1242 | ||
2617 | 1237 | recv_recovery_from_checkpoint_finish(); | 1243 | recv_recovery_from_checkpoint_finish(); |
2618 | @@ -1242,7 +1248,7 @@ | |||
2619 | 1242 | if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) { | 1248 | if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) { |
2620 | 1243 | /* The following call is necessary for the insert | 1249 | /* The following call is necessary for the insert |
2621 | 1244 | buffer to work with multiple tablespaces. We must | 1250 | buffer to work with multiple tablespaces. We must |
2623 | 1245 | @@ -1962,7 +1969,18 @@ | 1251 | @@ -1990,7 +1997,18 @@ |
2624 | 1246 | 1252 | ||
2625 | 1247 | if (srv_auto_extend_last_data_file | 1253 | if (srv_auto_extend_last_data_file |
2626 | 1248 | && sum_of_data_file_sizes < tablespace_size_in_header) { | 1254 | && sum_of_data_file_sizes < tablespace_size_in_header) { |
2627 | @@ -1261,7 +1267,7 @@ | |||
2628 | 1261 | fprintf(stderr, | 1267 | fprintf(stderr, |
2629 | 1262 | "InnoDB: Error: tablespace size stored in header" | 1268 | "InnoDB: Error: tablespace size stored in header" |
2630 | 1263 | " is %lu pages, but\n" | 1269 | " is %lu pages, but\n" |
2632 | 1264 | @@ -1987,6 +2005,7 @@ | 1270 | @@ -2015,6 +2033,7 @@ |
2633 | 1265 | 1271 | ||
2634 | 1266 | return(DB_ERROR); | 1272 | return(DB_ERROR); |
2635 | 1267 | } | 1273 | } |
2636 | @@ -1269,7 +1275,7 @@ | |||
2637 | 1269 | } | 1275 | } |
2638 | 1270 | 1276 | ||
2639 | 1271 | /* Check that os_fast_mutexes work as expected */ | 1277 | /* Check that os_fast_mutexes work as expected */ |
2641 | 1272 | @@ -2008,6 +2027,10 @@ | 1278 | @@ -2036,6 +2055,10 @@ |
2642 | 1273 | 1279 | ||
2643 | 1274 | os_fast_mutex_free(&srv_os_test_mutex); | 1280 | os_fast_mutex_free(&srv_os_test_mutex); |
2644 | 1275 | 1281 | ||
2645 | @@ -1280,7 +1286,7 @@ | |||
2646 | 1280 | if (!srv_file_per_table_original_value | 1286 | if (!srv_file_per_table_original_value |
2647 | 1281 | && srv_pass_corrupt_table) { | 1287 | && srv_pass_corrupt_table) { |
2648 | 1282 | fprintf(stderr, "InnoDB: Warning:" | 1288 | fprintf(stderr, "InnoDB: Warning:" |
2650 | 1283 | @@ -2089,6 +2112,7 @@ | 1289 | @@ -2117,6 +2140,7 @@ |
2651 | 1284 | ibuf_update_max_tablespace_id(); | 1290 | ibuf_update_max_tablespace_id(); |
2652 | 1285 | } | 1291 | } |
2653 | 1286 | 1292 | ||
2654 | @@ -1290,9 +1296,9 @@ | |||
2655 | 1290 | srv_was_started = TRUE; | 1296 | srv_was_started = TRUE; |
2656 | 1291 | --- a/storage/innodb_plugin/trx/trx0purge.c | 1297 | --- a/storage/innodb_plugin/trx/trx0purge.c |
2657 | 1292 | +++ b/storage/innodb_plugin/trx/trx0purge.c | 1298 | +++ b/storage/innodb_plugin/trx/trx0purge.c |
2659 | 1293 | @@ -1113,6 +1113,9 @@ | 1299 | @@ -1119,6 +1119,9 @@ |
2660 | 1294 | /* que_thr_t* thr2; */ | 1300 | /* que_thr_t* thr2; */ |
2662 | 1295 | ulint old_pages_handled; | 1301 | ulonglong old_pages_handled; |
2663 | 1296 | 1302 | ||
2664 | 1297 | + if (srv_fake_write) | 1303 | + if (srv_fake_write) |
2665 | 1298 | + return(0); | 1304 | + return(0); |
2666 | @@ -1316,7 +1322,7 @@ | |||
2667 | 1316 | 1322 | ||
2668 | 1317 | --- a/storage/innodb_plugin/trx/trx0sys.c | 1323 | --- a/storage/innodb_plugin/trx/trx0sys.c |
2669 | 1318 | +++ b/storage/innodb_plugin/trx/trx0sys.c | 1324 | +++ b/storage/innodb_plugin/trx/trx0sys.c |
2671 | 1319 | @@ -1910,12 +1910,14 @@ | 1325 | @@ -1944,12 +1944,14 @@ |
2672 | 1320 | mem_free(trx_doublewrite); | 1326 | mem_free(trx_doublewrite); |
2673 | 1321 | trx_doublewrite = NULL; | 1327 | trx_doublewrite = NULL; |
2674 | 1322 | 1328 | ||
2675 | @@ -1331,7 +1337,7 @@ | |||
2676 | 1331 | 1337 | ||
2677 | 1332 | /* There can't be any active transactions. */ | 1338 | /* There can't be any active transactions. */ |
2678 | 1333 | rseg = UT_LIST_GET_FIRST(trx_sys->rseg_list); | 1339 | rseg = UT_LIST_GET_FIRST(trx_sys->rseg_list); |
2680 | 1334 | @@ -1941,10 +1943,12 @@ | 1340 | @@ -1975,10 +1977,12 @@ |
2681 | 1335 | UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view); | 1341 | UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view); |
2682 | 1336 | } | 1342 | } |
2683 | 1337 | 1343 | ||
2684 | @@ -1389,7 +1395,7 @@ | |||
2685 | 1389 | mutex_enter(&kernel_mutex); | 1395 | mutex_enter(&kernel_mutex); |
2686 | 1390 | 1396 | ||
2687 | 1391 | ret = trx_start_low(trx, rseg_id); | 1397 | ret = trx_start_low(trx, rseg_id); |
2689 | 1392 | @@ -990,7 +984,6 @@ | 1398 | @@ -1000,7 +994,6 @@ |
2690 | 1393 | trx->read_view = NULL; | 1399 | trx->read_view = NULL; |
2691 | 1394 | 1400 | ||
2692 | 1395 | if (lsn) { | 1401 | if (lsn) { |
2693 | @@ -1397,7 +1403,7 @@ | |||
2694 | 1397 | 1403 | ||
2695 | 1398 | mutex_exit(&kernel_mutex); | 1404 | mutex_exit(&kernel_mutex); |
2696 | 1399 | 1405 | ||
2698 | 1400 | @@ -999,11 +992,6 @@ | 1406 | @@ -1009,11 +1002,6 @@ |
2699 | 1401 | trx_undo_insert_cleanup(trx); | 1407 | trx_undo_insert_cleanup(trx); |
2700 | 1402 | } | 1408 | } |
2701 | 1403 | 1409 | ||
2702 | @@ -1409,7 +1415,7 @@ | |||
2703 | 1409 | 1415 | ||
2704 | 1410 | /* NOTE that we could possibly make a group commit more | 1416 | /* NOTE that we could possibly make a group commit more |
2705 | 1411 | efficient here: call os_thread_yield here to allow also other | 1417 | efficient here: call os_thread_yield here to allow also other |
2707 | 1412 | @@ -1036,9 +1024,9 @@ | 1418 | @@ -1046,9 +1034,9 @@ |
2708 | 1413 | if (trx->flush_log_later) { | 1419 | if (trx->flush_log_later) { |
2709 | 1414 | /* Do nothing yet */ | 1420 | /* Do nothing yet */ |
2710 | 1415 | trx->must_flush_log_later = TRUE; | 1421 | trx->must_flush_log_later = TRUE; |
2711 | @@ -1421,7 +1427,7 @@ | |||
2712 | 1421 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { | 1427 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { |
2713 | 1422 | /* Write the log but do not flush it to disk */ | 1428 | /* Write the log but do not flush it to disk */ |
2714 | 1423 | 1429 | ||
2716 | 1424 | @@ -1050,7 +1038,7 @@ | 1430 | @@ -1060,7 +1048,7 @@ |
2717 | 1425 | 1431 | ||
2718 | 1426 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); | 1432 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); |
2719 | 1427 | } | 1433 | } |
2720 | @@ -1430,7 +1436,7 @@ | |||
2721 | 1430 | 1436 | ||
2722 | 1431 | /* Write the log but do not flush it to disk */ | 1437 | /* Write the log but do not flush it to disk */ |
2723 | 1432 | 1438 | ||
2725 | 1433 | @@ -1730,23 +1718,16 @@ | 1439 | @@ -1742,23 +1730,16 @@ |
2726 | 1434 | trx_t* trx) /*!< in: trx handle */ | 1440 | trx_t* trx) /*!< in: trx handle */ |
2727 | 1435 | { | 1441 | { |
2728 | 1436 | ib_uint64_t lsn = trx->commit_lsn; | 1442 | ib_uint64_t lsn = trx->commit_lsn; |
2729 | @@ -1456,7 +1462,7 @@ | |||
2730 | 1456 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { | 1462 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { |
2731 | 1457 | /* Write the log but do not flush it to disk */ | 1463 | /* Write the log but do not flush it to disk */ |
2732 | 1458 | 1464 | ||
2734 | 1459 | @@ -1757,7 +1738,7 @@ | 1465 | @@ -1769,7 +1750,7 @@ |
2735 | 1460 | 1466 | ||
2736 | 1461 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); | 1467 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); |
2737 | 1462 | } | 1468 | } |
2738 | @@ -1465,7 +1471,7 @@ | |||
2739 | 1465 | 1471 | ||
2740 | 1466 | /* Write the log but do not flush it to disk */ | 1472 | /* Write the log but do not flush it to disk */ |
2741 | 1467 | 1473 | ||
2743 | 1468 | @@ -2018,8 +1999,6 @@ | 1474 | @@ -2047,8 +2028,6 @@ |
2744 | 1469 | /*--------------------------------------*/ | 1475 | /*--------------------------------------*/ |
2745 | 1470 | 1476 | ||
2746 | 1471 | if (lsn) { | 1477 | if (lsn) { |
2747 | @@ -1474,7 +1480,7 @@ | |||
2748 | 1474 | /* Depending on the my.cnf options, we may now write the log | 1480 | /* Depending on the my.cnf options, we may now write the log |
2749 | 1475 | buffer to the log files, making the prepared state of the | 1481 | buffer to the log files, making the prepared state of the |
2750 | 1476 | transaction durable if the OS does not crash. We may also | 1482 | transaction durable if the OS does not crash. We may also |
2752 | 1477 | @@ -2039,15 +2018,9 @@ | 1483 | @@ -2068,15 +2047,9 @@ |
2753 | 1478 | 1484 | ||
2754 | 1479 | mutex_exit(&kernel_mutex); | 1485 | mutex_exit(&kernel_mutex); |
2755 | 1480 | 1486 | ||
2756 | @@ -1492,7 +1498,7 @@ | |||
2757 | 1492 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { | 1498 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { |
2758 | 1493 | /* Write the log but do not flush it to disk */ | 1499 | /* Write the log but do not flush it to disk */ |
2759 | 1494 | 1500 | ||
2761 | 1495 | @@ -2059,7 +2032,7 @@ | 1501 | @@ -2088,7 +2061,7 @@ |
2762 | 1496 | 1502 | ||
2763 | 1497 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); | 1503 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); |
2764 | 1498 | } | 1504 | } |
2765 | @@ -1511,9 +1517,9 @@ | |||
2766 | 1511 | 1517 | ||
2767 | 1512 | /* | 1518 | /* |
2768 | 1513 | WAIT ARRAY | 1519 | WAIT ARRAY |
2772 | 1514 | @@ -926,6 +927,13 @@ | 1520 | @@ -931,6 +932,13 @@ |
2773 | 1515 | ibool fatal = FALSE; | 1521 | return(FALSE); |
2774 | 1516 | double longest_diff = 0; | 1522 | } |
2775 | 1517 | 1523 | ||
2776 | 1518 | + if (srv_rebuild_indexes) { | 1524 | + if (srv_rebuild_indexes) { |
2777 | 1519 | + | 1525 | + |
2778 | @@ -1522,12 +1528,12 @@ | |||
2779 | 1522 | + return(FALSE); | 1528 | + return(FALSE); |
2780 | 1523 | + } | 1529 | + } |
2781 | 1524 | + | 1530 | + |
2782 | 1531 | sync_array_enter(sync_primary_wait_array); | ||
2783 | 1532 | |||
2784 | 1525 | for (i = 0; i < sync_primary_wait_array->n_cells; i++) { | 1533 | for (i = 0; i < sync_primary_wait_array->n_cells; i++) { |
2785 | 1526 | |||
2786 | 1527 | double diff; | ||
2787 | 1528 | --- a/storage/innodb_plugin/include/buf0buf.h | 1534 | --- a/storage/innodb_plugin/include/buf0buf.h |
2788 | 1529 | +++ b/storage/innodb_plugin/include/buf0buf.h | 1535 | +++ b/storage/innodb_plugin/include/buf0buf.h |
2790 | 1530 | @@ -1211,6 +1211,8 @@ | 1536 | @@ -1295,6 +1295,8 @@ |
2791 | 1531 | frees a page in buffer pool */ | 1537 | frees a page in buffer pool */ |
2792 | 1532 | # endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ | 1538 | # endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ |
2793 | 1533 | #endif /* !UNIV_HOTBACKUP */ | 1539 | #endif /* !UNIV_HOTBACKUP */ |
2794 | @@ -1579,14 +1585,3 @@ | |||
2795 | 1579 | 1585 | ||
2796 | 1580 | UNIV_MEM_FREE(buf, n); | 1586 | UNIV_MEM_FREE(buf, n); |
2797 | 1581 | } | 1587 | } |
2798 | 1582 | --- a/configure.in | ||
2799 | 1583 | +++ b/configure.in | ||
2800 | 1584 | @@ -22,7 +22,7 @@ | ||
2801 | 1585 | AM_INIT_AUTOMAKE([1.9 tar-ustar]) | ||
2802 | 1586 | AC_PROG_LIBTOOL | ||
2803 | 1587 | |||
2804 | 1588 | -AM_CONFIG_HEADER([include/config.h]) | ||
2805 | 1589 | +AC_CONFIG_HEADERS([include/config.h]) | ||
2806 | 1590 | |||
2807 | 1591 | # Request support for automake silent-rules if available. | ||
2808 | 1592 | # Default to verbose output. One can use the configure-time | ||
2809 | 1593 | 1588 | ||
2810 | === modified file 'patches/xtradb55.patch' | |||
2811 | --- patches/xtradb55.patch 2013-05-07 13:32:47 +0000 | |||
2812 | +++ patches/xtradb55.patch 2013-07-22 14:01:36 +0000 | |||
2813 | @@ -1,6 +1,7 @@ | |||
2814 | 1 | === modified file 'Percona-Server/storage/innobase/btr/btr0btr.c' | ||
2815 | 1 | --- a/storage/innobase/btr/btr0btr.c | 2 | --- a/storage/innobase/btr/btr0btr.c |
2816 | 2 | +++ b/storage/innobase/btr/btr0btr.c | 3 | +++ b/storage/innobase/btr/btr0btr.c |
2818 | 3 | @@ -674,7 +674,7 @@ | 4 | @@ -704,7 +704,7 @@ |
2819 | 4 | /**************************************************************//** | 5 | /**************************************************************//** |
2820 | 5 | Gets the root node of a tree and x-latches it. | 6 | Gets the root node of a tree and x-latches it. |
2821 | 6 | @return root page, x-latched */ | 7 | @return root page, x-latched */ |
2822 | @@ -9,7 +10,7 @@ | |||
2823 | 9 | buf_block_t* | 10 | buf_block_t* |
2824 | 10 | btr_root_block_get( | 11 | btr_root_block_get( |
2825 | 11 | /*===============*/ | 12 | /*===============*/ |
2827 | 12 | @@ -1134,7 +1134,7 @@ | 13 | @@ -1209,7 +1209,7 @@ |
2828 | 13 | /************************************************************//** | 14 | /************************************************************//** |
2829 | 14 | Returns the child page of a node pointer and x-latches it. | 15 | Returns the child page of a node pointer and x-latches it. |
2830 | 15 | @return child page, x-latched */ | 16 | @return child page, x-latched */ |
2831 | @@ -28,7 +29,7 @@ | |||
2832 | 28 | 29 | ||
2833 | 29 | /* prototypes for new functions added to ha_innodb.cc */ | 30 | /* prototypes for new functions added to ha_innodb.cc */ |
2834 | 30 | trx_t* innobase_get_trx(); | 31 | trx_t* innobase_get_trx(); |
2836 | 31 | @@ -581,7 +582,7 @@ | 32 | @@ -599,7 +600,7 @@ |
2837 | 32 | return(TRUE); | 33 | return(TRUE); |
2838 | 33 | } | 34 | } |
2839 | 34 | 35 | ||
2840 | @@ -37,7 +38,7 @@ | |||
2841 | 37 | if (recv_lsn_checks_on) { | 38 | if (recv_lsn_checks_on) { |
2842 | 38 | ib_uint64_t current_lsn; | 39 | ib_uint64_t current_lsn; |
2843 | 39 | 40 | ||
2845 | 40 | @@ -965,6 +966,7 @@ | 41 | @@ -1000,6 +1001,7 @@ |
2846 | 41 | block->page.zip_list.prev = NULL; | 42 | block->page.zip_list.prev = NULL; |
2847 | 42 | block->page.zip_list.next = NULL; | 43 | block->page.zip_list.next = NULL; |
2848 | 43 | block->page.in_LRU_list = FALSE; | 44 | block->page.in_LRU_list = FALSE; |
2849 | @@ -45,7 +46,7 @@ | |||
2850 | 45 | block->in_unzip_LRU_list = FALSE; | 46 | block->in_unzip_LRU_list = FALSE; |
2851 | 46 | #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG | 47 | #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG |
2852 | 47 | block->n_pointers = 0; | 48 | block->n_pointers = 0; |
2854 | 48 | @@ -2542,7 +2544,8 @@ | 49 | @@ -2471,7 +2473,8 @@ |
2855 | 49 | ut_ad(zip_size == fil_space_get_zip_size(space)); | 50 | ut_ad(zip_size == fil_space_get_zip_size(space)); |
2856 | 50 | ut_ad(ut_is_2pow(zip_size)); | 51 | ut_ad(ut_is_2pow(zip_size)); |
2857 | 51 | #ifndef UNIV_LOG_DEBUG | 52 | #ifndef UNIV_LOG_DEBUG |
2858 | @@ -55,7 +56,7 @@ | |||
2859 | 55 | || ibuf_page_low(space, zip_size, offset, | 56 | || ibuf_page_low(space, zip_size, offset, |
2860 | 56 | FALSE, file, line, NULL)); | 57 | FALSE, file, line, NULL)); |
2861 | 57 | #endif | 58 | #endif |
2863 | 58 | @@ -3952,6 +3955,13 @@ | 59 | @@ -3902,6 +3905,13 @@ |
2864 | 59 | frame = ((buf_block_t*) bpage)->frame; | 60 | frame = ((buf_block_t*) bpage)->frame; |
2865 | 60 | } | 61 | } |
2866 | 61 | 62 | ||
2867 | @@ -69,19 +70,19 @@ | |||
2868 | 69 | /* If this page is not uninitialized and not in the | 70 | /* If this page is not uninitialized and not in the |
2869 | 70 | doublewrite buffer, then the page number and space id | 71 | doublewrite buffer, then the page number and space id |
2870 | 71 | should be the same as in block. */ | 72 | should be the same as in block. */ |
2872 | 72 | @@ -4064,7 +4074,8 @@ | 73 | @@ -4025,7 +4035,8 @@ |
2873 | 73 | recv_recover_page(TRUE, (buf_block_t*) bpage); | 74 | recv_recover_page(TRUE, (buf_block_t*) bpage); |
2874 | 74 | } | 75 | } |
2875 | 75 | 76 | ||
2876 | 76 | - if (uncompressed && !recv_no_ibuf_operations) { | 77 | - if (uncompressed && !recv_no_ibuf_operations) { |
2877 | 77 | + if (uncompressed && !recv_no_ibuf_operations && | 78 | + if (uncompressed && !recv_no_ibuf_operations && |
2878 | 78 | + !srv_fake_write && !bpage->is_compacted) { | 79 | + !srv_fake_write && !bpage->is_compacted) { |
2882 | 79 | ibuf_merge_or_delete_for_page( | 80 | |
2883 | 80 | /* Delete possible entries, if bpage is_corrupt */ | 81 | buf_block_t* block; |
2884 | 81 | (srv_pass_corrupt_table && bpage->is_corrupt) ? NULL : | 82 | ibool update_ibuf_bitmap; |
2885 | 82 | --- a/storage/innobase/fil/fil0fil.c | 83 | --- a/storage/innobase/fil/fil0fil.c |
2886 | 83 | +++ b/storage/innobase/fil/fil0fil.c | 84 | +++ b/storage/innobase/fil/fil0fil.c |
2888 | 84 | @@ -307,7 +307,7 @@ | 85 | @@ -310,7 +310,7 @@ |
2889 | 85 | 86 | ||
2890 | 86 | /** The tablespace memory cache. This variable is NULL before the module is | 87 | /** The tablespace memory cache. This variable is NULL before the module is |
2891 | 87 | initialized. */ | 88 | initialized. */ |
2892 | @@ -90,7 +91,7 @@ | |||
2893 | 90 | 91 | ||
2894 | 91 | #ifdef UNIV_DEBUG | 92 | #ifdef UNIV_DEBUG |
2895 | 92 | /** Try fil_validate() every this many times */ | 93 | /** Try fil_validate() every this many times */ |
2897 | 93 | @@ -346,7 +346,7 @@ | 94 | @@ -349,7 +349,7 @@ |
2898 | 94 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys | 95 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
2899 | 95 | mutex. */ | 96 | mutex. */ |
2900 | 96 | static | 97 | static |
2901 | @@ -99,7 +100,7 @@ | |||
2902 | 99 | fil_node_prepare_for_io( | 100 | fil_node_prepare_for_io( |
2903 | 100 | /*====================*/ | 101 | /*====================*/ |
2904 | 101 | fil_node_t* node, /*!< in: file node */ | 102 | fil_node_t* node, /*!< in: file node */ |
2906 | 102 | @@ -671,7 +671,7 @@ | 103 | @@ -674,7 +674,7 @@ |
2907 | 103 | Opens a the file of a node of a tablespace. The caller must own the fil_system | 104 | Opens a the file of a node of a tablespace. The caller must own the fil_system |
2908 | 104 | mutex. */ | 105 | mutex. */ |
2909 | 105 | static | 106 | static |
2910 | @@ -108,7 +109,7 @@ | |||
2911 | 108 | fil_node_open_file( | 109 | fil_node_open_file( |
2912 | 109 | /*===============*/ | 110 | /*===============*/ |
2913 | 110 | fil_node_t* node, /*!< in: file node */ | 111 | fil_node_t* node, /*!< in: file node */ |
2915 | 111 | @@ -706,7 +706,17 @@ | 112 | @@ -709,7 +709,17 @@ |
2916 | 112 | OS_FILE_READ_ONLY, &success); | 113 | OS_FILE_READ_ONLY, &success); |
2917 | 113 | if (!success) { | 114 | if (!success) { |
2918 | 114 | /* The following call prints an error message */ | 115 | /* The following call prints an error message */ |
2919 | @@ -127,7 +128,7 @@ | |||
2920 | 127 | 128 | ||
2921 | 128 | ut_print_timestamp(stderr); | 129 | ut_print_timestamp(stderr); |
2922 | 129 | 130 | ||
2924 | 130 | @@ -767,12 +777,15 @@ | 131 | @@ -770,12 +780,15 @@ |
2925 | 131 | 132 | ||
2926 | 132 | if (UNIV_UNLIKELY(space_id != space->id)) { | 133 | if (UNIV_UNLIKELY(space_id != space->id)) { |
2927 | 133 | fprintf(stderr, | 134 | fprintf(stderr, |
2928 | @@ -146,7 +147,7 @@ | |||
2929 | 146 | } | 147 | } |
2930 | 147 | 148 | ||
2931 | 148 | if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED | 149 | if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED |
2933 | 149 | @@ -796,8 +809,8 @@ | 150 | @@ -799,8 +812,8 @@ |
2934 | 150 | } | 151 | } |
2935 | 151 | 152 | ||
2936 | 152 | if (size_bytes >= 1024 * 1024) { | 153 | if (size_bytes >= 1024 * 1024) { |
2937 | @@ -157,7 +158,7 @@ | |||
2938 | 157 | } | 158 | } |
2939 | 158 | 159 | ||
2940 | 159 | if (!(flags & DICT_TF_ZSSIZE_MASK)) { | 160 | if (!(flags & DICT_TF_ZSSIZE_MASK)) { |
2942 | 160 | @@ -848,6 +861,8 @@ | 161 | @@ -851,6 +864,8 @@ |
2943 | 161 | /* Put the node to the LRU list */ | 162 | /* Put the node to the LRU list */ |
2944 | 162 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); | 163 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); |
2945 | 163 | } | 164 | } |
2946 | @@ -166,7 +167,7 @@ | |||
2947 | 166 | } | 167 | } |
2948 | 167 | 168 | ||
2949 | 168 | /**********************************************************************//** | 169 | /**********************************************************************//** |
2951 | 169 | @@ -1477,7 +1492,12 @@ | 170 | @@ -1517,7 +1532,12 @@ |
2952 | 170 | the file yet; the following calls will open it and update the | 171 | the file yet; the following calls will open it and update the |
2953 | 171 | size fields */ | 172 | size fields */ |
2954 | 172 | 173 | ||
2955 | @@ -180,7 +181,7 @@ | |||
2956 | 180 | fil_node_complete_io(node, fil_system, OS_FILE_READ); | 181 | fil_node_complete_io(node, fil_system, OS_FILE_READ); |
2957 | 181 | } | 182 | } |
2958 | 182 | 183 | ||
2960 | 183 | @@ -1529,7 +1549,12 @@ | 184 | @@ -1586,7 +1606,12 @@ |
2961 | 184 | the file yet; the following calls will open it and update the | 185 | the file yet; the following calls will open it and update the |
2962 | 185 | size fields */ | 186 | size fields */ |
2963 | 186 | 187 | ||
2964 | @@ -194,7 +195,7 @@ | |||
2965 | 194 | fil_node_complete_io(node, fil_system, OS_FILE_READ); | 195 | fil_node_complete_io(node, fil_system, OS_FILE_READ); |
2966 | 195 | } | 196 | } |
2967 | 196 | 197 | ||
2969 | 197 | @@ -1981,7 +2006,7 @@ | 198 | @@ -2045,7 +2070,7 @@ |
2970 | 198 | mem_free(path); | 199 | mem_free(path); |
2971 | 199 | } | 200 | } |
2972 | 200 | 201 | ||
2973 | @@ -203,7 +204,7 @@ | |||
2974 | 203 | /********************************************************//** | 204 | /********************************************************//** |
2975 | 204 | Writes a log record about an .ibd file create/rename/delete. */ | 205 | Writes a log record about an .ibd file create/rename/delete. */ |
2976 | 205 | static | 206 | static |
2978 | 206 | @@ -2205,7 +2230,7 @@ | 207 | @@ -2269,7 +2294,7 @@ |
2979 | 207 | if (fil_create_new_single_table_tablespace( | 208 | if (fil_create_new_single_table_tablespace( |
2980 | 208 | space_id, name, FALSE, flags, | 209 | space_id, name, FALSE, flags, |
2981 | 209 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { | 210 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { |
2982 | @@ -212,7 +213,7 @@ | |||
2983 | 212 | } | 213 | } |
2984 | 213 | } | 214 | } |
2985 | 214 | 215 | ||
2987 | 215 | @@ -2372,7 +2397,7 @@ | 216 | @@ -2460,7 +2485,7 @@ |
2988 | 216 | } | 217 | } |
2989 | 217 | 218 | ||
2990 | 218 | if (success) { | 219 | if (success) { |
2991 | @@ -221,16 +222,16 @@ | |||
2992 | 221 | /* Write a log record about the deletion of the .ibd | 222 | /* Write a log record about the deletion of the .ibd |
2993 | 222 | file, so that ibbackup can replay it in the | 223 | file, so that ibbackup can replay it in the |
2994 | 223 | --apply-log phase. We use a dummy mtr and the familiar | 224 | --apply-log phase. We use a dummy mtr and the familiar |
2996 | 224 | @@ -2673,7 +2698,7 @@ | 225 | @@ -2761,7 +2786,7 @@ |
2997 | 225 | 226 | ||
2998 | 226 | mutex_exit(&fil_system->mutex); | 227 | mutex_exit(&fil_system->mutex); |
2999 | 227 | 228 | ||
3000 | 228 | -#ifndef UNIV_HOTBACKUP | 229 | -#ifndef UNIV_HOTBACKUP |
3001 | 229 | +#ifdef UNDEFINED | 230 | +#ifdef UNDEFINED |
3003 | 230 | if (success) { | 231 | if (success && !recv_recovery_on) { |
3004 | 231 | mtr_t mtr; | 232 | mtr_t mtr; |
3005 | 232 | 233 | ||
3007 | 233 | @@ -2864,7 +2889,7 @@ | 234 | @@ -2952,7 +2977,7 @@ |
3008 | 234 | 235 | ||
3009 | 235 | fil_node_create(path, size, space_id, FALSE); | 236 | fil_node_create(path, size, space_id, FALSE); |
3010 | 236 | 237 | ||
3011 | @@ -239,7 +240,7 @@ | |||
3012 | 239 | { | 240 | { |
3013 | 240 | mtr_t mtr; | 241 | mtr_t mtr; |
3014 | 241 | 242 | ||
3016 | 242 | @@ -3210,19 +3235,97 @@ | 243 | @@ -3301,19 +3326,97 @@ |
3017 | 243 | "InnoDB: open the tablespace file ", stderr); | 244 | "InnoDB: open the tablespace file ", stderr); |
3018 | 244 | ut_print_filename(stderr, filepath); | 245 | ut_print_filename(stderr, filepath); |
3019 | 245 | fputs("!\n" | 246 | fputs("!\n" |
3020 | @@ -347,7 +348,7 @@ | |||
3021 | 347 | return(FALSE); | 348 | return(FALSE); |
3022 | 348 | } | 349 | } |
3023 | 349 | 350 | ||
3025 | 350 | @@ -4158,7 +4261,7 @@ | 351 | @@ -4258,7 +4361,7 @@ |
3026 | 351 | cannot be ok. */ | 352 | cannot be ok. */ |
3027 | 352 | 353 | ||
3028 | 353 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; | 354 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; |
3029 | @@ -356,7 +357,7 @@ | |||
3030 | 356 | if (size < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) { | 357 | if (size < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) { |
3031 | 357 | fprintf(stderr, | 358 | fprintf(stderr, |
3032 | 358 | "InnoDB: Error: the size of single-table tablespace" | 359 | "InnoDB: Error: the size of single-table tablespace" |
3034 | 359 | @@ -4288,7 +4391,51 @@ | 360 | @@ -4388,7 +4491,51 @@ |
3035 | 360 | 361 | ||
3036 | 361 | fil_node_create(filepath, 0, space_id, FALSE); | 362 | fil_node_create(filepath, 0, space_id, FALSE); |
3037 | 362 | func_exit: | 363 | func_exit: |
3038 | @@ -409,7 +410,7 @@ | |||
3039 | 409 | ut_free(buf2); | 410 | ut_free(buf2); |
3040 | 410 | mem_free(filepath); | 411 | mem_free(filepath); |
3041 | 411 | } | 412 | } |
3043 | 412 | @@ -4299,7 +4446,7 @@ | 413 | @@ -4399,7 +4546,7 @@ |
3044 | 413 | idea is to read as much good data as we can and jump over bad data. | 414 | idea is to read as much good data as we can and jump over bad data. |
3045 | 414 | @return 0 if ok, -1 if error even after the retries, 1 if at the end | 415 | @return 0 if ok, -1 if error even after the retries, 1 if at the end |
3046 | 415 | of the directory */ | 416 | of the directory */ |
3047 | @@ -418,7 +419,7 @@ | |||
3048 | 418 | int | 419 | int |
3049 | 419 | fil_file_readdir_next_file( | 420 | fil_file_readdir_next_file( |
3050 | 420 | /*=======================*/ | 421 | /*=======================*/ |
3052 | 421 | @@ -4343,7 +4490,7 @@ | 422 | @@ -4443,7 +4590,7 @@ |
3053 | 422 | @return DB_SUCCESS or error number */ | 423 | @return DB_SUCCESS or error number */ |
3054 | 423 | UNIV_INTERN | 424 | UNIV_INTERN |
3055 | 424 | ulint | 425 | ulint |
3056 | @@ -427,7 +428,7 @@ | |||
3057 | 427 | /*===================================*/ | 428 | /*===================================*/ |
3058 | 428 | { | 429 | { |
3059 | 429 | int ret; | 430 | int ret; |
3061 | 430 | @@ -4399,7 +4546,9 @@ | 431 | @@ -4499,7 +4646,9 @@ |
3062 | 431 | dbinfo.name); | 432 | dbinfo.name); |
3063 | 432 | srv_normalize_path_for_win(dbpath); | 433 | srv_normalize_path_for_win(dbpath); |
3064 | 433 | 434 | ||
3065 | @@ -438,7 +439,7 @@ | |||
3066 | 438 | 439 | ||
3067 | 439 | if (dbdir != NULL) { | 440 | if (dbdir != NULL) { |
3068 | 440 | /* printf("Opened dir %s\n", dbinfo.name); */ | 441 | /* printf("Opened dir %s\n", dbinfo.name); */ |
3070 | 441 | @@ -4425,8 +4574,11 @@ | 442 | @@ -4525,8 +4674,11 @@ |
3071 | 442 | ".ibd")) { | 443 | ".ibd")) { |
3072 | 443 | /* The name ends in .ibd; try opening | 444 | /* The name ends in .ibd; try opening |
3073 | 444 | the file */ | 445 | the file */ |
3074 | @@ -451,7 +452,7 @@ | |||
3075 | 451 | } | 452 | } |
3076 | 452 | next_file_item: | 453 | next_file_item: |
3077 | 453 | ret = fil_file_readdir_next_file(&err, | 454 | ret = fil_file_readdir_next_file(&err, |
3079 | 454 | @@ -4598,15 +4750,97 @@ | 455 | @@ -4698,15 +4850,97 @@ |
3080 | 455 | "InnoDB: in InnoDB data dictionary" | 456 | "InnoDB: in InnoDB data dictionary" |
3081 | 456 | " has tablespace id %lu,\n" | 457 | " has tablespace id %lu,\n" |
3082 | 457 | "InnoDB: but tablespace with that id" | 458 | "InnoDB: but tablespace with that id" |
3083 | @@ -557,7 +558,7 @@ | |||
3084 | 557 | } else { | 558 | } else { |
3085 | 558 | ut_print_timestamp(stderr); | 559 | ut_print_timestamp(stderr); |
3086 | 559 | fputs(" InnoDB: Error: table ", stderr); | 560 | fputs(" InnoDB: Error: table ", stderr); |
3088 | 560 | @@ -5005,7 +5239,7 @@ | 561 | @@ -5129,7 +5363,7 @@ |
3089 | 561 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys | 562 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
3090 | 562 | mutex. */ | 563 | mutex. */ |
3091 | 563 | static | 564 | static |
3092 | @@ -566,7 +567,7 @@ | |||
3093 | 566 | fil_node_prepare_for_io( | 567 | fil_node_prepare_for_io( |
3094 | 567 | /*====================*/ | 568 | /*====================*/ |
3095 | 568 | fil_node_t* node, /*!< in: file node */ | 569 | fil_node_t* node, /*!< in: file node */ |
3097 | 569 | @@ -5025,10 +5259,13 @@ | 570 | @@ -5149,10 +5383,13 @@ |
3098 | 570 | } | 571 | } |
3099 | 571 | 572 | ||
3100 | 572 | if (node->open == FALSE) { | 573 | if (node->open == FALSE) { |
3101 | @@ -581,7 +582,7 @@ | |||
3102 | 581 | } | 582 | } |
3103 | 582 | 583 | ||
3104 | 583 | if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE | 584 | if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE |
3106 | 584 | @@ -5041,6 +5278,8 @@ | 585 | @@ -5165,6 +5402,8 @@ |
3107 | 585 | } | 586 | } |
3108 | 586 | 587 | ||
3109 | 587 | node->n_pending++; | 588 | node->n_pending++; |
3110 | @@ -590,7 +591,7 @@ | |||
3111 | 590 | } | 591 | } |
3112 | 591 | 592 | ||
3113 | 592 | /********************************************************************//** | 593 | /********************************************************************//** |
3115 | 593 | @@ -5240,6 +5479,16 @@ | 594 | @@ -5350,6 +5589,16 @@ |
3116 | 594 | 595 | ||
3117 | 595 | ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE)); | 596 | ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE)); |
3118 | 596 | 597 | ||
3119 | @@ -607,9 +608,28 @@ | |||
3120 | 607 | node = UT_LIST_GET_FIRST(space->chain); | 608 | node = UT_LIST_GET_FIRST(space->chain); |
3121 | 608 | 609 | ||
3122 | 609 | for (;;) { | 610 | for (;;) { |
3123 | 611 | @@ -6028,6 +6277,12 @@ | ||
3124 | 612 | const char* tmp_name) /*!< in: temp table name used while | ||
3125 | 613 | swapping */ | ||
3126 | 614 | { | ||
3127 | 615 | + (void)old_space_id; | ||
3128 | 616 | + (void)old_name; | ||
3129 | 617 | + (void)new_space_id; | ||
3130 | 618 | + (void)new_name; | ||
3131 | 619 | + (void)tmp_name; | ||
3132 | 620 | +#ifdef UNDEFINED | ||
3133 | 621 | mtr_t mtr; | ||
3134 | 622 | mtr_start(&mtr); | ||
3135 | 623 | fil_op_write_log(MLOG_FILE_RENAME, old_space_id, | ||
3136 | 624 | @@ -6035,4 +6290,5 @@ | ||
3137 | 625 | fil_op_write_log(MLOG_FILE_RENAME, new_space_id, | ||
3138 | 626 | 0, 0, new_name, old_name, &mtr); | ||
3139 | 627 | mtr_commit(&mtr); | ||
3140 | 628 | +#endif | ||
3141 | 629 | } | ||
3142 | 610 | --- a/storage/innobase/handler/ha_innodb.cc | 630 | --- a/storage/innobase/handler/ha_innodb.cc |
3143 | 611 | +++ b/storage/innobase/handler/ha_innodb.cc | 631 | +++ b/storage/innobase/handler/ha_innodb.cc |
3145 | 612 | @@ -482,12 +482,6 @@ | 632 | @@ -514,12 +514,6 @@ |
3146 | 613 | "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.", | 633 | "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.", |
3147 | 614 | NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0); | 634 | NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0); |
3148 | 615 | 635 | ||
3149 | @@ -622,7 +642,7 @@ | |||
3150 | 622 | static MYSQL_THDVAR_BOOL(fake_changes, PLUGIN_VAR_OPCMDARG, | 642 | static MYSQL_THDVAR_BOOL(fake_changes, PLUGIN_VAR_OPCMDARG, |
3151 | 623 | "In the transaction after enabled, UPDATE, INSERT and DELETE only move the cursor to the records " | 643 | "In the transaction after enabled, UPDATE, INSERT and DELETE only move the cursor to the records " |
3152 | 624 | "and do nothing other operations (no changes, no ibuf, no undo, no transaction log) in the transaction. " | 644 | "and do nothing other operations (no changes, no ibuf, no undo, no transaction log) in the transaction. " |
3154 | 625 | @@ -989,17 +983,6 @@ | 645 | @@ -1038,17 +1032,6 @@ |
3155 | 626 | } | 646 | } |
3156 | 627 | 647 | ||
3157 | 628 | /******************************************************************//** | 648 | /******************************************************************//** |
3158 | @@ -640,7 +660,7 @@ | |||
3159 | 640 | Returns true if expand_fast_index_creation is enabled for the current | 660 | Returns true if expand_fast_index_creation is enabled for the current |
3160 | 641 | session. | 661 | session. |
3161 | 642 | @return the value of the server's expand_fast_index_creation variable */ | 662 | @return the value of the server's expand_fast_index_creation variable */ |
3163 | 643 | @@ -11806,17 +11789,12 @@ | 663 | @@ -12637,17 +12620,12 @@ |
3164 | 644 | innodb_file_format_max_update, "Antelope"); | 664 | innodb_file_format_max_update, "Antelope"); |
3165 | 645 | 665 | ||
3166 | 646 | /* Changed to the THDVAR */ | 666 | /* Changed to the THDVAR */ |
3167 | @@ -664,7 +684,7 @@ | |||
3168 | 664 | 684 | ||
3169 | 665 | static MYSQL_SYSVAR_STR(flush_method, innobase_file_flush_method, | 685 | static MYSQL_SYSVAR_STR(flush_method, innobase_file_flush_method, |
3170 | 666 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, | 686 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
3172 | 667 | @@ -12294,7 +12272,6 @@ | 687 | @@ -13234,7 +13212,6 @@ |
3173 | 668 | MYSQL_SYSVAR(file_format_check), | 688 | MYSQL_SYSVAR(file_format_check), |
3174 | 669 | MYSQL_SYSVAR(file_format_max), | 689 | MYSQL_SYSVAR(file_format_max), |
3175 | 670 | MYSQL_SYSVAR(flush_log_at_trx_commit), | 690 | MYSQL_SYSVAR(flush_log_at_trx_commit), |
3176 | @@ -674,7 +694,7 @@ | |||
3177 | 674 | MYSQL_SYSVAR(large_prefix), | 694 | MYSQL_SYSVAR(large_prefix), |
3178 | 675 | --- a/storage/innobase/ibuf/ibuf0ibuf.c | 695 | --- a/storage/innobase/ibuf/ibuf0ibuf.c |
3179 | 676 | +++ b/storage/innobase/ibuf/ibuf0ibuf.c | 696 | +++ b/storage/innobase/ibuf/ibuf0ibuf.c |
3181 | 677 | @@ -1190,6 +1190,9 @@ | 697 | @@ -1199,6 +1199,9 @@ |
3182 | 678 | ut_ad(!recv_no_ibuf_operations); | 698 | ut_ad(!recv_no_ibuf_operations); |
3183 | 679 | ut_ad(x_latch || mtr == NULL); | 699 | ut_ad(x_latch || mtr == NULL); |
3184 | 680 | 700 | ||
3185 | @@ -684,7 +704,7 @@ | |||
3186 | 684 | if (ibuf_fixed_addr_page(space, zip_size, page_no)) { | 704 | if (ibuf_fixed_addr_page(space, zip_size, page_no)) { |
3187 | 685 | 705 | ||
3188 | 686 | return(TRUE); | 706 | return(TRUE); |
3190 | 687 | @@ -2757,6 +2760,9 @@ | 707 | @@ -2771,6 +2774,9 @@ |
3191 | 688 | ulint n_bytes; | 708 | ulint n_bytes; |
3192 | 689 | ulint n_pag2; | 709 | ulint n_pag2; |
3193 | 690 | 710 | ||
3194 | @@ -694,9 +714,20 @@ | |||
3195 | 694 | while (sum_pages < n_pages) { | 714 | while (sum_pages < n_pages) { |
3196 | 695 | n_bytes = ibuf_contract_ext(&n_pag2, sync); | 715 | n_bytes = ibuf_contract_ext(&n_pag2, sync); |
3197 | 696 | 716 | ||
3198 | 717 | --- a/storage/innobase/include/buf0buf.h | ||
3199 | 718 | +++ b/storage/innobase/include/buf0buf.h | ||
3200 | 719 | @@ -1594,6 +1594,8 @@ | ||
3201 | 720 | frees a page in buffer pool */ | ||
3202 | 721 | # endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ | ||
3203 | 722 | #endif /* !UNIV_HOTBACKUP */ | ||
3204 | 723 | + ibool is_compacted; /*!< TRUE if the page was skipped in | ||
3205 | 724 | + compact backups */ | ||
3206 | 725 | }; | ||
3207 | 726 | |||
3208 | 727 | /** The buffer control block structure */ | ||
3209 | 697 | --- a/storage/innobase/include/fil0fil.h | 728 | --- a/storage/innobase/include/fil0fil.h |
3210 | 698 | +++ b/storage/innobase/include/fil0fil.h | 729 | +++ b/storage/innobase/include/fil0fil.h |
3212 | 699 | @@ -506,7 +506,7 @@ | 730 | @@ -518,7 +518,7 @@ |
3213 | 700 | @return DB_SUCCESS or error number */ | 731 | @return DB_SUCCESS or error number */ |
3214 | 701 | UNIV_INTERN | 732 | UNIV_INTERN |
3215 | 702 | ulint | 733 | ulint |
3216 | @@ -723,7 +754,7 @@ | |||
3217 | 723 | Get the current setting of the lower_case_table_names global parameter from | 754 | Get the current setting of the lower_case_table_names global parameter from |
3218 | 724 | --- a/storage/innobase/include/log0recv.h | 755 | --- a/storage/innobase/include/log0recv.h |
3219 | 725 | +++ b/storage/innobase/include/log0recv.h | 756 | +++ b/storage/innobase/include/log0recv.h |
3221 | 726 | @@ -444,7 +444,7 @@ | 757 | @@ -481,7 +481,7 @@ |
3222 | 727 | /* defined in os0file.c */ | 758 | /* defined in os0file.c */ |
3223 | 728 | #define OS_AIO_MERGE_N_CONSECUTIVE 64 | 759 | #define OS_AIO_MERGE_N_CONSECUTIVE 64 |
3224 | 729 | /* defined in log0recv.c */ | 760 | /* defined in log0recv.c */ |
3225 | @@ -734,7 +765,7 @@ | |||
3226 | 734 | 765 | ||
3227 | 735 | --- a/storage/innobase/include/srv0srv.h | 766 | --- a/storage/innobase/include/srv0srv.h |
3228 | 736 | +++ b/storage/innobase/include/srv0srv.h | 767 | +++ b/storage/innobase/include/srv0srv.h |
3230 | 737 | @@ -145,8 +145,7 @@ | 768 | @@ -159,8 +159,7 @@ |
3231 | 738 | extern ulint srv_n_log_files; | 769 | extern ulint srv_n_log_files; |
3232 | 739 | extern ulint srv_log_file_size; | 770 | extern ulint srv_log_file_size; |
3233 | 740 | extern ulint srv_log_buffer_size; | 771 | extern ulint srv_log_buffer_size; |
3234 | @@ -743,19 +774,19 @@ | |||
3235 | 743 | +extern ulong srv_flush_log_at_trx_commit; | 774 | +extern ulong srv_flush_log_at_trx_commit; |
3236 | 744 | extern char srv_adaptive_flushing; | 775 | extern char srv_adaptive_flushing; |
3237 | 745 | 776 | ||
3244 | 746 | 777 | /* If this flag is TRUE, then we will load the indexes' (and tables') metadata | |
3245 | 747 | @@ -247,6 +246,11 @@ | 778 | @@ -271,6 +270,11 @@ |
3246 | 748 | extern ulint srv_dict_size_limit; | 779 | extern ulint srv_expand_import; |
3247 | 749 | 780 | extern ulint srv_pass_corrupt_table; | |
3248 | 750 | extern ulint srv_lazy_drop_table; | 781 | |
3243 | 751 | + | ||
3249 | 752 | +extern ibool srv_read_only; | 782 | +extern ibool srv_read_only; |
3250 | 753 | +extern ibool srv_fake_write; | 783 | +extern ibool srv_fake_write; |
3251 | 754 | +extern ibool srv_apply_log_only; | 784 | +extern ibool srv_apply_log_only; |
3252 | 755 | +extern ibool srv_backup_mode; | 785 | +extern ibool srv_backup_mode; |
3256 | 756 | /*-------------------------------------------*/ | 786 | + |
3257 | 757 | 787 | /* Helper macro to support srv_pass_corrupt_table checks. If 'cond' is FALSE, | |
3258 | 758 | extern ulint srv_n_rows_inserted; | 788 | execute 'code' if srv_pass_corrupt_table is non-zero, or trigger a fatal error |
3259 | 789 | otherwise. The break statement in 'code' will obviously not work as expected. */ | ||
3260 | 759 | --- a/storage/innobase/include/srv0start.h | 790 | --- a/storage/innobase/include/srv0start.h |
3261 | 760 | +++ b/storage/innobase/include/srv0start.h | 791 | +++ b/storage/innobase/include/srv0start.h |
3262 | 761 | @@ -91,6 +91,8 @@ | 792 | @@ -91,6 +91,8 @@ |
3263 | @@ -769,7 +800,7 @@ | |||
3264 | 769 | extern ibool srv_have_fullfsync; | 800 | extern ibool srv_have_fullfsync; |
3265 | 770 | --- a/storage/innobase/log/log0log.c | 801 | --- a/storage/innobase/log/log0log.c |
3266 | 771 | +++ b/storage/innobase/log/log0log.c | 802 | +++ b/storage/innobase/log/log0log.c |
3268 | 772 | @@ -1154,7 +1154,7 @@ | 803 | @@ -1237,7 +1237,7 @@ |
3269 | 773 | if (srv_unix_file_flush_method != SRV_UNIX_O_DSYNC | 804 | if (srv_unix_file_flush_method != SRV_UNIX_O_DSYNC |
3270 | 774 | && srv_unix_file_flush_method != SRV_UNIX_ALL_O_DIRECT | 805 | && srv_unix_file_flush_method != SRV_UNIX_ALL_O_DIRECT |
3271 | 775 | && srv_unix_file_flush_method != SRV_UNIX_NOSYNC | 806 | && srv_unix_file_flush_method != SRV_UNIX_NOSYNC |
3272 | @@ -778,7 +809,7 @@ | |||
3273 | 778 | 809 | ||
3274 | 779 | fil_flush(group->space_id, FALSE); | 810 | fil_flush(group->space_id, FALSE); |
3275 | 780 | } | 811 | } |
3277 | 781 | @@ -1389,7 +1389,7 @@ | 812 | @@ -1472,7 +1472,7 @@ |
3278 | 782 | #endif /* UNIV_DEBUG */ | 813 | #endif /* UNIV_DEBUG */ |
3279 | 783 | ulint unlock; | 814 | ulint unlock; |
3280 | 784 | 815 | ||
3281 | @@ -787,7 +818,7 @@ | |||
3282 | 787 | /* Recovery is running and no operations on the log files are | 818 | /* Recovery is running and no operations on the log files are |
3283 | 788 | allowed yet (the variable name .._no_ibuf_.. is misleading) */ | 819 | allowed yet (the variable name .._no_ibuf_.. is misleading) */ |
3284 | 789 | 820 | ||
3286 | 790 | @@ -2051,7 +2051,7 @@ | 821 | @@ -2140,7 +2140,7 @@ |
3287 | 791 | return(TRUE); | 822 | return(TRUE); |
3288 | 792 | } | 823 | } |
3289 | 793 | 824 | ||
3290 | @@ -796,16 +827,16 @@ | |||
3291 | 796 | 827 | ||
3292 | 797 | if (log_sys->n_pending_checkpoint_writes > 0) { | 828 | if (log_sys->n_pending_checkpoint_writes > 0) { |
3293 | 798 | /* A checkpoint write is running */ | 829 | /* A checkpoint write is running */ |
3295 | 799 | @@ -3151,6 +3151,7 @@ | 830 | @@ -3277,6 +3277,7 @@ |
3296 | 800 | shutdown, because the InnoDB layer may have committed or | 831 | shutdown, because the InnoDB layer may have committed or |
3297 | 801 | prepared transactions and we don't want to lose them. */ | 832 | prepared transactions and we don't want to lose them. */ |
3298 | 802 | 833 | ||
3299 | 803 | + if (!srv_apply_log_only) { | 834 | + if (!srv_apply_log_only) { |
3300 | 804 | server_busy = trx_n_mysql_transactions > 0 | 835 | server_busy = trx_n_mysql_transactions > 0 |
3301 | 805 | || UT_LIST_GET_LEN(trx_sys->trx_list) > trx_n_prepared; | 836 | || UT_LIST_GET_LEN(trx_sys->trx_list) > trx_n_prepared; |
3305 | 806 | mutex_exit(&kernel_mutex); | 837 | |
3306 | 807 | @@ -3158,6 +3159,9 @@ | 838 | @@ -3329,6 +3330,9 @@ |
3307 | 808 | if (server_busy || srv_is_any_background_thread_active()) { | 839 | |
3308 | 809 | goto loop; | 840 | goto loop; |
3309 | 810 | } | 841 | } |
3310 | 811 | + } else { | 842 | + } else { |
3311 | @@ -867,16 +898,7 @@ | |||
3312 | 867 | ulint | 898 | ulint |
3313 | 868 | recv_find_max_checkpoint( | 899 | recv_find_max_checkpoint( |
3314 | 869 | /*=====================*/ | 900 | /*=====================*/ |
3325 | 870 | @@ -850,7 +851,7 @@ | 901 | @@ -1645,9 +1646,16 @@ |
3316 | 871 | InnoDB-3.23.52 where the checksum field contains the log block number. | ||
3317 | 872 | @return TRUE if ok, or if the log block may be in the format of InnoDB | ||
3318 | 873 | version predating 3.23.52 */ | ||
3319 | 874 | -static | ||
3320 | 875 | +//static | ||
3321 | 876 | ibool | ||
3322 | 877 | log_block_checksum_is_ok_or_old_format( | ||
3323 | 878 | /*===================================*/ | ||
3324 | 879 | @@ -1639,9 +1640,16 @@ | ||
3326 | 880 | if (page_zip) { | 902 | if (page_zip) { |
3327 | 881 | memset(FIL_PAGE_LSN + page_zip->data, 0, 8); | 903 | memset(FIL_PAGE_LSN + page_zip->data, 0, 8); |
3328 | 882 | } | 904 | } |
3329 | @@ -894,7 +916,7 @@ | |||
3330 | 894 | 916 | ||
3331 | 895 | ib_uint64_t end_lsn; | 917 | ib_uint64_t end_lsn; |
3332 | 896 | 918 | ||
3334 | 897 | @@ -1842,6 +1850,18 @@ | 919 | @@ -1848,6 +1856,18 @@ |
3335 | 898 | ulint zip_size = fil_space_get_zip_size(space); | 920 | ulint zip_size = fil_space_get_zip_size(space); |
3336 | 899 | ulint page_no = recv_addr->page_no; | 921 | ulint page_no = recv_addr->page_no; |
3337 | 900 | 922 | ||
3338 | @@ -913,7 +935,7 @@ | |||
3339 | 913 | if (recv_addr->state == RECV_NOT_PROCESSED) { | 935 | if (recv_addr->state == RECV_NOT_PROCESSED) { |
3340 | 914 | if (!has_printed) { | 936 | if (!has_printed) { |
3341 | 915 | ut_print_timestamp(stderr); | 937 | ut_print_timestamp(stderr); |
3343 | 916 | @@ -1875,7 +1895,7 @@ | 938 | @@ -1881,7 +1901,7 @@ |
3344 | 917 | 939 | ||
3345 | 918 | mutex_enter(&(recv_sys->mutex)); | 940 | mutex_enter(&(recv_sys->mutex)); |
3346 | 919 | } | 941 | } |
3347 | @@ -922,7 +944,7 @@ | |||
3348 | 922 | recv_addr = HASH_GET_NEXT(addr_hash, recv_addr); | 944 | recv_addr = HASH_GET_NEXT(addr_hash, recv_addr); |
3349 | 923 | } | 945 | } |
3350 | 924 | 946 | ||
3352 | 925 | @@ -2380,7 +2400,7 @@ | 947 | @@ -2386,7 +2406,7 @@ |
3353 | 926 | || type == MLOG_FILE_RENAME | 948 | || type == MLOG_FILE_RENAME |
3354 | 927 | || type == MLOG_FILE_DELETE) { | 949 | || type == MLOG_FILE_DELETE) { |
3355 | 928 | ut_a(space); | 950 | ut_a(space); |
3356 | @@ -931,7 +953,7 @@ | |||
3357 | 931 | if (recv_replay_file_ops) { | 953 | if (recv_replay_file_ops) { |
3358 | 932 | 954 | ||
3359 | 933 | /* In ibbackup --apply-log, replay an .ibd file | 955 | /* In ibbackup --apply-log, replay an .ibd file |
3361 | 934 | @@ -2403,7 +2423,7 @@ | 956 | @@ -2409,7 +2429,7 @@ |
3362 | 935 | ut_error; | 957 | ut_error; |
3363 | 936 | } | 958 | } |
3364 | 937 | } | 959 | } |
3365 | @@ -940,7 +962,7 @@ | |||
3366 | 940 | /* In normal mysqld crash recovery we do not try to | 962 | /* In normal mysqld crash recovery we do not try to |
3367 | 941 | replay file operations */ | 963 | replay file operations */ |
3368 | 942 | #ifdef UNIV_LOG_LSN_DEBUG | 964 | #ifdef UNIV_LOG_LSN_DEBUG |
3370 | 943 | @@ -2820,8 +2840,11 @@ | 965 | @@ -2826,8 +2846,11 @@ |
3371 | 944 | 966 | ||
3372 | 945 | fprintf(stderr, | 967 | fprintf(stderr, |
3373 | 946 | "InnoDB: Doing recovery: scanned up to" | 968 | "InnoDB: Doing recovery: scanned up to" |
3374 | @@ -954,7 +976,7 @@ | |||
3375 | 954 | } | 976 | } |
3376 | 955 | } | 977 | } |
3377 | 956 | 978 | ||
3379 | 957 | @@ -2926,7 +2949,7 @@ | 979 | @@ -2932,7 +2955,7 @@ |
3380 | 958 | "InnoDB: Reading tablespace information" | 980 | "InnoDB: Reading tablespace information" |
3381 | 959 | " from the .ibd files...\n"); | 981 | " from the .ibd files...\n"); |
3382 | 960 | 982 | ||
3383 | @@ -963,7 +985,7 @@ | |||
3384 | 963 | 985 | ||
3385 | 964 | /* If we are using the doublewrite method, we will | 986 | /* If we are using the doublewrite method, we will |
3386 | 965 | check if there are half-written pages in data files, | 987 | check if there are half-written pages in data files, |
3388 | 966 | @@ -2935,12 +2958,14 @@ | 988 | @@ -2941,12 +2964,14 @@ |
3389 | 967 | 989 | ||
3390 | 968 | if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { | 990 | if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { |
3391 | 969 | 991 | ||
3392 | @@ -979,7 +1001,7 @@ | |||
3393 | 979 | } | 1001 | } |
3394 | 980 | } | 1002 | } |
3395 | 981 | 1003 | ||
3397 | 982 | @@ -3109,6 +3134,7 @@ | 1004 | @@ -3115,6 +3140,7 @@ |
3398 | 983 | recv_sys->recovered_lsn = checkpoint_lsn; | 1005 | recv_sys->recovered_lsn = checkpoint_lsn; |
3399 | 984 | 1006 | ||
3400 | 985 | srv_start_lsn = checkpoint_lsn; | 1007 | srv_start_lsn = checkpoint_lsn; |
3401 | @@ -987,7 +1009,7 @@ | |||
3402 | 987 | } | 1009 | } |
3403 | 988 | 1010 | ||
3404 | 989 | contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn, | 1011 | contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn, |
3406 | 990 | @@ -3474,6 +3500,7 @@ | 1012 | @@ -3480,6 +3506,7 @@ |
3407 | 991 | that the data dictionary tables will be free of any locks. | 1013 | that the data dictionary tables will be free of any locks. |
3408 | 992 | The data dictionary latch should guarantee that there is at | 1014 | The data dictionary latch should guarantee that there is at |
3409 | 993 | most one data dictionary transaction active at a time. */ | 1015 | most one data dictionary transaction active at a time. */ |
3410 | @@ -995,9 +1017,52 @@ | |||
3411 | 995 | trx_rollback_or_clean_recovered(FALSE); | 1017 | trx_rollback_or_clean_recovered(FALSE); |
3412 | 996 | } | 1018 | } |
3413 | 997 | 1019 | ||
3414 | 1020 | --- a/storage/innobase/mem/mem0dbg.c | ||
3415 | 1021 | +++ b/storage/innobase/mem/mem0dbg.c | ||
3416 | 1022 | @@ -282,18 +282,10 @@ | ||
3417 | 1023 | byte* buf, /*!< in: pointer to buffer */ | ||
3418 | 1024 | ulint n) /*!< in: length of buffer */ | ||
3419 | 1025 | { | ||
3420 | 1026 | - byte* ptr; | ||
3421 | 1027 | - | ||
3422 | 1028 | UNIV_MEM_ASSERT_W(buf, n); | ||
3423 | 1029 | |||
3424 | 1030 | - for (ptr = buf; ptr < buf + n; ptr++) { | ||
3425 | 1031 | - | ||
3426 | 1032 | - if (ut_rnd_gen_ibool()) { | ||
3427 | 1033 | - *ptr = 0xBA; | ||
3428 | 1034 | - } else { | ||
3429 | 1035 | - *ptr = 0xBE; | ||
3430 | 1036 | - } | ||
3431 | 1037 | - } | ||
3432 | 1038 | + /* Fix https://bugs.launchpad.net/percona-xtrabackup/+bug/1158154 */ | ||
3433 | 1039 | + memset(buf, 0xBA, n); | ||
3434 | 1040 | |||
3435 | 1041 | UNIV_MEM_INVALID(buf, n); | ||
3436 | 1042 | } | ||
3437 | 1043 | @@ -308,17 +300,10 @@ | ||
3438 | 1044 | byte* buf, /*!< in: pointer to buffer */ | ||
3439 | 1045 | ulint n) /*!< in: length of buffer */ | ||
3440 | 1046 | { | ||
3441 | 1047 | - byte* ptr; | ||
3442 | 1048 | - | ||
3443 | 1049 | UNIV_MEM_ASSERT_W(buf, n); | ||
3444 | 1050 | |||
3445 | 1051 | - for (ptr = buf; ptr < buf + n; ptr++) { | ||
3446 | 1052 | - if (ut_rnd_gen_ibool()) { | ||
3447 | 1053 | - *ptr = 0xDE; | ||
3448 | 1054 | - } else { | ||
3449 | 1055 | - *ptr = 0xAD; | ||
3450 | 1056 | - } | ||
3451 | 1057 | - } | ||
3452 | 1058 | + /* Fix https://bugs.launchpad.net/percona-xtrabackup/+bug/1158154 */ | ||
3453 | 1059 | + memset(buf, 0xDE, n); | ||
3454 | 1060 | |||
3455 | 1061 | UNIV_MEM_FREE(buf, n); | ||
3456 | 1062 | } | ||
3457 | 998 | --- a/storage/innobase/os/os0file.c | 1063 | --- a/storage/innobase/os/os0file.c |
3458 | 999 | +++ b/storage/innobase/os/os0file.c | 1064 | +++ b/storage/innobase/os/os0file.c |
3460 | 1000 | @@ -660,7 +660,7 @@ | 1065 | @@ -670,7 +670,7 @@ |
3461 | 1001 | } | 1066 | } |
3462 | 1002 | 1067 | ||
3463 | 1003 | #undef USE_FILE_LOCK | 1068 | #undef USE_FILE_LOCK |
3464 | @@ -1006,7 +1071,7 @@ | |||
3465 | 1006 | #if defined(UNIV_HOTBACKUP) || defined(__WIN__) | 1071 | #if defined(UNIV_HOTBACKUP) || defined(__WIN__) |
3466 | 1007 | /* InnoDB Hot Backup does not lock the data files. | 1072 | /* InnoDB Hot Backup does not lock the data files. |
3467 | 1008 | * On Windows, mandatory locking is used. | 1073 | * On Windows, mandatory locking is used. |
3469 | 1009 | @@ -1428,7 +1428,7 @@ | 1074 | @@ -1474,7 +1474,7 @@ |
3470 | 1010 | #endif | 1075 | #endif |
3471 | 1011 | #ifdef UNIV_NON_BUFFERED_IO | 1076 | #ifdef UNIV_NON_BUFFERED_IO |
3472 | 1012 | # ifndef UNIV_HOTBACKUP | 1077 | # ifndef UNIV_HOTBACKUP |
3473 | @@ -1015,7 +1080,7 @@ | |||
3474 | 1015 | /* Do not use unbuffered i/o to log files because | 1080 | /* Do not use unbuffered i/o to log files because |
3475 | 1016 | value 2 denotes that we do not flush the log at every | 1081 | value 2 denotes that we do not flush the log at every |
3476 | 1017 | commit, but only once per second */ | 1082 | commit, but only once per second */ |
3478 | 1018 | @@ -1444,7 +1444,7 @@ | 1083 | @@ -1490,7 +1490,7 @@ |
3479 | 1019 | attributes = 0; | 1084 | attributes = 0; |
3480 | 1020 | #ifdef UNIV_NON_BUFFERED_IO | 1085 | #ifdef UNIV_NON_BUFFERED_IO |
3481 | 1021 | # ifndef UNIV_HOTBACKUP | 1086 | # ifndef UNIV_HOTBACKUP |
3482 | @@ -1024,7 +1089,7 @@ | |||
3483 | 1024 | /* Do not use unbuffered i/o to log files because | 1089 | /* Do not use unbuffered i/o to log files because |
3484 | 1025 | value 2 denotes that we do not flush the log at every | 1090 | value 2 denotes that we do not flush the log at every |
3485 | 1026 | commit, but only once per second */ | 1091 | commit, but only once per second */ |
3487 | 1027 | @@ -1460,8 +1460,9 @@ | 1092 | @@ -1506,8 +1506,9 @@ |
3488 | 1028 | attributes = 0; | 1093 | attributes = 0; |
3489 | 1029 | ut_error; | 1094 | ut_error; |
3490 | 1030 | } | 1095 | } |
3491 | @@ -1035,7 +1100,7 @@ | |||
3492 | 1035 | GENERIC_READ | GENERIC_WRITE, /* read and write | 1100 | GENERIC_READ | GENERIC_WRITE, /* read and write |
3493 | 1036 | access */ | 1101 | access */ |
3494 | 1037 | share_mode, /* File can be read also by other | 1102 | share_mode, /* File can be read also by other |
3496 | 1038 | @@ -1520,7 +1521,11 @@ | 1103 | @@ -1572,7 +1573,11 @@ |
3497 | 1039 | if (create_mode == OS_FILE_OPEN || create_mode == OS_FILE_OPEN_RAW | 1104 | if (create_mode == OS_FILE_OPEN || create_mode == OS_FILE_OPEN_RAW |
3498 | 1040 | || create_mode == OS_FILE_OPEN_RETRY) { | 1105 | || create_mode == OS_FILE_OPEN_RETRY) { |
3499 | 1041 | mode_str = "OPEN"; | 1106 | mode_str = "OPEN"; |
3500 | @@ -1048,7 +1113,7 @@ | |||
3501 | 1048 | } else if (create_mode == OS_FILE_CREATE) { | 1113 | } else if (create_mode == OS_FILE_CREATE) { |
3502 | 1049 | mode_str = "CREATE"; | 1114 | mode_str = "CREATE"; |
3503 | 1050 | create_flag = O_RDWR | O_CREAT | O_EXCL; | 1115 | create_flag = O_RDWR | O_CREAT | O_EXCL; |
3505 | 1051 | @@ -2791,6 +2796,9 @@ | 1116 | @@ -2888,6 +2893,9 @@ |
3506 | 1052 | ut_a((offset & 0xFFFFFFFFUL) == offset); | 1117 | ut_a((offset & 0xFFFFFFFFUL) == offset); |
3507 | 1053 | ut_a((n & 0xFFFFFFFFUL) == n); | 1118 | ut_a((n & 0xFFFFFFFFUL) == n); |
3508 | 1054 | 1119 | ||
3509 | @@ -1058,7 +1123,7 @@ | |||
3510 | 1058 | os_n_file_writes++; | 1123 | os_n_file_writes++; |
3511 | 1059 | 1124 | ||
3512 | 1060 | ut_ad(file); | 1125 | ut_ad(file); |
3514 | 1061 | @@ -2915,6 +2923,9 @@ | 1126 | @@ -3012,6 +3020,9 @@ |
3515 | 1062 | #else | 1127 | #else |
3516 | 1063 | ssize_t ret; | 1128 | ssize_t ret; |
3517 | 1064 | 1129 | ||
3518 | @@ -1089,19 +1154,20 @@ | |||
3519 | 1089 | } | 1154 | } |
3520 | 1090 | --- a/storage/innobase/srv/srv0srv.c | 1155 | --- a/storage/innobase/srv/srv0srv.c |
3521 | 1091 | +++ b/storage/innobase/srv/srv0srv.c | 1156 | +++ b/storage/innobase/srv/srv0srv.c |
3523 | 1092 | @@ -87,11 +87,6 @@ | 1157 | @@ -90,12 +90,6 @@ |
3524 | 1093 | #include "mysql/plugin.h" | 1158 | #include "mysql/plugin.h" |
3525 | 1094 | #include "mysql/service_thd_wait.h" | 1159 | #include "mysql/service_thd_wait.h" |
3526 | 1095 | 1160 | ||
3527 | 1096 | -/* prototypes of new functions added to ha_innodb.cc for kill_idle_transaction */ | 1161 | -/* prototypes of new functions added to ha_innodb.cc for kill_idle_transaction */ |
3528 | 1097 | -ibool innobase_thd_is_idle(const void* thd); | 1162 | -ibool innobase_thd_is_idle(const void* thd); |
3529 | 1098 | -ib_int64_t innobase_thd_get_start_time(const void* thd); | 1163 | -ib_int64_t innobase_thd_get_start_time(const void* thd); |
3531 | 1099 | -void innobase_thd_kill(void* thd); | 1164 | -void innobase_thd_kill(ulong thd_id); |
3532 | 1165 | -ulong innobase_thd_get_thread_id(const void* thd); | ||
3533 | 1100 | - | 1166 | - |
3534 | 1101 | /* prototypes for new functions added to ha_innodb.cc */ | 1167 | /* prototypes for new functions added to ha_innodb.cc */ |
3535 | 1102 | ibool innobase_get_slow_log(); | 1168 | ibool innobase_get_slow_log(); |
3536 | 1103 | 1169 | ||
3538 | 1104 | @@ -198,8 +193,7 @@ | 1170 | @@ -212,8 +206,7 @@ |
3539 | 1105 | UNIV_INTERN ulint srv_log_file_size = ULINT_MAX; | 1171 | UNIV_INTERN ulint srv_log_file_size = ULINT_MAX; |
3540 | 1106 | /* size in database pages */ | 1172 | /* size in database pages */ |
3541 | 1107 | UNIV_INTERN ulint srv_log_buffer_size = ULINT_MAX; | 1173 | UNIV_INTERN ulint srv_log_buffer_size = ULINT_MAX; |
3542 | @@ -1111,10 +1177,10 @@ | |||
3543 | 1111 | 1177 | ||
3544 | 1112 | /* Try to flush dirty pages so as to avoid IO bursts at | 1178 | /* Try to flush dirty pages so as to avoid IO bursts at |
3545 | 1113 | the checkpoints. */ | 1179 | the checkpoints. */ |
3547 | 1114 | @@ -457,6 +451,11 @@ | 1180 | @@ -435,6 +428,11 @@ |
3548 | 1181 | UNIV_INTERN ulint srv_pass_corrupt_table = 0; /* 0:disable 1:enable */ | ||
3549 | 1182 | |||
3550 | 1115 | UNIV_INTERN ulint srv_dict_size_limit = 0; | 1183 | UNIV_INTERN ulint srv_dict_size_limit = 0; |
3551 | 1116 | |||
3552 | 1117 | UNIV_INTERN ulint srv_lazy_drop_table = 0; | ||
3553 | 1118 | + | 1184 | + |
3554 | 1119 | +UNIV_INTERN ibool srv_read_only = FALSE; | 1185 | +UNIV_INTERN ibool srv_read_only = FALSE; |
3555 | 1120 | +UNIV_INTERN ibool srv_fake_write = FALSE; | 1186 | +UNIV_INTERN ibool srv_fake_write = FALSE; |
3556 | @@ -1123,7 +1189,7 @@ | |||
3557 | 1123 | /*-------------------------------------------*/ | 1189 | /*-------------------------------------------*/ |
3558 | 1124 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; | 1190 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; |
3559 | 1125 | UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; | 1191 | UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; |
3561 | 1126 | @@ -1137,7 +1136,7 @@ | 1192 | @@ -1185,7 +1183,7 @@ |
3562 | 1127 | } | 1193 | } |
3563 | 1128 | 1194 | ||
3564 | 1129 | /* Initialize some INFORMATION SCHEMA internal structures */ | 1195 | /* Initialize some INFORMATION SCHEMA internal structures */ |
3565 | @@ -1132,7 +1198,7 @@ | |||
3566 | 1132 | } | 1198 | } |
3567 | 1133 | 1199 | ||
3568 | 1134 | /*********************************************************************//** | 1200 | /*********************************************************************//** |
3570 | 1135 | @@ -1148,6 +1147,7 @@ | 1201 | @@ -1196,6 +1194,7 @@ |
3571 | 1136 | /*==========*/ | 1202 | /*==========*/ |
3572 | 1137 | { | 1203 | { |
3573 | 1138 | os_fast_mutex_free(&srv_conc_mutex); | 1204 | os_fast_mutex_free(&srv_conc_mutex); |
3574 | @@ -1140,7 +1206,7 @@ | |||
3575 | 1140 | mem_free(srv_conc_slots); | 1206 | mem_free(srv_conc_slots); |
3576 | 1141 | srv_conc_slots = NULL; | 1207 | srv_conc_slots = NULL; |
3577 | 1142 | 1208 | ||
3579 | 1143 | @@ -1161,6 +1161,7 @@ | 1209 | @@ -1209,6 +1208,7 @@ |
3580 | 1144 | srv_mysql_table = NULL; | 1210 | srv_mysql_table = NULL; |
3581 | 1145 | 1211 | ||
3582 | 1146 | trx_i_s_cache_free(trx_i_s_cache); | 1212 | trx_i_s_cache_free(trx_i_s_cache); |
3583 | @@ -1148,7 +1214,7 @@ | |||
3584 | 1148 | } | 1214 | } |
3585 | 1149 | 1215 | ||
3586 | 1150 | /*********************************************************************//** | 1216 | /*********************************************************************//** |
3588 | 1151 | @@ -1886,7 +1887,7 @@ | 1217 | @@ -1938,7 +1938,7 @@ |
3589 | 1152 | } | 1218 | } |
3590 | 1153 | 1219 | ||
3591 | 1154 | /* Record the lock wait time for this thread */ | 1220 | /* Record the lock wait time for this thread */ |
3592 | @@ -1157,7 +1223,7 @@ | |||
3593 | 1157 | } | 1223 | } |
3594 | 1158 | 1224 | ||
3595 | 1159 | if (trx->was_chosen_as_deadlock_victim) { | 1225 | if (trx->was_chosen_as_deadlock_victim) { |
3597 | 1160 | @@ -2842,36 +2843,6 @@ | 1226 | @@ -2946,36 +2946,6 @@ |
3598 | 1161 | old_sema = sema; | 1227 | old_sema = sema; |
3599 | 1162 | } | 1228 | } |
3600 | 1163 | 1229 | ||
3601 | @@ -1169,12 +1235,12 @@ | |||
3602 | 1169 | - mutex_enter(&kernel_mutex); | 1235 | - mutex_enter(&kernel_mutex); |
3603 | 1170 | - trx = UT_LIST_GET_FIRST(trx_sys->mysql_trx_list); | 1236 | - trx = UT_LIST_GET_FIRST(trx_sys->mysql_trx_list); |
3604 | 1171 | - while (trx) { | 1237 | - while (trx) { |
3606 | 1172 | - if (trx->conc_state == TRX_ACTIVE | 1238 | - if (trx->state == TRX_ACTIVE |
3607 | 1173 | - && trx->mysql_thd | 1239 | - && trx->mysql_thd |
3608 | 1174 | - && innobase_thd_is_idle(trx->mysql_thd)) { | 1240 | - && innobase_thd_is_idle(trx->mysql_thd)) { |
3610 | 1175 | - ib_int64_t start_time; /* as stmt ID */ | 1241 | - ib_int64_t start_time = innobase_thd_get_start_time(trx->mysql_thd); |
3611 | 1242 | - ulong thd_id = innobase_thd_get_thread_id(trx->mysql_thd); | ||
3612 | 1176 | - | 1243 | - |
3613 | 1177 | - start_time = innobase_thd_get_start_time(trx->mysql_thd); | ||
3614 | 1178 | - if (trx->last_stmt_start != start_time) { | 1244 | - if (trx->last_stmt_start != start_time) { |
3615 | 1179 | - trx->idle_start = now; | 1245 | - trx->idle_start = now; |
3616 | 1180 | - trx->last_stmt_start = start_time; | 1246 | - trx->last_stmt_start = start_time; |
3617 | @@ -1182,7 +1248,7 @@ | |||
3618 | 1182 | - > srv_kill_idle_transaction) { | 1248 | - > srv_kill_idle_transaction) { |
3619 | 1183 | - /* kill the session */ | 1249 | - /* kill the session */ |
3620 | 1184 | - mutex_exit(&kernel_mutex); | 1250 | - mutex_exit(&kernel_mutex); |
3622 | 1185 | - innobase_thd_kill(trx->mysql_thd); | 1251 | - innobase_thd_kill(thd_id); |
3623 | 1186 | - goto rescan_idle; | 1252 | - goto rescan_idle; |
3624 | 1187 | - } | 1253 | - } |
3625 | 1188 | - } | 1254 | - } |
3626 | @@ -1196,7 +1262,7 @@ | |||
3627 | 1196 | 1262 | ||
3628 | 1197 | --- a/storage/innobase/srv/srv0start.c | 1263 | --- a/storage/innobase/srv/srv0start.c |
3629 | 1198 | +++ b/storage/innobase/srv/srv0start.c | 1264 | +++ b/storage/innobase/srv/srv0start.c |
3631 | 1199 | @@ -62,6 +62,7 @@ | 1265 | @@ -63,6 +63,7 @@ |
3632 | 1200 | #include "ibuf0ibuf.h" | 1266 | #include "ibuf0ibuf.h" |
3633 | 1201 | #include "srv0start.h" | 1267 | #include "srv0start.h" |
3634 | 1202 | #include "srv0srv.h" | 1268 | #include "srv0srv.h" |
3635 | @@ -1204,7 +1270,7 @@ | |||
3636 | 1204 | #ifndef UNIV_HOTBACKUP | 1270 | #ifndef UNIV_HOTBACKUP |
3637 | 1205 | # include "os0proc.h" | 1271 | # include "os0proc.h" |
3638 | 1206 | # include "sync0sync.h" | 1272 | # include "sync0sync.h" |
3640 | 1207 | @@ -94,6 +95,8 @@ | 1273 | @@ -95,6 +96,8 @@ |
3641 | 1208 | /** Log sequence number at shutdown */ | 1274 | /** Log sequence number at shutdown */ |
3642 | 1209 | UNIV_INTERN ib_uint64_t srv_shutdown_lsn; | 1275 | UNIV_INTERN ib_uint64_t srv_shutdown_lsn; |
3643 | 1210 | 1276 | ||
3644 | @@ -1213,7 +1279,7 @@ | |||
3645 | 1213 | #ifdef HAVE_DARWIN_THREADS | 1279 | #ifdef HAVE_DARWIN_THREADS |
3646 | 1214 | # include <sys/utsname.h> | 1280 | # include <sys/utsname.h> |
3647 | 1215 | /** TRUE if the F_FULLFSYNC option is available */ | 1281 | /** TRUE if the F_FULLFSYNC option is available */ |
3649 | 1216 | @@ -549,7 +552,7 @@ | 1282 | @@ -551,7 +554,7 @@ |
3650 | 1217 | /*********************************************************************//** | 1283 | /*********************************************************************//** |
3651 | 1218 | Creates or opens the log files and closes them. | 1284 | Creates or opens the log files and closes them. |
3652 | 1219 | @return DB_SUCCESS or error code */ | 1285 | @return DB_SUCCESS or error code */ |
3653 | @@ -1222,7 +1288,7 @@ | |||
3654 | 1222 | ulint | 1288 | ulint |
3655 | 1223 | open_or_create_log_file( | 1289 | open_or_create_log_file( |
3656 | 1224 | /*====================*/ | 1290 | /*====================*/ |
3658 | 1225 | @@ -709,7 +712,7 @@ | 1291 | @@ -711,7 +714,7 @@ |
3659 | 1226 | /*********************************************************************//** | 1292 | /*********************************************************************//** |
3660 | 1227 | Creates or opens database data files and closes them. | 1293 | Creates or opens database data files and closes them. |
3661 | 1228 | @return DB_SUCCESS or error code */ | 1294 | @return DB_SUCCESS or error code */ |
3662 | @@ -1231,7 +1297,7 @@ | |||
3663 | 1231 | ulint | 1297 | ulint |
3664 | 1232 | open_or_create_data_files( | 1298 | open_or_create_data_files( |
3665 | 1233 | /*======================*/ | 1299 | /*======================*/ |
3667 | 1234 | @@ -1875,6 +1878,10 @@ | 1300 | @@ -1934,6 +1937,10 @@ |
3668 | 1235 | are initialized in trx_sys_init_at_db_start(). */ | 1301 | are initialized in trx_sys_init_at_db_start(). */ |
3669 | 1236 | 1302 | ||
3670 | 1237 | recv_recovery_from_checkpoint_finish(); | 1303 | recv_recovery_from_checkpoint_finish(); |
3671 | @@ -1242,7 +1308,7 @@ | |||
3672 | 1242 | if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) { | 1308 | if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) { |
3673 | 1243 | /* The following call is necessary for the insert | 1309 | /* The following call is necessary for the insert |
3674 | 1244 | buffer to work with multiple tablespaces. We must | 1310 | buffer to work with multiple tablespaces. We must |
3676 | 1245 | @@ -2054,6 +2061,17 @@ | 1311 | @@ -2119,6 +2126,17 @@ |
3677 | 1246 | if (!srv_auto_extend_last_data_file | 1312 | if (!srv_auto_extend_last_data_file |
3678 | 1247 | && sum_of_data_file_sizes != tablespace_size_in_header) { | 1313 | && sum_of_data_file_sizes != tablespace_size_in_header) { |
3679 | 1248 | 1314 | ||
3680 | @@ -1260,7 +1326,7 @@ | |||
3681 | 1260 | ut_print_timestamp(stderr); | 1326 | ut_print_timestamp(stderr); |
3682 | 1261 | fprintf(stderr, | 1327 | fprintf(stderr, |
3683 | 1262 | " InnoDB: Error: tablespace size" | 1328 | " InnoDB: Error: tablespace size" |
3685 | 1263 | @@ -2133,6 +2151,7 @@ | 1329 | @@ -2198,6 +2216,7 @@ |
3686 | 1264 | 1330 | ||
3687 | 1265 | return(DB_ERROR); | 1331 | return(DB_ERROR); |
3688 | 1266 | } | 1332 | } |
3689 | @@ -1268,7 +1334,7 @@ | |||
3690 | 1268 | } | 1334 | } |
3691 | 1269 | 1335 | ||
3692 | 1270 | /* Check that os_fast_mutexes work as expected */ | 1336 | /* Check that os_fast_mutexes work as expected */ |
3694 | 1271 | @@ -2157,6 +2176,10 @@ | 1337 | @@ -2222,6 +2241,10 @@ |
3695 | 1272 | 1338 | ||
3696 | 1273 | os_fast_mutex_free(&srv_os_test_mutex); | 1339 | os_fast_mutex_free(&srv_os_test_mutex); |
3697 | 1274 | 1340 | ||
3698 | @@ -1279,7 +1345,7 @@ | |||
3699 | 1279 | if (!srv_file_per_table_original_value | 1345 | if (!srv_file_per_table_original_value |
3700 | 1280 | && srv_pass_corrupt_table) { | 1346 | && srv_pass_corrupt_table) { |
3701 | 1281 | fprintf(stderr, "InnoDB: Warning:" | 1347 | fprintf(stderr, "InnoDB: Warning:" |
3703 | 1282 | @@ -2252,6 +2275,7 @@ | 1348 | @@ -2317,6 +2340,7 @@ |
3704 | 1283 | ibuf_update_max_tablespace_id(); | 1349 | ibuf_update_max_tablespace_id(); |
3705 | 1284 | } | 1350 | } |
3706 | 1285 | 1351 | ||
3707 | @@ -1287,9 +1353,33 @@ | |||
3708 | 1287 | srv_file_per_table = srv_file_per_table_original_value; | 1353 | srv_file_per_table = srv_file_per_table_original_value; |
3709 | 1288 | 1354 | ||
3710 | 1289 | srv_was_started = TRUE; | 1355 | srv_was_started = TRUE; |
3711 | 1356 | --- a/storage/innobase/sync/sync0arr.c | ||
3712 | 1357 | +++ b/storage/innobase/sync/sync0arr.c | ||
3713 | 1358 | @@ -41,6 +41,7 @@ | ||
3714 | 1359 | #include "os0file.h" | ||
3715 | 1360 | #include "srv0srv.h" | ||
3716 | 1361 | #include "ha_prototypes.h" | ||
3717 | 1362 | +#include "xb0xb.h" | ||
3718 | 1363 | |||
3719 | 1364 | /* | ||
3720 | 1365 | WAIT ARRAY | ||
3721 | 1366 | @@ -927,6 +928,13 @@ | ||
3722 | 1367 | return(FALSE); | ||
3723 | 1368 | } | ||
3724 | 1369 | |||
3725 | 1370 | + if (srv_rebuild_indexes) { | ||
3726 | 1371 | + | ||
3727 | 1372 | + /* Avoid long semaphore warnings when rebuilding indexes */ | ||
3728 | 1373 | + | ||
3729 | 1374 | + return(FALSE); | ||
3730 | 1375 | + } | ||
3731 | 1376 | + | ||
3732 | 1377 | #ifdef UNIV_DEBUG_VALGRIND | ||
3733 | 1378 | /* Increase the timeouts if running under valgrind because it executes | ||
3734 | 1379 | extremely slowly. UNIV_DEBUG_VALGRIND does not necessary mean that | ||
3735 | 1290 | --- a/storage/innobase/trx/trx0purge.c | 1380 | --- a/storage/innobase/trx/trx0purge.c |
3736 | 1291 | +++ b/storage/innobase/trx/trx0purge.c | 1381 | +++ b/storage/innobase/trx/trx0purge.c |
3738 | 1292 | @@ -1129,6 +1129,9 @@ | 1382 | @@ -1149,6 +1149,9 @@ |
3739 | 1293 | que_thr_t* thr; | 1383 | que_thr_t* thr; |
3740 | 1294 | ulint old_pages_handled; | 1384 | ulint old_pages_handled; |
3741 | 1295 | 1385 | ||
3742 | @@ -1315,7 +1405,7 @@ | |||
3743 | 1315 | 1405 | ||
3744 | 1316 | --- a/storage/innobase/trx/trx0sys.c | 1406 | --- a/storage/innobase/trx/trx0sys.c |
3745 | 1317 | +++ b/storage/innobase/trx/trx0sys.c | 1407 | +++ b/storage/innobase/trx/trx0sys.c |
3747 | 1318 | @@ -1952,12 +1952,14 @@ | 1408 | @@ -2000,12 +2000,14 @@ |
3748 | 1319 | mem_free(trx_doublewrite); | 1409 | mem_free(trx_doublewrite); |
3749 | 1320 | trx_doublewrite = NULL; | 1410 | trx_doublewrite = NULL; |
3750 | 1321 | 1411 | ||
3751 | @@ -1330,7 +1420,7 @@ | |||
3752 | 1330 | 1420 | ||
3753 | 1331 | /* There can't be any active transactions. */ | 1421 | /* There can't be any active transactions. */ |
3754 | 1332 | rseg = UT_LIST_GET_FIRST(trx_sys->rseg_list); | 1422 | rseg = UT_LIST_GET_FIRST(trx_sys->rseg_list); |
3756 | 1333 | @@ -1983,10 +1985,12 @@ | 1423 | @@ -2031,10 +2033,12 @@ |
3757 | 1334 | UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view); | 1424 | UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view); |
3758 | 1335 | } | 1425 | } |
3759 | 1336 | 1426 | ||
3760 | @@ -1341,36 +1431,36 @@ | |||
3761 | 1341 | ut_a(UT_LIST_GET_LEN(trx_sys->mysql_trx_list) == 0); | 1431 | ut_a(UT_LIST_GET_LEN(trx_sys->mysql_trx_list) == 0); |
3762 | 1342 | + } | 1432 | + } |
3763 | 1343 | 1433 | ||
3766 | 1344 | mem_free(trx_sys); | 1434 | ut_ad(trx_sys->descr_n_used == 0); |
3767 | 1345 | 1435 | ut_free(trx_sys->descriptors); | |
3768 | 1346 | --- a/storage/innobase/trx/trx0trx.c | 1436 | --- a/storage/innobase/trx/trx0trx.c |
3769 | 1347 | +++ b/storage/innobase/trx/trx0trx.c | 1437 | +++ b/storage/innobase/trx/trx0trx.c |
3772 | 1348 | @@ -563,9 +563,8 @@ | 1438 | @@ -692,8 +692,8 @@ |
3771 | 1349 | (ullint) trx->id); | ||
3773 | 1350 | 1439 | ||
3774 | 1351 | if (srv_force_recovery == 0) { | 1440 | if (srv_force_recovery == 0) { |
3777 | 1352 | - | 1441 | |
3778 | 1353 | - trx->conc_state = TRX_PREPARED; | 1442 | - trx->state = TRX_PREPARED; |
3779 | 1354 | - trx_n_prepared++; | 1443 | - trx_n_prepared++; |
3782 | 1355 | + /* xtrabackup should rollback it */ | 1444 | + /* xtrabackup should rollback it */ |
3783 | 1356 | + trx->conc_state = TRX_ACTIVE; | 1445 | + trx->state = TRX_ACTIVE; |
3784 | 1357 | } else { | 1446 | } else { |
3785 | 1358 | fprintf(stderr, | 1447 | fprintf(stderr, |
3786 | 1359 | "InnoDB: Since" | 1448 | "InnoDB: Since" |
3789 | 1360 | @@ -639,10 +638,9 @@ | 1449 | @@ -772,9 +772,11 @@ |
3788 | 1361 | (ullint) trx->id); | ||
3790 | 1362 | 1450 | ||
3791 | 1363 | if (srv_force_recovery == 0) { | 1451 | if (srv_force_recovery == 0) { |
3795 | 1364 | - | 1452 | |
3796 | 1365 | + /* xtrabackup should rollback it */ | 1453 | + /* xtrabackup should |
3797 | 1366 | trx->conc_state | 1454 | + rollback it */ |
3798 | 1455 | trx->state | ||
3799 | 1367 | - = TRX_PREPARED; | 1456 | - = TRX_PREPARED; |
3800 | 1368 | - trx_n_prepared++; | 1457 | - trx_n_prepared++; |
3801 | 1369 | + = TRX_ACTIVE; | 1458 | + = TRX_ACTIVE; |
3802 | 1459 | + trx_reserve_descriptor(trx); | ||
3803 | 1370 | } else { | 1460 | } else { |
3804 | 1371 | fprintf(stderr, | 1461 | fprintf(stderr, |
3805 | 1372 | "InnoDB: Since" | 1462 | "InnoDB: Since" |
3807 | 1373 | @@ -1051,7 +1049,6 @@ | 1463 | @@ -1211,7 +1213,6 @@ |
3808 | 1374 | trx->read_view = NULL; | 1464 | trx->read_view = NULL; |
3809 | 1375 | 1465 | ||
3810 | 1376 | if (lsn) { | 1466 | if (lsn) { |
3811 | @@ -1378,7 +1468,7 @@ | |||
3812 | 1378 | 1468 | ||
3813 | 1379 | mutex_exit(&kernel_mutex); | 1469 | mutex_exit(&kernel_mutex); |
3814 | 1380 | 1470 | ||
3816 | 1381 | @@ -1060,12 +1057,6 @@ | 1471 | @@ -1220,12 +1221,6 @@ |
3817 | 1382 | trx_undo_insert_cleanup(trx); | 1472 | trx_undo_insert_cleanup(trx); |
3818 | 1383 | } | 1473 | } |
3819 | 1384 | 1474 | ||
3820 | @@ -1391,7 +1481,7 @@ | |||
3821 | 1391 | /* NOTE that we could possibly make a group commit more | 1481 | /* NOTE that we could possibly make a group commit more |
3822 | 1392 | efficient here: call os_thread_yield here to allow also other | 1482 | efficient here: call os_thread_yield here to allow also other |
3823 | 1393 | trxs to come to commit! */ | 1483 | trxs to come to commit! */ |
3825 | 1394 | @@ -1097,9 +1088,9 @@ | 1484 | @@ -1257,9 +1252,9 @@ |
3826 | 1395 | if (trx->flush_log_later) { | 1485 | if (trx->flush_log_later) { |
3827 | 1396 | /* Do nothing yet */ | 1486 | /* Do nothing yet */ |
3828 | 1397 | trx->must_flush_log_later = TRUE; | 1487 | trx->must_flush_log_later = TRUE; |
3829 | @@ -1403,7 +1493,7 @@ | |||
3830 | 1403 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { | 1493 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { |
3831 | 1404 | /* Write the log but do not flush it to disk */ | 1494 | /* Write the log but do not flush it to disk */ |
3832 | 1405 | 1495 | ||
3834 | 1406 | @@ -1111,7 +1102,7 @@ | 1496 | @@ -1271,7 +1266,7 @@ |
3835 | 1407 | 1497 | ||
3836 | 1408 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); | 1498 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); |
3837 | 1409 | } | 1499 | } |
3838 | @@ -1412,7 +1502,7 @@ | |||
3839 | 1412 | 1502 | ||
3840 | 1413 | /* Write the log but do not flush it to disk */ | 1503 | /* Write the log but do not flush it to disk */ |
3841 | 1414 | 1504 | ||
3843 | 1415 | @@ -1791,23 +1782,16 @@ | 1505 | @@ -1956,23 +1951,16 @@ |
3844 | 1416 | trx_t* trx) /*!< in: trx handle */ | 1506 | trx_t* trx) /*!< in: trx handle */ |
3845 | 1417 | { | 1507 | { |
3846 | 1418 | ib_uint64_t lsn = trx->commit_lsn; | 1508 | ib_uint64_t lsn = trx->commit_lsn; |
3847 | @@ -1438,7 +1528,7 @@ | |||
3848 | 1438 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { | 1528 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { |
3849 | 1439 | /* Write the log but do not flush it to disk */ | 1529 | /* Write the log but do not flush it to disk */ |
3850 | 1440 | 1530 | ||
3852 | 1441 | @@ -1818,7 +1802,7 @@ | 1531 | @@ -1983,7 +1971,7 @@ |
3853 | 1442 | 1532 | ||
3854 | 1443 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); | 1533 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); |
3855 | 1444 | } | 1534 | } |
3856 | @@ -1447,7 +1537,7 @@ | |||
3857 | 1447 | 1537 | ||
3858 | 1448 | /* Write the log but do not flush it to disk */ | 1538 | /* Write the log but do not flush it to disk */ |
3859 | 1449 | 1539 | ||
3861 | 1450 | @@ -2066,7 +2050,6 @@ | 1540 | @@ -2252,7 +2240,6 @@ |
3862 | 1451 | /*--------------------------------------*/ | 1541 | /*--------------------------------------*/ |
3863 | 1452 | 1542 | ||
3864 | 1453 | if (lsn) { | 1543 | if (lsn) { |
3865 | @@ -1455,7 +1545,7 @@ | |||
3866 | 1455 | 1545 | ||
3867 | 1456 | /* Depending on the my.cnf options, we may now write the log | 1546 | /* Depending on the my.cnf options, we may now write the log |
3868 | 1457 | buffer to the log files, making the prepared state of the | 1547 | buffer to the log files, making the prepared state of the |
3870 | 1458 | @@ -2087,15 +2070,9 @@ | 1548 | @@ -2273,15 +2260,9 @@ |
3871 | 1459 | 1549 | ||
3872 | 1460 | mutex_exit(&kernel_mutex); | 1550 | mutex_exit(&kernel_mutex); |
3873 | 1461 | 1551 | ||
3874 | @@ -1473,7 +1563,7 @@ | |||
3875 | 1473 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { | 1563 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { |
3876 | 1474 | /* Write the log but do not flush it to disk */ | 1564 | /* Write the log but do not flush it to disk */ |
3877 | 1475 | 1565 | ||
3879 | 1476 | @@ -2107,7 +2084,7 @@ | 1566 | @@ -2293,7 +2274,7 @@ |
3880 | 1477 | 1567 | ||
3881 | 1478 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); | 1568 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); |
3882 | 1479 | } | 1569 | } |
3883 | @@ -1482,94 +1572,14 @@ | |||
3884 | 1482 | 1572 | ||
3885 | 1483 | /* Write the log but do not flush it to disk */ | 1573 | /* Write the log but do not flush it to disk */ |
3886 | 1484 | 1574 | ||
3978 | 1485 | --- a/configure.cmake | 1575 | --- a/storage/innobase/row/row0merge.c |
3979 | 1486 | +++ b/configure.cmake | 1576 | +++ b/storage/innobase/row/row0merge.c |
3980 | 1487 | @@ -149,7 +149,9 @@ | 1577 | @@ -2774,7 +2774,7 @@ |
3981 | 1488 | SET(CMAKE_REQUIRED_LIBRARIES | 1578 | ut_ad(indexes); |
3982 | 1489 | ${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT}) | 1579 | ut_ad(n_indexes); |
3983 | 1490 | 1580 | ||
3984 | 1491 | - LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES) | 1581 | - merge_sort_block_size = thd_merge_sort_block_size(trx->mysql_thd); |
3985 | 1492 | + IF(CMAKE_REQUIRED_LIBRARIES) | 1582 | + merge_sort_block_size = 1UL << 20; |
3986 | 1493 | + LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES) | 1583 | |
3987 | 1494 | + ENDIF() | 1584 | trx_start_if_not_started(trx); |
3988 | 1495 | LINK_LIBRARIES(${CMAKE_THREAD_LIBS_INIT}) | 1585 | |
3898 | 1496 | |||
3899 | 1497 | OPTION(WITH_LIBWRAP "Compile with tcp wrappers support" OFF) | ||
3900 | 1498 | --- a/storage/innobase/sync/sync0arr.c | ||
3901 | 1499 | +++ b/storage/innobase/sync/sync0arr.c | ||
3902 | 1500 | @@ -41,6 +41,7 @@ | ||
3903 | 1501 | #include "os0file.h" | ||
3904 | 1502 | #include "srv0srv.h" | ||
3905 | 1503 | #include "ha_prototypes.h" | ||
3906 | 1504 | +#include "xb0xb.h" | ||
3907 | 1505 | |||
3908 | 1506 | /* | ||
3909 | 1507 | WAIT ARRAY | ||
3910 | 1508 | @@ -926,6 +927,13 @@ | ||
3911 | 1509 | ibool fatal = FALSE; | ||
3912 | 1510 | double longest_diff = 0; | ||
3913 | 1511 | |||
3914 | 1512 | + if (srv_rebuild_indexes) { | ||
3915 | 1513 | + | ||
3916 | 1514 | + /* Avoid long semaphore warnings when rebuilding indexes */ | ||
3917 | 1515 | + | ||
3918 | 1516 | + return(FALSE); | ||
3919 | 1517 | + } | ||
3920 | 1518 | + | ||
3921 | 1519 | #ifdef UNIV_DEBUG_VALGRIND | ||
3922 | 1520 | /* Increase the timeouts if running under valgrind because it executes | ||
3923 | 1521 | extremely slowly. UNIV_DEBUG_VALGRIND does not necessary mean that | ||
3924 | 1522 | --- a/storage/innobase/include/buf0buf.h | ||
3925 | 1523 | +++ b/storage/innobase/include/buf0buf.h | ||
3926 | 1524 | @@ -1509,6 +1509,8 @@ | ||
3927 | 1525 | frees a page in buffer pool */ | ||
3928 | 1526 | # endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ | ||
3929 | 1527 | #endif /* !UNIV_HOTBACKUP */ | ||
3930 | 1528 | + ibool is_compacted; /*!< TRUE if the page was skipped in | ||
3931 | 1529 | + compact backups */ | ||
3932 | 1530 | }; | ||
3933 | 1531 | |||
3934 | 1532 | /** The buffer control block structure */ | ||
3935 | 1533 | --- a/storage/innobase/mem/mem0dbg.c | ||
3936 | 1534 | +++ b/storage/innobase/mem/mem0dbg.c | ||
3937 | 1535 | @@ -280,18 +280,10 @@ | ||
3938 | 1536 | byte* buf, /*!< in: pointer to buffer */ | ||
3939 | 1537 | ulint n) /*!< in: length of buffer */ | ||
3940 | 1538 | { | ||
3941 | 1539 | - byte* ptr; | ||
3942 | 1540 | - | ||
3943 | 1541 | UNIV_MEM_ASSERT_W(buf, n); | ||
3944 | 1542 | |||
3945 | 1543 | - for (ptr = buf; ptr < buf + n; ptr++) { | ||
3946 | 1544 | - | ||
3947 | 1545 | - if (ut_rnd_gen_ibool()) { | ||
3948 | 1546 | - *ptr = 0xBA; | ||
3949 | 1547 | - } else { | ||
3950 | 1548 | - *ptr = 0xBE; | ||
3951 | 1549 | - } | ||
3952 | 1550 | - } | ||
3953 | 1551 | + /* Fix https://bugs.launchpad.net/percona-xtrabackup/+bug/1158154 */ | ||
3954 | 1552 | + memset(buf, 0xBA, n); | ||
3955 | 1553 | |||
3956 | 1554 | UNIV_MEM_INVALID(buf, n); | ||
3957 | 1555 | } | ||
3958 | 1556 | @@ -306,17 +298,10 @@ | ||
3959 | 1557 | byte* buf, /*!< in: pointer to buffer */ | ||
3960 | 1558 | ulint n) /*!< in: length of buffer */ | ||
3961 | 1559 | { | ||
3962 | 1560 | - byte* ptr; | ||
3963 | 1561 | - | ||
3964 | 1562 | UNIV_MEM_ASSERT_W(buf, n); | ||
3965 | 1563 | |||
3966 | 1564 | - for (ptr = buf; ptr < buf + n; ptr++) { | ||
3967 | 1565 | - if (ut_rnd_gen_ibool()) { | ||
3968 | 1566 | - *ptr = 0xDE; | ||
3969 | 1567 | - } else { | ||
3970 | 1568 | - *ptr = 0xAD; | ||
3971 | 1569 | - } | ||
3972 | 1570 | - } | ||
3973 | 1571 | + /* Fix https://bugs.launchpad.net/percona-xtrabackup/+bug/1158154 */ | ||
3974 | 1572 | + memset(buf, 0xDE, n); | ||
3975 | 1573 | |||
3976 | 1574 | UNIV_MEM_FREE(buf, n); | ||
3977 | 1575 | } | ||
3989 | 1576 | 1586 | ||
3990 | === modified file 'src/Makefile' | |||
3991 | --- src/Makefile 2013-05-18 03:04:06 +0000 | |||
3992 | +++ src/Makefile 2013-07-22 14:01:36 +0000 | |||
3993 | @@ -183,7 +183,7 @@ | |||
3994 | 183 | usr0sess.o ut0byte.o ut0dbg.o \ | 183 | usr0sess.o ut0byte.o ut0dbg.o \ |
3995 | 184 | ut0list.o ut0mem.o ut0rnd.o \ | 184 | ut0list.o ut0mem.o ut0rnd.o \ |
3996 | 185 | ut0ut.o ut0vec.o ut0wqueue.o \ | 185 | ut0ut.o ut0vec.o ut0wqueue.o \ |
3998 | 186 | ut0rbt.o) | 186 | ut0rbt.o log0online.o) |
3999 | 187 | xtradb: MYSQLOBJS = $(addprefix $(MYSQL_ROOT_DIR)/, mysys/libmysys.a \ | 187 | xtradb: MYSQLOBJS = $(addprefix $(MYSQL_ROOT_DIR)/, mysys/libmysys.a \ |
4000 | 188 | strings/libmystrings.a zlib/.libs/libzlt.a dbug/libdbug.a) | 188 | strings/libmystrings.a zlib/.libs/libzlt.a dbug/libdbug.a) |
4001 | 189 | xtradb: DEFS += -DXTRADB_BASED | 189 | xtradb: DEFS += -DXTRADB_BASED |
4002 | 190 | 190 | ||
4003 | === modified file 'src/compact.cc' | |||
4004 | --- src/compact.cc 2013-05-03 05:17:03 +0000 | |||
4005 | +++ src/compact.cc 2013-07-22 14:01:36 +0000 | |||
4006 | @@ -815,7 +815,7 @@ | |||
4007 | 815 | index->to_be_dropped = 1; | 815 | index->to_be_dropped = 1; |
4008 | 816 | 816 | ||
4009 | 817 | /* Patch up any FK referencing this index with NULL */ | 817 | /* Patch up any FK referencing this index with NULL */ |
4011 | 818 | dict_foreign_replace_index(table, index, trx); | 818 | dict_foreign_replace_index(table, NULL, index); |
4012 | 819 | 819 | ||
4013 | 820 | dict_index_remove_from_cache(table, index); | 820 | dict_index_remove_from_cache(table, index); |
4014 | 821 | 821 | ||
4015 | 822 | 822 | ||
4016 | === modified file 'src/innodb_int.cc' | |||
4017 | --- src/innodb_int.cc 2013-04-27 12:08:11 +0000 | |||
4018 | +++ src/innodb_int.cc 2013-07-22 14:01:36 +0000 | |||
4019 | @@ -47,6 +47,25 @@ | |||
4020 | 47 | 47 | ||
4021 | 48 | long innobase_mirrored_log_groups = 1; | 48 | long innobase_mirrored_log_groups = 1; |
4022 | 49 | 49 | ||
4023 | 50 | /******************************************************//** | ||
4024 | 51 | Reads a specified log segment to a buffer. */ | ||
4025 | 52 | UNIV_INTERN | ||
4026 | 53 | void | ||
4027 | 54 | xb_log_group_read_log_seg( | ||
4028 | 55 | /*===================*/ | ||
4029 | 56 | ulint type, /*!< in: LOG_ARCHIVE or LOG_RECOVER */ | ||
4030 | 57 | byte* buf, /*!< in: buffer where to read */ | ||
4031 | 58 | log_group_t* group, /*!< in: log group */ | ||
4032 | 59 | ib_uint64_t start_lsn, /*!< in: read area start */ | ||
4033 | 60 | ib_uint64_t end_lsn) /*!< in: read area end */ | ||
4034 | 61 | { | ||
4035 | 62 | #if defined(XTRADB_BASED) && !defined(XTRADB55) | ||
4036 | 63 | log_group_read_log_seg(type, buf, group, start_lsn, end_lsn, FALSE); | ||
4037 | 64 | #else | ||
4038 | 65 | log_group_read_log_seg(type, buf, group, start_lsn, end_lsn); | ||
4039 | 66 | #endif | ||
4040 | 67 | } | ||
4041 | 68 | |||
4042 | 50 | /****************************************************************//** | 69 | /****************************************************************//** |
4043 | 51 | A simple function to open or create a file. | 70 | A simple function to open or create a file. |
4044 | 52 | @return own: handle to the file, not defined if error, error number | 71 | @return own: handle to the file, not defined if error, error number |
4045 | @@ -244,7 +263,7 @@ | |||
4046 | 244 | if (!ret) { | 263 | if (!ret) { |
4047 | 245 | msg("xtrabackup: cannot set size for file %s\n", path); | 264 | msg("xtrabackup: cannot set size for file %s\n", path); |
4048 | 246 | os_file_close(*file); | 265 | os_file_close(*file); |
4050 | 247 | os_file_delete(path); | 266 | xb_file_delete(path); |
4051 | 248 | return ret; | 267 | return ret; |
4052 | 249 | } | 268 | } |
4053 | 250 | 269 | ||
4054 | @@ -289,7 +308,7 @@ | |||
4055 | 289 | msg("xtrabackup: could not write the first page to %s\n", | 308 | msg("xtrabackup: could not write the first page to %s\n", |
4056 | 290 | path); | 309 | path); |
4057 | 291 | os_file_close(*file); | 310 | os_file_close(*file); |
4059 | 292 | os_file_delete(path); | 311 | xb_file_delete(path); |
4060 | 293 | return ret; | 312 | return ret; |
4061 | 294 | } | 313 | } |
4062 | 295 | 314 | ||
4063 | @@ -334,6 +353,43 @@ | |||
4064 | 334 | /* do nothing */ | 353 | /* do nothing */ |
4065 | 335 | } | 354 | } |
4066 | 336 | 355 | ||
4067 | 356 | my_bool | ||
4068 | 357 | innobase_check_identifier_length( | ||
4069 | 358 | /*=============================*/ | ||
4070 | 359 | const char* id __attribute__((unused))) | ||
4071 | 360 | { | ||
4072 | 361 | msg("xtrabackup: innobase_check_identifier_length() called.\n"); | ||
4073 | 362 | ut_a(0); | ||
4074 | 363 | return(false); | ||
4075 | 364 | } | ||
4076 | 365 | |||
4077 | 366 | uint | ||
4078 | 367 | innobase_convert_to_filename_charset( | ||
4079 | 368 | /*=================================*/ | ||
4080 | 369 | char* to __attribute__((unused)), | ||
4081 | 370 | const char* from __attribute__((unused)), | ||
4082 | 371 | ulint len __attribute__((unused))) | ||
4083 | 372 | { | ||
4084 | 373 | msg("xtrabackup: innobase_convert_to_filename_charset() called.\n"); | ||
4085 | 374 | ut_a(0); | ||
4086 | 375 | |||
4087 | 376 | return(0); | ||
4088 | 377 | } | ||
4089 | 378 | |||
4090 | 379 | uint | ||
4091 | 380 | innobase_convert_to_system_charset( | ||
4092 | 381 | /*=================================*/ | ||
4093 | 382 | char* to __attribute__((unused)), | ||
4094 | 383 | const char* from __attribute__((unused)), | ||
4095 | 384 | ulint len __attribute__((unused)), | ||
4096 | 385 | uint* errors __attribute__((unused))) | ||
4097 | 386 | { | ||
4098 | 387 | msg("xtrabackup: innobase_convert_to__charset() called.\n"); | ||
4099 | 388 | ut_a(0); | ||
4100 | 389 | |||
4101 | 390 | return(0); | ||
4102 | 391 | } | ||
4103 | 392 | |||
4104 | 337 | #if MYSQL_VERSION_ID >= 50500 | 393 | #if MYSQL_VERSION_ID >= 50500 |
4105 | 338 | 394 | ||
4106 | 339 | /**********************************************************************//** | 395 | /**********************************************************************//** |
4107 | 340 | 396 | ||
4108 | === modified file 'src/innodb_int.h' | |||
4109 | --- src/innodb_int.h 2013-05-04 05:26:19 +0000 | |||
4110 | +++ src/innodb_int.h 2013-07-22 14:01:36 +0000 | |||
4111 | @@ -144,6 +144,8 @@ | |||
4112 | 144 | fil_rename_tablespace(old_name_in, id, new_name, new_path) | 144 | fil_rename_tablespace(old_name_in, id, new_name, new_path) |
4113 | 145 | # define xb_btr_root_block_get(index, mode, mtr) \ | 145 | # define xb_btr_root_block_get(index, mode, mtr) \ |
4114 | 146 | btr_root_block_get(index, mode, mtr) | 146 | btr_root_block_get(index, mode, mtr) |
4115 | 147 | # define xb_file_delete(path) \ | ||
4116 | 148 | os_file_delete_func(path) | ||
4117 | 147 | typedef ib_mutex_t mutex_t; | 149 | typedef ib_mutex_t mutex_t; |
4118 | 148 | # define INNODB_LOG_DIR srv_log_group_home_dir | 150 | # define INNODB_LOG_DIR srv_log_group_home_dir |
4119 | 149 | # define DEFAULT_LOG_FILE_SIZE 48*1024*1024 | 151 | # define DEFAULT_LOG_FILE_SIZE 48*1024*1024 |
4120 | @@ -154,6 +156,7 @@ | |||
4121 | 154 | # define xb_os_event_create(name) os_event_create() | 156 | # define xb_os_event_create(name) os_event_create() |
4122 | 155 | #else /* MYSQL_VERSION_ID >= 50600 */ | 157 | #else /* MYSQL_VERSION_ID >= 50600 */ |
4123 | 156 | /* MySQL and Percona Server 5.1 and 5.5 */ | 158 | /* MySQL and Percona Server 5.1 and 5.5 */ |
4124 | 159 | # define xb_file_delete(path) os_file_delete(path) | ||
4125 | 157 | # define xb_buf_page_is_corrupted(page, zip_size) \ | 160 | # define xb_buf_page_is_corrupted(page, zip_size) \ |
4126 | 158 | buf_page_is_corrupted(page, zip_size) | 161 | buf_page_is_corrupted(page, zip_size) |
4127 | 159 | # define xb_os_event_create(name) os_event_create(name) | 162 | # define xb_os_event_create(name) os_event_create(name) |
4128 | @@ -360,6 +363,7 @@ | |||
4129 | 360 | .ibd file of tablespace and want to | 363 | .ibd file of tablespace and want to |
4130 | 361 | stop temporarily posting of new i/o | 364 | stop temporarily posting of new i/o |
4131 | 362 | requests on the file */ | 365 | requests on the file */ |
4132 | 366 | #if MYSQL_VERSION_ID < 50500 | ||
4133 | 363 | ibool stop_ibuf_merges; | 367 | ibool stop_ibuf_merges; |
4134 | 364 | /*!< we set this TRUE when we start | 368 | /*!< we set this TRUE when we start |
4135 | 365 | deleting a single-table tablespace */ | 369 | deleting a single-table tablespace */ |
4136 | @@ -370,6 +374,20 @@ | |||
4137 | 370 | or flush requests can be placed on this space, | 374 | or flush requests can be placed on this space, |
4138 | 371 | though there may be such requests still being | 375 | though there may be such requests still being |
4139 | 372 | processed on this space */ | 376 | processed on this space */ |
4140 | 377 | #else | ||
4141 | 378 | ibool stop_new_ops; | ||
4142 | 379 | /*!< we set this TRUE when we start | ||
4143 | 380 | deleting a single-table tablespace. | ||
4144 | 381 | When this is set following new ops | ||
4145 | 382 | are not allowed: | ||
4146 | 383 | * read IO request | ||
4147 | 384 | * ibuf merge | ||
4148 | 385 | * file flush | ||
4149 | 386 | Note that we can still possibly have | ||
4150 | 387 | new write operations because we don't | ||
4151 | 388 | check this flag when doing flush | ||
4152 | 389 | batches. */ | ||
4153 | 390 | #endif | ||
4154 | 373 | ulint purpose;/*!< FIL_TABLESPACE, FIL_LOG, or | 391 | ulint purpose;/*!< FIL_TABLESPACE, FIL_LOG, or |
4155 | 374 | FIL_ARCH_LOG */ | 392 | FIL_ARCH_LOG */ |
4156 | 375 | UT_LIST_BASE_NODE_T(fil_node_t) chain; | 393 | UT_LIST_BASE_NODE_T(fil_node_t) chain; |
4157 | @@ -746,14 +764,14 @@ | |||
4158 | 746 | lsn_t* max_flushed_lsn,/* out: */ | 764 | lsn_t* max_flushed_lsn,/* out: */ |
4159 | 747 | ulint* sum_of_new_sizes);/* out: sum of sizes of the new files added | 765 | ulint* sum_of_new_sizes);/* out: sum of sizes of the new files added |
4160 | 748 | */ | 766 | */ |
4162 | 749 | 767 | #ifndef XTRADB_BASED | |
4163 | 750 | ibool | 768 | ibool |
4164 | 751 | log_block_checksum_is_ok_or_old_format( | 769 | log_block_checksum_is_ok_or_old_format( |
4165 | 752 | /*===================================*/ | 770 | /*===================================*/ |
4166 | 753 | /* out: TRUE if ok, or if the log block may be in the | 771 | /* out: TRUE if ok, or if the log block may be in the |
4167 | 754 | format of InnoDB version < 3.23.52 */ | 772 | format of InnoDB version < 3.23.52 */ |
4168 | 755 | byte* block); /* in: pointer to a log block */ | 773 | byte* block); /* in: pointer to a log block */ |
4170 | 756 | 774 | #endif /* XTRADB_BASED */ | |
4171 | 757 | #endif /* MYSQL_VERSION_ID >= 50600 */ | 775 | #endif /* MYSQL_VERSION_ID >= 50600 */ |
4172 | 758 | 776 | ||
4173 | 759 | buf_block_t* | 777 | buf_block_t* |
4174 | @@ -801,6 +819,18 @@ | |||
4175 | 801 | } /* extern "C" */ | 819 | } /* extern "C" */ |
4176 | 802 | #endif | 820 | #endif |
4177 | 803 | 821 | ||
4178 | 822 | /******************************************************//** | ||
4179 | 823 | Reads a specified log segment to a buffer. */ | ||
4180 | 824 | UNIV_INTERN | ||
4181 | 825 | void | ||
4182 | 826 | xb_log_group_read_log_seg( | ||
4183 | 827 | /*===================*/ | ||
4184 | 828 | ulint type, /*!< in: LOG_ARCHIVE or LOG_RECOVER */ | ||
4185 | 829 | byte* buf, /*!< in: buffer where to read */ | ||
4186 | 830 | log_group_t* group, /*!< in: log group */ | ||
4187 | 831 | ib_uint64_t start_lsn, /*!< in: read area start */ | ||
4188 | 832 | ib_uint64_t end_lsn); /*!< in: read area end */ | ||
4189 | 833 | |||
4190 | 804 | /****************************************************************//** | 834 | /****************************************************************//** |
4191 | 805 | A simple function to open or create a file. | 835 | A simple function to open or create a file. |
4192 | 806 | @return own: handle to the file, not defined if error, error number | 836 | @return own: handle to the file, not defined if error, error number |
4193 | @@ -967,6 +997,26 @@ | |||
4194 | 967 | 997 | ||
4195 | 968 | #if MYSQL_VERSION_ID < 50600 | 998 | #if MYSQL_VERSION_ID < 50600 |
4196 | 969 | 999 | ||
4197 | 1000 | my_bool | ||
4198 | 1001 | innobase_check_identifier_length( | ||
4199 | 1002 | /*=============================*/ | ||
4200 | 1003 | const char* id); | ||
4201 | 1004 | |||
4202 | 1005 | uint | ||
4203 | 1006 | innobase_convert_to_filename_charset( | ||
4204 | 1007 | /*=================================*/ | ||
4205 | 1008 | char* to, | ||
4206 | 1009 | const char* from, | ||
4207 | 1010 | ulint len); | ||
4208 | 1011 | |||
4209 | 1012 | uint | ||
4210 | 1013 | innobase_convert_to_system_charset( | ||
4211 | 1014 | /*=================================*/ | ||
4212 | 1015 | char* to, | ||
4213 | 1016 | const char* from, | ||
4214 | 1017 | ulint len, | ||
4215 | 1018 | uint* errors); | ||
4216 | 1019 | |||
4217 | 970 | void | 1020 | void |
4218 | 971 | innobase_invalidate_query_cache( | 1021 | innobase_invalidate_query_cache( |
4219 | 972 | trx_t* trx, | 1022 | trx_t* trx, |
4220 | 973 | 1023 | ||
4221 | === modified file 'src/xtrabackup.cc' | |||
4222 | --- src/xtrabackup.cc 2013-07-10 12:29:40 +0000 | |||
4223 | +++ src/xtrabackup.cc 2013-07-22 14:01:36 +0000 | |||
4224 | @@ -1367,6 +1367,11 @@ | |||
4225 | 1367 | } | 1367 | } |
4226 | 1368 | #endif | 1368 | #endif |
4227 | 1369 | 1369 | ||
4228 | 1370 | #ifdef XTRADB_BASED | ||
4229 | 1371 | /* Workaround for LP #1203308. */ | ||
4230 | 1372 | srv_track_changed_pages = FALSE; | ||
4231 | 1373 | #endif | ||
4232 | 1374 | |||
4233 | 1370 | return(FALSE); | 1375 | return(FALSE); |
4234 | 1371 | 1376 | ||
4235 | 1372 | error: | 1377 | error: |
4236 | @@ -2056,8 +2061,8 @@ | |||
4237 | 2056 | 2061 | ||
4238 | 2057 | mutex_enter(&log_sys->mutex); | 2062 | mutex_enter(&log_sys->mutex); |
4239 | 2058 | 2063 | ||
4242 | 2059 | log_group_read_log_seg(LOG_RECOVER, log_sys->buf, | 2064 | xb_log_group_read_log_seg(LOG_RECOVER, log_sys->buf, |
4243 | 2060 | group, start_lsn, end_lsn); | 2065 | group, start_lsn, end_lsn); |
4244 | 2061 | 2066 | ||
4245 | 2062 | 2067 | ||
4246 | 2063 | /* reference recv_scan_log_recs() */ | 2068 | /* reference recv_scan_log_recs() */ |
4247 | @@ -3487,11 +3492,7 @@ | |||
4248 | 3487 | for (;;) { | 3492 | for (;;) { |
4249 | 3488 | mtr_start(&local_mtr); | 3493 | mtr_start(&local_mtr); |
4250 | 3489 | 3494 | ||
4251 | 3490 | #if (MYSQL_VERSION_ID < 50517) | ||
4252 | 3491 | local_block = btr_block_get(space_id, zip_size, page_no, RW_S_LATCH, &local_mtr); | ||
4253 | 3492 | #else | ||
4254 | 3493 | local_block = btr_block_get(space_id, zip_size, page_no, RW_S_LATCH, index, &local_mtr); | 3495 | local_block = btr_block_get(space_id, zip_size, page_no, RW_S_LATCH, index, &local_mtr); |
4255 | 3494 | #endif | ||
4256 | 3495 | local_page = buf_block_get_frame(local_block); | 3496 | local_page = buf_block_get_frame(local_block); |
4257 | 3496 | blob_header = local_page + offset; | 3497 | blob_header = local_page + offset; |
4258 | 3497 | #define BTR_BLOB_HDR_PART_LEN 0 | 3498 | #define BTR_BLOB_HDR_PART_LEN 0 |
4259 | @@ -3532,13 +3533,8 @@ | |||
4260 | 3532 | mtr_commit(&mtr); | 3533 | mtr_commit(&mtr); |
4261 | 3533 | if (right_page_no != FIL_NULL) { | 3534 | if (right_page_no != FIL_NULL) { |
4262 | 3534 | mtr_start(&mtr); | 3535 | mtr_start(&mtr); |
4263 | 3535 | #if (MYSQL_VERSION_ID < 50517) | ||
4264 | 3536 | block = btr_block_get(space, zip_size, right_page_no, | ||
4265 | 3537 | RW_X_LATCH, &mtr); | ||
4266 | 3538 | #else | ||
4267 | 3539 | block = btr_block_get(space, zip_size, right_page_no, | 3536 | block = btr_block_get(space, zip_size, right_page_no, |
4268 | 3540 | RW_X_LATCH, index, &mtr); | 3537 | RW_X_LATCH, index, &mtr); |
4269 | 3541 | #endif | ||
4270 | 3542 | page = buf_block_get_frame(block); | 3538 | page = buf_block_get_frame(block); |
4271 | 3543 | goto loop; | 3539 | goto loop; |
4272 | 3544 | } | 3540 | } |
4273 | @@ -4565,7 +4561,7 @@ | |||
4274 | 4565 | if (!table) { | 4561 | if (!table) { |
4275 | 4566 | snprintf(name, FN_REFLEN, "%s/%s/%s", data_home_dir, | 4562 | snprintf(name, FN_REFLEN, "%s/%s/%s", data_home_dir, |
4276 | 4567 | db_name, file_name); | 4563 | db_name, file_name); |
4278 | 4568 | return os_file_delete(name); | 4564 | return xb_file_delete(name); |
4279 | 4569 | } | 4565 | } |
4280 | 4570 | 4566 | ||
4281 | 4571 | return(TRUE); | 4567 | return(TRUE); |
4282 | 4572 | 4568 | ||
4283 | === modified file 'utils/build.sh' | |||
4284 | --- utils/build.sh 2013-06-05 08:39:54 +0000 | |||
4285 | +++ utils/build.sh 2013-07-22 14:01:36 +0000 | |||
4286 | @@ -2,9 +2,9 @@ | |||
4287 | 2 | 2 | ||
4288 | 3 | set -e | 3 | set -e |
4289 | 4 | 4 | ||
4293 | 5 | MYSQL_51_VERSION=5.1.59 | 5 | MYSQL_51_VERSION=5.1.70 |
4294 | 6 | MYSQL_55_VERSION=5.5.17 | 6 | MYSQL_55_VERSION=5.5.31 |
4295 | 7 | MYSQL_56_VERSION=5.6.10 | 7 | MYSQL_56_VERSION=5.6.11 |
4296 | 8 | PS_51_VERSION=5.1.59-13.0 | 8 | PS_51_VERSION=5.1.59-13.0 |
4297 | 9 | PS_55_VERSION=5.5.16-22.0 | 9 | PS_55_VERSION=5.5.16-22.0 |
4298 | 10 | 10 | ||
4299 | @@ -125,10 +125,11 @@ | |||
4300 | 125 | ################################################################################ | 125 | ################################################################################ |
4301 | 126 | function unpack_and_patch() | 126 | function unpack_and_patch() |
4302 | 127 | { | 127 | { |
4303 | 128 | local dirname=`basename "$1" ".tar.gz"` | ||
4304 | 128 | tar xzf $top_dir/$1 | 129 | tar xzf $top_dir/$1 |
4306 | 129 | cd `basename "$1" ".tar.gz"` | 130 | cd $dirname |
4307 | 130 | patch -p1 < $top_dir/patches/$2 | 131 | patch -p1 < $top_dir/patches/$2 |
4309 | 131 | cd .. | 132 | cd - |
4310 | 132 | } | 133 | } |
4311 | 133 | 134 | ||
4312 | 134 | ################################################################################ | 135 | ################################################################################ |
4313 | @@ -215,8 +216,8 @@ | |||
4314 | 215 | { | 216 | { |
4315 | 216 | local type=$1 | 217 | local type=$1 |
4316 | 217 | local mysql_version_short=${mysql_version:0:3} | 218 | local mysql_version_short=${mysql_version:0:3} |
4319 | 218 | server_dir=$top_dir/mysql-$mysql_version_short | 219 | local dirname=`basename "$server_tarball" ".tar.gz"` |
4320 | 219 | server_tarball=mysql-$mysql_version.tar.gz | 220 | |
4321 | 220 | innodb_dir=$server_dir/storage/$innodb_name | 221 | innodb_dir=$server_dir/storage/$innodb_name |
4322 | 221 | 222 | ||
4323 | 222 | echo "Downloading sources" | 223 | echo "Downloading sources" |
4324 | @@ -226,7 +227,7 @@ | |||
4325 | 226 | 227 | ||
4326 | 227 | echo "Preparing sources" | 228 | echo "Preparing sources" |
4327 | 228 | unpack_and_patch $server_tarball $server_patch | 229 | unpack_and_patch $server_tarball $server_patch |
4329 | 229 | mv $top_dir/mysql-$mysql_version $server_dir | 230 | mv $top_dir/$dirname $server_dir |
4330 | 230 | 231 | ||
4331 | 231 | build_server $type | 232 | build_server $type |
4332 | 232 | 233 | ||
4333 | @@ -241,10 +242,12 @@ | |||
4334 | 241 | 242 | ||
4335 | 242 | case "$type" in | 243 | case "$type" in |
4336 | 243 | "innodb51") | 244 | "innodb51") |
4337 | 245 | server_dir=$top_dir/mysql-5.1 | ||
4338 | 244 | mysql_version=$MYSQL_51_VERSION | 246 | mysql_version=$MYSQL_51_VERSION |
4339 | 245 | server_patch=innodb51.patch | 247 | server_patch=innodb51.patch |
4340 | 246 | innodb_name=innodb_plugin | 248 | innodb_name=innodb_plugin |
4341 | 247 | xtrabackup_target=plugin | 249 | xtrabackup_target=plugin |
4342 | 250 | server_tarball=mysql-5.1.70.tar.gz | ||
4343 | 248 | configure_cmd="./configure --enable-local-infile \ | 251 | configure_cmd="./configure --enable-local-infile \ |
4344 | 249 | --enable-thread-safe-client \ | 252 | --enable-thread-safe-client \ |
4345 | 250 | --with-plugins=innodb_plugin \ | 253 | --with-plugins=innodb_plugin \ |
4346 | @@ -255,10 +258,12 @@ | |||
4347 | 255 | build_all $type | 258 | build_all $type |
4348 | 256 | ;; | 259 | ;; |
4349 | 257 | "innodb55") | 260 | "innodb55") |
4350 | 261 | server_dir=$top_dir/mysql-5.5 | ||
4351 | 258 | mysql_version=$MYSQL_55_VERSION | 262 | mysql_version=$MYSQL_55_VERSION |
4352 | 259 | server_patch=innodb55.patch | 263 | server_patch=innodb55.patch |
4353 | 260 | innodb_name=innobase | 264 | innodb_name=innobase |
4354 | 261 | xtrabackup_target=5.5 | 265 | xtrabackup_target=5.5 |
4355 | 266 | server_tarball=mysql-5.5.31.tar.gz | ||
4356 | 262 | # We need to build with partitioning due to MySQL bug #58632 | 267 | # We need to build with partitioning due to MySQL bug #58632 |
4357 | 263 | configure_cmd="cmake . \ | 268 | configure_cmd="cmake . \ |
4358 | 264 | -DENABLED_LOCAL_INFILE=ON \ | 269 | -DENABLED_LOCAL_INFILE=ON \ |
4359 | @@ -272,10 +277,12 @@ | |||
4360 | 272 | ;; | 277 | ;; |
4361 | 273 | 278 | ||
4362 | 274 | "innodb56" ) | 279 | "innodb56" ) |
4363 | 280 | server_dir=$top_dir/mysql-5.6 | ||
4364 | 275 | mysql_version=$MYSQL_56_VERSION | 281 | mysql_version=$MYSQL_56_VERSION |
4365 | 276 | server_patch=innodb56.patch | 282 | server_patch=innodb56.patch |
4366 | 277 | innodb_name=innobase | 283 | innodb_name=innobase |
4367 | 278 | xtrabackup_target=5.6 | 284 | xtrabackup_target=5.6 |
4368 | 285 | server_tarball=mysql-5.6.11.tar.gz | ||
4369 | 279 | configure_cmd="cmake . \ | 286 | configure_cmd="cmake . \ |
4370 | 280 | -DWITH_INNOBASE_STORAGE_ENGINE=ON \ | 287 | -DWITH_INNOBASE_STORAGE_ENGINE=ON \ |
4371 | 281 | -DWITH_ZLIB=bundled \ | 288 | -DWITH_ZLIB=bundled \ |
4372 | @@ -288,8 +295,10 @@ | |||
4373 | 288 | "xtradb51" ) | 295 | "xtradb51" ) |
4374 | 289 | server_dir=$top_dir/Percona-Server | 296 | server_dir=$top_dir/Percona-Server |
4375 | 290 | branch_dir=percona-server-5.1-xtrabackup | 297 | branch_dir=percona-server-5.1-xtrabackup |
4378 | 291 | innodb_dir=$server_dir/storage/innodb_plugin | 298 | innodb_name=innodb_plugin |
4379 | 292 | xtrabackup_target=xtradb | 299 | xtrabackup_target=xtradb |
4380 | 300 | server_patch=xtradb51.patch | ||
4381 | 301 | server_tarball=Percona-Server-5.1.70-rel14.8.tar.gz | ||
4382 | 293 | configure_cmd="./configure --enable-local-infile \ | 302 | configure_cmd="./configure --enable-local-infile \ |
4383 | 294 | --enable-thread-safe-client \ | 303 | --enable-thread-safe-client \ |
4384 | 295 | --with-plugins=innodb_plugin \ | 304 | --with-plugins=innodb_plugin \ |
4385 | @@ -301,42 +310,15 @@ | |||
4386 | 301 | configure_cmd="LIBS=-lrt $configure_cmd" | 310 | configure_cmd="LIBS=-lrt $configure_cmd" |
4387 | 302 | fi | 311 | fi |
4388 | 303 | 312 | ||
4419 | 304 | 313 | build_all $type | |
4390 | 305 | echo "Downloading sources" | ||
4391 | 306 | |||
4392 | 307 | # Get Percona Server | ||
4393 | 308 | if [ -d $branch_dir ] | ||
4394 | 309 | then | ||
4395 | 310 | rm -rf $branch_dir | ||
4396 | 311 | fi | ||
4397 | 312 | |||
4398 | 313 | if [ ! -f Percona-Server-XtraBackup-$PS_51_VERSION.tar.gz ] | ||
4399 | 314 | then | ||
4400 | 315 | make ps51source | ||
4401 | 316 | fi | ||
4402 | 317 | |||
4403 | 318 | rm -rf $branch_dir | ||
4404 | 319 | tar xfz Percona-Server-XtraBackup-$PS_51_VERSION.tar.gz | ||
4405 | 320 | cd $branch_dir | ||
4406 | 321 | $MAKE_CMD main | ||
4407 | 322 | cd $top_dir | ||
4408 | 323 | rm -rf $server_dir | ||
4409 | 324 | ln -s $branch_dir/Percona-Server $server_dir | ||
4410 | 325 | |||
4411 | 326 | # Patch Percona Server | ||
4412 | 327 | cd $server_dir | ||
4413 | 328 | patch -p1 < $top_dir/patches/xtradb51.patch | ||
4414 | 329 | |||
4415 | 330 | build_server $type | ||
4416 | 331 | |||
4417 | 332 | build_xtrabackup | ||
4418 | 333 | |||
4420 | 334 | ;; | 314 | ;; |
4421 | 335 | "xtradb55" ) | 315 | "xtradb55" ) |
4422 | 336 | server_dir=$top_dir/Percona-Server-5.5 | 316 | server_dir=$top_dir/Percona-Server-5.5 |
4423 | 337 | branch_dir=percona-server-5.5-xtrabackup | 317 | branch_dir=percona-server-5.5-xtrabackup |
4426 | 338 | innodb_dir=$server_dir/storage/innobase | 318 | innodb_name=innobase |
4427 | 339 | xtrabackup_target=xtradb55 | 319 | xtrabackup_target=xtradb55 |
4428 | 320 | server_patch=xtradb55.patch | ||
4429 | 321 | server_tarball=Percona-Server-5.5.31-rel30.3.tar.gz | ||
4430 | 340 | # We need to build with partitioning due to MySQL bug #58632 | 322 | # We need to build with partitioning due to MySQL bug #58632 |
4431 | 341 | configure_cmd="cmake . \ | 323 | configure_cmd="cmake . \ |
4432 | 342 | -DENABLED_LOCAL_INFILE=ON \ | 324 | -DENABLED_LOCAL_INFILE=ON \ |
4433 | @@ -350,37 +332,7 @@ | |||
4434 | 350 | configure_cmd="LIBS=-lrt $configure_cmd" | 332 | configure_cmd="LIBS=-lrt $configure_cmd" |
4435 | 351 | fi | 333 | fi |
4436 | 352 | 334 | ||
4468 | 353 | 335 | build_all $type | |
4438 | 354 | echo "Downloading sources" | ||
4439 | 355 | |||
4440 | 356 | # Get Percona Server | ||
4441 | 357 | if [ -d $branch_dir ] | ||
4442 | 358 | then | ||
4443 | 359 | rm -rf $branch_dir | ||
4444 | 360 | fi | ||
4445 | 361 | |||
4446 | 362 | if [ ! -f Percona-Server-XtraBackup-$PS_55_VERSION.tar.gz ] | ||
4447 | 363 | then | ||
4448 | 364 | make ps55source | ||
4449 | 365 | fi | ||
4450 | 366 | |||
4451 | 367 | rm -rf $branch_dir | ||
4452 | 368 | tar xfz Percona-Server-XtraBackup-$PS_55_VERSION.tar.gz | ||
4453 | 369 | cd $branch_dir | ||
4454 | 370 | |||
4455 | 371 | $MAKE_CMD PERCONA_SERVER=Percona-Server-5.5 main | ||
4456 | 372 | cd $top_dir | ||
4457 | 373 | rm -rf $server_dir | ||
4458 | 374 | ln -s $branch_dir/Percona-Server $server_dir | ||
4459 | 375 | |||
4460 | 376 | # Patch Percona Server | ||
4461 | 377 | cd $server_dir | ||
4462 | 378 | patch -p1 < $top_dir/patches/xtradb55.patch | ||
4463 | 379 | |||
4464 | 380 | build_server $type | ||
4465 | 381 | |||
4466 | 382 | build_xtrabackup | ||
4467 | 383 | |||
4469 | 384 | ;; | 336 | ;; |
4470 | 385 | *) | 337 | *) |
4471 | 386 | usage | 338 | usage |
http:// jenkins. percona. com/view/ XtraBackup/ job/percona- xtrabackup- 2.1-param/ 382/
innodb56/xtradb56 failures are bug #1203669.
galera55 failures are bug #1201686 and bug #1203668 (currently being looked at by Raghu).