Merge lp:~akopytov/percona-xtrabackup/rebase-2.1-on-5.6.17 into lp:percona-xtrabackup/2.1
- rebase-2.1-on-5.6.17
- Merge into 2.1
Proposed by
Alexey Kopytov
Status: | Merged |
---|---|
Approved by: | Sergei Glushchenko |
Approved revision: | no longer in the source branch. |
Merged at revision: | 739 |
Proposed branch: | lp:~akopytov/percona-xtrabackup/rebase-2.1-on-5.6.17 |
Merge into: | lp:percona-xtrabackup/2.1 |
Diff against target: |
1167 lines (+193/-129) 3 files modified
Makefile (+1/-1) patches/innodb56.patch (+190/-126) utils/build.sh (+2/-2) |
To merge this branch: | bzr merge lp:~akopytov/percona-xtrabackup/rebase-2.1-on-5.6.17 |
Related bugs: | |
Related blueprints: |
Rebase XtraBackup 2.1 on MySQL 5.6.17
(Essential)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sergei Glushchenko (community) | g2 | Approve | |
Review via email: mp+217464@code.launchpad.net |
Commit message
Description of the change
Implementation of
https:/
Fix for bug #1262439 “Compiling using Bison 3.0 does not work”.
http://
To post a comment you must log in.
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote : | # |
review:
Approve
(g2)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Makefile' |
2 | --- Makefile 2014-01-10 11:13:00 +0000 |
3 | +++ Makefile 2014-04-28 14:58:04 +0000 |
4 | @@ -6,7 +6,7 @@ |
5 | |
6 | MYSQL_51_SOURCE=mysql-5.1.73.tar.gz |
7 | MYSQL_55_SOURCE=mysql-5.5.35.tar.gz |
8 | -MYSQL_56_SOURCE=mysql-5.6.15.tar.gz |
9 | +MYSQL_56_SOURCE=mysql-5.6.17.tar.gz |
10 | PS_51_SOURCE=Percona-Server-5.1.73-rel14.11.tar.gz |
11 | PS_55_SOURCE=Percona-Server-5.5.35-rel33.0.tar.gz |
12 | BZR_REVNO=$(shell bzr revno 2>/dev/null || cat REVNO) |
13 | |
14 | === modified file 'patches/innodb56.patch' |
15 | --- patches/innodb56.patch 2014-02-25 10:19:01 +0000 |
16 | +++ patches/innodb56.patch 2014-04-28 14:58:04 +0000 |
17 | @@ -1,6 +1,6 @@ |
18 | --- a/configure.cmake |
19 | +++ b/configure.cmake |
20 | -@@ -985,14 +985,6 @@ |
21 | +@@ -987,14 +987,6 @@ |
22 | ENDIF() |
23 | |
24 | CHECK_C_SOURCE_COMPILES(" |
25 | @@ -60,7 +60,7 @@ |
26 | |
27 | /* |
28 | IMPLEMENTATION OF THE BUFFER POOL |
29 | -@@ -548,9 +549,15 @@ |
30 | +@@ -568,12 +569,18 @@ |
31 | if (checksum_field1 == 0 && checksum_field2 == 0 |
32 | && mach_read_from_4(read_buf + FIL_PAGE_LSN) == 0) { |
33 | /* make sure that the page is really empty */ |
34 | @@ -69,14 +69,17 @@ |
35 | + is incompatible with 1st newly-created tablespace pages, which |
36 | + have FIL_PAGE_FIL_FLUSH_LSN != 0, FIL_PAGE_OR_CHKSUM == 0, |
37 | + FIL_PAGE_END_LSN_OLD_CHKSUM == 0 */ |
38 | - ut_d(for (ulint i = 0; i < UNIV_PAGE_SIZE; i++) { |
39 | - ut_a(read_buf[i] == 0); }); |
40 | + for (ulint i = 0; i < UNIV_PAGE_SIZE; i++) { |
41 | + if (read_buf[i] != 0) { |
42 | + return(TRUE); |
43 | + } |
44 | + } |
45 | |
46 | +#endif |
47 | return(FALSE); |
48 | } |
49 | |
50 | -@@ -975,6 +982,7 @@ |
51 | +@@ -998,6 +1005,7 @@ |
52 | block->page.in_flush_list = FALSE; |
53 | block->page.in_free_list = FALSE; |
54 | block->page.in_LRU_list = FALSE; |
55 | @@ -84,7 +87,7 @@ |
56 | block->in_unzip_LRU_list = FALSE; |
57 | #endif /* UNIV_DEBUG */ |
58 | #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG |
59 | -@@ -3948,6 +3956,13 @@ |
60 | +@@ -4095,6 +4103,13 @@ |
61 | frame = ((buf_block_t*) bpage)->frame; |
62 | } |
63 | |
64 | @@ -98,7 +101,7 @@ |
65 | /* If this page is not uninitialized and not in the |
66 | doublewrite buffer, then the page number and space id |
67 | should be the same as in block. */ |
68 | -@@ -4065,7 +4080,7 @@ |
69 | +@@ -4212,7 +4227,7 @@ |
70 | recv_recover_page(TRUE, (buf_block_t*) bpage); |
71 | } |
72 | |
73 | @@ -232,7 +235,7 @@ |
74 | /********************************************************//** |
75 | Writes a log record about an .ibd file create/rename/delete. */ |
76 | static |
77 | -@@ -2429,7 +2407,7 @@ |
78 | +@@ -2423,7 +2401,7 @@ |
79 | space_id, name, path, flags, |
80 | DICT_TF2_USE_TABLESPACE, |
81 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { |
82 | @@ -241,7 +244,7 @@ |
83 | } |
84 | } |
85 | |
86 | -@@ -2788,7 +2766,7 @@ |
87 | +@@ -2782,7 +2760,7 @@ |
88 | } |
89 | |
90 | if (err == DB_SUCCESS) { |
91 | @@ -250,7 +253,7 @@ |
92 | /* Write a log record about the deletion of the .ibd |
93 | file, so that ibbackup can replay it in the |
94 | --apply-log phase. We use a dummy mtr and the familiar |
95 | -@@ -3143,7 +3121,7 @@ |
96 | +@@ -3137,7 +3115,7 @@ |
97 | |
98 | mutex_exit(&fil_system->mutex); |
99 | |
100 | @@ -259,7 +262,7 @@ |
101 | if (success && !recv_recovery_on) { |
102 | mtr_t mtr; |
103 | |
104 | -@@ -3527,7 +3505,7 @@ |
105 | +@@ -3521,7 +3499,7 @@ |
106 | goto error_exit_1; |
107 | } |
108 | |
109 | @@ -268,14 +271,9 @@ |
110 | { |
111 | mtr_t mtr; |
112 | ulint mlog_file_flag = 0; |
113 | -@@ -3614,11 +3592,99 @@ |
114 | - lsn_t lsn; /*!< Flushed LSN from header page */ |
115 | - ulint id; /*!< Space ID */ |
116 | - ulint flags; /*!< Tablespace flags */ |
117 | --#ifdef UNIV_LOG_ARCHIVE |
118 | -- ulint arch_log_no; /*!< latest archived log file number */ |
119 | --#endif /* UNIV_LOG_ARCHIVE */ |
120 | - }; |
121 | +@@ -3599,6 +3577,97 @@ |
122 | + (ulong) expected_id, (ulong) expected_flags); |
123 | + } |
124 | |
125 | +static |
126 | +void |
127 | @@ -371,7 +369,7 @@ |
128 | /********************************************************************//** |
129 | Tries to open a single-table tablespace and optionally checks that the |
130 | space id in it is correct. If this does not succeed, print an error message |
131 | -@@ -3684,6 +3750,9 @@ |
132 | +@@ -3664,6 +3733,9 @@ |
133 | in the default location. If it is remote, it should not be here. */ |
134 | def.filepath = fil_make_ibd_name(tablename, false); |
135 | |
136 | @@ -381,7 +379,7 @@ |
137 | /* The path_in was read from SYS_DATAFILES. */ |
138 | if (path_in) { |
139 | if (strcmp(def.filepath, path_in)) { |
140 | -@@ -3731,6 +3800,7 @@ |
141 | +@@ -3711,6 +3783,7 @@ |
142 | tablespaces_found++; |
143 | } |
144 | } |
145 | @@ -389,7 +387,7 @@ |
146 | |
147 | /* Always look for a file at the default location. */ |
148 | ut_a(def.filepath); |
149 | -@@ -3752,9 +3822,6 @@ |
150 | +@@ -3732,9 +3805,6 @@ |
151 | if (def.success) { |
152 | def.check_msg = fil_read_first_page( |
153 | def.file, FALSE, &def.flags, &def.id, |
154 | @@ -399,7 +397,7 @@ |
155 | &def.lsn, &def.lsn); |
156 | def.valid = !def.check_msg; |
157 | |
158 | -@@ -3777,9 +3844,6 @@ |
159 | +@@ -3757,9 +3827,6 @@ |
160 | if (remote.success) { |
161 | remote.check_msg = fil_read_first_page( |
162 | remote.file, FALSE, &remote.flags, &remote.id, |
163 | @@ -409,7 +407,7 @@ |
164 | &remote.lsn, &remote.lsn); |
165 | remote.valid = !remote.check_msg; |
166 | |
167 | -@@ -3803,9 +3867,6 @@ |
168 | +@@ -3783,9 +3850,6 @@ |
169 | if (dict.success) { |
170 | dict.check_msg = fil_read_first_page( |
171 | dict.file, FALSE, &dict.flags, &dict.id, |
172 | @@ -419,7 +417,7 @@ |
173 | &dict.lsn, &dict.lsn); |
174 | dict.valid = !dict.check_msg; |
175 | |
176 | -@@ -3830,11 +3891,15 @@ |
177 | +@@ -3810,11 +3874,15 @@ |
178 | /* The following call prints an error message */ |
179 | os_file_get_last_error(true); |
180 | |
181 | @@ -436,8 +434,8 @@ |
182 | |
183 | err = DB_CORRUPTION; |
184 | |
185 | -@@ -4034,9 +4099,6 @@ |
186 | - { |
187 | +@@ -4187,9 +4255,6 @@ |
188 | + fsp->success = TRUE; |
189 | if (const char* check_msg = fil_read_first_page( |
190 | fsp->file, FALSE, &fsp->flags, &fsp->id, |
191 | -#ifdef UNIV_LOG_ARCHIVE |
192 | @@ -446,7 +444,7 @@ |
193 | &fsp->lsn, &fsp->lsn)) { |
194 | ib_logf(IB_LOG_LEVEL_ERROR, |
195 | "%s in tablespace %s (table %s)", |
196 | -@@ -4098,6 +4160,9 @@ |
197 | +@@ -4266,6 +4331,9 @@ |
198 | #ifdef UNIV_HOTBACKUP |
199 | fil_space_t* space; |
200 | #endif |
201 | @@ -456,7 +454,7 @@ |
202 | |
203 | memset(&def, 0, sizeof(def)); |
204 | memset(&remote, 0, sizeof(remote)); |
205 | -@@ -4142,6 +4207,9 @@ |
206 | +@@ -4310,6 +4378,9 @@ |
207 | # endif /* !UNIV_HOTBACKUP */ |
208 | #endif |
209 | |
210 | @@ -466,7 +464,7 @@ |
211 | /* Check for a link file which locates a remote tablespace. */ |
212 | remote.success = fil_open_linked_file( |
213 | tablename, &remote.filepath, &remote.file); |
214 | -@@ -4152,8 +4220,20 @@ |
215 | +@@ -4320,8 +4391,20 @@ |
216 | if (!remote.success) { |
217 | os_file_close(remote.file); |
218 | mem_free(remote.filepath); |
219 | @@ -487,7 +485,7 @@ |
220 | |
221 | |
222 | /* Try to open the tablespace in the datadir. */ |
223 | -@@ -4166,6 +4246,17 @@ |
224 | +@@ -4334,6 +4417,17 @@ |
225 | fil_validate_single_table_tablespace(tablename, &def); |
226 | if (!def.success) { |
227 | os_file_close(def.file); |
228 | @@ -505,7 +503,7 @@ |
229 | } |
230 | } |
231 | |
232 | -@@ -4250,7 +4341,7 @@ |
233 | +@@ -4418,7 +4512,7 @@ |
234 | /* At this point, only one tablespace is open */ |
235 | ut_a(def.success == !remote.success); |
236 | |
237 | @@ -514,7 +512,7 @@ |
238 | |
239 | /* Get and test the file size. */ |
240 | size = os_file_get_size(fsp->file); |
241 | -@@ -4269,9 +4360,9 @@ |
242 | +@@ -4437,9 +4531,9 @@ |
243 | |
244 | /* Every .ibd file is created >= 4 pages in size. Smaller files |
245 | cannot be ok. */ |
246 | @@ -526,7 +524,7 @@ |
247 | ib_logf(IB_LOG_LEVEL_ERROR, |
248 | "The size of single-table tablespace file %s " |
249 | "is only " UINT64PF ", should be at least %lu!", |
250 | -@@ -4352,7 +4443,7 @@ |
251 | +@@ -4520,7 +4614,7 @@ |
252 | } |
253 | mutex_exit(&fil_system->mutex); |
254 | #endif /* UNIV_HOTBACKUP */ |
255 | @@ -535,7 +533,7 @@ |
256 | tablename, fsp->id, fsp->flags, FIL_TABLESPACE); |
257 | |
258 | if (!file_space_create_success) { |
259 | -@@ -4379,13 +4470,55 @@ |
260 | +@@ -4547,13 +4641,55 @@ |
261 | } |
262 | |
263 | func_exit: |
264 | @@ -595,7 +593,7 @@ |
265 | mem_free(tablename); |
266 | if (remote.success) { |
267 | mem_free(remote.filepath); |
268 | -@@ -4399,7 +4532,7 @@ |
269 | +@@ -4567,7 +4703,7 @@ |
270 | idea is to read as much good data as we can and jump over bad data. |
271 | @return 0 if ok, -1 if error even after the retries, 1 if at the end |
272 | of the directory */ |
273 | @@ -604,7 +602,7 @@ |
274 | int |
275 | fil_file_readdir_next_file( |
276 | /*=======================*/ |
277 | -@@ -4439,7 +4572,7 @@ |
278 | +@@ -4607,7 +4743,7 @@ |
279 | @return DB_SUCCESS or error number */ |
280 | UNIV_INTERN |
281 | dberr_t |
282 | @@ -613,7 +611,7 @@ |
283 | /*===================================*/ |
284 | { |
285 | int ret; |
286 | -@@ -4495,7 +4628,9 @@ |
287 | +@@ -4663,7 +4799,9 @@ |
288 | "%s/%s", fil_path_to_mysql_datadir, dbinfo.name); |
289 | srv_normalize_path_for_win(dbpath); |
290 | |
291 | @@ -624,7 +622,7 @@ |
292 | |
293 | if (dbdir != NULL) { |
294 | |
295 | -@@ -4516,9 +4651,15 @@ |
296 | +@@ -4684,9 +4822,15 @@ |
297 | && (0 == strcmp(fileinfo.name |
298 | + strlen(fileinfo.name) - 4, |
299 | ".ibd") |
300 | @@ -642,7 +640,7 @@ |
301 | /* The name ends in .ibd or .isl; |
302 | try opening the file */ |
303 | fil_load_single_table_tablespace( |
304 | -@@ -4674,6 +4815,7 @@ |
305 | +@@ -4842,6 +4986,7 @@ |
306 | { |
307 | fil_space_t* fnamespace; |
308 | fil_space_t* space; |
309 | @@ -650,7 +648,7 @@ |
310 | |
311 | ut_ad(fil_system); |
312 | |
313 | -@@ -4751,6 +4893,10 @@ |
314 | +@@ -4919,6 +5064,10 @@ |
315 | if (fnamespace == NULL) { |
316 | if (print_error_if_does_not_exist) { |
317 | fil_report_missing_tablespace(name, id); |
318 | @@ -661,7 +659,7 @@ |
319 | } |
320 | } else { |
321 | ut_print_timestamp(stderr); |
322 | -@@ -4774,6 +4920,10 @@ |
323 | +@@ -4942,6 +5091,10 @@ |
324 | |
325 | mutex_exit(&fil_system->mutex); |
326 | |
327 | @@ -672,7 +670,7 @@ |
328 | return(FALSE); |
329 | } |
330 | |
331 | -@@ -5407,6 +5557,16 @@ |
332 | +@@ -5575,6 +5728,16 @@ |
333 | |
334 | ut_ad(mode != OS_AIO_IBUF || space->purpose == FIL_TABLESPACE); |
335 | |
336 | @@ -689,7 +687,7 @@ |
337 | node = UT_LIST_GET_FIRST(space->chain); |
338 | |
339 | for (;;) { |
340 | -@@ -6334,6 +6494,7 @@ |
341 | +@@ -6502,6 +6665,7 @@ |
342 | return(err); |
343 | } |
344 | |
345 | @@ -697,7 +695,7 @@ |
346 | /****************************************************************//** |
347 | Generate redo logs for swapping two .ibd files */ |
348 | UNIV_INTERN |
349 | -@@ -6360,3 +6521,4 @@ |
350 | +@@ -6528,3 +6692,4 @@ |
351 | 0, 0, new_name, old_name, mtr); |
352 | } |
353 | } |
354 | @@ -725,7 +723,7 @@ |
355 | static TYPELIB innodb_checksum_algorithm_typelib = { |
356 | array_elements(innodb_checksum_algorithm_names) - 1, |
357 | "innodb_checksum_algorithm_typelib", |
358 | -@@ -1568,7 +1569,7 @@ |
359 | +@@ -1587,7 +1588,7 @@ |
360 | ut_ad(*mbminlen < DATA_MBMAX); |
361 | ut_ad(*mbmaxlen < DATA_MBMAX); |
362 | } else { |
363 | @@ -734,7 +732,7 @@ |
364 | |
365 | if (thd && thd_sql_command(thd) == SQLCOM_DROP_TABLE) { |
366 | |
367 | -@@ -2113,6 +2114,62 @@ |
368 | +@@ -2132,6 +2133,62 @@ |
369 | return(trx->state != TRX_STATE_NOT_STARTED); |
370 | } |
371 | |
372 | @@ -797,7 +795,7 @@ |
373 | /*********************************************************************//** |
374 | Copy table flags from MySQL's HA_CREATE_INFO into an InnoDB table object. |
375 | Those flags are stored in .frm file and end up in the MySQL table object, |
376 | -@@ -2478,40 +2535,19 @@ |
377 | +@@ -2497,40 +2554,19 @@ |
378 | ulint buflen, /*!< in: length of buf, in bytes */ |
379 | const char* id, /*!< in: identifier to convert */ |
380 | ulint idlen, /*!< in: length of id, in bytes */ |
381 | @@ -843,7 +841,7 @@ |
382 | if (UNIV_UNLIKELY(idlen > buflen)) { |
383 | idlen = buflen; |
384 | } |
385 | -@@ -2899,12 +2935,9 @@ |
386 | +@@ -2921,12 +2957,9 @@ |
387 | } |
388 | |
389 | #ifdef UNIV_LOG_ARCHIVE |
390 | @@ -859,7 +857,7 @@ |
391 | srv_arch_dir = innobase_log_arch_dir; |
392 | #endif /* UNIG_LOG_ARCHIVE */ |
393 | |
394 | -@@ -3146,6 +3179,8 @@ |
395 | +@@ -3168,6 +3201,8 @@ |
396 | srv_checksum_algorithm = SRV_CHECKSUM_ALGORITHM_NONE; |
397 | } |
398 | |
399 | @@ -868,7 +866,7 @@ |
400 | #ifdef HAVE_LARGE_PAGES |
401 | if ((os_use_large_pages = (ibool) my_use_large_pages)) { |
402 | os_large_page_size = (ulint) opt_large_page_size; |
403 | -@@ -15476,6 +15511,33 @@ |
404 | +@@ -15641,6 +15676,33 @@ |
405 | NULL, NULL, SRV_CHECKSUM_ALGORITHM_INNODB, |
406 | &innodb_checksum_algorithm_typelib); |
407 | |
408 | @@ -902,7 +900,7 @@ |
409 | static MYSQL_SYSVAR_BOOL(checksums, innobase_use_checksums, |
410 | PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, |
411 | "DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting " |
412 | -@@ -16258,6 +16320,7 @@ |
413 | +@@ -16447,6 +16509,7 @@ |
414 | MYSQL_SYSVAR(lru_scan_depth), |
415 | MYSQL_SYSVAR(flush_neighbors), |
416 | MYSQL_SYSVAR(checksum_algorithm), |
417 | @@ -910,7 +908,7 @@ |
418 | MYSQL_SYSVAR(checksums), |
419 | MYSQL_SYSVAR(commit_concurrency), |
420 | MYSQL_SYSVAR(concurrency_tickets), |
421 | -@@ -16836,45 +16899,24 @@ |
422 | +@@ -17034,47 +17097,24 @@ |
423 | void |
424 | ib_logf( |
425 | /*====*/ |
426 | @@ -931,7 +929,9 @@ |
427 | - str[size - 1] = 0x0; |
428 | - vsnprintf(str, size, format, args); |
429 | -#elif HAVE_VASPRINTF |
430 | -- (void) vasprintf(&str, format, args); |
431 | +- int ret; |
432 | +- ret = vasprintf(&str, format, args); |
433 | +- ut_a(ret != -1); |
434 | -#else |
435 | - /* Use a fixed length string. */ |
436 | - str = static_cast<char*>(malloc(BUFSIZ)); |
437 | @@ -966,7 +966,7 @@ |
438 | ut_error; |
439 | --- a/storage/innobase/handler/handler0alter.cc |
440 | +++ b/storage/innobase/handler/handler0alter.cc |
441 | -@@ -5440,6 +5440,7 @@ |
442 | +@@ -5505,6 +5505,7 @@ |
443 | = static_cast<ha_innobase_inplace_ctx*>(*pctx); |
444 | |
445 | DBUG_ASSERT(ctx->need_rebuild()); |
446 | @@ -974,7 +974,7 @@ |
447 | /* Generate the redo log for the file |
448 | operations that will be performed in |
449 | commit_cache_rebuild(). */ |
450 | -@@ -5448,6 +5449,7 @@ |
451 | +@@ -5513,6 +5514,7 @@ |
452 | ctx->new_table->space, |
453 | ctx->new_table->name, |
454 | ctx->tmp_name, &mtr); |
455 | @@ -984,7 +984,7 @@ |
456 | } |
457 | --- a/storage/innobase/include/buf0buf.h |
458 | +++ b/storage/innobase/include/buf0buf.h |
459 | -@@ -1580,6 +1580,8 @@ |
460 | +@@ -1610,6 +1610,8 @@ |
461 | or buf_block_t::mutex. */ |
462 | # endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ |
463 | #endif /* !UNIV_HOTBACKUP */ |
464 | @@ -995,7 +995,7 @@ |
465 | /** The buffer control block structure */ |
466 | --- a/storage/innobase/include/fil0fil.h |
467 | +++ b/storage/innobase/include/fil0fil.h |
468 | -@@ -163,6 +163,9 @@ |
469 | +@@ -165,6 +165,9 @@ |
470 | #define FIL_LOG 502 /*!< redo log */ |
471 | /* @} */ |
472 | |
473 | @@ -1005,7 +1005,17 @@ |
474 | /** The number of fsyncs done to the log */ |
475 | extern ulint fil_n_log_flushes; |
476 | |
477 | -@@ -373,12 +376,6 @@ |
478 | +@@ -185,9 +188,6 @@ |
479 | + lsn_t lsn; /*!< Flushed LSN from header page */ |
480 | + ulint id; /*!< Space ID */ |
481 | + ulint flags; /*!< Tablespace flags */ |
482 | +-#ifdef UNIV_LOG_ARCHIVE |
483 | +- ulint arch_log_no; /*!< latest archived log file number */ |
484 | +-#endif /* UNIV_LOG_ARCHIVE */ |
485 | + }; |
486 | + |
487 | + #ifndef UNIV_HOTBACKUP |
488 | +@@ -389,12 +389,6 @@ |
489 | contain sensible data */ |
490 | ulint* flags, /*!< out: tablespace flags */ |
491 | ulint* space_id, /*!< out: tablespace ID */ |
492 | @@ -1018,7 +1028,7 @@ |
493 | lsn_t* min_flushed_lsn, /*!< out: min of flushed |
494 | lsn values in data files */ |
495 | lsn_t* max_flushed_lsn) /*!< out: max of flushed |
496 | -@@ -611,7 +608,7 @@ |
497 | +@@ -627,7 +621,7 @@ |
498 | @return DB_SUCCESS or error number */ |
499 | UNIV_INTERN |
500 | dberr_t |
501 | @@ -1181,7 +1191,7 @@ |
502 | UNIV_INLINE |
503 | --- a/storage/innobase/include/log0recv.h |
504 | +++ b/storage/innobase/include/log0recv.h |
505 | -@@ -297,18 +297,13 @@ |
506 | +@@ -298,18 +298,13 @@ |
507 | Recovers from archived log files, and also from log files, if they exist. |
508 | @return error code or DB_SUCCESS */ |
509 | UNIV_INTERN |
510 | @@ -1213,7 +1223,7 @@ |
511 | |
512 | /** Options for os_file_create_func @{ */ |
513 | enum os_file_create_t { |
514 | -@@ -202,6 +202,10 @@ |
515 | +@@ -206,6 +206,10 @@ |
516 | extern ulint os_n_file_writes; |
517 | extern ulint os_n_fsyncs; |
518 | |
519 | @@ -1239,7 +1249,7 @@ |
520 | + |
521 | /*-------------------------------------------*/ |
522 | |
523 | - extern ibool srv_print_innodb_monitor; |
524 | + extern my_bool srv_print_innodb_monitor; |
525 | @@ -496,13 +503,17 @@ |
526 | the reason for which is that some FS |
527 | do not flush meta-data when |
528 | @@ -1601,7 +1611,7 @@ |
529 | #ifdef UNIV_LOG_DEBUG |
530 | --- a/storage/innobase/log/log0recv.cc |
531 | +++ b/storage/innobase/log/log0recv.cc |
532 | -@@ -43,20 +43,28 @@ |
533 | +@@ -48,21 +48,29 @@ |
534 | #include "trx0undo.h" |
535 | #include "trx0rec.h" |
536 | #include "fil0fil.h" |
537 | @@ -1624,6 +1634,7 @@ |
538 | +/** The maximum LSN of found archived log files */ |
539 | +extern ib_uint64_t xtrabackup_arch_last_file_lsn; |
540 | |
541 | + |
542 | /** This is set to FALSE if the backup was originally taken with the |
543 | ibbackup --include regexp option: then we do not want to create tables in |
544 | directories which were not included */ |
545 | @@ -1633,7 +1644,7 @@ |
546 | |
547 | /** Log records are stored in the hash table in chunks at most of this size; |
548 | this must be less than UNIV_PAGE_SIZE as it is stored in the buffer pool */ |
549 | -@@ -399,7 +407,7 @@ |
550 | +@@ -405,7 +413,7 @@ |
551 | /* Set appropriate value of recv_n_pool_free_frames. */ |
552 | if (buf_pool_get_curr_size() >= (10 * 1024 * 1024)) { |
553 | /* Buffer pool of size greater than 10 MB. */ |
554 | @@ -1642,7 +1653,7 @@ |
555 | } |
556 | |
557 | recv_sys->buf = static_cast<byte*>(ut_malloc(RECV_PARSING_BUF_SIZE)); |
558 | -@@ -703,7 +711,7 @@ |
559 | +@@ -712,7 +720,7 @@ |
560 | /***********************************************************************//** |
561 | Checks the consistency of the checkpoint info |
562 | @return TRUE if ok */ |
563 | @@ -1651,7 +1662,7 @@ |
564 | ibool |
565 | recv_check_cp_is_consistent( |
566 | /*========================*/ |
567 | -@@ -733,7 +741,7 @@ |
568 | +@@ -742,7 +750,7 @@ |
569 | /********************************************************//** |
570 | Looks for the maximum consistent checkpoint from the log groups. |
571 | @return error code or DB_SUCCESS */ |
572 | @@ -1660,7 +1671,7 @@ |
573 | dberr_t |
574 | recv_find_max_checkpoint( |
575 | /*=====================*/ |
576 | -@@ -893,7 +901,7 @@ |
577 | +@@ -902,7 +910,7 @@ |
578 | InnoDB-3.23.52 where the checksum field contains the log block number. |
579 | @return TRUE if ok, or if the log block may be in the format of InnoDB |
580 | version predating 3.23.52 */ |
581 | @@ -1669,7 +1680,7 @@ |
582 | ibool |
583 | log_block_checksum_is_ok_or_old_format( |
584 | /*===================================*/ |
585 | -@@ -902,12 +910,72 @@ |
586 | +@@ -911,12 +919,72 @@ |
587 | #ifdef UNIV_LOG_DEBUG |
588 | return(TRUE); |
589 | #endif /* UNIV_LOG_DEBUG */ |
590 | @@ -1744,7 +1755,7 @@ |
591 | |
592 | /* We assume the log block is in the format of |
593 | InnoDB version < 3.23.52 and the block is ok */ |
594 | -@@ -1588,6 +1656,8 @@ |
595 | +@@ -1606,6 +1674,8 @@ |
596 | buf_block_get_page_no(block)); |
597 | |
598 | if ((recv_addr == NULL) |
599 | @@ -1753,7 +1764,7 @@ |
600 | || (recv_addr->state == RECV_BEING_PROCESSED) |
601 | || (recv_addr->state == RECV_PROCESSED)) { |
602 | |
603 | -@@ -1677,9 +1747,17 @@ |
604 | +@@ -1695,9 +1765,17 @@ |
605 | if (page_zip) { |
606 | memset(FIL_PAGE_LSN + page_zip->data, 0, 8); |
607 | } |
608 | @@ -1772,7 +1783,7 @@ |
609 | |
610 | lsn_t end_lsn; |
611 | |
612 | -@@ -1865,6 +1943,19 @@ |
613 | +@@ -1883,6 +1961,19 @@ |
614 | ulint zip_size = fil_space_get_zip_size(space); |
615 | ulint page_no = recv_addr->page_no; |
616 | |
617 | @@ -1792,7 +1803,7 @@ |
618 | if (recv_addr->state == RECV_NOT_PROCESSED) { |
619 | if (!has_printed) { |
620 | ib_logf(IB_LOG_LEVEL_INFO, |
621 | -@@ -2406,7 +2497,7 @@ |
622 | +@@ -2424,7 +2515,7 @@ |
623 | || type == MLOG_FILE_RENAME |
624 | || type == MLOG_FILE_DELETE) { |
625 | ut_a(space); |
626 | @@ -1801,7 +1812,7 @@ |
627 | if (recv_replay_file_ops) { |
628 | |
629 | /* In ibbackup --apply-log, replay an .ibd file |
630 | -@@ -2429,7 +2520,7 @@ |
631 | +@@ -2447,7 +2538,7 @@ |
632 | ut_error; |
633 | } |
634 | } |
635 | @@ -1810,7 +1821,7 @@ |
636 | /* In normal mysqld crash recovery we do not try to |
637 | replay file operations */ |
638 | #ifdef UNIV_LOG_LSN_DEBUG |
639 | -@@ -2832,7 +2923,10 @@ |
640 | +@@ -2850,7 +2941,10 @@ |
641 | = log_block_get_checkpoint_no(log_block); |
642 | } |
643 | |
644 | @@ -1822,7 +1833,7 @@ |
645 | /* Log data for this group ends here */ |
646 | |
647 | finished = TRUE; |
648 | -@@ -2852,8 +2946,14 @@ |
649 | +@@ -2870,8 +2964,14 @@ |
650 | |
651 | fprintf(stderr, |
652 | "InnoDB: Doing recovery: scanned up to" |
653 | @@ -1839,7 +1850,7 @@ |
654 | } |
655 | } |
656 | |
657 | -@@ -2953,7 +3053,7 @@ |
658 | +@@ -2971,7 +3071,7 @@ |
659 | ib_logf(IB_LOG_LEVEL_INFO, |
660 | "Reading tablespace information from the .ibd files..."); |
661 | |
662 | @@ -1848,7 +1859,7 @@ |
663 | |
664 | /* If we are using the doublewrite method, we will |
665 | check if there are half-written pages in data files, |
666 | -@@ -2997,6 +3097,7 @@ |
667 | +@@ -3015,6 +3115,7 @@ |
668 | log_group_t* group; |
669 | log_group_t* max_cp_group; |
670 | ulint max_cp_field; |
671 | @@ -1856,7 +1867,7 @@ |
672 | lsn_t checkpoint_lsn; |
673 | ib_uint64_t checkpoint_no; |
674 | lsn_t group_scanned_lsn = 0; |
675 | -@@ -3006,9 +3107,13 @@ |
676 | +@@ -3024,10 +3125,14 @@ |
677 | lsn_t archived_lsn; |
678 | #endif /* UNIV_LOG_ARCHIVE */ |
679 | byte* buf; |
680 | @@ -1864,6 +1875,7 @@ |
681 | + byte* log_hdr_buf; |
682 | + byte log_hdr_buf_base[LOG_FILE_HDR_SIZE + OS_FILE_LOG_BLOCK_SIZE]; |
683 | dberr_t err; |
684 | + ut_when_dtor<recv_dblwr_t> tmp(recv_sys->dblwr); |
685 | |
686 | + log_hdr_buf = static_cast<byte *> |
687 | + (ut_align(log_hdr_buf_base, OS_FILE_LOG_BLOCK_SIZE)); |
688 | @@ -1871,7 +1883,7 @@ |
689 | #ifdef UNIV_LOG_ARCHIVE |
690 | ut_ad(type != LOG_CHECKPOINT || limit_lsn == LSN_MAX); |
691 | /** TRUE when recovering from a checkpoint */ |
692 | -@@ -3102,14 +3207,33 @@ |
693 | +@@ -3116,14 +3221,33 @@ |
694 | log_hdr_buf, max_cp_group); |
695 | } |
696 | |
697 | @@ -1906,7 +1918,7 @@ |
698 | group = UT_LIST_GET_NEXT(log_groups, group); |
699 | } |
700 | #endif /* UNIV_LOG_ARCHIVE */ |
701 | -@@ -3435,7 +3559,8 @@ |
702 | +@@ -3444,7 +3568,8 @@ |
703 | that the data dictionary tables will be free of any locks. |
704 | The data dictionary latch should guarantee that there is at |
705 | most one data dictionary transaction active at a time. */ |
706 | @@ -1916,7 +1928,7 @@ |
707 | trx_rollback_or_clean_recovered(FALSE); |
708 | } |
709 | } |
710 | -@@ -3664,23 +3789,23 @@ |
711 | +@@ -3673,23 +3798,23 @@ |
712 | ulint len; |
713 | ibool ret; |
714 | byte* buf; |
715 | @@ -1945,7 +1957,7 @@ |
716 | |
717 | if (ret == FALSE) { |
718 | ask_again: |
719 | -@@ -3725,20 +3850,19 @@ |
720 | +@@ -3734,20 +3859,19 @@ |
721 | |
722 | /* Add the archive file as a node to the space */ |
723 | |
724 | @@ -1972,7 +1984,7 @@ |
725 | != group->archived_file_no) { |
726 | fprintf(stderr, |
727 | "InnoDB: Archive file header inconsistent %s\n", name); |
728 | -@@ -3767,6 +3891,20 @@ |
729 | +@@ -3776,6 +3900,20 @@ |
730 | return(TRUE); |
731 | } |
732 | |
733 | @@ -1993,7 +2005,7 @@ |
734 | recv_sys->scanned_lsn = start_lsn; |
735 | } |
736 | |
737 | -@@ -3779,7 +3917,7 @@ |
738 | +@@ -3788,7 +3926,7 @@ |
739 | return(TRUE); |
740 | } |
741 | |
742 | @@ -2002,7 +2014,7 @@ |
743 | |
744 | for (;;) { |
745 | len = RECV_SCAN_SIZE; |
746 | -@@ -3799,13 +3937,13 @@ |
747 | +@@ -3808,13 +3946,13 @@ |
748 | fprintf(stderr, |
749 | "InnoDB: Archive read starting at" |
750 | " lsn %llu, len %lu from file %s\n", |
751 | @@ -2018,7 +2030,7 @@ |
752 | read_offset % UNIV_PAGE_SIZE, len, buf, NULL); |
753 | |
754 | ret = recv_scan_log_recs( |
755 | -@@ -3820,10 +3958,12 @@ |
756 | +@@ -3829,10 +3967,12 @@ |
757 | } |
758 | |
759 | if (ret) { |
760 | @@ -2035,7 +2047,7 @@ |
761 | return(TRUE); |
762 | } |
763 | |
764 | -@@ -3840,26 +3980,18 @@ |
765 | +@@ -3849,26 +3989,18 @@ |
766 | Recovers from archived log files, and also from log files, if they exist. |
767 | @return error code or DB_SUCCESS */ |
768 | UNIV_INTERN |
769 | @@ -2064,7 +2076,7 @@ |
770 | |
771 | recv_sys_create(); |
772 | recv_sys_init(buf_pool_get_curr_size()); |
773 | -@@ -3889,7 +4021,7 @@ |
774 | +@@ -3898,7 +4030,7 @@ |
775 | return(DB_ERROR); |
776 | } |
777 | |
778 | @@ -2073,7 +2085,7 @@ |
779 | |
780 | recv_sys->parse_start_lsn = min_flushed_lsn; |
781 | |
782 | -@@ -3903,7 +4035,8 @@ |
783 | +@@ -3912,7 +4044,8 @@ |
784 | |
785 | mutex_enter(&(log_sys->mutex)); |
786 | |
787 | @@ -2083,7 +2095,7 @@ |
788 | ret = log_group_recover_from_archive_file(group); |
789 | |
790 | /* Close and truncate a possible processed archive file |
791 | -@@ -3916,9 +4049,9 @@ |
792 | +@@ -3925,9 +4058,9 @@ |
793 | trunc_len); |
794 | } |
795 | |
796 | @@ -2095,7 +2107,7 @@ |
797 | if (recv_sys->recovered_lsn < limit_lsn) { |
798 | |
799 | if (!recv_sys->scanned_lsn) { |
800 | -@@ -3939,12 +4072,12 @@ |
801 | +@@ -3948,12 +4081,12 @@ |
802 | |
803 | mutex_enter(&(log_sys->mutex)); |
804 | } |
805 | @@ -2155,7 +2167,7 @@ |
806 | } |
807 | --- a/storage/innobase/os/os0file.cc |
808 | +++ b/storage/innobase/os/os0file.cc |
809 | -@@ -686,7 +686,7 @@ |
810 | +@@ -691,7 +691,7 @@ |
811 | } |
812 | |
813 | #undef USE_FILE_LOCK |
814 | @@ -2164,7 +2176,7 @@ |
815 | #if defined(UNIV_HOTBACKUP) || defined(__WIN__) |
816 | /* InnoDB Hot Backup does not lock the data files. |
817 | * On Windows, mandatory locking is used. |
818 | -@@ -1750,8 +1750,6 @@ |
819 | +@@ -1755,8 +1755,6 @@ |
820 | |
821 | } while (retry); |
822 | |
823 | @@ -2173,7 +2185,7 @@ |
824 | if (!srv_read_only_mode |
825 | && *success |
826 | && type != OS_LOG_FILE |
827 | -@@ -1759,6 +1757,11 @@ |
828 | +@@ -1764,6 +1762,11 @@ |
829 | || srv_unix_file_flush_method == SRV_UNIX_O_DIRECT_NO_FSYNC)) { |
830 | |
831 | os_file_set_nocache(file, name, mode_str); |
832 | @@ -2187,8 +2199,8 @@ |
833 | #ifdef USE_FILE_LOCK |
834 | --- a/storage/innobase/page/page0cur.cc |
835 | +++ b/storage/innobase/page/page0cur.cc |
836 | -@@ -1207,7 +1207,9 @@ |
837 | - == index->id || mtr->inside_ibuf || recv_recovery_is_on()); |
838 | +@@ -1209,7 +1209,9 @@ |
839 | + || (mtr ? mtr->inside_ibuf : dict_index_is_ibuf(index))); |
840 | |
841 | ut_ad(!page_cur_is_after_last(cursor)); |
842 | -#ifdef UNIV_ZIP_DEBUG |
843 | @@ -2254,7 +2266,7 @@ |
844 | |
845 | /** io_handler_thread parameters for thread identification */ |
846 | static ulint n[SRV_MAX_N_IO_THREADS + 6]; |
847 | -@@ -658,6 +659,12 @@ |
848 | +@@ -663,6 +664,12 @@ |
849 | } |
850 | } |
851 | |
852 | @@ -2267,7 +2279,7 @@ |
853 | log_group_init(0, srv_n_log_files, |
854 | srv_log_file_size * UNIV_PAGE_SIZE, |
855 | SRV_LOG_SPACE_FIRST_ID, |
856 | -@@ -668,7 +675,12 @@ |
857 | +@@ -673,7 +680,12 @@ |
858 | /* Create a log checkpoint. */ |
859 | mutex_enter(&log_sys->mutex); |
860 | ut_d(recv_no_log_write = FALSE); |
861 | @@ -2281,7 +2293,7 @@ |
862 | mutex_exit(&log_sys->mutex); |
863 | |
864 | return(DB_SUCCESS); |
865 | -@@ -749,18 +761,12 @@ |
866 | +@@ -754,18 +766,12 @@ |
867 | /*********************************************************************//** |
868 | Creates or opens database data files and closes them. |
869 | @return DB_SUCCESS or error code */ |
870 | @@ -2301,8 +2313,20 @@ |
871 | lsn_t* min_flushed_lsn,/*!< out: min of flushed lsn |
872 | values in data files */ |
873 | lsn_t* max_flushed_lsn,/*!< out: max of flushed lsn |
874 | -@@ -982,9 +988,6 @@ |
875 | - skip_size_check: |
876 | +@@ -989,17 +995,16 @@ |
877 | + /* This is the earliest location where we can load |
878 | + the double write buffer. */ |
879 | + if (i == 0) { |
880 | +- buf_dblwr_init_or_load_pages( |
881 | +- files[i], srv_data_file_names[i], true); |
882 | ++ /* XtraBackup never loads corrupted pages from |
883 | ++ the doublewrite buffer */ |
884 | ++ buf_dblwr_init_or_load_pages( |
885 | ++ files[i], srv_data_file_names[i], false); |
886 | + } |
887 | + |
888 | + bool retry = true; |
889 | + check_first_page: |
890 | check_msg = fil_read_first_page( |
891 | files[i], one_opened, &flags, &space, |
892 | -#ifdef UNIV_LOG_ARCHIVE |
893 | @@ -2311,7 +2335,7 @@ |
894 | min_flushed_lsn, max_flushed_lsn); |
895 | |
896 | if (check_msg) { |
897 | -@@ -1236,12 +1239,16 @@ |
898 | +@@ -1267,12 +1272,16 @@ |
899 | /******************************************************************** |
900 | Opens the configured number of undo tablespaces. |
901 | @return DB_SUCCESS or error code */ |
902 | @@ -2329,7 +2353,7 @@ |
903 | const ulint n_conf_tablespaces, /*!< in: configured undo |
904 | tablespaces */ |
905 | ulint* n_opened) /*!< out: number of UNDO |
906 | -@@ -1257,6 +1264,7 @@ |
907 | +@@ -1288,6 +1297,7 @@ |
908 | *n_opened = 0; |
909 | |
910 | ut_a(n_conf_tablespaces <= TRX_SYS_N_RSEGS); |
911 | @@ -2337,7 +2361,7 @@ |
912 | |
913 | memset(undo_tablespace_ids, 0x0, sizeof(undo_tablespace_ids)); |
914 | |
915 | -@@ -1290,12 +1298,13 @@ |
916 | +@@ -1321,12 +1331,13 @@ |
917 | } |
918 | } |
919 | |
920 | @@ -2355,7 +2379,7 @@ |
921 | n_undo_tablespaces = trx_rseg_get_n_undo_tablespaces( |
922 | undo_tablespace_ids); |
923 | } else { |
924 | -@@ -1401,7 +1410,7 @@ |
925 | +@@ -1432,7 +1443,7 @@ |
926 | ib_logf(IB_LOG_LEVEL_INFO, "Opened %lu undo tablespaces", |
927 | n_undo_tablespaces); |
928 | |
929 | @@ -2364,7 +2388,7 @@ |
930 | ib_logf(IB_LOG_LEVEL_WARN, |
931 | "Using the system tablespace for all UNDO " |
932 | "logging because innodb_undo_tablespaces=0"); |
933 | -@@ -1475,8 +1484,8 @@ |
934 | +@@ -1506,8 +1517,8 @@ |
935 | lsn_t min_flushed_lsn; |
936 | lsn_t max_flushed_lsn; |
937 | #ifdef UNIV_LOG_ARCHIVE |
938 | @@ -2375,7 +2399,7 @@ |
939 | #endif /* UNIV_LOG_ARCHIVE */ |
940 | ulint sum_of_new_sizes; |
941 | ulint sum_of_data_file_sizes; |
942 | -@@ -1699,6 +1708,9 @@ |
943 | +@@ -1740,6 +1751,9 @@ |
944 | } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT")) { |
945 | srv_unix_file_flush_method = SRV_UNIX_O_DIRECT; |
946 | |
947 | @@ -2385,7 +2409,7 @@ |
948 | } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT_NO_FSYNC")) { |
949 | srv_unix_file_flush_method = SRV_UNIX_O_DIRECT_NO_FSYNC; |
950 | |
951 | -@@ -1931,17 +1943,6 @@ |
952 | +@@ -1972,17 +1986,6 @@ |
953 | os_thread_create(io_handler_thread, n + i, thread_ids + i); |
954 | } |
955 | |
956 | @@ -2403,8 +2427,8 @@ |
957 | if (srv_n_log_files * srv_log_file_size * UNIV_PAGE_SIZE |
958 | >= 512ULL * 1024ULL * 1024ULL * 1024ULL) { |
959 | /* log_block_convert_lsn_to_no() limits the returned block |
960 | -@@ -2000,9 +2001,6 @@ |
961 | - } |
962 | +@@ -2044,9 +2047,6 @@ |
963 | + recv_sys_init(buf_pool_get_curr_size()); |
964 | |
965 | err = open_or_create_data_files(&create_new_db, |
966 | -#ifdef UNIV_LOG_ARCHIVE |
967 | @@ -2413,7 +2437,7 @@ |
968 | &min_flushed_lsn, &max_flushed_lsn, |
969 | &sum_of_new_sizes); |
970 | if (err == DB_FAIL) { |
971 | -@@ -2030,7 +2028,6 @@ |
972 | +@@ -2074,7 +2074,6 @@ |
973 | |
974 | #ifdef UNIV_LOG_ARCHIVE |
975 | srv_normalize_path_for_win(srv_arch_dir); |
976 | @@ -2421,7 +2445,7 @@ |
977 | #endif /* UNIV_LOG_ARCHIVE */ |
978 | |
979 | dirnamelen = strlen(srv_log_group_home_dir); |
980 | -@@ -2110,15 +2107,23 @@ |
981 | +@@ -2154,15 +2153,23 @@ |
982 | max_flushed_lsn, logfile0); |
983 | |
984 | /* Suppress the message about |
985 | @@ -2448,7 +2472,7 @@ |
986 | } |
987 | |
988 | /* opened all files */ |
989 | -@@ -2211,6 +2216,7 @@ |
990 | +@@ -2255,6 +2262,7 @@ |
991 | |
992 | err = srv_undo_tablespaces_init( |
993 | create_new_db, |
994 | @@ -2456,7 +2480,7 @@ |
995 | srv_undo_tablespaces, |
996 | &srv_undo_tablespaces_open); |
997 | |
998 | -@@ -2284,10 +2290,13 @@ |
999 | +@@ -2328,10 +2336,13 @@ |
1000 | |
1001 | ib_logf(IB_LOG_LEVEL_INFO, |
1002 | " Starting archive recovery from a backup..."); |
1003 | @@ -2472,7 +2496,7 @@ |
1004 | if (err != DB_SUCCESS) { |
1005 | |
1006 | return(DB_ERROR); |
1007 | -@@ -2312,6 +2321,11 @@ |
1008 | +@@ -2356,6 +2367,11 @@ |
1009 | srv_startup_is_before_trx_rollback_phase = FALSE; |
1010 | |
1011 | recv_recovery_from_archive_finish(); |
1012 | @@ -2484,7 +2508,7 @@ |
1013 | #endif /* UNIV_LOG_ARCHIVE */ |
1014 | } else { |
1015 | |
1016 | -@@ -2378,6 +2392,10 @@ |
1017 | +@@ -2422,6 +2438,10 @@ |
1018 | |
1019 | recv_recovery_from_checkpoint_finish(); |
1020 | |
1021 | @@ -2495,7 +2519,7 @@ |
1022 | if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) { |
1023 | /* The following call is necessary for the insert |
1024 | buffer to work with multiple tablespaces. We must |
1025 | -@@ -2500,7 +2518,9 @@ |
1026 | +@@ -2544,7 +2564,9 @@ |
1027 | value. Important to note that we can do it ONLY after |
1028 | we have finished the recovery process so that the |
1029 | image of TRX_SYS_PAGE_NO is not stale. */ |
1030 | @@ -2506,7 +2530,7 @@ |
1031 | } |
1032 | |
1033 | if (!create_new_db && sum_of_new_sizes > 0) { |
1034 | -@@ -2523,6 +2543,8 @@ |
1035 | +@@ -2567,6 +2589,8 @@ |
1036 | if (!srv_log_archive_on) { |
1037 | ut_a(DB_SUCCESS == log_archive_noarchivelog()); |
1038 | } else { |
1039 | @@ -2515,7 +2539,7 @@ |
1040 | mutex_enter(&(log_sys->mutex)); |
1041 | |
1042 | start_archive = FALSE; |
1043 | -@@ -2714,6 +2736,7 @@ |
1044 | +@@ -2758,6 +2782,7 @@ |
1045 | && srv_auto_extend_last_data_file |
1046 | && sum_of_data_file_sizes < tablespace_size_in_header) { |
1047 | |
1048 | @@ -2523,7 +2547,7 @@ |
1049 | ut_print_timestamp(stderr); |
1050 | fprintf(stderr, |
1051 | " InnoDB: Error: tablespace size stored in header" |
1052 | -@@ -2750,6 +2773,7 @@ |
1053 | +@@ -2794,6 +2819,7 @@ |
1054 | |
1055 | return(DB_ERROR); |
1056 | } |
1057 | @@ -2531,7 +2555,7 @@ |
1058 | } |
1059 | |
1060 | /* Check that os_fast_mutexes work as expected */ |
1061 | -@@ -2774,6 +2798,10 @@ |
1062 | +@@ -2818,6 +2844,10 @@ |
1063 | |
1064 | os_fast_mutex_free(&srv_os_test_mutex); |
1065 | |
1066 | @@ -2542,7 +2566,7 @@ |
1067 | if (srv_print_verbose_log) { |
1068 | ib_logf(IB_LOG_LEVEL_INFO, |
1069 | "%s started; log sequence number " LSN_PF "", |
1070 | -@@ -2806,6 +2834,7 @@ |
1071 | +@@ -2850,6 +2880,7 @@ |
1072 | fts_optimize_init(); |
1073 | } |
1074 | |
1075 | @@ -2550,7 +2574,7 @@ |
1076 | srv_was_started = TRUE; |
1077 | |
1078 | return(DB_SUCCESS); |
1079 | -@@ -2861,7 +2890,7 @@ |
1080 | +@@ -2905,7 +2936,7 @@ |
1081 | return(DB_SUCCESS); |
1082 | } |
1083 | |
1084 | @@ -2661,7 +2685,7 @@ |
1085 | } else { |
1086 | fprintf(stderr, |
1087 | "InnoDB: Since innodb_force_recovery" |
1088 | -@@ -592,14 +592,13 @@ |
1089 | +@@ -599,14 +599,13 @@ |
1090 | " was in the XA prepared state.\n", trx->id); |
1091 | |
1092 | if (srv_force_recovery == 0) { |
1093 | @@ -2680,7 +2704,7 @@ |
1094 | } else { |
1095 | fprintf(stderr, |
1096 | "InnoDB: Since innodb_force_recovery" |
1097 | -@@ -2206,7 +2208,8 @@ |
1098 | +@@ -2221,7 +2220,8 @@ |
1099 | scenario where some undo generated by a transaction, |
1100 | has XA stuff, and other undo, generated by the same |
1101 | transaction, doesn't. */ |
1102 | @@ -2708,3 +2732,43 @@ |
1103 | /*********************************************************************//** |
1104 | Wrapper around MySQL's copy_and_convert function. |
1105 | @return number of bytes copied to 'to' */ |
1106 | +--- a/sql/sql_yacc.yy |
1107 | ++++ b/sql/sql_yacc.yy |
1108 | +@@ -26,8 +26,6 @@ |
1109 | + ** The type will be void*, so it must be cast to (THD*) when used. |
1110 | + ** Use the YYTHD macro for this. |
1111 | + */ |
1112 | +-#define YYPARSE_PARAM yythd |
1113 | +-#define YYLEX_PARAM yythd |
1114 | + #define YYTHD ((THD *)yythd) |
1115 | + #define YYLIP (& YYTHD->m_parser_state->m_lip) |
1116 | + #define YYPS (& YYTHD->m_parser_state->m_yacc) |
1117 | +@@ -85,7 +83,7 @@ |
1118 | + ulong val= *(F); \ |
1119 | + if (my_yyoverflow((B), (D), &val)) \ |
1120 | + { \ |
1121 | +- yyerror((char*) (A)); \ |
1122 | ++ yyerror(yythd, (char*) (A)); \ |
1123 | + return 2; \ |
1124 | + } \ |
1125 | + else \ |
1126 | +@@ -183,7 +181,7 @@ |
1127 | + to abort from the parser. |
1128 | + */ |
1129 | + |
1130 | +-void MYSQLerror(const char *s) |
1131 | ++void MYSQLerror(void *yythd, const char *s) |
1132 | + { |
1133 | + THD *thd= current_thd; |
1134 | + |
1135 | +@@ -1031,7 +1029,9 @@ |
1136 | + bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); |
1137 | + %} |
1138 | + |
1139 | +-%pure_parser /* We have threads */ |
1140 | ++%pure-parser /* We have threads */ |
1141 | ++%parse-param { void *yythd } |
1142 | ++%lex-param { void *yythd } |
1143 | + /* |
1144 | + Currently there are 161 shift/reduce conflicts. |
1145 | + We should not introduce new conflicts any more. |
1146 | |
1147 | === modified file 'utils/build.sh' |
1148 | --- utils/build.sh 2014-01-16 08:56:59 +0000 |
1149 | +++ utils/build.sh 2014-04-28 14:58:04 +0000 |
1150 | @@ -4,7 +4,7 @@ |
1151 | |
1152 | MYSQL_51_VERSION=5.1.73 |
1153 | MYSQL_55_VERSION=5.5.35 |
1154 | -MYSQL_56_VERSION=5.6.15 |
1155 | +MYSQL_56_VERSION=5.6.17 |
1156 | PS_51_VERSION=5.1.73-14.11 |
1157 | PS_55_VERSION=5.5.35-33.0 |
1158 | |
1159 | @@ -326,7 +326,7 @@ |
1160 | server_patch=innodb56.patch |
1161 | innodb_name=innobase |
1162 | xtrabackup_target=5.6 |
1163 | - server_tarball=mysql-5.6.15.tar.gz |
1164 | + server_tarball=mysql-5.6.17.tar.gz |
1165 | configure_cmd="cmake . \ |
1166 | -DWITH_INNOBASE_STORAGE_ENGINE=ON \ |
1167 | -DWITH_ZLIB=bundled \ |
Approve