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 | 6 | ||
6 | 7 | MYSQL_51_SOURCE=mysql-5.1.73.tar.gz | 7 | MYSQL_51_SOURCE=mysql-5.1.73.tar.gz |
7 | 8 | MYSQL_55_SOURCE=mysql-5.5.35.tar.gz | 8 | MYSQL_55_SOURCE=mysql-5.5.35.tar.gz |
9 | 9 | MYSQL_56_SOURCE=mysql-5.6.15.tar.gz | 9 | MYSQL_56_SOURCE=mysql-5.6.17.tar.gz |
10 | 10 | PS_51_SOURCE=Percona-Server-5.1.73-rel14.11.tar.gz | 10 | PS_51_SOURCE=Percona-Server-5.1.73-rel14.11.tar.gz |
11 | 11 | PS_55_SOURCE=Percona-Server-5.5.35-rel33.0.tar.gz | 11 | PS_55_SOURCE=Percona-Server-5.5.35-rel33.0.tar.gz |
12 | 12 | BZR_REVNO=$(shell bzr revno 2>/dev/null || cat REVNO) | 12 | BZR_REVNO=$(shell bzr revno 2>/dev/null || cat REVNO) |
13 | 13 | 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 | 1 | --- a/configure.cmake | 1 | --- a/configure.cmake |
19 | 2 | +++ b/configure.cmake | 2 | +++ b/configure.cmake |
21 | 3 | @@ -985,14 +985,6 @@ | 3 | @@ -987,14 +987,6 @@ |
22 | 4 | ENDIF() | 4 | ENDIF() |
23 | 5 | 5 | ||
24 | 6 | CHECK_C_SOURCE_COMPILES(" | 6 | CHECK_C_SOURCE_COMPILES(" |
25 | @@ -60,7 +60,7 @@ | |||
26 | 60 | 60 | ||
27 | 61 | /* | 61 | /* |
28 | 62 | IMPLEMENTATION OF THE BUFFER POOL | 62 | IMPLEMENTATION OF THE BUFFER POOL |
30 | 63 | @@ -548,9 +549,15 @@ | 63 | @@ -568,12 +569,18 @@ |
31 | 64 | if (checksum_field1 == 0 && checksum_field2 == 0 | 64 | if (checksum_field1 == 0 && checksum_field2 == 0 |
32 | 65 | && mach_read_from_4(read_buf + FIL_PAGE_LSN) == 0) { | 65 | && mach_read_from_4(read_buf + FIL_PAGE_LSN) == 0) { |
33 | 66 | /* make sure that the page is really empty */ | 66 | /* make sure that the page is really empty */ |
34 | @@ -69,14 +69,17 @@ | |||
35 | 69 | + is incompatible with 1st newly-created tablespace pages, which | 69 | + is incompatible with 1st newly-created tablespace pages, which |
36 | 70 | + have FIL_PAGE_FIL_FLUSH_LSN != 0, FIL_PAGE_OR_CHKSUM == 0, | 70 | + have FIL_PAGE_FIL_FLUSH_LSN != 0, FIL_PAGE_OR_CHKSUM == 0, |
37 | 71 | + FIL_PAGE_END_LSN_OLD_CHKSUM == 0 */ | 71 | + FIL_PAGE_END_LSN_OLD_CHKSUM == 0 */ |
40 | 72 | ut_d(for (ulint i = 0; i < UNIV_PAGE_SIZE; i++) { | 72 | for (ulint i = 0; i < UNIV_PAGE_SIZE; i++) { |
41 | 73 | ut_a(read_buf[i] == 0); }); | 73 | if (read_buf[i] != 0) { |
42 | 74 | return(TRUE); | ||
43 | 75 | } | ||
44 | 76 | } | ||
45 | 74 | 77 | ||
46 | 75 | +#endif | 78 | +#endif |
47 | 76 | return(FALSE); | 79 | return(FALSE); |
48 | 77 | } | 80 | } |
49 | 78 | 81 | ||
51 | 79 | @@ -975,6 +982,7 @@ | 82 | @@ -998,6 +1005,7 @@ |
52 | 80 | block->page.in_flush_list = FALSE; | 83 | block->page.in_flush_list = FALSE; |
53 | 81 | block->page.in_free_list = FALSE; | 84 | block->page.in_free_list = FALSE; |
54 | 82 | block->page.in_LRU_list = FALSE; | 85 | block->page.in_LRU_list = FALSE; |
55 | @@ -84,7 +87,7 @@ | |||
56 | 84 | block->in_unzip_LRU_list = FALSE; | 87 | block->in_unzip_LRU_list = FALSE; |
57 | 85 | #endif /* UNIV_DEBUG */ | 88 | #endif /* UNIV_DEBUG */ |
58 | 86 | #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG | 89 | #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG |
60 | 87 | @@ -3948,6 +3956,13 @@ | 90 | @@ -4095,6 +4103,13 @@ |
61 | 88 | frame = ((buf_block_t*) bpage)->frame; | 91 | frame = ((buf_block_t*) bpage)->frame; |
62 | 89 | } | 92 | } |
63 | 90 | 93 | ||
64 | @@ -98,7 +101,7 @@ | |||
65 | 98 | /* If this page is not uninitialized and not in the | 101 | /* If this page is not uninitialized and not in the |
66 | 99 | doublewrite buffer, then the page number and space id | 102 | doublewrite buffer, then the page number and space id |
67 | 100 | should be the same as in block. */ | 103 | should be the same as in block. */ |
69 | 101 | @@ -4065,7 +4080,7 @@ | 104 | @@ -4212,7 +4227,7 @@ |
70 | 102 | recv_recover_page(TRUE, (buf_block_t*) bpage); | 105 | recv_recover_page(TRUE, (buf_block_t*) bpage); |
71 | 103 | } | 106 | } |
72 | 104 | 107 | ||
73 | @@ -232,7 +235,7 @@ | |||
74 | 232 | /********************************************************//** | 235 | /********************************************************//** |
75 | 233 | Writes a log record about an .ibd file create/rename/delete. */ | 236 | Writes a log record about an .ibd file create/rename/delete. */ |
76 | 234 | static | 237 | static |
78 | 235 | @@ -2429,7 +2407,7 @@ | 238 | @@ -2423,7 +2401,7 @@ |
79 | 236 | space_id, name, path, flags, | 239 | space_id, name, path, flags, |
80 | 237 | DICT_TF2_USE_TABLESPACE, | 240 | DICT_TF2_USE_TABLESPACE, |
81 | 238 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { | 241 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { |
82 | @@ -241,7 +244,7 @@ | |||
83 | 241 | } | 244 | } |
84 | 242 | } | 245 | } |
85 | 243 | 246 | ||
87 | 244 | @@ -2788,7 +2766,7 @@ | 247 | @@ -2782,7 +2760,7 @@ |
88 | 245 | } | 248 | } |
89 | 246 | 249 | ||
90 | 247 | if (err == DB_SUCCESS) { | 250 | if (err == DB_SUCCESS) { |
91 | @@ -250,7 +253,7 @@ | |||
92 | 250 | /* Write a log record about the deletion of the .ibd | 253 | /* Write a log record about the deletion of the .ibd |
93 | 251 | file, so that ibbackup can replay it in the | 254 | file, so that ibbackup can replay it in the |
94 | 252 | --apply-log phase. We use a dummy mtr and the familiar | 255 | --apply-log phase. We use a dummy mtr and the familiar |
96 | 253 | @@ -3143,7 +3121,7 @@ | 256 | @@ -3137,7 +3115,7 @@ |
97 | 254 | 257 | ||
98 | 255 | mutex_exit(&fil_system->mutex); | 258 | mutex_exit(&fil_system->mutex); |
99 | 256 | 259 | ||
100 | @@ -259,7 +262,7 @@ | |||
101 | 259 | if (success && !recv_recovery_on) { | 262 | if (success && !recv_recovery_on) { |
102 | 260 | mtr_t mtr; | 263 | mtr_t mtr; |
103 | 261 | 264 | ||
105 | 262 | @@ -3527,7 +3505,7 @@ | 265 | @@ -3521,7 +3499,7 @@ |
106 | 263 | goto error_exit_1; | 266 | goto error_exit_1; |
107 | 264 | } | 267 | } |
108 | 265 | 268 | ||
109 | @@ -268,14 +271,9 @@ | |||
110 | 268 | { | 271 | { |
111 | 269 | mtr_t mtr; | 272 | mtr_t mtr; |
112 | 270 | ulint mlog_file_flag = 0; | 273 | ulint mlog_file_flag = 0; |
121 | 271 | @@ -3614,11 +3592,99 @@ | 274 | @@ -3599,6 +3577,97 @@ |
122 | 272 | lsn_t lsn; /*!< Flushed LSN from header page */ | 275 | (ulong) expected_id, (ulong) expected_flags); |
123 | 273 | ulint id; /*!< Space ID */ | 276 | } |
116 | 274 | ulint flags; /*!< Tablespace flags */ | ||
117 | 275 | -#ifdef UNIV_LOG_ARCHIVE | ||
118 | 276 | - ulint arch_log_no; /*!< latest archived log file number */ | ||
119 | 277 | -#endif /* UNIV_LOG_ARCHIVE */ | ||
120 | 278 | }; | ||
124 | 279 | 277 | ||
125 | 280 | +static | 278 | +static |
126 | 281 | +void | 279 | +void |
127 | @@ -371,7 +369,7 @@ | |||
128 | 371 | /********************************************************************//** | 369 | /********************************************************************//** |
129 | 372 | Tries to open a single-table tablespace and optionally checks that the | 370 | Tries to open a single-table tablespace and optionally checks that the |
130 | 373 | space id in it is correct. If this does not succeed, print an error message | 371 | space id in it is correct. If this does not succeed, print an error message |
132 | 374 | @@ -3684,6 +3750,9 @@ | 372 | @@ -3664,6 +3733,9 @@ |
133 | 375 | in the default location. If it is remote, it should not be here. */ | 373 | in the default location. If it is remote, it should not be here. */ |
134 | 376 | def.filepath = fil_make_ibd_name(tablename, false); | 374 | def.filepath = fil_make_ibd_name(tablename, false); |
135 | 377 | 375 | ||
136 | @@ -381,7 +379,7 @@ | |||
137 | 381 | /* The path_in was read from SYS_DATAFILES. */ | 379 | /* The path_in was read from SYS_DATAFILES. */ |
138 | 382 | if (path_in) { | 380 | if (path_in) { |
139 | 383 | if (strcmp(def.filepath, path_in)) { | 381 | if (strcmp(def.filepath, path_in)) { |
141 | 384 | @@ -3731,6 +3800,7 @@ | 382 | @@ -3711,6 +3783,7 @@ |
142 | 385 | tablespaces_found++; | 383 | tablespaces_found++; |
143 | 386 | } | 384 | } |
144 | 387 | } | 385 | } |
145 | @@ -389,7 +387,7 @@ | |||
146 | 389 | 387 | ||
147 | 390 | /* Always look for a file at the default location. */ | 388 | /* Always look for a file at the default location. */ |
148 | 391 | ut_a(def.filepath); | 389 | ut_a(def.filepath); |
150 | 392 | @@ -3752,9 +3822,6 @@ | 390 | @@ -3732,9 +3805,6 @@ |
151 | 393 | if (def.success) { | 391 | if (def.success) { |
152 | 394 | def.check_msg = fil_read_first_page( | 392 | def.check_msg = fil_read_first_page( |
153 | 395 | def.file, FALSE, &def.flags, &def.id, | 393 | def.file, FALSE, &def.flags, &def.id, |
154 | @@ -399,7 +397,7 @@ | |||
155 | 399 | &def.lsn, &def.lsn); | 397 | &def.lsn, &def.lsn); |
156 | 400 | def.valid = !def.check_msg; | 398 | def.valid = !def.check_msg; |
157 | 401 | 399 | ||
159 | 402 | @@ -3777,9 +3844,6 @@ | 400 | @@ -3757,9 +3827,6 @@ |
160 | 403 | if (remote.success) { | 401 | if (remote.success) { |
161 | 404 | remote.check_msg = fil_read_first_page( | 402 | remote.check_msg = fil_read_first_page( |
162 | 405 | remote.file, FALSE, &remote.flags, &remote.id, | 403 | remote.file, FALSE, &remote.flags, &remote.id, |
163 | @@ -409,7 +407,7 @@ | |||
164 | 409 | &remote.lsn, &remote.lsn); | 407 | &remote.lsn, &remote.lsn); |
165 | 410 | remote.valid = !remote.check_msg; | 408 | remote.valid = !remote.check_msg; |
166 | 411 | 409 | ||
168 | 412 | @@ -3803,9 +3867,6 @@ | 410 | @@ -3783,9 +3850,6 @@ |
169 | 413 | if (dict.success) { | 411 | if (dict.success) { |
170 | 414 | dict.check_msg = fil_read_first_page( | 412 | dict.check_msg = fil_read_first_page( |
171 | 415 | dict.file, FALSE, &dict.flags, &dict.id, | 413 | dict.file, FALSE, &dict.flags, &dict.id, |
172 | @@ -419,7 +417,7 @@ | |||
173 | 419 | &dict.lsn, &dict.lsn); | 417 | &dict.lsn, &dict.lsn); |
174 | 420 | dict.valid = !dict.check_msg; | 418 | dict.valid = !dict.check_msg; |
175 | 421 | 419 | ||
177 | 422 | @@ -3830,11 +3891,15 @@ | 420 | @@ -3810,11 +3874,15 @@ |
178 | 423 | /* The following call prints an error message */ | 421 | /* The following call prints an error message */ |
179 | 424 | os_file_get_last_error(true); | 422 | os_file_get_last_error(true); |
180 | 425 | 423 | ||
181 | @@ -436,8 +434,8 @@ | |||
182 | 436 | 434 | ||
183 | 437 | err = DB_CORRUPTION; | 435 | err = DB_CORRUPTION; |
184 | 438 | 436 | ||
187 | 439 | @@ -4034,9 +4099,6 @@ | 437 | @@ -4187,9 +4255,6 @@ |
188 | 440 | { | 438 | fsp->success = TRUE; |
189 | 441 | if (const char* check_msg = fil_read_first_page( | 439 | if (const char* check_msg = fil_read_first_page( |
190 | 442 | fsp->file, FALSE, &fsp->flags, &fsp->id, | 440 | fsp->file, FALSE, &fsp->flags, &fsp->id, |
191 | 443 | -#ifdef UNIV_LOG_ARCHIVE | 441 | -#ifdef UNIV_LOG_ARCHIVE |
192 | @@ -446,7 +444,7 @@ | |||
193 | 446 | &fsp->lsn, &fsp->lsn)) { | 444 | &fsp->lsn, &fsp->lsn)) { |
194 | 447 | ib_logf(IB_LOG_LEVEL_ERROR, | 445 | ib_logf(IB_LOG_LEVEL_ERROR, |
195 | 448 | "%s in tablespace %s (table %s)", | 446 | "%s in tablespace %s (table %s)", |
197 | 449 | @@ -4098,6 +4160,9 @@ | 447 | @@ -4266,6 +4331,9 @@ |
198 | 450 | #ifdef UNIV_HOTBACKUP | 448 | #ifdef UNIV_HOTBACKUP |
199 | 451 | fil_space_t* space; | 449 | fil_space_t* space; |
200 | 452 | #endif | 450 | #endif |
201 | @@ -456,7 +454,7 @@ | |||
202 | 456 | 454 | ||
203 | 457 | memset(&def, 0, sizeof(def)); | 455 | memset(&def, 0, sizeof(def)); |
204 | 458 | memset(&remote, 0, sizeof(remote)); | 456 | memset(&remote, 0, sizeof(remote)); |
206 | 459 | @@ -4142,6 +4207,9 @@ | 457 | @@ -4310,6 +4378,9 @@ |
207 | 460 | # endif /* !UNIV_HOTBACKUP */ | 458 | # endif /* !UNIV_HOTBACKUP */ |
208 | 461 | #endif | 459 | #endif |
209 | 462 | 460 | ||
210 | @@ -466,7 +464,7 @@ | |||
211 | 466 | /* Check for a link file which locates a remote tablespace. */ | 464 | /* Check for a link file which locates a remote tablespace. */ |
212 | 467 | remote.success = fil_open_linked_file( | 465 | remote.success = fil_open_linked_file( |
213 | 468 | tablename, &remote.filepath, &remote.file); | 466 | tablename, &remote.filepath, &remote.file); |
215 | 469 | @@ -4152,8 +4220,20 @@ | 467 | @@ -4320,8 +4391,20 @@ |
216 | 470 | if (!remote.success) { | 468 | if (!remote.success) { |
217 | 471 | os_file_close(remote.file); | 469 | os_file_close(remote.file); |
218 | 472 | mem_free(remote.filepath); | 470 | mem_free(remote.filepath); |
219 | @@ -487,7 +485,7 @@ | |||
220 | 487 | 485 | ||
221 | 488 | 486 | ||
222 | 489 | /* Try to open the tablespace in the datadir. */ | 487 | /* Try to open the tablespace in the datadir. */ |
224 | 490 | @@ -4166,6 +4246,17 @@ | 488 | @@ -4334,6 +4417,17 @@ |
225 | 491 | fil_validate_single_table_tablespace(tablename, &def); | 489 | fil_validate_single_table_tablespace(tablename, &def); |
226 | 492 | if (!def.success) { | 490 | if (!def.success) { |
227 | 493 | os_file_close(def.file); | 491 | os_file_close(def.file); |
228 | @@ -505,7 +503,7 @@ | |||
229 | 505 | } | 503 | } |
230 | 506 | } | 504 | } |
231 | 507 | 505 | ||
233 | 508 | @@ -4250,7 +4341,7 @@ | 506 | @@ -4418,7 +4512,7 @@ |
234 | 509 | /* At this point, only one tablespace is open */ | 507 | /* At this point, only one tablespace is open */ |
235 | 510 | ut_a(def.success == !remote.success); | 508 | ut_a(def.success == !remote.success); |
236 | 511 | 509 | ||
237 | @@ -514,7 +512,7 @@ | |||
238 | 514 | 512 | ||
239 | 515 | /* Get and test the file size. */ | 513 | /* Get and test the file size. */ |
240 | 516 | size = os_file_get_size(fsp->file); | 514 | size = os_file_get_size(fsp->file); |
242 | 517 | @@ -4269,9 +4360,9 @@ | 515 | @@ -4437,9 +4531,9 @@ |
243 | 518 | 516 | ||
244 | 519 | /* Every .ibd file is created >= 4 pages in size. Smaller files | 517 | /* Every .ibd file is created >= 4 pages in size. Smaller files |
245 | 520 | cannot be ok. */ | 518 | cannot be ok. */ |
246 | @@ -526,7 +524,7 @@ | |||
247 | 526 | ib_logf(IB_LOG_LEVEL_ERROR, | 524 | ib_logf(IB_LOG_LEVEL_ERROR, |
248 | 527 | "The size of single-table tablespace file %s " | 525 | "The size of single-table tablespace file %s " |
249 | 528 | "is only " UINT64PF ", should be at least %lu!", | 526 | "is only " UINT64PF ", should be at least %lu!", |
251 | 529 | @@ -4352,7 +4443,7 @@ | 527 | @@ -4520,7 +4614,7 @@ |
252 | 530 | } | 528 | } |
253 | 531 | mutex_exit(&fil_system->mutex); | 529 | mutex_exit(&fil_system->mutex); |
254 | 532 | #endif /* UNIV_HOTBACKUP */ | 530 | #endif /* UNIV_HOTBACKUP */ |
255 | @@ -535,7 +533,7 @@ | |||
256 | 535 | tablename, fsp->id, fsp->flags, FIL_TABLESPACE); | 533 | tablename, fsp->id, fsp->flags, FIL_TABLESPACE); |
257 | 536 | 534 | ||
258 | 537 | if (!file_space_create_success) { | 535 | if (!file_space_create_success) { |
260 | 538 | @@ -4379,13 +4470,55 @@ | 536 | @@ -4547,13 +4641,55 @@ |
261 | 539 | } | 537 | } |
262 | 540 | 538 | ||
263 | 541 | func_exit: | 539 | func_exit: |
264 | @@ -595,7 +593,7 @@ | |||
265 | 595 | mem_free(tablename); | 593 | mem_free(tablename); |
266 | 596 | if (remote.success) { | 594 | if (remote.success) { |
267 | 597 | mem_free(remote.filepath); | 595 | mem_free(remote.filepath); |
269 | 598 | @@ -4399,7 +4532,7 @@ | 596 | @@ -4567,7 +4703,7 @@ |
270 | 599 | idea is to read as much good data as we can and jump over bad data. | 597 | idea is to read as much good data as we can and jump over bad data. |
271 | 600 | @return 0 if ok, -1 if error even after the retries, 1 if at the end | 598 | @return 0 if ok, -1 if error even after the retries, 1 if at the end |
272 | 601 | of the directory */ | 599 | of the directory */ |
273 | @@ -604,7 +602,7 @@ | |||
274 | 604 | int | 602 | int |
275 | 605 | fil_file_readdir_next_file( | 603 | fil_file_readdir_next_file( |
276 | 606 | /*=======================*/ | 604 | /*=======================*/ |
278 | 607 | @@ -4439,7 +4572,7 @@ | 605 | @@ -4607,7 +4743,7 @@ |
279 | 608 | @return DB_SUCCESS or error number */ | 606 | @return DB_SUCCESS or error number */ |
280 | 609 | UNIV_INTERN | 607 | UNIV_INTERN |
281 | 610 | dberr_t | 608 | dberr_t |
282 | @@ -613,7 +611,7 @@ | |||
283 | 613 | /*===================================*/ | 611 | /*===================================*/ |
284 | 614 | { | 612 | { |
285 | 615 | int ret; | 613 | int ret; |
287 | 616 | @@ -4495,7 +4628,9 @@ | 614 | @@ -4663,7 +4799,9 @@ |
288 | 617 | "%s/%s", fil_path_to_mysql_datadir, dbinfo.name); | 615 | "%s/%s", fil_path_to_mysql_datadir, dbinfo.name); |
289 | 618 | srv_normalize_path_for_win(dbpath); | 616 | srv_normalize_path_for_win(dbpath); |
290 | 619 | 617 | ||
291 | @@ -624,7 +622,7 @@ | |||
292 | 624 | 622 | ||
293 | 625 | if (dbdir != NULL) { | 623 | if (dbdir != NULL) { |
294 | 626 | 624 | ||
296 | 627 | @@ -4516,9 +4651,15 @@ | 625 | @@ -4684,9 +4822,15 @@ |
297 | 628 | && (0 == strcmp(fileinfo.name | 626 | && (0 == strcmp(fileinfo.name |
298 | 629 | + strlen(fileinfo.name) - 4, | 627 | + strlen(fileinfo.name) - 4, |
299 | 630 | ".ibd") | 628 | ".ibd") |
300 | @@ -642,7 +640,7 @@ | |||
301 | 642 | /* The name ends in .ibd or .isl; | 640 | /* The name ends in .ibd or .isl; |
302 | 643 | try opening the file */ | 641 | try opening the file */ |
303 | 644 | fil_load_single_table_tablespace( | 642 | fil_load_single_table_tablespace( |
305 | 645 | @@ -4674,6 +4815,7 @@ | 643 | @@ -4842,6 +4986,7 @@ |
306 | 646 | { | 644 | { |
307 | 647 | fil_space_t* fnamespace; | 645 | fil_space_t* fnamespace; |
308 | 648 | fil_space_t* space; | 646 | fil_space_t* space; |
309 | @@ -650,7 +648,7 @@ | |||
310 | 650 | 648 | ||
311 | 651 | ut_ad(fil_system); | 649 | ut_ad(fil_system); |
312 | 652 | 650 | ||
314 | 653 | @@ -4751,6 +4893,10 @@ | 651 | @@ -4919,6 +5064,10 @@ |
315 | 654 | if (fnamespace == NULL) { | 652 | if (fnamespace == NULL) { |
316 | 655 | if (print_error_if_does_not_exist) { | 653 | if (print_error_if_does_not_exist) { |
317 | 656 | fil_report_missing_tablespace(name, id); | 654 | fil_report_missing_tablespace(name, id); |
318 | @@ -661,7 +659,7 @@ | |||
319 | 661 | } | 659 | } |
320 | 662 | } else { | 660 | } else { |
321 | 663 | ut_print_timestamp(stderr); | 661 | ut_print_timestamp(stderr); |
323 | 664 | @@ -4774,6 +4920,10 @@ | 662 | @@ -4942,6 +5091,10 @@ |
324 | 665 | 663 | ||
325 | 666 | mutex_exit(&fil_system->mutex); | 664 | mutex_exit(&fil_system->mutex); |
326 | 667 | 665 | ||
327 | @@ -672,7 +670,7 @@ | |||
328 | 672 | return(FALSE); | 670 | return(FALSE); |
329 | 673 | } | 671 | } |
330 | 674 | 672 | ||
332 | 675 | @@ -5407,6 +5557,16 @@ | 673 | @@ -5575,6 +5728,16 @@ |
333 | 676 | 674 | ||
334 | 677 | ut_ad(mode != OS_AIO_IBUF || space->purpose == FIL_TABLESPACE); | 675 | ut_ad(mode != OS_AIO_IBUF || space->purpose == FIL_TABLESPACE); |
335 | 678 | 676 | ||
336 | @@ -689,7 +687,7 @@ | |||
337 | 689 | node = UT_LIST_GET_FIRST(space->chain); | 687 | node = UT_LIST_GET_FIRST(space->chain); |
338 | 690 | 688 | ||
339 | 691 | for (;;) { | 689 | for (;;) { |
341 | 692 | @@ -6334,6 +6494,7 @@ | 690 | @@ -6502,6 +6665,7 @@ |
342 | 693 | return(err); | 691 | return(err); |
343 | 694 | } | 692 | } |
344 | 695 | 693 | ||
345 | @@ -697,7 +695,7 @@ | |||
346 | 697 | /****************************************************************//** | 695 | /****************************************************************//** |
347 | 698 | Generate redo logs for swapping two .ibd files */ | 696 | Generate redo logs for swapping two .ibd files */ |
348 | 699 | UNIV_INTERN | 697 | UNIV_INTERN |
350 | 700 | @@ -6360,3 +6521,4 @@ | 698 | @@ -6528,3 +6692,4 @@ |
351 | 701 | 0, 0, new_name, old_name, mtr); | 699 | 0, 0, new_name, old_name, mtr); |
352 | 702 | } | 700 | } |
353 | 703 | } | 701 | } |
354 | @@ -725,7 +723,7 @@ | |||
355 | 725 | static TYPELIB innodb_checksum_algorithm_typelib = { | 723 | static TYPELIB innodb_checksum_algorithm_typelib = { |
356 | 726 | array_elements(innodb_checksum_algorithm_names) - 1, | 724 | array_elements(innodb_checksum_algorithm_names) - 1, |
357 | 727 | "innodb_checksum_algorithm_typelib", | 725 | "innodb_checksum_algorithm_typelib", |
359 | 728 | @@ -1568,7 +1569,7 @@ | 726 | @@ -1587,7 +1588,7 @@ |
360 | 729 | ut_ad(*mbminlen < DATA_MBMAX); | 727 | ut_ad(*mbminlen < DATA_MBMAX); |
361 | 730 | ut_ad(*mbmaxlen < DATA_MBMAX); | 728 | ut_ad(*mbmaxlen < DATA_MBMAX); |
362 | 731 | } else { | 729 | } else { |
363 | @@ -734,7 +732,7 @@ | |||
364 | 734 | 732 | ||
365 | 735 | if (thd && thd_sql_command(thd) == SQLCOM_DROP_TABLE) { | 733 | if (thd && thd_sql_command(thd) == SQLCOM_DROP_TABLE) { |
366 | 736 | 734 | ||
368 | 737 | @@ -2113,6 +2114,62 @@ | 735 | @@ -2132,6 +2133,62 @@ |
369 | 738 | return(trx->state != TRX_STATE_NOT_STARTED); | 736 | return(trx->state != TRX_STATE_NOT_STARTED); |
370 | 739 | } | 737 | } |
371 | 740 | 738 | ||
372 | @@ -797,7 +795,7 @@ | |||
373 | 797 | /*********************************************************************//** | 795 | /*********************************************************************//** |
374 | 798 | Copy table flags from MySQL's HA_CREATE_INFO into an InnoDB table object. | 796 | Copy table flags from MySQL's HA_CREATE_INFO into an InnoDB table object. |
375 | 799 | Those flags are stored in .frm file and end up in the MySQL table object, | 797 | Those flags are stored in .frm file and end up in the MySQL table object, |
377 | 800 | @@ -2478,40 +2535,19 @@ | 798 | @@ -2497,40 +2554,19 @@ |
378 | 801 | ulint buflen, /*!< in: length of buf, in bytes */ | 799 | ulint buflen, /*!< in: length of buf, in bytes */ |
379 | 802 | const char* id, /*!< in: identifier to convert */ | 800 | const char* id, /*!< in: identifier to convert */ |
380 | 803 | ulint idlen, /*!< in: length of id, in bytes */ | 801 | ulint idlen, /*!< in: length of id, in bytes */ |
381 | @@ -843,7 +841,7 @@ | |||
382 | 843 | if (UNIV_UNLIKELY(idlen > buflen)) { | 841 | if (UNIV_UNLIKELY(idlen > buflen)) { |
383 | 844 | idlen = buflen; | 842 | idlen = buflen; |
384 | 845 | } | 843 | } |
386 | 846 | @@ -2899,12 +2935,9 @@ | 844 | @@ -2921,12 +2957,9 @@ |
387 | 847 | } | 845 | } |
388 | 848 | 846 | ||
389 | 849 | #ifdef UNIV_LOG_ARCHIVE | 847 | #ifdef UNIV_LOG_ARCHIVE |
390 | @@ -859,7 +857,7 @@ | |||
391 | 859 | srv_arch_dir = innobase_log_arch_dir; | 857 | srv_arch_dir = innobase_log_arch_dir; |
392 | 860 | #endif /* UNIG_LOG_ARCHIVE */ | 858 | #endif /* UNIG_LOG_ARCHIVE */ |
393 | 861 | 859 | ||
395 | 862 | @@ -3146,6 +3179,8 @@ | 860 | @@ -3168,6 +3201,8 @@ |
396 | 863 | srv_checksum_algorithm = SRV_CHECKSUM_ALGORITHM_NONE; | 861 | srv_checksum_algorithm = SRV_CHECKSUM_ALGORITHM_NONE; |
397 | 864 | } | 862 | } |
398 | 865 | 863 | ||
399 | @@ -868,7 +866,7 @@ | |||
400 | 868 | #ifdef HAVE_LARGE_PAGES | 866 | #ifdef HAVE_LARGE_PAGES |
401 | 869 | if ((os_use_large_pages = (ibool) my_use_large_pages)) { | 867 | if ((os_use_large_pages = (ibool) my_use_large_pages)) { |
402 | 870 | os_large_page_size = (ulint) opt_large_page_size; | 868 | os_large_page_size = (ulint) opt_large_page_size; |
404 | 871 | @@ -15476,6 +15511,33 @@ | 869 | @@ -15641,6 +15676,33 @@ |
405 | 872 | NULL, NULL, SRV_CHECKSUM_ALGORITHM_INNODB, | 870 | NULL, NULL, SRV_CHECKSUM_ALGORITHM_INNODB, |
406 | 873 | &innodb_checksum_algorithm_typelib); | 871 | &innodb_checksum_algorithm_typelib); |
407 | 874 | 872 | ||
408 | @@ -902,7 +900,7 @@ | |||
409 | 902 | static MYSQL_SYSVAR_BOOL(checksums, innobase_use_checksums, | 900 | static MYSQL_SYSVAR_BOOL(checksums, innobase_use_checksums, |
410 | 903 | PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, | 901 | PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, |
411 | 904 | "DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting " | 902 | "DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting " |
413 | 905 | @@ -16258,6 +16320,7 @@ | 903 | @@ -16447,6 +16509,7 @@ |
414 | 906 | MYSQL_SYSVAR(lru_scan_depth), | 904 | MYSQL_SYSVAR(lru_scan_depth), |
415 | 907 | MYSQL_SYSVAR(flush_neighbors), | 905 | MYSQL_SYSVAR(flush_neighbors), |
416 | 908 | MYSQL_SYSVAR(checksum_algorithm), | 906 | MYSQL_SYSVAR(checksum_algorithm), |
417 | @@ -910,7 +908,7 @@ | |||
418 | 910 | MYSQL_SYSVAR(checksums), | 908 | MYSQL_SYSVAR(checksums), |
419 | 911 | MYSQL_SYSVAR(commit_concurrency), | 909 | MYSQL_SYSVAR(commit_concurrency), |
420 | 912 | MYSQL_SYSVAR(concurrency_tickets), | 910 | MYSQL_SYSVAR(concurrency_tickets), |
422 | 913 | @@ -16836,45 +16899,24 @@ | 911 | @@ -17034,47 +17097,24 @@ |
423 | 914 | void | 912 | void |
424 | 915 | ib_logf( | 913 | ib_logf( |
425 | 916 | /*====*/ | 914 | /*====*/ |
426 | @@ -931,7 +929,9 @@ | |||
427 | 931 | - str[size - 1] = 0x0; | 929 | - str[size - 1] = 0x0; |
428 | 932 | - vsnprintf(str, size, format, args); | 930 | - vsnprintf(str, size, format, args); |
429 | 933 | -#elif HAVE_VASPRINTF | 931 | -#elif HAVE_VASPRINTF |
431 | 934 | - (void) vasprintf(&str, format, args); | 932 | - int ret; |
432 | 933 | - ret = vasprintf(&str, format, args); | ||
433 | 934 | - ut_a(ret != -1); | ||
434 | 935 | -#else | 935 | -#else |
435 | 936 | - /* Use a fixed length string. */ | 936 | - /* Use a fixed length string. */ |
436 | 937 | - str = static_cast<char*>(malloc(BUFSIZ)); | 937 | - str = static_cast<char*>(malloc(BUFSIZ)); |
437 | @@ -966,7 +966,7 @@ | |||
438 | 966 | ut_error; | 966 | ut_error; |
439 | 967 | --- a/storage/innobase/handler/handler0alter.cc | 967 | --- a/storage/innobase/handler/handler0alter.cc |
440 | 968 | +++ b/storage/innobase/handler/handler0alter.cc | 968 | +++ b/storage/innobase/handler/handler0alter.cc |
442 | 969 | @@ -5440,6 +5440,7 @@ | 969 | @@ -5505,6 +5505,7 @@ |
443 | 970 | = static_cast<ha_innobase_inplace_ctx*>(*pctx); | 970 | = static_cast<ha_innobase_inplace_ctx*>(*pctx); |
444 | 971 | 971 | ||
445 | 972 | DBUG_ASSERT(ctx->need_rebuild()); | 972 | DBUG_ASSERT(ctx->need_rebuild()); |
446 | @@ -974,7 +974,7 @@ | |||
447 | 974 | /* Generate the redo log for the file | 974 | /* Generate the redo log for the file |
448 | 975 | operations that will be performed in | 975 | operations that will be performed in |
449 | 976 | commit_cache_rebuild(). */ | 976 | commit_cache_rebuild(). */ |
451 | 977 | @@ -5448,6 +5449,7 @@ | 977 | @@ -5513,6 +5514,7 @@ |
452 | 978 | ctx->new_table->space, | 978 | ctx->new_table->space, |
453 | 979 | ctx->new_table->name, | 979 | ctx->new_table->name, |
454 | 980 | ctx->tmp_name, &mtr); | 980 | ctx->tmp_name, &mtr); |
455 | @@ -984,7 +984,7 @@ | |||
456 | 984 | } | 984 | } |
457 | 985 | --- a/storage/innobase/include/buf0buf.h | 985 | --- a/storage/innobase/include/buf0buf.h |
458 | 986 | +++ b/storage/innobase/include/buf0buf.h | 986 | +++ b/storage/innobase/include/buf0buf.h |
460 | 987 | @@ -1580,6 +1580,8 @@ | 987 | @@ -1610,6 +1610,8 @@ |
461 | 988 | or buf_block_t::mutex. */ | 988 | or buf_block_t::mutex. */ |
462 | 989 | # endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ | 989 | # endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ |
463 | 990 | #endif /* !UNIV_HOTBACKUP */ | 990 | #endif /* !UNIV_HOTBACKUP */ |
464 | @@ -995,7 +995,7 @@ | |||
465 | 995 | /** The buffer control block structure */ | 995 | /** The buffer control block structure */ |
466 | 996 | --- a/storage/innobase/include/fil0fil.h | 996 | --- a/storage/innobase/include/fil0fil.h |
467 | 997 | +++ b/storage/innobase/include/fil0fil.h | 997 | +++ b/storage/innobase/include/fil0fil.h |
469 | 998 | @@ -163,6 +163,9 @@ | 998 | @@ -165,6 +165,9 @@ |
470 | 999 | #define FIL_LOG 502 /*!< redo log */ | 999 | #define FIL_LOG 502 /*!< redo log */ |
471 | 1000 | /* @} */ | 1000 | /* @} */ |
472 | 1001 | 1001 | ||
473 | @@ -1005,7 +1005,17 @@ | |||
474 | 1005 | /** The number of fsyncs done to the log */ | 1005 | /** The number of fsyncs done to the log */ |
475 | 1006 | extern ulint fil_n_log_flushes; | 1006 | extern ulint fil_n_log_flushes; |
476 | 1007 | 1007 | ||
478 | 1008 | @@ -373,12 +376,6 @@ | 1008 | @@ -185,9 +188,6 @@ |
479 | 1009 | lsn_t lsn; /*!< Flushed LSN from header page */ | ||
480 | 1010 | ulint id; /*!< Space ID */ | ||
481 | 1011 | ulint flags; /*!< Tablespace flags */ | ||
482 | 1012 | -#ifdef UNIV_LOG_ARCHIVE | ||
483 | 1013 | - ulint arch_log_no; /*!< latest archived log file number */ | ||
484 | 1014 | -#endif /* UNIV_LOG_ARCHIVE */ | ||
485 | 1015 | }; | ||
486 | 1016 | |||
487 | 1017 | #ifndef UNIV_HOTBACKUP | ||
488 | 1018 | @@ -389,12 +389,6 @@ | ||
489 | 1009 | contain sensible data */ | 1019 | contain sensible data */ |
490 | 1010 | ulint* flags, /*!< out: tablespace flags */ | 1020 | ulint* flags, /*!< out: tablespace flags */ |
491 | 1011 | ulint* space_id, /*!< out: tablespace ID */ | 1021 | ulint* space_id, /*!< out: tablespace ID */ |
492 | @@ -1018,7 +1028,7 @@ | |||
493 | 1018 | lsn_t* min_flushed_lsn, /*!< out: min of flushed | 1028 | lsn_t* min_flushed_lsn, /*!< out: min of flushed |
494 | 1019 | lsn values in data files */ | 1029 | lsn values in data files */ |
495 | 1020 | lsn_t* max_flushed_lsn) /*!< out: max of flushed | 1030 | lsn_t* max_flushed_lsn) /*!< out: max of flushed |
497 | 1021 | @@ -611,7 +608,7 @@ | 1031 | @@ -627,7 +621,7 @@ |
498 | 1022 | @return DB_SUCCESS or error number */ | 1032 | @return DB_SUCCESS or error number */ |
499 | 1023 | UNIV_INTERN | 1033 | UNIV_INTERN |
500 | 1024 | dberr_t | 1034 | dberr_t |
501 | @@ -1181,7 +1191,7 @@ | |||
502 | 1181 | UNIV_INLINE | 1191 | UNIV_INLINE |
503 | 1182 | --- a/storage/innobase/include/log0recv.h | 1192 | --- a/storage/innobase/include/log0recv.h |
504 | 1183 | +++ b/storage/innobase/include/log0recv.h | 1193 | +++ b/storage/innobase/include/log0recv.h |
506 | 1184 | @@ -297,18 +297,13 @@ | 1194 | @@ -298,18 +298,13 @@ |
507 | 1185 | Recovers from archived log files, and also from log files, if they exist. | 1195 | Recovers from archived log files, and also from log files, if they exist. |
508 | 1186 | @return error code or DB_SUCCESS */ | 1196 | @return error code or DB_SUCCESS */ |
509 | 1187 | UNIV_INTERN | 1197 | UNIV_INTERN |
510 | @@ -1213,7 +1223,7 @@ | |||
511 | 1213 | 1223 | ||
512 | 1214 | /** Options for os_file_create_func @{ */ | 1224 | /** Options for os_file_create_func @{ */ |
513 | 1215 | enum os_file_create_t { | 1225 | enum os_file_create_t { |
515 | 1216 | @@ -202,6 +202,10 @@ | 1226 | @@ -206,6 +206,10 @@ |
516 | 1217 | extern ulint os_n_file_writes; | 1227 | extern ulint os_n_file_writes; |
517 | 1218 | extern ulint os_n_fsyncs; | 1228 | extern ulint os_n_fsyncs; |
518 | 1219 | 1229 | ||
519 | @@ -1239,7 +1249,7 @@ | |||
520 | 1239 | + | 1249 | + |
521 | 1240 | /*-------------------------------------------*/ | 1250 | /*-------------------------------------------*/ |
522 | 1241 | 1251 | ||
524 | 1242 | extern ibool srv_print_innodb_monitor; | 1252 | extern my_bool srv_print_innodb_monitor; |
525 | 1243 | @@ -496,13 +503,17 @@ | 1253 | @@ -496,13 +503,17 @@ |
526 | 1244 | the reason for which is that some FS | 1254 | the reason for which is that some FS |
527 | 1245 | do not flush meta-data when | 1255 | do not flush meta-data when |
528 | @@ -1601,7 +1611,7 @@ | |||
529 | 1601 | #ifdef UNIV_LOG_DEBUG | 1611 | #ifdef UNIV_LOG_DEBUG |
530 | 1602 | --- a/storage/innobase/log/log0recv.cc | 1612 | --- a/storage/innobase/log/log0recv.cc |
531 | 1603 | +++ b/storage/innobase/log/log0recv.cc | 1613 | +++ b/storage/innobase/log/log0recv.cc |
533 | 1604 | @@ -43,20 +43,28 @@ | 1614 | @@ -48,21 +48,29 @@ |
534 | 1605 | #include "trx0undo.h" | 1615 | #include "trx0undo.h" |
535 | 1606 | #include "trx0rec.h" | 1616 | #include "trx0rec.h" |
536 | 1607 | #include "fil0fil.h" | 1617 | #include "fil0fil.h" |
537 | @@ -1624,6 +1634,7 @@ | |||
538 | 1624 | +/** The maximum LSN of found archived log files */ | 1634 | +/** The maximum LSN of found archived log files */ |
539 | 1625 | +extern ib_uint64_t xtrabackup_arch_last_file_lsn; | 1635 | +extern ib_uint64_t xtrabackup_arch_last_file_lsn; |
540 | 1626 | 1636 | ||
541 | 1637 | |||
542 | 1627 | /** This is set to FALSE if the backup was originally taken with the | 1638 | /** This is set to FALSE if the backup was originally taken with the |
543 | 1628 | ibbackup --include regexp option: then we do not want to create tables in | 1639 | ibbackup --include regexp option: then we do not want to create tables in |
544 | 1629 | directories which were not included */ | 1640 | directories which were not included */ |
545 | @@ -1633,7 +1644,7 @@ | |||
546 | 1633 | 1644 | ||
547 | 1634 | /** Log records are stored in the hash table in chunks at most of this size; | 1645 | /** Log records are stored in the hash table in chunks at most of this size; |
548 | 1635 | this must be less than UNIV_PAGE_SIZE as it is stored in the buffer pool */ | 1646 | this must be less than UNIV_PAGE_SIZE as it is stored in the buffer pool */ |
550 | 1636 | @@ -399,7 +407,7 @@ | 1647 | @@ -405,7 +413,7 @@ |
551 | 1637 | /* Set appropriate value of recv_n_pool_free_frames. */ | 1648 | /* Set appropriate value of recv_n_pool_free_frames. */ |
552 | 1638 | if (buf_pool_get_curr_size() >= (10 * 1024 * 1024)) { | 1649 | if (buf_pool_get_curr_size() >= (10 * 1024 * 1024)) { |
553 | 1639 | /* Buffer pool of size greater than 10 MB. */ | 1650 | /* Buffer pool of size greater than 10 MB. */ |
554 | @@ -1642,7 +1653,7 @@ | |||
555 | 1642 | } | 1653 | } |
556 | 1643 | 1654 | ||
557 | 1644 | recv_sys->buf = static_cast<byte*>(ut_malloc(RECV_PARSING_BUF_SIZE)); | 1655 | recv_sys->buf = static_cast<byte*>(ut_malloc(RECV_PARSING_BUF_SIZE)); |
559 | 1645 | @@ -703,7 +711,7 @@ | 1656 | @@ -712,7 +720,7 @@ |
560 | 1646 | /***********************************************************************//** | 1657 | /***********************************************************************//** |
561 | 1647 | Checks the consistency of the checkpoint info | 1658 | Checks the consistency of the checkpoint info |
562 | 1648 | @return TRUE if ok */ | 1659 | @return TRUE if ok */ |
563 | @@ -1651,7 +1662,7 @@ | |||
564 | 1651 | ibool | 1662 | ibool |
565 | 1652 | recv_check_cp_is_consistent( | 1663 | recv_check_cp_is_consistent( |
566 | 1653 | /*========================*/ | 1664 | /*========================*/ |
568 | 1654 | @@ -733,7 +741,7 @@ | 1665 | @@ -742,7 +750,7 @@ |
569 | 1655 | /********************************************************//** | 1666 | /********************************************************//** |
570 | 1656 | Looks for the maximum consistent checkpoint from the log groups. | 1667 | Looks for the maximum consistent checkpoint from the log groups. |
571 | 1657 | @return error code or DB_SUCCESS */ | 1668 | @return error code or DB_SUCCESS */ |
572 | @@ -1660,7 +1671,7 @@ | |||
573 | 1660 | dberr_t | 1671 | dberr_t |
574 | 1661 | recv_find_max_checkpoint( | 1672 | recv_find_max_checkpoint( |
575 | 1662 | /*=====================*/ | 1673 | /*=====================*/ |
577 | 1663 | @@ -893,7 +901,7 @@ | 1674 | @@ -902,7 +910,7 @@ |
578 | 1664 | InnoDB-3.23.52 where the checksum field contains the log block number. | 1675 | InnoDB-3.23.52 where the checksum field contains the log block number. |
579 | 1665 | @return TRUE if ok, or if the log block may be in the format of InnoDB | 1676 | @return TRUE if ok, or if the log block may be in the format of InnoDB |
580 | 1666 | version predating 3.23.52 */ | 1677 | version predating 3.23.52 */ |
581 | @@ -1669,7 +1680,7 @@ | |||
582 | 1669 | ibool | 1680 | ibool |
583 | 1670 | log_block_checksum_is_ok_or_old_format( | 1681 | log_block_checksum_is_ok_or_old_format( |
584 | 1671 | /*===================================*/ | 1682 | /*===================================*/ |
586 | 1672 | @@ -902,12 +910,72 @@ | 1683 | @@ -911,12 +919,72 @@ |
587 | 1673 | #ifdef UNIV_LOG_DEBUG | 1684 | #ifdef UNIV_LOG_DEBUG |
588 | 1674 | return(TRUE); | 1685 | return(TRUE); |
589 | 1675 | #endif /* UNIV_LOG_DEBUG */ | 1686 | #endif /* UNIV_LOG_DEBUG */ |
590 | @@ -1744,7 +1755,7 @@ | |||
591 | 1744 | 1755 | ||
592 | 1745 | /* We assume the log block is in the format of | 1756 | /* We assume the log block is in the format of |
593 | 1746 | InnoDB version < 3.23.52 and the block is ok */ | 1757 | InnoDB version < 3.23.52 and the block is ok */ |
595 | 1747 | @@ -1588,6 +1656,8 @@ | 1758 | @@ -1606,6 +1674,8 @@ |
596 | 1748 | buf_block_get_page_no(block)); | 1759 | buf_block_get_page_no(block)); |
597 | 1749 | 1760 | ||
598 | 1750 | if ((recv_addr == NULL) | 1761 | if ((recv_addr == NULL) |
599 | @@ -1753,7 +1764,7 @@ | |||
600 | 1753 | || (recv_addr->state == RECV_BEING_PROCESSED) | 1764 | || (recv_addr->state == RECV_BEING_PROCESSED) |
601 | 1754 | || (recv_addr->state == RECV_PROCESSED)) { | 1765 | || (recv_addr->state == RECV_PROCESSED)) { |
602 | 1755 | 1766 | ||
604 | 1756 | @@ -1677,9 +1747,17 @@ | 1767 | @@ -1695,9 +1765,17 @@ |
605 | 1757 | if (page_zip) { | 1768 | if (page_zip) { |
606 | 1758 | memset(FIL_PAGE_LSN + page_zip->data, 0, 8); | 1769 | memset(FIL_PAGE_LSN + page_zip->data, 0, 8); |
607 | 1759 | } | 1770 | } |
608 | @@ -1772,7 +1783,7 @@ | |||
609 | 1772 | 1783 | ||
610 | 1773 | lsn_t end_lsn; | 1784 | lsn_t end_lsn; |
611 | 1774 | 1785 | ||
613 | 1775 | @@ -1865,6 +1943,19 @@ | 1786 | @@ -1883,6 +1961,19 @@ |
614 | 1776 | ulint zip_size = fil_space_get_zip_size(space); | 1787 | ulint zip_size = fil_space_get_zip_size(space); |
615 | 1777 | ulint page_no = recv_addr->page_no; | 1788 | ulint page_no = recv_addr->page_no; |
616 | 1778 | 1789 | ||
617 | @@ -1792,7 +1803,7 @@ | |||
618 | 1792 | if (recv_addr->state == RECV_NOT_PROCESSED) { | 1803 | if (recv_addr->state == RECV_NOT_PROCESSED) { |
619 | 1793 | if (!has_printed) { | 1804 | if (!has_printed) { |
620 | 1794 | ib_logf(IB_LOG_LEVEL_INFO, | 1805 | ib_logf(IB_LOG_LEVEL_INFO, |
622 | 1795 | @@ -2406,7 +2497,7 @@ | 1806 | @@ -2424,7 +2515,7 @@ |
623 | 1796 | || type == MLOG_FILE_RENAME | 1807 | || type == MLOG_FILE_RENAME |
624 | 1797 | || type == MLOG_FILE_DELETE) { | 1808 | || type == MLOG_FILE_DELETE) { |
625 | 1798 | ut_a(space); | 1809 | ut_a(space); |
626 | @@ -1801,7 +1812,7 @@ | |||
627 | 1801 | if (recv_replay_file_ops) { | 1812 | if (recv_replay_file_ops) { |
628 | 1802 | 1813 | ||
629 | 1803 | /* In ibbackup --apply-log, replay an .ibd file | 1814 | /* In ibbackup --apply-log, replay an .ibd file |
631 | 1804 | @@ -2429,7 +2520,7 @@ | 1815 | @@ -2447,7 +2538,7 @@ |
632 | 1805 | ut_error; | 1816 | ut_error; |
633 | 1806 | } | 1817 | } |
634 | 1807 | } | 1818 | } |
635 | @@ -1810,7 +1821,7 @@ | |||
636 | 1810 | /* In normal mysqld crash recovery we do not try to | 1821 | /* In normal mysqld crash recovery we do not try to |
637 | 1811 | replay file operations */ | 1822 | replay file operations */ |
638 | 1812 | #ifdef UNIV_LOG_LSN_DEBUG | 1823 | #ifdef UNIV_LOG_LSN_DEBUG |
640 | 1813 | @@ -2832,7 +2923,10 @@ | 1824 | @@ -2850,7 +2941,10 @@ |
641 | 1814 | = log_block_get_checkpoint_no(log_block); | 1825 | = log_block_get_checkpoint_no(log_block); |
642 | 1815 | } | 1826 | } |
643 | 1816 | 1827 | ||
644 | @@ -1822,7 +1833,7 @@ | |||
645 | 1822 | /* Log data for this group ends here */ | 1833 | /* Log data for this group ends here */ |
646 | 1823 | 1834 | ||
647 | 1824 | finished = TRUE; | 1835 | finished = TRUE; |
649 | 1825 | @@ -2852,8 +2946,14 @@ | 1836 | @@ -2870,8 +2964,14 @@ |
650 | 1826 | 1837 | ||
651 | 1827 | fprintf(stderr, | 1838 | fprintf(stderr, |
652 | 1828 | "InnoDB: Doing recovery: scanned up to" | 1839 | "InnoDB: Doing recovery: scanned up to" |
653 | @@ -1839,7 +1850,7 @@ | |||
654 | 1839 | } | 1850 | } |
655 | 1840 | } | 1851 | } |
656 | 1841 | 1852 | ||
658 | 1842 | @@ -2953,7 +3053,7 @@ | 1853 | @@ -2971,7 +3071,7 @@ |
659 | 1843 | ib_logf(IB_LOG_LEVEL_INFO, | 1854 | ib_logf(IB_LOG_LEVEL_INFO, |
660 | 1844 | "Reading tablespace information from the .ibd files..."); | 1855 | "Reading tablespace information from the .ibd files..."); |
661 | 1845 | 1856 | ||
662 | @@ -1848,7 +1859,7 @@ | |||
663 | 1848 | 1859 | ||
664 | 1849 | /* If we are using the doublewrite method, we will | 1860 | /* If we are using the doublewrite method, we will |
665 | 1850 | check if there are half-written pages in data files, | 1861 | check if there are half-written pages in data files, |
667 | 1851 | @@ -2997,6 +3097,7 @@ | 1862 | @@ -3015,6 +3115,7 @@ |
668 | 1852 | log_group_t* group; | 1863 | log_group_t* group; |
669 | 1853 | log_group_t* max_cp_group; | 1864 | log_group_t* max_cp_group; |
670 | 1854 | ulint max_cp_field; | 1865 | ulint max_cp_field; |
671 | @@ -1856,7 +1867,7 @@ | |||
672 | 1856 | lsn_t checkpoint_lsn; | 1867 | lsn_t checkpoint_lsn; |
673 | 1857 | ib_uint64_t checkpoint_no; | 1868 | ib_uint64_t checkpoint_no; |
674 | 1858 | lsn_t group_scanned_lsn = 0; | 1869 | lsn_t group_scanned_lsn = 0; |
676 | 1859 | @@ -3006,9 +3107,13 @@ | 1870 | @@ -3024,10 +3125,14 @@ |
677 | 1860 | lsn_t archived_lsn; | 1871 | lsn_t archived_lsn; |
678 | 1861 | #endif /* UNIV_LOG_ARCHIVE */ | 1872 | #endif /* UNIV_LOG_ARCHIVE */ |
679 | 1862 | byte* buf; | 1873 | byte* buf; |
680 | @@ -1864,6 +1875,7 @@ | |||
681 | 1864 | + byte* log_hdr_buf; | 1875 | + byte* log_hdr_buf; |
682 | 1865 | + byte log_hdr_buf_base[LOG_FILE_HDR_SIZE + OS_FILE_LOG_BLOCK_SIZE]; | 1876 | + byte log_hdr_buf_base[LOG_FILE_HDR_SIZE + OS_FILE_LOG_BLOCK_SIZE]; |
683 | 1866 | dberr_t err; | 1877 | dberr_t err; |
684 | 1878 | ut_when_dtor<recv_dblwr_t> tmp(recv_sys->dblwr); | ||
685 | 1867 | 1879 | ||
686 | 1868 | + log_hdr_buf = static_cast<byte *> | 1880 | + log_hdr_buf = static_cast<byte *> |
687 | 1869 | + (ut_align(log_hdr_buf_base, OS_FILE_LOG_BLOCK_SIZE)); | 1881 | + (ut_align(log_hdr_buf_base, OS_FILE_LOG_BLOCK_SIZE)); |
688 | @@ -1871,7 +1883,7 @@ | |||
689 | 1871 | #ifdef UNIV_LOG_ARCHIVE | 1883 | #ifdef UNIV_LOG_ARCHIVE |
690 | 1872 | ut_ad(type != LOG_CHECKPOINT || limit_lsn == LSN_MAX); | 1884 | ut_ad(type != LOG_CHECKPOINT || limit_lsn == LSN_MAX); |
691 | 1873 | /** TRUE when recovering from a checkpoint */ | 1885 | /** TRUE when recovering from a checkpoint */ |
693 | 1874 | @@ -3102,14 +3207,33 @@ | 1886 | @@ -3116,14 +3221,33 @@ |
694 | 1875 | log_hdr_buf, max_cp_group); | 1887 | log_hdr_buf, max_cp_group); |
695 | 1876 | } | 1888 | } |
696 | 1877 | 1889 | ||
697 | @@ -1906,7 +1918,7 @@ | |||
698 | 1906 | group = UT_LIST_GET_NEXT(log_groups, group); | 1918 | group = UT_LIST_GET_NEXT(log_groups, group); |
699 | 1907 | } | 1919 | } |
700 | 1908 | #endif /* UNIV_LOG_ARCHIVE */ | 1920 | #endif /* UNIV_LOG_ARCHIVE */ |
702 | 1909 | @@ -3435,7 +3559,8 @@ | 1921 | @@ -3444,7 +3568,8 @@ |
703 | 1910 | that the data dictionary tables will be free of any locks. | 1922 | that the data dictionary tables will be free of any locks. |
704 | 1911 | The data dictionary latch should guarantee that there is at | 1923 | The data dictionary latch should guarantee that there is at |
705 | 1912 | most one data dictionary transaction active at a time. */ | 1924 | most one data dictionary transaction active at a time. */ |
706 | @@ -1916,7 +1928,7 @@ | |||
707 | 1916 | trx_rollback_or_clean_recovered(FALSE); | 1928 | trx_rollback_or_clean_recovered(FALSE); |
708 | 1917 | } | 1929 | } |
709 | 1918 | } | 1930 | } |
711 | 1919 | @@ -3664,23 +3789,23 @@ | 1931 | @@ -3673,23 +3798,23 @@ |
712 | 1920 | ulint len; | 1932 | ulint len; |
713 | 1921 | ibool ret; | 1933 | ibool ret; |
714 | 1922 | byte* buf; | 1934 | byte* buf; |
715 | @@ -1945,7 +1957,7 @@ | |||
716 | 1945 | 1957 | ||
717 | 1946 | if (ret == FALSE) { | 1958 | if (ret == FALSE) { |
718 | 1947 | ask_again: | 1959 | ask_again: |
720 | 1948 | @@ -3725,20 +3850,19 @@ | 1960 | @@ -3734,20 +3859,19 @@ |
721 | 1949 | 1961 | ||
722 | 1950 | /* Add the archive file as a node to the space */ | 1962 | /* Add the archive file as a node to the space */ |
723 | 1951 | 1963 | ||
724 | @@ -1972,7 +1984,7 @@ | |||
725 | 1972 | != group->archived_file_no) { | 1984 | != group->archived_file_no) { |
726 | 1973 | fprintf(stderr, | 1985 | fprintf(stderr, |
727 | 1974 | "InnoDB: Archive file header inconsistent %s\n", name); | 1986 | "InnoDB: Archive file header inconsistent %s\n", name); |
729 | 1975 | @@ -3767,6 +3891,20 @@ | 1987 | @@ -3776,6 +3900,20 @@ |
730 | 1976 | return(TRUE); | 1988 | return(TRUE); |
731 | 1977 | } | 1989 | } |
732 | 1978 | 1990 | ||
733 | @@ -1993,7 +2005,7 @@ | |||
734 | 1993 | recv_sys->scanned_lsn = start_lsn; | 2005 | recv_sys->scanned_lsn = start_lsn; |
735 | 1994 | } | 2006 | } |
736 | 1995 | 2007 | ||
738 | 1996 | @@ -3779,7 +3917,7 @@ | 2008 | @@ -3788,7 +3926,7 @@ |
739 | 1997 | return(TRUE); | 2009 | return(TRUE); |
740 | 1998 | } | 2010 | } |
741 | 1999 | 2011 | ||
742 | @@ -2002,7 +2014,7 @@ | |||
743 | 2002 | 2014 | ||
744 | 2003 | for (;;) { | 2015 | for (;;) { |
745 | 2004 | len = RECV_SCAN_SIZE; | 2016 | len = RECV_SCAN_SIZE; |
747 | 2005 | @@ -3799,13 +3937,13 @@ | 2017 | @@ -3808,13 +3946,13 @@ |
748 | 2006 | fprintf(stderr, | 2018 | fprintf(stderr, |
749 | 2007 | "InnoDB: Archive read starting at" | 2019 | "InnoDB: Archive read starting at" |
750 | 2008 | " lsn %llu, len %lu from file %s\n", | 2020 | " lsn %llu, len %lu from file %s\n", |
751 | @@ -2018,7 +2030,7 @@ | |||
752 | 2018 | read_offset % UNIV_PAGE_SIZE, len, buf, NULL); | 2030 | read_offset % UNIV_PAGE_SIZE, len, buf, NULL); |
753 | 2019 | 2031 | ||
754 | 2020 | ret = recv_scan_log_recs( | 2032 | ret = recv_scan_log_recs( |
756 | 2021 | @@ -3820,10 +3958,12 @@ | 2033 | @@ -3829,10 +3967,12 @@ |
757 | 2022 | } | 2034 | } |
758 | 2023 | 2035 | ||
759 | 2024 | if (ret) { | 2036 | if (ret) { |
760 | @@ -2035,7 +2047,7 @@ | |||
761 | 2035 | return(TRUE); | 2047 | return(TRUE); |
762 | 2036 | } | 2048 | } |
763 | 2037 | 2049 | ||
765 | 2038 | @@ -3840,26 +3980,18 @@ | 2050 | @@ -3849,26 +3989,18 @@ |
766 | 2039 | Recovers from archived log files, and also from log files, if they exist. | 2051 | Recovers from archived log files, and also from log files, if they exist. |
767 | 2040 | @return error code or DB_SUCCESS */ | 2052 | @return error code or DB_SUCCESS */ |
768 | 2041 | UNIV_INTERN | 2053 | UNIV_INTERN |
769 | @@ -2064,7 +2076,7 @@ | |||
770 | 2064 | 2076 | ||
771 | 2065 | recv_sys_create(); | 2077 | recv_sys_create(); |
772 | 2066 | recv_sys_init(buf_pool_get_curr_size()); | 2078 | recv_sys_init(buf_pool_get_curr_size()); |
774 | 2067 | @@ -3889,7 +4021,7 @@ | 2079 | @@ -3898,7 +4030,7 @@ |
775 | 2068 | return(DB_ERROR); | 2080 | return(DB_ERROR); |
776 | 2069 | } | 2081 | } |
777 | 2070 | 2082 | ||
778 | @@ -2073,7 +2085,7 @@ | |||
779 | 2073 | 2085 | ||
780 | 2074 | recv_sys->parse_start_lsn = min_flushed_lsn; | 2086 | recv_sys->parse_start_lsn = min_flushed_lsn; |
781 | 2075 | 2087 | ||
783 | 2076 | @@ -3903,7 +4035,8 @@ | 2088 | @@ -3912,7 +4044,8 @@ |
784 | 2077 | 2089 | ||
785 | 2078 | mutex_enter(&(log_sys->mutex)); | 2090 | mutex_enter(&(log_sys->mutex)); |
786 | 2079 | 2091 | ||
787 | @@ -2083,7 +2095,7 @@ | |||
788 | 2083 | ret = log_group_recover_from_archive_file(group); | 2095 | ret = log_group_recover_from_archive_file(group); |
789 | 2084 | 2096 | ||
790 | 2085 | /* Close and truncate a possible processed archive file | 2097 | /* Close and truncate a possible processed archive file |
792 | 2086 | @@ -3916,9 +4049,9 @@ | 2098 | @@ -3925,9 +4058,9 @@ |
793 | 2087 | trunc_len); | 2099 | trunc_len); |
794 | 2088 | } | 2100 | } |
795 | 2089 | 2101 | ||
796 | @@ -2095,7 +2107,7 @@ | |||
797 | 2095 | if (recv_sys->recovered_lsn < limit_lsn) { | 2107 | if (recv_sys->recovered_lsn < limit_lsn) { |
798 | 2096 | 2108 | ||
799 | 2097 | if (!recv_sys->scanned_lsn) { | 2109 | if (!recv_sys->scanned_lsn) { |
801 | 2098 | @@ -3939,12 +4072,12 @@ | 2110 | @@ -3948,12 +4081,12 @@ |
802 | 2099 | 2111 | ||
803 | 2100 | mutex_enter(&(log_sys->mutex)); | 2112 | mutex_enter(&(log_sys->mutex)); |
804 | 2101 | } | 2113 | } |
805 | @@ -2155,7 +2167,7 @@ | |||
806 | 2155 | } | 2167 | } |
807 | 2156 | --- a/storage/innobase/os/os0file.cc | 2168 | --- a/storage/innobase/os/os0file.cc |
808 | 2157 | +++ b/storage/innobase/os/os0file.cc | 2169 | +++ b/storage/innobase/os/os0file.cc |
810 | 2158 | @@ -686,7 +686,7 @@ | 2170 | @@ -691,7 +691,7 @@ |
811 | 2159 | } | 2171 | } |
812 | 2160 | 2172 | ||
813 | 2161 | #undef USE_FILE_LOCK | 2173 | #undef USE_FILE_LOCK |
814 | @@ -2164,7 +2176,7 @@ | |||
815 | 2164 | #if defined(UNIV_HOTBACKUP) || defined(__WIN__) | 2176 | #if defined(UNIV_HOTBACKUP) || defined(__WIN__) |
816 | 2165 | /* InnoDB Hot Backup does not lock the data files. | 2177 | /* InnoDB Hot Backup does not lock the data files. |
817 | 2166 | * On Windows, mandatory locking is used. | 2178 | * On Windows, mandatory locking is used. |
819 | 2167 | @@ -1750,8 +1750,6 @@ | 2179 | @@ -1755,8 +1755,6 @@ |
820 | 2168 | 2180 | ||
821 | 2169 | } while (retry); | 2181 | } while (retry); |
822 | 2170 | 2182 | ||
823 | @@ -2173,7 +2185,7 @@ | |||
824 | 2173 | if (!srv_read_only_mode | 2185 | if (!srv_read_only_mode |
825 | 2174 | && *success | 2186 | && *success |
826 | 2175 | && type != OS_LOG_FILE | 2187 | && type != OS_LOG_FILE |
828 | 2176 | @@ -1759,6 +1757,11 @@ | 2188 | @@ -1764,6 +1762,11 @@ |
829 | 2177 | || srv_unix_file_flush_method == SRV_UNIX_O_DIRECT_NO_FSYNC)) { | 2189 | || srv_unix_file_flush_method == SRV_UNIX_O_DIRECT_NO_FSYNC)) { |
830 | 2178 | 2190 | ||
831 | 2179 | os_file_set_nocache(file, name, mode_str); | 2191 | os_file_set_nocache(file, name, mode_str); |
832 | @@ -2187,8 +2199,8 @@ | |||
833 | 2187 | #ifdef USE_FILE_LOCK | 2199 | #ifdef USE_FILE_LOCK |
834 | 2188 | --- a/storage/innobase/page/page0cur.cc | 2200 | --- a/storage/innobase/page/page0cur.cc |
835 | 2189 | +++ b/storage/innobase/page/page0cur.cc | 2201 | +++ b/storage/innobase/page/page0cur.cc |
838 | 2190 | @@ -1207,7 +1207,9 @@ | 2202 | @@ -1209,7 +1209,9 @@ |
839 | 2191 | == index->id || mtr->inside_ibuf || recv_recovery_is_on()); | 2203 | || (mtr ? mtr->inside_ibuf : dict_index_is_ibuf(index))); |
840 | 2192 | 2204 | ||
841 | 2193 | ut_ad(!page_cur_is_after_last(cursor)); | 2205 | ut_ad(!page_cur_is_after_last(cursor)); |
842 | 2194 | -#ifdef UNIV_ZIP_DEBUG | 2206 | -#ifdef UNIV_ZIP_DEBUG |
843 | @@ -2254,7 +2266,7 @@ | |||
844 | 2254 | 2266 | ||
845 | 2255 | /** io_handler_thread parameters for thread identification */ | 2267 | /** io_handler_thread parameters for thread identification */ |
846 | 2256 | static ulint n[SRV_MAX_N_IO_THREADS + 6]; | 2268 | static ulint n[SRV_MAX_N_IO_THREADS + 6]; |
848 | 2257 | @@ -658,6 +659,12 @@ | 2269 | @@ -663,6 +664,12 @@ |
849 | 2258 | } | 2270 | } |
850 | 2259 | } | 2271 | } |
851 | 2260 | 2272 | ||
852 | @@ -2267,7 +2279,7 @@ | |||
853 | 2267 | log_group_init(0, srv_n_log_files, | 2279 | log_group_init(0, srv_n_log_files, |
854 | 2268 | srv_log_file_size * UNIV_PAGE_SIZE, | 2280 | srv_log_file_size * UNIV_PAGE_SIZE, |
855 | 2269 | SRV_LOG_SPACE_FIRST_ID, | 2281 | SRV_LOG_SPACE_FIRST_ID, |
857 | 2270 | @@ -668,7 +675,12 @@ | 2282 | @@ -673,7 +680,12 @@ |
858 | 2271 | /* Create a log checkpoint. */ | 2283 | /* Create a log checkpoint. */ |
859 | 2272 | mutex_enter(&log_sys->mutex); | 2284 | mutex_enter(&log_sys->mutex); |
860 | 2273 | ut_d(recv_no_log_write = FALSE); | 2285 | ut_d(recv_no_log_write = FALSE); |
861 | @@ -2281,7 +2293,7 @@ | |||
862 | 2281 | mutex_exit(&log_sys->mutex); | 2293 | mutex_exit(&log_sys->mutex); |
863 | 2282 | 2294 | ||
864 | 2283 | return(DB_SUCCESS); | 2295 | return(DB_SUCCESS); |
866 | 2284 | @@ -749,18 +761,12 @@ | 2296 | @@ -754,18 +766,12 @@ |
867 | 2285 | /*********************************************************************//** | 2297 | /*********************************************************************//** |
868 | 2286 | Creates or opens database data files and closes them. | 2298 | Creates or opens database data files and closes them. |
869 | 2287 | @return DB_SUCCESS or error code */ | 2299 | @return DB_SUCCESS or error code */ |
870 | @@ -2301,8 +2313,20 @@ | |||
871 | 2301 | lsn_t* min_flushed_lsn,/*!< out: min of flushed lsn | 2313 | lsn_t* min_flushed_lsn,/*!< out: min of flushed lsn |
872 | 2302 | values in data files */ | 2314 | values in data files */ |
873 | 2303 | lsn_t* max_flushed_lsn,/*!< out: max of flushed lsn | 2315 | lsn_t* max_flushed_lsn,/*!< out: max of flushed lsn |
876 | 2304 | @@ -982,9 +988,6 @@ | 2316 | @@ -989,17 +995,16 @@ |
877 | 2305 | skip_size_check: | 2317 | /* This is the earliest location where we can load |
878 | 2318 | the double write buffer. */ | ||
879 | 2319 | if (i == 0) { | ||
880 | 2320 | - buf_dblwr_init_or_load_pages( | ||
881 | 2321 | - files[i], srv_data_file_names[i], true); | ||
882 | 2322 | + /* XtraBackup never loads corrupted pages from | ||
883 | 2323 | + the doublewrite buffer */ | ||
884 | 2324 | + buf_dblwr_init_or_load_pages( | ||
885 | 2325 | + files[i], srv_data_file_names[i], false); | ||
886 | 2326 | } | ||
887 | 2327 | |||
888 | 2328 | bool retry = true; | ||
889 | 2329 | check_first_page: | ||
890 | 2306 | check_msg = fil_read_first_page( | 2330 | check_msg = fil_read_first_page( |
891 | 2307 | files[i], one_opened, &flags, &space, | 2331 | files[i], one_opened, &flags, &space, |
892 | 2308 | -#ifdef UNIV_LOG_ARCHIVE | 2332 | -#ifdef UNIV_LOG_ARCHIVE |
893 | @@ -2311,7 +2335,7 @@ | |||
894 | 2311 | min_flushed_lsn, max_flushed_lsn); | 2335 | min_flushed_lsn, max_flushed_lsn); |
895 | 2312 | 2336 | ||
896 | 2313 | if (check_msg) { | 2337 | if (check_msg) { |
898 | 2314 | @@ -1236,12 +1239,16 @@ | 2338 | @@ -1267,12 +1272,16 @@ |
899 | 2315 | /******************************************************************** | 2339 | /******************************************************************** |
900 | 2316 | Opens the configured number of undo tablespaces. | 2340 | Opens the configured number of undo tablespaces. |
901 | 2317 | @return DB_SUCCESS or error code */ | 2341 | @return DB_SUCCESS or error code */ |
902 | @@ -2329,7 +2353,7 @@ | |||
903 | 2329 | const ulint n_conf_tablespaces, /*!< in: configured undo | 2353 | const ulint n_conf_tablespaces, /*!< in: configured undo |
904 | 2330 | tablespaces */ | 2354 | tablespaces */ |
905 | 2331 | ulint* n_opened) /*!< out: number of UNDO | 2355 | ulint* n_opened) /*!< out: number of UNDO |
907 | 2332 | @@ -1257,6 +1264,7 @@ | 2356 | @@ -1288,6 +1297,7 @@ |
908 | 2333 | *n_opened = 0; | 2357 | *n_opened = 0; |
909 | 2334 | 2358 | ||
910 | 2335 | ut_a(n_conf_tablespaces <= TRX_SYS_N_RSEGS); | 2359 | ut_a(n_conf_tablespaces <= TRX_SYS_N_RSEGS); |
911 | @@ -2337,7 +2361,7 @@ | |||
912 | 2337 | 2361 | ||
913 | 2338 | memset(undo_tablespace_ids, 0x0, sizeof(undo_tablespace_ids)); | 2362 | memset(undo_tablespace_ids, 0x0, sizeof(undo_tablespace_ids)); |
914 | 2339 | 2363 | ||
916 | 2340 | @@ -1290,12 +1298,13 @@ | 2364 | @@ -1321,12 +1331,13 @@ |
917 | 2341 | } | 2365 | } |
918 | 2342 | } | 2366 | } |
919 | 2343 | 2367 | ||
920 | @@ -2355,7 +2379,7 @@ | |||
921 | 2355 | n_undo_tablespaces = trx_rseg_get_n_undo_tablespaces( | 2379 | n_undo_tablespaces = trx_rseg_get_n_undo_tablespaces( |
922 | 2356 | undo_tablespace_ids); | 2380 | undo_tablespace_ids); |
923 | 2357 | } else { | 2381 | } else { |
925 | 2358 | @@ -1401,7 +1410,7 @@ | 2382 | @@ -1432,7 +1443,7 @@ |
926 | 2359 | ib_logf(IB_LOG_LEVEL_INFO, "Opened %lu undo tablespaces", | 2383 | ib_logf(IB_LOG_LEVEL_INFO, "Opened %lu undo tablespaces", |
927 | 2360 | n_undo_tablespaces); | 2384 | n_undo_tablespaces); |
928 | 2361 | 2385 | ||
929 | @@ -2364,7 +2388,7 @@ | |||
930 | 2364 | ib_logf(IB_LOG_LEVEL_WARN, | 2388 | ib_logf(IB_LOG_LEVEL_WARN, |
931 | 2365 | "Using the system tablespace for all UNDO " | 2389 | "Using the system tablespace for all UNDO " |
932 | 2366 | "logging because innodb_undo_tablespaces=0"); | 2390 | "logging because innodb_undo_tablespaces=0"); |
934 | 2367 | @@ -1475,8 +1484,8 @@ | 2391 | @@ -1506,8 +1517,8 @@ |
935 | 2368 | lsn_t min_flushed_lsn; | 2392 | lsn_t min_flushed_lsn; |
936 | 2369 | lsn_t max_flushed_lsn; | 2393 | lsn_t max_flushed_lsn; |
937 | 2370 | #ifdef UNIV_LOG_ARCHIVE | 2394 | #ifdef UNIV_LOG_ARCHIVE |
938 | @@ -2375,7 +2399,7 @@ | |||
939 | 2375 | #endif /* UNIV_LOG_ARCHIVE */ | 2399 | #endif /* UNIV_LOG_ARCHIVE */ |
940 | 2376 | ulint sum_of_new_sizes; | 2400 | ulint sum_of_new_sizes; |
941 | 2377 | ulint sum_of_data_file_sizes; | 2401 | ulint sum_of_data_file_sizes; |
943 | 2378 | @@ -1699,6 +1708,9 @@ | 2402 | @@ -1740,6 +1751,9 @@ |
944 | 2379 | } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT")) { | 2403 | } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT")) { |
945 | 2380 | srv_unix_file_flush_method = SRV_UNIX_O_DIRECT; | 2404 | srv_unix_file_flush_method = SRV_UNIX_O_DIRECT; |
946 | 2381 | 2405 | ||
947 | @@ -2385,7 +2409,7 @@ | |||
948 | 2385 | } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT_NO_FSYNC")) { | 2409 | } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT_NO_FSYNC")) { |
949 | 2386 | srv_unix_file_flush_method = SRV_UNIX_O_DIRECT_NO_FSYNC; | 2410 | srv_unix_file_flush_method = SRV_UNIX_O_DIRECT_NO_FSYNC; |
950 | 2387 | 2411 | ||
952 | 2388 | @@ -1931,17 +1943,6 @@ | 2412 | @@ -1972,17 +1986,6 @@ |
953 | 2389 | os_thread_create(io_handler_thread, n + i, thread_ids + i); | 2413 | os_thread_create(io_handler_thread, n + i, thread_ids + i); |
954 | 2390 | } | 2414 | } |
955 | 2391 | 2415 | ||
956 | @@ -2403,8 +2427,8 @@ | |||
957 | 2403 | if (srv_n_log_files * srv_log_file_size * UNIV_PAGE_SIZE | 2427 | if (srv_n_log_files * srv_log_file_size * UNIV_PAGE_SIZE |
958 | 2404 | >= 512ULL * 1024ULL * 1024ULL * 1024ULL) { | 2428 | >= 512ULL * 1024ULL * 1024ULL * 1024ULL) { |
959 | 2405 | /* log_block_convert_lsn_to_no() limits the returned block | 2429 | /* log_block_convert_lsn_to_no() limits the returned block |
962 | 2406 | @@ -2000,9 +2001,6 @@ | 2430 | @@ -2044,9 +2047,6 @@ |
963 | 2407 | } | 2431 | recv_sys_init(buf_pool_get_curr_size()); |
964 | 2408 | 2432 | ||
965 | 2409 | err = open_or_create_data_files(&create_new_db, | 2433 | err = open_or_create_data_files(&create_new_db, |
966 | 2410 | -#ifdef UNIV_LOG_ARCHIVE | 2434 | -#ifdef UNIV_LOG_ARCHIVE |
967 | @@ -2413,7 +2437,7 @@ | |||
968 | 2413 | &min_flushed_lsn, &max_flushed_lsn, | 2437 | &min_flushed_lsn, &max_flushed_lsn, |
969 | 2414 | &sum_of_new_sizes); | 2438 | &sum_of_new_sizes); |
970 | 2415 | if (err == DB_FAIL) { | 2439 | if (err == DB_FAIL) { |
972 | 2416 | @@ -2030,7 +2028,6 @@ | 2440 | @@ -2074,7 +2074,6 @@ |
973 | 2417 | 2441 | ||
974 | 2418 | #ifdef UNIV_LOG_ARCHIVE | 2442 | #ifdef UNIV_LOG_ARCHIVE |
975 | 2419 | srv_normalize_path_for_win(srv_arch_dir); | 2443 | srv_normalize_path_for_win(srv_arch_dir); |
976 | @@ -2421,7 +2445,7 @@ | |||
977 | 2421 | #endif /* UNIV_LOG_ARCHIVE */ | 2445 | #endif /* UNIV_LOG_ARCHIVE */ |
978 | 2422 | 2446 | ||
979 | 2423 | dirnamelen = strlen(srv_log_group_home_dir); | 2447 | dirnamelen = strlen(srv_log_group_home_dir); |
981 | 2424 | @@ -2110,15 +2107,23 @@ | 2448 | @@ -2154,15 +2153,23 @@ |
982 | 2425 | max_flushed_lsn, logfile0); | 2449 | max_flushed_lsn, logfile0); |
983 | 2426 | 2450 | ||
984 | 2427 | /* Suppress the message about | 2451 | /* Suppress the message about |
985 | @@ -2448,7 +2472,7 @@ | |||
986 | 2448 | } | 2472 | } |
987 | 2449 | 2473 | ||
988 | 2450 | /* opened all files */ | 2474 | /* opened all files */ |
990 | 2451 | @@ -2211,6 +2216,7 @@ | 2475 | @@ -2255,6 +2262,7 @@ |
991 | 2452 | 2476 | ||
992 | 2453 | err = srv_undo_tablespaces_init( | 2477 | err = srv_undo_tablespaces_init( |
993 | 2454 | create_new_db, | 2478 | create_new_db, |
994 | @@ -2456,7 +2480,7 @@ | |||
995 | 2456 | srv_undo_tablespaces, | 2480 | srv_undo_tablespaces, |
996 | 2457 | &srv_undo_tablespaces_open); | 2481 | &srv_undo_tablespaces_open); |
997 | 2458 | 2482 | ||
999 | 2459 | @@ -2284,10 +2290,13 @@ | 2483 | @@ -2328,10 +2336,13 @@ |
1000 | 2460 | 2484 | ||
1001 | 2461 | ib_logf(IB_LOG_LEVEL_INFO, | 2485 | ib_logf(IB_LOG_LEVEL_INFO, |
1002 | 2462 | " Starting archive recovery from a backup..."); | 2486 | " Starting archive recovery from a backup..."); |
1003 | @@ -2472,7 +2496,7 @@ | |||
1004 | 2472 | if (err != DB_SUCCESS) { | 2496 | if (err != DB_SUCCESS) { |
1005 | 2473 | 2497 | ||
1006 | 2474 | return(DB_ERROR); | 2498 | return(DB_ERROR); |
1008 | 2475 | @@ -2312,6 +2321,11 @@ | 2499 | @@ -2356,6 +2367,11 @@ |
1009 | 2476 | srv_startup_is_before_trx_rollback_phase = FALSE; | 2500 | srv_startup_is_before_trx_rollback_phase = FALSE; |
1010 | 2477 | 2501 | ||
1011 | 2478 | recv_recovery_from_archive_finish(); | 2502 | recv_recovery_from_archive_finish(); |
1012 | @@ -2484,7 +2508,7 @@ | |||
1013 | 2484 | #endif /* UNIV_LOG_ARCHIVE */ | 2508 | #endif /* UNIV_LOG_ARCHIVE */ |
1014 | 2485 | } else { | 2509 | } else { |
1015 | 2486 | 2510 | ||
1017 | 2487 | @@ -2378,6 +2392,10 @@ | 2511 | @@ -2422,6 +2438,10 @@ |
1018 | 2488 | 2512 | ||
1019 | 2489 | recv_recovery_from_checkpoint_finish(); | 2513 | recv_recovery_from_checkpoint_finish(); |
1020 | 2490 | 2514 | ||
1021 | @@ -2495,7 +2519,7 @@ | |||
1022 | 2495 | if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) { | 2519 | if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) { |
1023 | 2496 | /* The following call is necessary for the insert | 2520 | /* The following call is necessary for the insert |
1024 | 2497 | buffer to work with multiple tablespaces. We must | 2521 | buffer to work with multiple tablespaces. We must |
1026 | 2498 | @@ -2500,7 +2518,9 @@ | 2522 | @@ -2544,7 +2564,9 @@ |
1027 | 2499 | value. Important to note that we can do it ONLY after | 2523 | value. Important to note that we can do it ONLY after |
1028 | 2500 | we have finished the recovery process so that the | 2524 | we have finished the recovery process so that the |
1029 | 2501 | image of TRX_SYS_PAGE_NO is not stale. */ | 2525 | image of TRX_SYS_PAGE_NO is not stale. */ |
1030 | @@ -2506,7 +2530,7 @@ | |||
1031 | 2506 | } | 2530 | } |
1032 | 2507 | 2531 | ||
1033 | 2508 | if (!create_new_db && sum_of_new_sizes > 0) { | 2532 | if (!create_new_db && sum_of_new_sizes > 0) { |
1035 | 2509 | @@ -2523,6 +2543,8 @@ | 2533 | @@ -2567,6 +2589,8 @@ |
1036 | 2510 | if (!srv_log_archive_on) { | 2534 | if (!srv_log_archive_on) { |
1037 | 2511 | ut_a(DB_SUCCESS == log_archive_noarchivelog()); | 2535 | ut_a(DB_SUCCESS == log_archive_noarchivelog()); |
1038 | 2512 | } else { | 2536 | } else { |
1039 | @@ -2515,7 +2539,7 @@ | |||
1040 | 2515 | mutex_enter(&(log_sys->mutex)); | 2539 | mutex_enter(&(log_sys->mutex)); |
1041 | 2516 | 2540 | ||
1042 | 2517 | start_archive = FALSE; | 2541 | start_archive = FALSE; |
1044 | 2518 | @@ -2714,6 +2736,7 @@ | 2542 | @@ -2758,6 +2782,7 @@ |
1045 | 2519 | && srv_auto_extend_last_data_file | 2543 | && srv_auto_extend_last_data_file |
1046 | 2520 | && sum_of_data_file_sizes < tablespace_size_in_header) { | 2544 | && sum_of_data_file_sizes < tablespace_size_in_header) { |
1047 | 2521 | 2545 | ||
1048 | @@ -2523,7 +2547,7 @@ | |||
1049 | 2523 | ut_print_timestamp(stderr); | 2547 | ut_print_timestamp(stderr); |
1050 | 2524 | fprintf(stderr, | 2548 | fprintf(stderr, |
1051 | 2525 | " InnoDB: Error: tablespace size stored in header" | 2549 | " InnoDB: Error: tablespace size stored in header" |
1053 | 2526 | @@ -2750,6 +2773,7 @@ | 2550 | @@ -2794,6 +2819,7 @@ |
1054 | 2527 | 2551 | ||
1055 | 2528 | return(DB_ERROR); | 2552 | return(DB_ERROR); |
1056 | 2529 | } | 2553 | } |
1057 | @@ -2531,7 +2555,7 @@ | |||
1058 | 2531 | } | 2555 | } |
1059 | 2532 | 2556 | ||
1060 | 2533 | /* Check that os_fast_mutexes work as expected */ | 2557 | /* Check that os_fast_mutexes work as expected */ |
1062 | 2534 | @@ -2774,6 +2798,10 @@ | 2558 | @@ -2818,6 +2844,10 @@ |
1063 | 2535 | 2559 | ||
1064 | 2536 | os_fast_mutex_free(&srv_os_test_mutex); | 2560 | os_fast_mutex_free(&srv_os_test_mutex); |
1065 | 2537 | 2561 | ||
1066 | @@ -2542,7 +2566,7 @@ | |||
1067 | 2542 | if (srv_print_verbose_log) { | 2566 | if (srv_print_verbose_log) { |
1068 | 2543 | ib_logf(IB_LOG_LEVEL_INFO, | 2567 | ib_logf(IB_LOG_LEVEL_INFO, |
1069 | 2544 | "%s started; log sequence number " LSN_PF "", | 2568 | "%s started; log sequence number " LSN_PF "", |
1071 | 2545 | @@ -2806,6 +2834,7 @@ | 2569 | @@ -2850,6 +2880,7 @@ |
1072 | 2546 | fts_optimize_init(); | 2570 | fts_optimize_init(); |
1073 | 2547 | } | 2571 | } |
1074 | 2548 | 2572 | ||
1075 | @@ -2550,7 +2574,7 @@ | |||
1076 | 2550 | srv_was_started = TRUE; | 2574 | srv_was_started = TRUE; |
1077 | 2551 | 2575 | ||
1078 | 2552 | return(DB_SUCCESS); | 2576 | return(DB_SUCCESS); |
1080 | 2553 | @@ -2861,7 +2890,7 @@ | 2577 | @@ -2905,7 +2936,7 @@ |
1081 | 2554 | return(DB_SUCCESS); | 2578 | return(DB_SUCCESS); |
1082 | 2555 | } | 2579 | } |
1083 | 2556 | 2580 | ||
1084 | @@ -2661,7 +2685,7 @@ | |||
1085 | 2661 | } else { | 2685 | } else { |
1086 | 2662 | fprintf(stderr, | 2686 | fprintf(stderr, |
1087 | 2663 | "InnoDB: Since innodb_force_recovery" | 2687 | "InnoDB: Since innodb_force_recovery" |
1089 | 2664 | @@ -592,14 +592,13 @@ | 2688 | @@ -599,14 +599,13 @@ |
1090 | 2665 | " was in the XA prepared state.\n", trx->id); | 2689 | " was in the XA prepared state.\n", trx->id); |
1091 | 2666 | 2690 | ||
1092 | 2667 | if (srv_force_recovery == 0) { | 2691 | if (srv_force_recovery == 0) { |
1093 | @@ -2680,7 +2704,7 @@ | |||
1094 | 2680 | } else { | 2704 | } else { |
1095 | 2681 | fprintf(stderr, | 2705 | fprintf(stderr, |
1096 | 2682 | "InnoDB: Since innodb_force_recovery" | 2706 | "InnoDB: Since innodb_force_recovery" |
1098 | 2683 | @@ -2206,7 +2208,8 @@ | 2707 | @@ -2221,7 +2220,8 @@ |
1099 | 2684 | scenario where some undo generated by a transaction, | 2708 | scenario where some undo generated by a transaction, |
1100 | 2685 | has XA stuff, and other undo, generated by the same | 2709 | has XA stuff, and other undo, generated by the same |
1101 | 2686 | transaction, doesn't. */ | 2710 | transaction, doesn't. */ |
1102 | @@ -2708,3 +2732,43 @@ | |||
1103 | 2708 | /*********************************************************************//** | 2732 | /*********************************************************************//** |
1104 | 2709 | Wrapper around MySQL's copy_and_convert function. | 2733 | Wrapper around MySQL's copy_and_convert function. |
1105 | 2710 | @return number of bytes copied to 'to' */ | 2734 | @return number of bytes copied to 'to' */ |
1106 | 2735 | --- a/sql/sql_yacc.yy | ||
1107 | 2736 | +++ b/sql/sql_yacc.yy | ||
1108 | 2737 | @@ -26,8 +26,6 @@ | ||
1109 | 2738 | ** The type will be void*, so it must be cast to (THD*) when used. | ||
1110 | 2739 | ** Use the YYTHD macro for this. | ||
1111 | 2740 | */ | ||
1112 | 2741 | -#define YYPARSE_PARAM yythd | ||
1113 | 2742 | -#define YYLEX_PARAM yythd | ||
1114 | 2743 | #define YYTHD ((THD *)yythd) | ||
1115 | 2744 | #define YYLIP (& YYTHD->m_parser_state->m_lip) | ||
1116 | 2745 | #define YYPS (& YYTHD->m_parser_state->m_yacc) | ||
1117 | 2746 | @@ -85,7 +83,7 @@ | ||
1118 | 2747 | ulong val= *(F); \ | ||
1119 | 2748 | if (my_yyoverflow((B), (D), &val)) \ | ||
1120 | 2749 | { \ | ||
1121 | 2750 | - yyerror((char*) (A)); \ | ||
1122 | 2751 | + yyerror(yythd, (char*) (A)); \ | ||
1123 | 2752 | return 2; \ | ||
1124 | 2753 | } \ | ||
1125 | 2754 | else \ | ||
1126 | 2755 | @@ -183,7 +181,7 @@ | ||
1127 | 2756 | to abort from the parser. | ||
1128 | 2757 | */ | ||
1129 | 2758 | |||
1130 | 2759 | -void MYSQLerror(const char *s) | ||
1131 | 2760 | +void MYSQLerror(void *yythd, const char *s) | ||
1132 | 2761 | { | ||
1133 | 2762 | THD *thd= current_thd; | ||
1134 | 2763 | |||
1135 | 2764 | @@ -1031,7 +1029,9 @@ | ||
1136 | 2765 | bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); | ||
1137 | 2766 | %} | ||
1138 | 2767 | |||
1139 | 2768 | -%pure_parser /* We have threads */ | ||
1140 | 2769 | +%pure-parser /* We have threads */ | ||
1141 | 2770 | +%parse-param { void *yythd } | ||
1142 | 2771 | +%lex-param { void *yythd } | ||
1143 | 2772 | /* | ||
1144 | 2773 | Currently there are 161 shift/reduce conflicts. | ||
1145 | 2774 | We should not introduce new conflicts any more. | ||
1146 | 2711 | 2775 | ||
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 | 4 | 4 | ||
1152 | 5 | MYSQL_51_VERSION=5.1.73 | 5 | MYSQL_51_VERSION=5.1.73 |
1153 | 6 | MYSQL_55_VERSION=5.5.35 | 6 | MYSQL_55_VERSION=5.5.35 |
1155 | 7 | MYSQL_56_VERSION=5.6.15 | 7 | MYSQL_56_VERSION=5.6.17 |
1156 | 8 | PS_51_VERSION=5.1.73-14.11 | 8 | PS_51_VERSION=5.1.73-14.11 |
1157 | 9 | PS_55_VERSION=5.5.35-33.0 | 9 | PS_55_VERSION=5.5.35-33.0 |
1158 | 10 | 10 | ||
1159 | @@ -326,7 +326,7 @@ | |||
1160 | 326 | server_patch=innodb56.patch | 326 | server_patch=innodb56.patch |
1161 | 327 | innodb_name=innobase | 327 | innodb_name=innobase |
1162 | 328 | xtrabackup_target=5.6 | 328 | xtrabackup_target=5.6 |
1164 | 329 | server_tarball=mysql-5.6.15.tar.gz | 329 | server_tarball=mysql-5.6.17.tar.gz |
1165 | 330 | configure_cmd="cmake . \ | 330 | configure_cmd="cmake . \ |
1166 | 331 | -DWITH_INNOBASE_STORAGE_ENGINE=ON \ | 331 | -DWITH_INNOBASE_STORAGE_ENGINE=ON \ |
1167 | 332 | -DWITH_ZLIB=bundled \ | 332 | -DWITH_ZLIB=bundled \ |
Approve