Merge lp:~akopytov/percona-xtrabackup/update-versions-1.6 into lp:percona-xtrabackup/1.6
- update-versions-1.6
- Merge into release-1.6
Proposed by
Alexey Kopytov
Status: | Merged |
---|---|
Approved by: | Stewart Smith |
Approved revision: | no longer in the source branch. |
Merged at revision: | 307 |
Proposed branch: | lp:~akopytov/percona-xtrabackup/update-versions-1.6 |
Merge into: | lp:percona-xtrabackup/1.6 |
Diff against target: |
2220 lines (+448/-270) 6 files modified
patches/innodb51_builtin.patch (+9/-7) patches/innodb55.patch (+67/-63) patches/xtradb51.patch (+141/-90) patches/xtradb55.patch (+149/-98) utils/build.sh (+12/-6) xtrabackup.c (+70/-6) |
To merge this branch: | bzr merge lp:~akopytov/percona-xtrabackup/update-versions-1.6 |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stewart Smith (community) | Approve | ||
Review via email: mp+83102@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote : | # |
Revision history for this message
Stewart Smith (stewart) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'patches/innodb51_builtin.patch' | |||
2 | --- patches/innodb51_builtin.patch 2011-09-14 12:48:27 +0000 | |||
3 | +++ patches/innodb51_builtin.patch 2011-11-27 06:47:26 +0000 | |||
4 | @@ -727,15 +727,15 @@ | |||
5 | 727 | /* Recovery is running and no operations on the log files are | 727 | /* Recovery is running and no operations on the log files are |
6 | 728 | allowed yet (the variable name .._no_ibuf_.. is misleading) */ | 728 | allowed yet (the variable name .._no_ibuf_.. is misleading) */ |
7 | 729 | 729 | ||
11 | 730 | @@ -3056,6 +3058,7 @@ | 730 | @@ -3057,6 +3059,7 @@ |
12 | 731 | for the 'very fast' shutdown, because the InnoDB layer may have | 731 | shutdown, because the InnoDB layer may have committed or |
13 | 732 | committed or prepared transactions and we don't want to lose them. */ | 732 | prepared transactions and we don't want to lose them. */ |
14 | 733 | 733 | ||
15 | 734 | + if (!srv_apply_log_only) { | 734 | + if (!srv_apply_log_only) { |
16 | 735 | if (trx_n_mysql_transactions > 0 | 735 | if (trx_n_mysql_transactions > 0 |
18 | 736 | || UT_LIST_GET_LEN(trx_sys->trx_list) > 0) { | 736 | || UT_LIST_GET_LEN(trx_sys->trx_list) > trx_n_prepared) { |
19 | 737 | 737 | ||
21 | 738 | @@ -3063,6 +3066,7 @@ | 738 | @@ -3064,6 +3067,7 @@ |
22 | 739 | 739 | ||
23 | 740 | goto loop; | 740 | goto loop; |
24 | 741 | } | 741 | } |
25 | @@ -1262,18 +1262,19 @@ | |||
26 | 1262 | if (purge_sys->trx->n_active_thrs > 0) { | 1262 | if (purge_sys->trx->n_active_thrs > 0) { |
27 | 1263 | --- a/storage/innobase/trx/trx0trx.c | 1263 | --- a/storage/innobase/trx/trx0trx.c |
28 | 1264 | +++ b/storage/innobase/trx/trx0trx.c | 1264 | +++ b/storage/innobase/trx/trx0trx.c |
30 | 1265 | @@ -478,8 +478,8 @@ | 1265 | @@ -481,9 +481,8 @@ |
31 | 1266 | ut_dulint_get_low(trx->id)); | 1266 | ut_dulint_get_low(trx->id)); |
32 | 1267 | 1267 | ||
33 | 1268 | if (srv_force_recovery == 0) { | 1268 | if (srv_force_recovery == 0) { |
34 | 1269 | - | 1269 | - |
35 | 1270 | - trx->conc_state = TRX_PREPARED; | 1270 | - trx->conc_state = TRX_PREPARED; |
36 | 1271 | - trx_n_prepared++; | ||
37 | 1271 | + /* xtrabackup should rollback it */ | 1272 | + /* xtrabackup should rollback it */ |
38 | 1272 | + trx->conc_state = TRX_ACTIVE; | 1273 | + trx->conc_state = TRX_ACTIVE; |
39 | 1273 | } else { | 1274 | } else { |
40 | 1274 | fprintf(stderr, | 1275 | fprintf(stderr, |
41 | 1275 | "InnoDB: Since" | 1276 | "InnoDB: Since" |
43 | 1276 | @@ -555,9 +555,9 @@ | 1277 | @@ -559,10 +558,9 @@ |
44 | 1277 | trx->id)); | 1278 | trx->id)); |
45 | 1278 | 1279 | ||
46 | 1279 | if (srv_force_recovery == 0) { | 1280 | if (srv_force_recovery == 0) { |
47 | @@ -1281,6 +1282,7 @@ | |||
48 | 1281 | + /* xtrabackup should rollback it */ | 1282 | + /* xtrabackup should rollback it */ |
49 | 1282 | trx->conc_state | 1283 | trx->conc_state |
50 | 1283 | - = TRX_PREPARED; | 1284 | - = TRX_PREPARED; |
51 | 1285 | - trx_n_prepared++; | ||
52 | 1284 | + = TRX_ACTIVE; | 1286 | + = TRX_ACTIVE; |
53 | 1285 | } else { | 1287 | } else { |
54 | 1286 | fprintf(stderr, | 1288 | fprintf(stderr, |
55 | 1287 | 1289 | ||
56 | === modified file 'patches/innodb55.patch' | |||
57 | --- patches/innodb55.patch 2011-09-14 12:48:27 +0000 | |||
58 | +++ patches/innodb55.patch 2011-11-27 06:47:26 +0000 | |||
59 | @@ -1,6 +1,6 @@ | |||
60 | 1 | --- a/storage/innobase/btr/btr0btr.c | 1 | --- a/storage/innobase/btr/btr0btr.c |
61 | 2 | +++ b/storage/innobase/btr/btr0btr.c | 2 | +++ b/storage/innobase/btr/btr0btr.c |
63 | 3 | @@ -120,7 +120,7 @@ | 3 | @@ -674,7 +674,7 @@ |
64 | 4 | /**************************************************************//** | 4 | /**************************************************************//** |
65 | 5 | Gets the root node of a tree and x-latches it. | 5 | Gets the root node of a tree and x-latches it. |
66 | 6 | @return root page, x-latched */ | 6 | @return root page, x-latched */ |
67 | @@ -9,7 +9,7 @@ | |||
68 | 9 | buf_block_t* | 9 | buf_block_t* |
69 | 10 | btr_root_block_get( | 10 | btr_root_block_get( |
70 | 11 | /*===============*/ | 11 | /*===============*/ |
72 | 12 | @@ -566,7 +566,7 @@ | 12 | @@ -1123,7 +1123,7 @@ |
73 | 13 | /************************************************************//** | 13 | /************************************************************//** |
74 | 14 | Returns the child page of a node pointer and x-latches it. | 14 | Returns the child page of a node pointer and x-latches it. |
75 | 15 | @return child page, x-latched */ | 15 | @return child page, x-latched */ |
76 | @@ -20,7 +20,7 @@ | |||
77 | 20 | /*===================*/ | 20 | /*===================*/ |
78 | 21 | --- a/storage/innobase/buf/buf0buf.c | 21 | --- a/storage/innobase/buf/buf0buf.c |
79 | 22 | +++ b/storage/innobase/buf/buf0buf.c | 22 | +++ b/storage/innobase/buf/buf0buf.c |
81 | 23 | @@ -517,7 +517,7 @@ | 23 | @@ -518,7 +518,7 @@ |
82 | 24 | return(TRUE); | 24 | return(TRUE); |
83 | 25 | } | 25 | } |
84 | 26 | 26 | ||
85 | @@ -29,7 +29,7 @@ | |||
86 | 29 | if (recv_lsn_checks_on) { | 29 | if (recv_lsn_checks_on) { |
87 | 30 | ib_uint64_t current_lsn; | 30 | ib_uint64_t current_lsn; |
88 | 31 | 31 | ||
90 | 32 | @@ -4056,7 +4056,7 @@ | 32 | @@ -3668,7 +3668,7 @@ |
91 | 33 | recv_recover_page(TRUE, (buf_block_t*) bpage); | 33 | recv_recover_page(TRUE, (buf_block_t*) bpage); |
92 | 34 | } | 34 | } |
93 | 35 | 35 | ||
94 | @@ -40,7 +40,7 @@ | |||
95 | 40 | bpage->offset, buf_page_get_zip_size(bpage), | 40 | bpage->offset, buf_page_get_zip_size(bpage), |
96 | 41 | --- a/storage/innobase/buf/buf0rea.c | 41 | --- a/storage/innobase/buf/buf0rea.c |
97 | 42 | +++ b/storage/innobase/buf/buf0rea.c | 42 | +++ b/storage/innobase/buf/buf0rea.c |
99 | 43 | @@ -122,6 +122,45 @@ | 43 | @@ -124,6 +124,45 @@ |
100 | 44 | bpage = buf_page_init_for_read(err, mode, space, zip_size, unzip, | 44 | bpage = buf_page_init_for_read(err, mode, space, zip_size, unzip, |
101 | 45 | tablespace_version, offset); | 45 | tablespace_version, offset); |
102 | 46 | if (bpage == NULL) { | 46 | if (bpage == NULL) { |
103 | @@ -86,7 +86,7 @@ | |||
104 | 86 | 86 | ||
105 | 87 | return(0); | 87 | return(0); |
106 | 88 | } | 88 | } |
108 | 89 | @@ -604,6 +643,50 @@ | 89 | @@ -768,6 +807,50 @@ |
109 | 90 | /* It is a single table tablespace and the .ibd file is | 90 | /* It is a single table tablespace and the .ibd file is |
110 | 91 | missing: do nothing */ | 91 | missing: do nothing */ |
111 | 92 | 92 | ||
112 | @@ -233,7 +233,7 @@ | |||
113 | 233 | } | 233 | } |
114 | 234 | 234 | ||
115 | 235 | /**********************************************************************//** | 235 | /**********************************************************************//** |
117 | 236 | @@ -1463,7 +1480,12 @@ | 236 | @@ -1464,7 +1481,12 @@ |
118 | 237 | the file yet; the following calls will open it and update the | 237 | the file yet; the following calls will open it and update the |
119 | 238 | size fields */ | 238 | size fields */ |
120 | 239 | 239 | ||
121 | @@ -247,7 +247,7 @@ | |||
122 | 247 | fil_node_complete_io(node, fil_system, OS_FILE_READ); | 247 | fil_node_complete_io(node, fil_system, OS_FILE_READ); |
123 | 248 | } | 248 | } |
124 | 249 | 249 | ||
126 | 250 | @@ -1515,7 +1537,12 @@ | 250 | @@ -1516,7 +1538,12 @@ |
127 | 251 | the file yet; the following calls will open it and update the | 251 | the file yet; the following calls will open it and update the |
128 | 252 | size fields */ | 252 | size fields */ |
129 | 253 | 253 | ||
130 | @@ -261,7 +261,7 @@ | |||
131 | 261 | fil_node_complete_io(node, fil_system, OS_FILE_READ); | 261 | fil_node_complete_io(node, fil_system, OS_FILE_READ); |
132 | 262 | } | 262 | } |
133 | 263 | 263 | ||
135 | 264 | @@ -2180,7 +2207,7 @@ | 264 | @@ -2181,7 +2208,7 @@ |
136 | 265 | if (fil_create_new_single_table_tablespace( | 265 | if (fil_create_new_single_table_tablespace( |
137 | 266 | space_id, name, FALSE, flags, | 266 | space_id, name, FALSE, flags, |
138 | 267 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { | 267 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { |
139 | @@ -270,7 +270,7 @@ | |||
140 | 270 | } | 270 | } |
141 | 271 | } | 271 | } |
142 | 272 | 272 | ||
144 | 273 | @@ -2343,7 +2370,7 @@ | 273 | @@ -2344,7 +2371,7 @@ |
145 | 274 | } | 274 | } |
146 | 275 | 275 | ||
147 | 276 | if (success) { | 276 | if (success) { |
148 | @@ -279,7 +279,7 @@ | |||
149 | 279 | /* Write a log record about the deletion of the .ibd | 279 | /* Write a log record about the deletion of the .ibd |
150 | 280 | file, so that ibbackup can replay it in the | 280 | file, so that ibbackup can replay it in the |
151 | 281 | --apply-log phase. We use a dummy mtr and the familiar | 281 | --apply-log phase. We use a dummy mtr and the familiar |
153 | 282 | @@ -2644,7 +2671,7 @@ | 282 | @@ -2645,7 +2672,7 @@ |
154 | 283 | 283 | ||
155 | 284 | mutex_exit(&fil_system->mutex); | 284 | mutex_exit(&fil_system->mutex); |
156 | 285 | 285 | ||
157 | @@ -288,7 +288,7 @@ | |||
158 | 288 | if (success) { | 288 | if (success) { |
159 | 289 | mtr_t mtr; | 289 | mtr_t mtr; |
160 | 290 | 290 | ||
162 | 291 | @@ -2835,7 +2862,7 @@ | 291 | @@ -2836,7 +2863,7 @@ |
163 | 292 | 292 | ||
164 | 293 | fil_node_create(path, size, space_id, FALSE); | 293 | fil_node_create(path, size, space_id, FALSE); |
165 | 294 | 294 | ||
166 | @@ -297,7 +297,7 @@ | |||
167 | 297 | { | 297 | { |
168 | 298 | mtr_t mtr; | 298 | mtr_t mtr; |
169 | 299 | 299 | ||
171 | 300 | @@ -3090,19 +3117,97 @@ | 300 | @@ -3091,19 +3118,97 @@ |
172 | 301 | "InnoDB: open the tablespace file ", stderr); | 301 | "InnoDB: open the tablespace file ", stderr); |
173 | 302 | ut_print_filename(stderr, filepath); | 302 | ut_print_filename(stderr, filepath); |
174 | 303 | fputs("!\n" | 303 | fputs("!\n" |
175 | @@ -405,7 +405,7 @@ | |||
176 | 405 | return(FALSE); | 405 | return(FALSE); |
177 | 406 | } | 406 | } |
178 | 407 | 407 | ||
180 | 408 | @@ -3334,7 +3439,7 @@ | 408 | @@ -3335,7 +3440,7 @@ |
181 | 409 | cannot be ok. */ | 409 | cannot be ok. */ |
182 | 410 | 410 | ||
183 | 411 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; | 411 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; |
184 | @@ -414,7 +414,7 @@ | |||
185 | 414 | if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { | 414 | if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { |
186 | 415 | fprintf(stderr, | 415 | fprintf(stderr, |
187 | 416 | "InnoDB: Error: the size of single-table tablespace" | 416 | "InnoDB: Error: the size of single-table tablespace" |
189 | 417 | @@ -3475,7 +3580,7 @@ | 417 | @@ -3476,7 +3581,7 @@ |
190 | 418 | idea is to read as much good data as we can and jump over bad data. | 418 | idea is to read as much good data as we can and jump over bad data. |
191 | 419 | @return 0 if ok, -1 if error even after the retries, 1 if at the end | 419 | @return 0 if ok, -1 if error even after the retries, 1 if at the end |
192 | 420 | of the directory */ | 420 | of the directory */ |
193 | @@ -423,7 +423,7 @@ | |||
194 | 423 | int | 423 | int |
195 | 424 | fil_file_readdir_next_file( | 424 | fil_file_readdir_next_file( |
196 | 425 | /*=======================*/ | 425 | /*=======================*/ |
198 | 426 | @@ -3774,15 +3879,97 @@ | 426 | @@ -3775,15 +3880,97 @@ |
199 | 427 | "InnoDB: in InnoDB data dictionary" | 427 | "InnoDB: in InnoDB data dictionary" |
200 | 428 | " has tablespace id %lu,\n" | 428 | " has tablespace id %lu,\n" |
201 | 429 | "InnoDB: but tablespace with that id" | 429 | "InnoDB: but tablespace with that id" |
202 | @@ -529,7 +529,7 @@ | |||
203 | 529 | } else { | 529 | } else { |
204 | 530 | ut_print_timestamp(stderr); | 530 | ut_print_timestamp(stderr); |
205 | 531 | fputs(" InnoDB: Error: table ", stderr); | 531 | fputs(" InnoDB: Error: table ", stderr); |
207 | 532 | @@ -4171,7 +4358,7 @@ | 532 | @@ -4172,7 +4359,7 @@ |
208 | 533 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys | 533 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
209 | 534 | mutex. */ | 534 | mutex. */ |
210 | 535 | static | 535 | static |
211 | @@ -538,7 +538,7 @@ | |||
212 | 538 | fil_node_prepare_for_io( | 538 | fil_node_prepare_for_io( |
213 | 539 | /*====================*/ | 539 | /*====================*/ |
214 | 540 | fil_node_t* node, /*!< in: file node */ | 540 | fil_node_t* node, /*!< in: file node */ |
216 | 541 | @@ -4191,10 +4378,13 @@ | 541 | @@ -4192,10 +4379,13 @@ |
217 | 542 | } | 542 | } |
218 | 543 | 543 | ||
219 | 544 | if (node->open == FALSE) { | 544 | if (node->open == FALSE) { |
220 | @@ -553,7 +553,7 @@ | |||
221 | 553 | } | 553 | } |
222 | 554 | 554 | ||
223 | 555 | if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE | 555 | if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE |
225 | 556 | @@ -4207,6 +4397,8 @@ | 556 | @@ -4208,6 +4398,8 @@ |
226 | 557 | } | 557 | } |
227 | 558 | 558 | ||
228 | 559 | node->n_pending++; | 559 | node->n_pending++; |
229 | @@ -562,7 +562,7 @@ | |||
230 | 562 | } | 562 | } |
231 | 563 | 563 | ||
232 | 564 | /********************************************************************//** | 564 | /********************************************************************//** |
234 | 565 | @@ -4391,6 +4583,16 @@ | 565 | @@ -4390,6 +4582,16 @@ |
235 | 566 | 566 | ||
236 | 567 | ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE)); | 567 | ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE)); |
237 | 568 | 568 | ||
238 | @@ -581,7 +581,7 @@ | |||
239 | 581 | for (;;) { | 581 | for (;;) { |
240 | 582 | --- a/storage/innobase/ibuf/ibuf0ibuf.c | 582 | --- a/storage/innobase/ibuf/ibuf0ibuf.c |
241 | 583 | +++ b/storage/innobase/ibuf/ibuf0ibuf.c | 583 | +++ b/storage/innobase/ibuf/ibuf0ibuf.c |
243 | 584 | @@ -1160,6 +1160,9 @@ | 584 | @@ -1148,6 +1148,9 @@ |
244 | 585 | ut_ad(!recv_no_ibuf_operations); | 585 | ut_ad(!recv_no_ibuf_operations); |
245 | 586 | ut_ad(x_latch || mtr == NULL); | 586 | ut_ad(x_latch || mtr == NULL); |
246 | 587 | 587 | ||
247 | @@ -591,7 +591,7 @@ | |||
248 | 591 | if (ibuf_fixed_addr_page(space, zip_size, page_no)) { | 591 | if (ibuf_fixed_addr_page(space, zip_size, page_no)) { |
249 | 592 | 592 | ||
250 | 593 | return(TRUE); | 593 | return(TRUE); |
252 | 594 | @@ -2674,6 +2677,9 @@ | 594 | @@ -2715,6 +2718,9 @@ |
253 | 595 | ulint n_bytes; | 595 | ulint n_bytes; |
254 | 596 | ulint n_pag2; | 596 | ulint n_pag2; |
255 | 597 | 597 | ||
256 | @@ -603,7 +603,7 @@ | |||
257 | 603 | 603 | ||
258 | 604 | --- a/storage/innobase/include/srv0srv.h | 604 | --- a/storage/innobase/include/srv0srv.h |
259 | 605 | +++ b/storage/innobase/include/srv0srv.h | 605 | +++ b/storage/innobase/include/srv0srv.h |
261 | 606 | @@ -216,6 +216,10 @@ | 606 | @@ -218,6 +218,10 @@ |
262 | 607 | extern ulong srv_max_purge_lag; | 607 | extern ulong srv_max_purge_lag; |
263 | 608 | 608 | ||
264 | 609 | extern ulong srv_replication_delay; | 609 | extern ulong srv_replication_delay; |
265 | @@ -647,21 +647,24 @@ | |||
266 | 647 | allowed yet (the variable name .._no_ibuf_.. is misleading) */ | 647 | allowed yet (the variable name .._no_ibuf_.. is misleading) */ |
267 | 648 | 648 | ||
268 | 649 | @@ -3114,6 +3116,7 @@ | 649 | @@ -3114,6 +3116,7 @@ |
271 | 650 | for the 'very fast' shutdown, because the InnoDB layer may have | 650 | shutdown, because the InnoDB layer may have committed or |
272 | 651 | committed or prepared transactions and we don't want to lose them. */ | 651 | prepared transactions and we don't want to lose them. */ |
273 | 652 | 652 | ||
274 | 653 | + if (!srv_apply_log_only) { | 653 | + if (!srv_apply_log_only) { |
280 | 654 | if (trx_n_mysql_transactions > 0 | 654 | server_busy = trx_n_mysql_transactions > 0 |
281 | 655 | || UT_LIST_GET_LEN(trx_sys->trx_list) > 0) { | 655 | || UT_LIST_GET_LEN(trx_sys->trx_list) > trx_n_prepared; |
282 | 656 | 656 | mutex_exit(&kernel_mutex); | |
283 | 657 | @@ -3121,6 +3124,7 @@ | 657 | @@ -3121,6 +3124,10 @@ |
284 | 658 | 658 | if (server_busy || srv_is_any_background_thread_active()) { | |
285 | 659 | goto loop; | 659 | goto loop; |
286 | 660 | } | 660 | } |
287 | 661 | + } | 661 | + } |
288 | 662 | + else { | ||
289 | 663 | + mutex_exit(&kernel_mutex); | ||
290 | 664 | + } | ||
291 | 662 | 665 | ||
294 | 663 | if (srv_fast_shutdown == 2) { | 666 | mutex_enter(&log_sys->mutex); |
295 | 664 | /* In this fastest shutdown we do not flush the buffer pool: | 667 | server_busy = log_sys->n_pending_checkpoint_writes |
296 | 665 | --- a/storage/innobase/log/log0recv.c | 668 | --- a/storage/innobase/log/log0recv.c |
297 | 666 | +++ b/storage/innobase/log/log0recv.c | 669 | +++ b/storage/innobase/log/log0recv.c |
298 | 667 | @@ -42,27 +42,27 @@ | 670 | @@ -42,27 +42,27 @@ |
299 | @@ -870,7 +873,7 @@ | |||
300 | 870 | if ((ulint)ret == n) { | 873 | if ((ulint)ret == n) { |
301 | 871 | --- a/storage/innobase/os/os0thread.c | 874 | --- a/storage/innobase/os/os0thread.c |
302 | 872 | +++ b/storage/innobase/os/os0thread.c | 875 | +++ b/storage/innobase/os/os0thread.c |
304 | 873 | @@ -266,12 +266,17 @@ | 876 | @@ -251,11 +251,16 @@ |
305 | 874 | #ifdef __WIN__ | 877 | #ifdef __WIN__ |
306 | 875 | Sleep((DWORD) tm / 1000); | 878 | Sleep((DWORD) tm / 1000); |
307 | 876 | #else | 879 | #else |
308 | @@ -887,7 +890,6 @@ | |||
309 | 887 | +*/ | 890 | +*/ |
310 | 888 | #endif | 891 | #endif |
311 | 889 | } | 892 | } |
312 | 890 | |||
313 | 891 | --- a/storage/innobase/row/row0merge.c | 893 | --- a/storage/innobase/row/row0merge.c |
314 | 892 | +++ b/storage/innobase/row/row0merge.c | 894 | +++ b/storage/innobase/row/row0merge.c |
315 | 893 | @@ -459,7 +459,9 @@ | 895 | @@ -459,7 +459,9 @@ |
316 | @@ -914,7 +916,7 @@ | |||
317 | 914 | mem_heap_free(heap); | 916 | mem_heap_free(heap); |
318 | 915 | return(DB_DUPLICATE_KEY); | 917 | return(DB_DUPLICATE_KEY); |
319 | 916 | } | 918 | } |
321 | 917 | @@ -2628,7 +2632,9 @@ | 919 | @@ -2627,7 +2631,9 @@ |
322 | 918 | 920 | ||
323 | 919 | /* Reset the MySQL row buffer that is used when reporting | 921 | /* Reset the MySQL row buffer that is used when reporting |
324 | 920 | duplicate keys. */ | 922 | duplicate keys. */ |
325 | @@ -927,7 +929,7 @@ | |||
326 | 927 | secondary index entries for merge sort */ | 929 | secondary index entries for merge sort */ |
327 | 928 | --- a/storage/innobase/srv/srv0srv.c | 930 | --- a/storage/innobase/srv/srv0srv.c |
328 | 929 | +++ b/storage/innobase/srv/srv0srv.c | 931 | +++ b/storage/innobase/srv/srv0srv.c |
330 | 930 | @@ -401,6 +401,9 @@ | 932 | @@ -399,6 +399,9 @@ |
331 | 931 | 933 | ||
332 | 932 | UNIV_INTERN ulong srv_replication_delay = 0; | 934 | UNIV_INTERN ulong srv_replication_delay = 0; |
333 | 933 | 935 | ||
334 | @@ -937,7 +939,7 @@ | |||
335 | 937 | /*-------------------------------------------*/ | 939 | /*-------------------------------------------*/ |
336 | 938 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; | 940 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; |
337 | 939 | UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; | 941 | UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; |
339 | 940 | @@ -1099,7 +1102,7 @@ | 942 | @@ -1078,7 +1081,7 @@ |
340 | 941 | } | 943 | } |
341 | 942 | 944 | ||
342 | 943 | /* Initialize some INFORMATION SCHEMA internal structures */ | 945 | /* Initialize some INFORMATION SCHEMA internal structures */ |
343 | @@ -946,7 +948,7 @@ | |||
344 | 946 | } | 948 | } |
345 | 947 | 949 | ||
346 | 948 | /*********************************************************************//** | 950 | /*********************************************************************//** |
348 | 949 | @@ -1110,6 +1113,7 @@ | 951 | @@ -1089,6 +1092,7 @@ |
349 | 950 | /*==========*/ | 952 | /*==========*/ |
350 | 951 | { | 953 | { |
351 | 952 | os_fast_mutex_free(&srv_conc_mutex); | 954 | os_fast_mutex_free(&srv_conc_mutex); |
352 | @@ -954,7 +956,7 @@ | |||
353 | 954 | mem_free(srv_conc_slots); | 956 | mem_free(srv_conc_slots); |
354 | 955 | srv_conc_slots = NULL; | 957 | srv_conc_slots = NULL; |
355 | 956 | 958 | ||
357 | 957 | @@ -1123,6 +1127,7 @@ | 959 | @@ -1102,6 +1106,7 @@ |
358 | 958 | srv_mysql_table = NULL; | 960 | srv_mysql_table = NULL; |
359 | 959 | 961 | ||
360 | 960 | trx_i_s_cache_free(trx_i_s_cache); | 962 | trx_i_s_cache_free(trx_i_s_cache); |
361 | @@ -962,7 +964,7 @@ | |||
362 | 962 | } | 964 | } |
363 | 963 | 965 | ||
364 | 964 | /*********************************************************************//** | 966 | /*********************************************************************//** |
366 | 965 | @@ -1718,7 +1723,7 @@ | 967 | @@ -1717,7 +1722,7 @@ |
367 | 966 | } | 968 | } |
368 | 967 | 969 | ||
369 | 968 | /* Record the lock wait time for this thread */ | 970 | /* Record the lock wait time for this thread */ |
370 | @@ -973,7 +975,7 @@ | |||
371 | 973 | if (trx->was_chosen_as_deadlock_victim) { | 975 | if (trx->was_chosen_as_deadlock_victim) { |
372 | 974 | --- a/storage/innobase/srv/srv0start.c | 976 | --- a/storage/innobase/srv/srv0start.c |
373 | 975 | +++ b/storage/innobase/srv/srv0start.c | 977 | +++ b/storage/innobase/srv/srv0start.c |
375 | 976 | @@ -94,6 +94,8 @@ | 978 | @@ -93,6 +93,8 @@ |
376 | 977 | /** Log sequence number at shutdown */ | 979 | /** Log sequence number at shutdown */ |
377 | 978 | UNIV_INTERN ib_uint64_t srv_shutdown_lsn; | 980 | UNIV_INTERN ib_uint64_t srv_shutdown_lsn; |
378 | 979 | 981 | ||
379 | @@ -982,7 +984,7 @@ | |||
380 | 982 | #ifdef HAVE_DARWIN_THREADS | 984 | #ifdef HAVE_DARWIN_THREADS |
381 | 983 | # include <sys/utsname.h> | 985 | # include <sys/utsname.h> |
382 | 984 | /** TRUE if the F_FULLFSYNC option is available */ | 986 | /** TRUE if the F_FULLFSYNC option is available */ |
384 | 985 | @@ -549,7 +551,7 @@ | 987 | @@ -548,7 +550,7 @@ |
385 | 986 | /*********************************************************************//** | 988 | /*********************************************************************//** |
386 | 987 | Creates or opens the log files and closes them. | 989 | Creates or opens the log files and closes them. |
387 | 988 | @return DB_SUCCESS or error code */ | 990 | @return DB_SUCCESS or error code */ |
388 | @@ -991,7 +993,7 @@ | |||
389 | 991 | ulint | 993 | ulint |
390 | 992 | open_or_create_log_file( | 994 | open_or_create_log_file( |
391 | 993 | /*====================*/ | 995 | /*====================*/ |
393 | 994 | @@ -709,7 +711,7 @@ | 996 | @@ -708,7 +710,7 @@ |
394 | 995 | /*********************************************************************//** | 997 | /*********************************************************************//** |
395 | 996 | Creates or opens database data files and closes them. | 998 | Creates or opens database data files and closes them. |
396 | 997 | @return DB_SUCCESS or error code */ | 999 | @return DB_SUCCESS or error code */ |
397 | @@ -1000,7 +1002,7 @@ | |||
398 | 1000 | ulint | 1002 | ulint |
399 | 1001 | open_or_create_data_files( | 1003 | open_or_create_data_files( |
400 | 1002 | /*======================*/ | 1004 | /*======================*/ |
402 | 1003 | @@ -1414,7 +1416,7 @@ | 1005 | @@ -1419,7 +1421,7 @@ |
403 | 1004 | } | 1006 | } |
404 | 1005 | #endif /* UNIV_LOG_ARCHIVE */ | 1007 | #endif /* UNIV_LOG_ARCHIVE */ |
405 | 1006 | 1008 | ||
406 | @@ -1009,7 +1011,7 @@ | |||
407 | 1009 | ut_print_timestamp(stderr); | 1011 | ut_print_timestamp(stderr); |
408 | 1010 | fprintf(stderr, | 1012 | fprintf(stderr, |
409 | 1011 | " InnoDB: Error: combined size of log files" | 1013 | " InnoDB: Error: combined size of log files" |
411 | 1012 | @@ -1709,6 +1711,10 @@ | 1014 | @@ -1714,6 +1716,10 @@ |
412 | 1013 | are initialized in trx_sys_init_at_db_start(). */ | 1015 | are initialized in trx_sys_init_at_db_start(). */ |
413 | 1014 | 1016 | ||
414 | 1015 | recv_recovery_from_checkpoint_finish(); | 1017 | recv_recovery_from_checkpoint_finish(); |
415 | @@ -1020,7 +1022,7 @@ | |||
416 | 1020 | if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) { | 1022 | if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) { |
417 | 1021 | /* The following call is necessary for the insert | 1023 | /* The following call is necessary for the insert |
418 | 1022 | buffer to work with multiple tablespaces. We must | 1024 | buffer to work with multiple tablespaces. We must |
420 | 1023 | @@ -1868,6 +1874,17 @@ | 1025 | @@ -1873,6 +1879,17 @@ |
421 | 1024 | if (!srv_auto_extend_last_data_file | 1026 | if (!srv_auto_extend_last_data_file |
422 | 1025 | && sum_of_data_file_sizes != tablespace_size_in_header) { | 1027 | && sum_of_data_file_sizes != tablespace_size_in_header) { |
423 | 1026 | 1028 | ||
424 | @@ -1038,7 +1040,7 @@ | |||
425 | 1038 | ut_print_timestamp(stderr); | 1040 | ut_print_timestamp(stderr); |
426 | 1039 | fprintf(stderr, | 1041 | fprintf(stderr, |
427 | 1040 | " InnoDB: Error: tablespace size" | 1042 | " InnoDB: Error: tablespace size" |
429 | 1041 | @@ -1947,6 +1964,7 @@ | 1043 | @@ -1952,6 +1969,7 @@ |
430 | 1042 | 1044 | ||
431 | 1043 | return(DB_ERROR); | 1045 | return(DB_ERROR); |
432 | 1044 | } | 1046 | } |
433 | @@ -1046,7 +1048,7 @@ | |||
434 | 1046 | } | 1048 | } |
435 | 1047 | 1049 | ||
436 | 1048 | /* Check that os_fast_mutexes work as expected */ | 1050 | /* Check that os_fast_mutexes work as expected */ |
438 | 1049 | @@ -2059,6 +2077,7 @@ | 1051 | @@ -2064,6 +2082,7 @@ |
439 | 1050 | ibuf_update_max_tablespace_id(); | 1052 | ibuf_update_max_tablespace_id(); |
440 | 1051 | } | 1053 | } |
441 | 1052 | 1054 | ||
442 | @@ -1054,18 +1056,6 @@ | |||
443 | 1054 | srv_file_per_table = srv_file_per_table_original_value; | 1056 | srv_file_per_table = srv_file_per_table_original_value; |
444 | 1055 | 1057 | ||
445 | 1056 | srv_was_started = TRUE; | 1058 | srv_was_started = TRUE; |
446 | 1057 | --- a/storage/innobase/trx/trx0purge.c | ||
447 | 1058 | +++ b/storage/innobase/trx/trx0purge.c | ||
448 | 1059 | @@ -1100,6 +1100,9 @@ | ||
449 | 1060 | /* que_thr_t* thr2; */ | ||
450 | 1061 | ulint old_pages_handled; | ||
451 | 1062 | |||
452 | 1063 | + if (srv_fake_write) | ||
453 | 1064 | + return(0); | ||
454 | 1065 | + | ||
455 | 1066 | mutex_enter(&(purge_sys->mutex)); | ||
456 | 1067 | |||
457 | 1068 | if (purge_sys->trx->n_active_thrs > 0) { | ||
458 | 1069 | --- a/storage/innobase/trx/trx0rseg.c | 1059 | --- a/storage/innobase/trx/trx0rseg.c |
459 | 1070 | +++ b/storage/innobase/trx/trx0rseg.c | 1060 | +++ b/storage/innobase/trx/trx0rseg.c |
460 | 1071 | @@ -140,9 +140,11 @@ | 1061 | @@ -140,9 +140,11 @@ |
461 | @@ -1082,7 +1072,7 @@ | |||
462 | 1082 | 1072 | ||
463 | 1083 | --- a/storage/innobase/trx/trx0sys.c | 1073 | --- a/storage/innobase/trx/trx0sys.c |
464 | 1084 | +++ b/storage/innobase/trx/trx0sys.c | 1074 | +++ b/storage/innobase/trx/trx0sys.c |
466 | 1085 | @@ -1641,10 +1641,12 @@ | 1075 | @@ -1686,10 +1686,12 @@ |
467 | 1086 | UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view); | 1076 | UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view); |
468 | 1087 | } | 1077 | } |
469 | 1088 | 1078 | ||
470 | @@ -1097,18 +1087,19 @@ | |||
471 | 1097 | 1087 | ||
472 | 1098 | --- a/storage/innobase/trx/trx0trx.c | 1088 | --- a/storage/innobase/trx/trx0trx.c |
473 | 1099 | +++ b/storage/innobase/trx/trx0trx.c | 1089 | +++ b/storage/innobase/trx/trx0trx.c |
475 | 1100 | @@ -469,8 +469,8 @@ | 1090 | @@ -522,9 +522,8 @@ |
476 | 1101 | (ullint) trx->id); | 1091 | (ullint) trx->id); |
477 | 1102 | 1092 | ||
478 | 1103 | if (srv_force_recovery == 0) { | 1093 | if (srv_force_recovery == 0) { |
479 | 1104 | - | 1094 | - |
480 | 1105 | - trx->conc_state = TRX_PREPARED; | 1095 | - trx->conc_state = TRX_PREPARED; |
481 | 1096 | - trx_n_prepared++; | ||
482 | 1106 | + /* xtrabackup should rollback it */ | 1097 | + /* xtrabackup should rollback it */ |
483 | 1107 | + trx->conc_state = TRX_ACTIVE; | 1098 | + trx->conc_state = TRX_ACTIVE; |
484 | 1108 | } else { | 1099 | } else { |
485 | 1109 | fprintf(stderr, | 1100 | fprintf(stderr, |
486 | 1110 | "InnoDB: Since" | 1101 | "InnoDB: Since" |
488 | 1111 | @@ -544,9 +544,9 @@ | 1102 | @@ -598,10 +597,9 @@ |
489 | 1112 | (ullint) trx->id); | 1103 | (ullint) trx->id); |
490 | 1113 | 1104 | ||
491 | 1114 | if (srv_force_recovery == 0) { | 1105 | if (srv_force_recovery == 0) { |
492 | @@ -1116,7 +1107,20 @@ | |||
493 | 1116 | + /* xtrabackup should rollback it */ | 1107 | + /* xtrabackup should rollback it */ |
494 | 1117 | trx->conc_state | 1108 | trx->conc_state |
495 | 1118 | - = TRX_PREPARED; | 1109 | - = TRX_PREPARED; |
496 | 1110 | - trx_n_prepared++; | ||
497 | 1119 | + = TRX_ACTIVE; | 1111 | + = TRX_ACTIVE; |
498 | 1120 | } else { | 1112 | } else { |
499 | 1121 | fprintf(stderr, | 1113 | fprintf(stderr, |
500 | 1122 | "InnoDB: Since" | 1114 | "InnoDB: Since" |
501 | 1115 | --- a/storage/innobase/trx/trx0purge.c | ||
502 | 1116 | +++ b/storage/innobase/trx/trx0purge.c | ||
503 | 1117 | @@ -1129,6 +1129,9 @@ | ||
504 | 1118 | que_thr_t* thr; | ||
505 | 1119 | ulint old_pages_handled; | ||
506 | 1120 | |||
507 | 1121 | + if (srv_fake_write) | ||
508 | 1122 | + return(0); | ||
509 | 1123 | + | ||
510 | 1124 | ut_a(purge_sys->trx->n_active_thrs == 0); | ||
511 | 1125 | |||
512 | 1126 | rw_lock_x_lock(&purge_sys->latch); | ||
513 | 1123 | 1127 | ||
514 | === modified file 'patches/xtradb51.patch' | |||
515 | --- patches/xtradb51.patch 2011-09-14 12:48:27 +0000 | |||
516 | +++ patches/xtradb51.patch 2011-11-27 06:47:26 +0000 | |||
517 | @@ -1,6 +1,6 @@ | |||
518 | 1 | --- a/storage/innodb_plugin/btr/btr0btr.c | 1 | --- a/storage/innodb_plugin/btr/btr0btr.c |
519 | 2 | +++ b/storage/innodb_plugin/btr/btr0btr.c | 2 | +++ b/storage/innodb_plugin/btr/btr0btr.c |
521 | 3 | @@ -120,7 +120,7 @@ | 3 | @@ -674,7 +674,7 @@ |
522 | 4 | /**************************************************************//** | 4 | /**************************************************************//** |
523 | 5 | Gets the root node of a tree and x-latches it. | 5 | Gets the root node of a tree and x-latches it. |
524 | 6 | @return root page, x-latched */ | 6 | @return root page, x-latched */ |
525 | @@ -9,7 +9,7 @@ | |||
526 | 9 | buf_block_t* | 9 | buf_block_t* |
527 | 10 | btr_root_block_get( | 10 | btr_root_block_get( |
528 | 11 | /*===============*/ | 11 | /*===============*/ |
530 | 12 | @@ -578,7 +578,7 @@ | 12 | @@ -1134,7 +1134,7 @@ |
531 | 13 | /************************************************************//** | 13 | /************************************************************//** |
532 | 14 | Returns the child page of a node pointer and x-latches it. | 14 | Returns the child page of a node pointer and x-latches it. |
533 | 15 | @return child page, x-latched */ | 15 | @return child page, x-latched */ |
534 | @@ -20,7 +20,7 @@ | |||
535 | 20 | /*===================*/ | 20 | /*===================*/ |
536 | 21 | --- a/storage/innodb_plugin/buf/buf0buf.c | 21 | --- a/storage/innodb_plugin/buf/buf0buf.c |
537 | 22 | +++ b/storage/innodb_plugin/buf/buf0buf.c | 22 | +++ b/storage/innodb_plugin/buf/buf0buf.c |
539 | 23 | @@ -440,7 +440,7 @@ | 23 | @@ -412,7 +412,7 @@ |
540 | 24 | return(TRUE); | 24 | return(TRUE); |
541 | 25 | } | 25 | } |
542 | 26 | 26 | ||
543 | @@ -29,7 +29,7 @@ | |||
544 | 29 | if (recv_lsn_checks_on) { | 29 | if (recv_lsn_checks_on) { |
545 | 30 | ib_uint64_t current_lsn; | 30 | ib_uint64_t current_lsn; |
546 | 31 | 31 | ||
548 | 32 | @@ -4030,7 +4030,7 @@ | 32 | @@ -3302,7 +3302,7 @@ |
549 | 33 | recv_recover_page(TRUE, (buf_block_t*) bpage); | 33 | recv_recover_page(TRUE, (buf_block_t*) bpage); |
550 | 34 | } | 34 | } |
551 | 35 | 35 | ||
552 | @@ -40,7 +40,7 @@ | |||
553 | 40 | (srv_pass_corrupt_table && bpage->is_corrupt) ? NULL : | 40 | (srv_pass_corrupt_table && bpage->is_corrupt) ? NULL : |
554 | 41 | --- a/storage/innodb_plugin/fil/fil0fil.c | 41 | --- a/storage/innodb_plugin/fil/fil0fil.c |
555 | 42 | +++ b/storage/innodb_plugin/fil/fil0fil.c | 42 | +++ b/storage/innodb_plugin/fil/fil0fil.c |
557 | 43 | @@ -294,7 +294,7 @@ | 43 | @@ -297,7 +297,7 @@ |
558 | 44 | 44 | ||
559 | 45 | /** The tablespace memory cache. This variable is NULL before the module is | 45 | /** The tablespace memory cache. This variable is NULL before the module is |
560 | 46 | initialized. */ | 46 | initialized. */ |
561 | @@ -49,7 +49,7 @@ | |||
562 | 49 | 49 | ||
563 | 50 | 50 | ||
564 | 51 | /********************************************************************//** | 51 | /********************************************************************//** |
566 | 52 | @@ -305,7 +305,7 @@ | 52 | @@ -308,7 +308,7 @@ |
567 | 53 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys | 53 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
568 | 54 | mutex. */ | 54 | mutex. */ |
569 | 55 | static | 55 | static |
570 | @@ -58,7 +58,7 @@ | |||
571 | 58 | fil_node_prepare_for_io( | 58 | fil_node_prepare_for_io( |
572 | 59 | /*====================*/ | 59 | /*====================*/ |
573 | 60 | fil_node_t* node, /*!< in: file node */ | 60 | fil_node_t* node, /*!< in: file node */ |
575 | 61 | @@ -630,7 +630,7 @@ | 61 | @@ -633,7 +633,7 @@ |
576 | 62 | Opens a the file of a node of a tablespace. The caller must own the fil_system | 62 | Opens a the file of a node of a tablespace. The caller must own the fil_system |
577 | 63 | mutex. */ | 63 | mutex. */ |
578 | 64 | static | 64 | static |
579 | @@ -67,7 +67,7 @@ | |||
580 | 67 | fil_node_open_file( | 67 | fil_node_open_file( |
581 | 68 | /*===============*/ | 68 | /*===============*/ |
582 | 69 | fil_node_t* node, /*!< in: file node */ | 69 | fil_node_t* node, /*!< in: file node */ |
584 | 70 | @@ -664,7 +664,17 @@ | 70 | @@ -667,7 +667,17 @@ |
585 | 71 | node->name, OS_FILE_OPEN, OS_FILE_READ_ONLY, &success); | 71 | node->name, OS_FILE_OPEN, OS_FILE_READ_ONLY, &success); |
586 | 72 | if (!success) { | 72 | if (!success) { |
587 | 73 | /* The following call prints an error message */ | 73 | /* The following call prints an error message */ |
588 | @@ -86,7 +86,7 @@ | |||
589 | 86 | 86 | ||
590 | 87 | ut_print_timestamp(stderr); | 87 | ut_print_timestamp(stderr); |
591 | 88 | 88 | ||
593 | 89 | @@ -725,12 +735,14 @@ | 89 | @@ -728,12 +738,14 @@ |
594 | 90 | 90 | ||
595 | 91 | if (UNIV_UNLIKELY(space_id != space->id)) { | 91 | if (UNIV_UNLIKELY(space_id != space->id)) { |
596 | 92 | fprintf(stderr, | 92 | fprintf(stderr, |
597 | @@ -105,7 +105,7 @@ | |||
598 | 105 | } | 105 | } |
599 | 106 | 106 | ||
600 | 107 | if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED | 107 | if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED |
602 | 108 | @@ -754,8 +766,8 @@ | 108 | @@ -757,8 +769,8 @@ |
603 | 109 | } | 109 | } |
604 | 110 | 110 | ||
605 | 111 | if (size_bytes >= 1024 * 1024) { | 111 | if (size_bytes >= 1024 * 1024) { |
606 | @@ -116,7 +116,7 @@ | |||
607 | 116 | } | 116 | } |
608 | 117 | 117 | ||
609 | 118 | if (!(flags & DICT_TF_ZSSIZE_MASK)) { | 118 | if (!(flags & DICT_TF_ZSSIZE_MASK)) { |
611 | 119 | @@ -800,6 +812,8 @@ | 119 | @@ -803,6 +815,8 @@ |
612 | 120 | /* Put the node to the LRU list */ | 120 | /* Put the node to the LRU list */ |
613 | 121 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); | 121 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); |
614 | 122 | } | 122 | } |
615 | @@ -125,7 +125,7 @@ | |||
616 | 125 | } | 125 | } |
617 | 126 | 126 | ||
618 | 127 | /**********************************************************************//** | 127 | /**********************************************************************//** |
620 | 128 | @@ -1428,7 +1442,12 @@ | 128 | @@ -1431,7 +1445,12 @@ |
621 | 129 | the file yet; the following calls will open it and update the | 129 | the file yet; the following calls will open it and update the |
622 | 130 | size fields */ | 130 | size fields */ |
623 | 131 | 131 | ||
624 | @@ -139,7 +139,7 @@ | |||
625 | 139 | fil_node_complete_io(node, fil_system, OS_FILE_READ); | 139 | fil_node_complete_io(node, fil_system, OS_FILE_READ); |
626 | 140 | } | 140 | } |
627 | 141 | 141 | ||
629 | 142 | @@ -1480,7 +1499,12 @@ | 142 | @@ -1483,7 +1502,12 @@ |
630 | 143 | the file yet; the following calls will open it and update the | 143 | the file yet; the following calls will open it and update the |
631 | 144 | size fields */ | 144 | size fields */ |
632 | 145 | 145 | ||
633 | @@ -153,7 +153,7 @@ | |||
634 | 153 | fil_node_complete_io(node, fil_system, OS_FILE_READ); | 153 | fil_node_complete_io(node, fil_system, OS_FILE_READ); |
635 | 154 | } | 154 | } |
636 | 155 | 155 | ||
638 | 156 | @@ -2153,7 +2177,7 @@ | 156 | @@ -2157,7 +2181,7 @@ |
639 | 157 | if (fil_create_new_single_table_tablespace( | 157 | if (fil_create_new_single_table_tablespace( |
640 | 158 | space_id, name, FALSE, flags, | 158 | space_id, name, FALSE, flags, |
641 | 159 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { | 159 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { |
642 | @@ -162,7 +162,7 @@ | |||
643 | 162 | } | 162 | } |
644 | 163 | } | 163 | } |
645 | 164 | 164 | ||
647 | 165 | @@ -2316,7 +2340,7 @@ | 165 | @@ -2324,7 +2348,7 @@ |
648 | 166 | } | 166 | } |
649 | 167 | 167 | ||
650 | 168 | if (success) { | 168 | if (success) { |
651 | @@ -171,7 +171,7 @@ | |||
652 | 171 | /* Write a log record about the deletion of the .ibd | 171 | /* Write a log record about the deletion of the .ibd |
653 | 172 | file, so that ibbackup can replay it in the | 172 | file, so that ibbackup can replay it in the |
654 | 173 | --apply-log phase. We use a dummy mtr and the familiar | 173 | --apply-log phase. We use a dummy mtr and the familiar |
656 | 174 | @@ -2617,7 +2641,7 @@ | 174 | @@ -2625,7 +2649,7 @@ |
657 | 175 | 175 | ||
658 | 176 | mutex_exit(&fil_system->mutex); | 176 | mutex_exit(&fil_system->mutex); |
659 | 177 | 177 | ||
660 | @@ -180,7 +180,7 @@ | |||
661 | 180 | if (success) { | 180 | if (success) { |
662 | 181 | mtr_t mtr; | 181 | mtr_t mtr; |
663 | 182 | 182 | ||
665 | 183 | @@ -2807,7 +2831,7 @@ | 183 | @@ -2815,7 +2839,7 @@ |
666 | 184 | 184 | ||
667 | 185 | fil_node_create(path, size, space_id, FALSE); | 185 | fil_node_create(path, size, space_id, FALSE); |
668 | 186 | 186 | ||
669 | @@ -189,7 +189,7 @@ | |||
670 | 189 | { | 189 | { |
671 | 190 | mtr_t mtr; | 190 | mtr_t mtr; |
672 | 191 | 191 | ||
674 | 192 | @@ -3060,19 +3084,97 @@ | 192 | @@ -3159,19 +3183,97 @@ |
675 | 193 | "InnoDB: open the tablespace file ", stderr); | 193 | "InnoDB: open the tablespace file ", stderr); |
676 | 194 | ut_print_filename(stderr, filepath); | 194 | ut_print_filename(stderr, filepath); |
677 | 195 | fputs("!\n" | 195 | fputs("!\n" |
678 | @@ -297,7 +297,7 @@ | |||
679 | 297 | return(FALSE); | 297 | return(FALSE); |
680 | 298 | } | 298 | } |
681 | 299 | 299 | ||
683 | 300 | @@ -3777,7 +3879,7 @@ | 300 | @@ -4106,7 +4208,7 @@ |
684 | 301 | cannot be ok. */ | 301 | cannot be ok. */ |
685 | 302 | 302 | ||
686 | 303 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; | 303 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; |
687 | @@ -306,7 +306,7 @@ | |||
688 | 306 | if (size < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) { | 306 | if (size < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) { |
689 | 307 | fprintf(stderr, | 307 | fprintf(stderr, |
690 | 308 | "InnoDB: Error: the size of single-table tablespace" | 308 | "InnoDB: Error: the size of single-table tablespace" |
692 | 309 | @@ -3918,7 +4020,7 @@ | 309 | @@ -4247,7 +4349,7 @@ |
693 | 310 | idea is to read as much good data as we can and jump over bad data. | 310 | idea is to read as much good data as we can and jump over bad data. |
694 | 311 | @return 0 if ok, -1 if error even after the retries, 1 if at the end | 311 | @return 0 if ok, -1 if error even after the retries, 1 if at the end |
695 | 312 | of the directory */ | 312 | of the directory */ |
696 | @@ -315,7 +315,7 @@ | |||
697 | 315 | int | 315 | int |
698 | 316 | fil_file_readdir_next_file( | 316 | fil_file_readdir_next_file( |
699 | 317 | /*=======================*/ | 317 | /*=======================*/ |
701 | 318 | @@ -4217,15 +4319,97 @@ | 318 | @@ -4546,15 +4648,97 @@ |
702 | 319 | "InnoDB: in InnoDB data dictionary" | 319 | "InnoDB: in InnoDB data dictionary" |
703 | 320 | " has tablespace id %lu,\n" | 320 | " has tablespace id %lu,\n" |
704 | 321 | "InnoDB: but tablespace with that id" | 321 | "InnoDB: but tablespace with that id" |
705 | @@ -421,7 +421,7 @@ | |||
706 | 421 | } else { | 421 | } else { |
707 | 422 | ut_print_timestamp(stderr); | 422 | ut_print_timestamp(stderr); |
708 | 423 | fputs(" InnoDB: Error: table ", stderr); | 423 | fputs(" InnoDB: Error: table ", stderr); |
710 | 424 | @@ -4614,7 +4798,7 @@ | 424 | @@ -4953,7 +5137,7 @@ |
711 | 425 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys | 425 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
712 | 426 | mutex. */ | 426 | mutex. */ |
713 | 427 | static | 427 | static |
714 | @@ -430,7 +430,7 @@ | |||
715 | 430 | fil_node_prepare_for_io( | 430 | fil_node_prepare_for_io( |
716 | 431 | /*====================*/ | 431 | /*====================*/ |
717 | 432 | fil_node_t* node, /*!< in: file node */ | 432 | fil_node_t* node, /*!< in: file node */ |
719 | 433 | @@ -4634,10 +4818,13 @@ | 433 | @@ -4973,10 +5157,13 @@ |
720 | 434 | } | 434 | } |
721 | 435 | 435 | ||
722 | 436 | if (node->open == FALSE) { | 436 | if (node->open == FALSE) { |
723 | @@ -445,7 +445,7 @@ | |||
724 | 445 | } | 445 | } |
725 | 446 | 446 | ||
726 | 447 | if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE | 447 | if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE |
728 | 448 | @@ -4650,6 +4837,8 @@ | 448 | @@ -4989,6 +5176,8 @@ |
729 | 449 | } | 449 | } |
730 | 450 | 450 | ||
731 | 451 | node->n_pending++; | 451 | node->n_pending++; |
732 | @@ -454,7 +454,7 @@ | |||
733 | 454 | } | 454 | } |
734 | 455 | 455 | ||
735 | 456 | /********************************************************************//** | 456 | /********************************************************************//** |
737 | 457 | @@ -4835,6 +5024,16 @@ | 457 | @@ -5190,6 +5379,16 @@ |
738 | 458 | 458 | ||
739 | 459 | ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE)); | 459 | ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE)); |
740 | 460 | 460 | ||
741 | @@ -473,7 +473,7 @@ | |||
742 | 473 | for (;;) { | 473 | for (;;) { |
743 | 474 | --- a/storage/innodb_plugin/handler/ha_innodb.cc | 474 | --- a/storage/innodb_plugin/handler/ha_innodb.cc |
744 | 475 | +++ b/storage/innodb_plugin/handler/ha_innodb.cc | 475 | +++ b/storage/innodb_plugin/handler/ha_innodb.cc |
746 | 476 | @@ -343,12 +343,6 @@ | 476 | @@ -365,12 +365,6 @@ |
747 | 477 | "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.", | 477 | "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.", |
748 | 478 | NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0); | 478 | NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0); |
749 | 479 | 479 | ||
750 | @@ -483,14 +483,13 @@ | |||
751 | 483 | - "The value 3 regards innodb_flush_log_at_trx_commit (default).", | 483 | - "The value 3 regards innodb_flush_log_at_trx_commit (default).", |
752 | 484 | - NULL, NULL, 3, 0, 3, 0); | 484 | - NULL, NULL, 3, 0, 3, 0); |
753 | 485 | - | 485 | - |
759 | 486 | 486 | static MYSQL_THDVAR_BOOL(fake_changes, PLUGIN_VAR_OPCMDARG, | |
760 | 487 | static handler *innobase_create_handler(handlerton *hton, | 487 | "In the transaction after enabled, UPDATE, INSERT and DELETE only move the cursor to the records " |
761 | 488 | TABLE_SHARE *table, | 488 | "and do nothing other operations (no changes, no ibuf, no undo, no transaction log) in the transaction. " |
762 | 489 | @@ -729,17 +723,6 @@ | 489 | @@ -760,17 +754,6 @@ |
758 | 490 | return(THDVAR((THD*) thd, lock_wait_timeout)); | ||
763 | 491 | } | 490 | } |
764 | 492 | 491 | ||
766 | 493 | -/******************************************************************//** | 492 | /******************************************************************//** |
767 | 494 | -*/ | 493 | -*/ |
768 | 495 | -extern "C" UNIV_INTERN | 494 | -extern "C" UNIV_INTERN |
769 | 496 | -ulong | 495 | -ulong |
770 | @@ -501,10 +500,11 @@ | |||
771 | 501 | - return(THDVAR((THD*) thd, flush_log_at_trx_commit_session)); | 500 | - return(THDVAR((THD*) thd, flush_log_at_trx_commit_session)); |
772 | 502 | -} | 501 | -} |
773 | 503 | - | 502 | - |
778 | 504 | /********************************************************************//** | 503 | -/******************************************************************//** |
779 | 505 | Obtain the InnoDB transaction of a MySQL thread. | 504 | Returns true if expand_fast_index_creation is enabled for the current |
780 | 506 | @return reference to transaction pointer */ | 505 | session. |
781 | 507 | @@ -11775,7 +11758,6 @@ | 506 | @return the value of the server's expand_fast_index_creation variable */ |
782 | 507 | @@ -11966,7 +11949,6 @@ | ||
783 | 508 | MYSQL_SYSVAR(flush_neighbor_pages), | 508 | MYSQL_SYSVAR(flush_neighbor_pages), |
784 | 509 | MYSQL_SYSVAR(read_ahead), | 509 | MYSQL_SYSVAR(read_ahead), |
785 | 510 | MYSQL_SYSVAR(adaptive_checkpoint), | 510 | MYSQL_SYSVAR(adaptive_checkpoint), |
786 | @@ -536,11 +536,10 @@ | |||
787 | 536 | 536 | ||
788 | 537 | --- a/storage/innodb_plugin/include/ha_prototypes.h | 537 | --- a/storage/innodb_plugin/include/ha_prototypes.h |
789 | 538 | +++ b/storage/innodb_plugin/include/ha_prototypes.h | 538 | +++ b/storage/innodb_plugin/include/ha_prototypes.h |
792 | 539 | @@ -268,12 +268,4 @@ | 539 | @@ -269,14 +269,6 @@ |
791 | 540 | void* thd); /*!< in: thread handle (THD*), or NULL to query | ||
793 | 541 | the global innodb_lock_wait_timeout */ | 540 | the global innodb_lock_wait_timeout */ |
794 | 542 | 541 | ||
796 | 543 | -/******************************************************************//** | 542 | /******************************************************************//** |
797 | 544 | -*/ | 543 | -*/ |
798 | 545 | - | 544 | - |
799 | 546 | -ulong | 545 | -ulong |
800 | @@ -548,10 +547,13 @@ | |||
801 | 548 | -/*================================*/ | 547 | -/*================================*/ |
802 | 549 | - void* thd); | 548 | - void* thd); |
803 | 550 | - | 549 | - |
805 | 551 | #endif | 550 | -/******************************************************************//** |
806 | 551 | Returns true if innodb_expand_fast_index_creation is enabled for the current | ||
807 | 552 | session. | ||
808 | 553 | @return the value of the server's innodb_expand_fast_index_creation variable */ | ||
809 | 552 | --- a/storage/innodb_plugin/include/srv0srv.h | 554 | --- a/storage/innodb_plugin/include/srv0srv.h |
810 | 553 | +++ b/storage/innodb_plugin/include/srv0srv.h | 555 | +++ b/storage/innodb_plugin/include/srv0srv.h |
812 | 554 | @@ -228,6 +228,10 @@ | 556 | @@ -226,6 +226,10 @@ |
813 | 555 | 557 | ||
814 | 556 | extern ulong srv_replication_delay; | 558 | extern ulong srv_replication_delay; |
815 | 557 | 559 | ||
816 | @@ -575,14 +577,14 @@ | |||
817 | 575 | #endif | 577 | #endif |
818 | 576 | --- a/storage/innodb_plugin/include/trx0trx.h | 578 | --- a/storage/innodb_plugin/include/trx0trx.h |
819 | 577 | +++ b/storage/innodb_plugin/include/trx0trx.h | 579 | +++ b/storage/innodb_plugin/include/trx0trx.h |
821 | 578 | @@ -497,7 +497,6 @@ | 580 | @@ -508,7 +508,6 @@ |
822 | 579 | FALSE, one can save CPU time and about | 581 | FALSE, one can save CPU time and about |
823 | 580 | 150 bytes in the undo log size as then | 582 | 150 bytes in the undo log size as then |
824 | 581 | we skip XA steps */ | 583 | we skip XA steps */ |
825 | 582 | - ulint flush_log_at_trx_commit_session; | 584 | - ulint flush_log_at_trx_commit_session; |
826 | 585 | ulint fake_changes; | ||
827 | 583 | ulint flush_log_later;/* In 2PC, we hold the | 586 | ulint flush_log_later;/* In 2PC, we hold the |
828 | 584 | prepare_commit mutex across | 587 | prepare_commit mutex across |
829 | 585 | both phases. In that case, we | ||
830 | 586 | --- a/storage/innodb_plugin/include/ut0byte.ic | 588 | --- a/storage/innodb_plugin/include/ut0byte.ic |
831 | 587 | +++ b/storage/innodb_plugin/include/ut0byte.ic | 589 | +++ b/storage/innodb_plugin/include/ut0byte.ic |
832 | 588 | @@ -168,6 +168,14 @@ | 590 | @@ -168,6 +168,14 @@ |
833 | @@ -637,15 +639,15 @@ | |||
834 | 637 | /* Recovery is running and no operations on the log files are | 639 | /* Recovery is running and no operations on the log files are |
835 | 638 | allowed yet (the variable name .._no_ibuf_.. is misleading) */ | 640 | allowed yet (the variable name .._no_ibuf_.. is misleading) */ |
836 | 639 | 641 | ||
840 | 640 | @@ -3126,6 +3126,7 @@ | 642 | @@ -3127,6 +3127,7 @@ |
841 | 641 | for the 'very fast' shutdown, because the InnoDB layer may have | 643 | shutdown, because the InnoDB layer may have committed or |
842 | 642 | committed or prepared transactions and we don't want to lose them. */ | 644 | prepared transactions and we don't want to lose them. */ |
843 | 643 | 645 | ||
844 | 644 | + if (!srv_apply_log_only) { | 646 | + if (!srv_apply_log_only) { |
845 | 645 | if (trx_n_mysql_transactions > 0 | 647 | if (trx_n_mysql_transactions > 0 |
847 | 646 | || UT_LIST_GET_LEN(trx_sys->trx_list) > 0) { | 648 | || UT_LIST_GET_LEN(trx_sys->trx_list) > trx_n_prepared) { |
848 | 647 | 649 | ||
850 | 648 | @@ -3133,6 +3134,7 @@ | 650 | @@ -3134,6 +3135,7 @@ |
851 | 649 | 651 | ||
852 | 650 | goto loop; | 652 | goto loop; |
853 | 651 | } | 653 | } |
854 | @@ -746,7 +748,7 @@ | |||
855 | 746 | } | 748 | } |
856 | 747 | } | 749 | } |
857 | 748 | 750 | ||
859 | 749 | @@ -2923,12 +2926,14 @@ | 751 | @@ -2922,12 +2925,14 @@ |
860 | 750 | 752 | ||
861 | 751 | if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { | 753 | if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { |
862 | 752 | 754 | ||
863 | @@ -762,7 +764,7 @@ | |||
864 | 762 | } | 764 | } |
865 | 763 | } | 765 | } |
866 | 764 | 766 | ||
868 | 765 | @@ -3096,6 +3101,7 @@ | 767 | @@ -3095,6 +3100,7 @@ |
869 | 766 | recv_sys->recovered_lsn = checkpoint_lsn; | 768 | recv_sys->recovered_lsn = checkpoint_lsn; |
870 | 767 | 769 | ||
871 | 768 | srv_start_lsn = checkpoint_lsn; | 770 | srv_start_lsn = checkpoint_lsn; |
872 | @@ -770,7 +772,7 @@ | |||
873 | 770 | } | 772 | } |
874 | 771 | 773 | ||
875 | 772 | contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn, | 774 | contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn, |
877 | 773 | @@ -3454,6 +3460,7 @@ | 775 | @@ -3453,6 +3459,7 @@ |
878 | 774 | that the data dictionary tables will be free of any locks. | 776 | that the data dictionary tables will be free of any locks. |
879 | 775 | The data dictionary latch should guarantee that there is at | 777 | The data dictionary latch should guarantee that there is at |
880 | 776 | most one data dictionary transaction active at a time. */ | 778 | most one data dictionary transaction active at a time. */ |
881 | @@ -780,7 +782,7 @@ | |||
882 | 780 | 782 | ||
883 | 781 | --- a/storage/innodb_plugin/os/os0file.c | 783 | --- a/storage/innodb_plugin/os/os0file.c |
884 | 782 | +++ b/storage/innodb_plugin/os/os0file.c | 784 | +++ b/storage/innodb_plugin/os/os0file.c |
886 | 783 | @@ -554,7 +554,7 @@ | 785 | @@ -555,7 +555,7 @@ |
887 | 784 | } | 786 | } |
888 | 785 | 787 | ||
889 | 786 | #undef USE_FILE_LOCK | 788 | #undef USE_FILE_LOCK |
890 | @@ -789,7 +791,7 @@ | |||
891 | 789 | #if defined(UNIV_HOTBACKUP) || defined(__WIN__) || defined(__NETWARE__) | 791 | #if defined(UNIV_HOTBACKUP) || defined(__WIN__) || defined(__NETWARE__) |
892 | 790 | /* InnoDB Hot Backup does not lock the data files. | 792 | /* InnoDB Hot Backup does not lock the data files. |
893 | 791 | * On Windows, mandatory locking is used. | 793 | * On Windows, mandatory locking is used. |
895 | 792 | @@ -1356,8 +1356,9 @@ | 794 | @@ -1357,8 +1357,9 @@ |
896 | 793 | attributes = 0; | 795 | attributes = 0; |
897 | 794 | ut_error; | 796 | ut_error; |
898 | 795 | } | 797 | } |
899 | @@ -800,7 +802,7 @@ | |||
900 | 800 | GENERIC_READ | GENERIC_WRITE, /* read and write | 802 | GENERIC_READ | GENERIC_WRITE, /* read and write |
901 | 801 | access */ | 803 | access */ |
902 | 802 | share_mode, /* File can be read also by other | 804 | share_mode, /* File can be read also by other |
904 | 803 | @@ -1416,7 +1417,11 @@ | 805 | @@ -1417,7 +1418,11 @@ |
905 | 804 | if (create_mode == OS_FILE_OPEN || create_mode == OS_FILE_OPEN_RAW | 806 | if (create_mode == OS_FILE_OPEN || create_mode == OS_FILE_OPEN_RAW |
906 | 805 | || create_mode == OS_FILE_OPEN_RETRY) { | 807 | || create_mode == OS_FILE_OPEN_RETRY) { |
907 | 806 | mode_str = "OPEN"; | 808 | mode_str = "OPEN"; |
908 | @@ -813,7 +815,7 @@ | |||
909 | 813 | } else if (create_mode == OS_FILE_CREATE) { | 815 | } else if (create_mode == OS_FILE_CREATE) { |
910 | 814 | mode_str = "CREATE"; | 816 | mode_str = "CREATE"; |
911 | 815 | create_flag = O_RDWR | O_CREAT | O_EXCL; | 817 | create_flag = O_RDWR | O_CREAT | O_EXCL; |
913 | 816 | @@ -2622,6 +2627,9 @@ | 818 | @@ -2682,6 +2687,9 @@ |
914 | 817 | ut_a((offset & 0xFFFFFFFFUL) == offset); | 819 | ut_a((offset & 0xFFFFFFFFUL) == offset); |
915 | 818 | ut_a((n & 0xFFFFFFFFUL) == n); | 820 | ut_a((n & 0xFFFFFFFFUL) == n); |
916 | 819 | 821 | ||
917 | @@ -823,7 +825,7 @@ | |||
918 | 823 | os_n_file_writes++; | 825 | os_n_file_writes++; |
919 | 824 | 826 | ||
920 | 825 | ut_ad(file); | 827 | ut_ad(file); |
922 | 826 | @@ -2746,6 +2754,9 @@ | 828 | @@ -2806,6 +2814,9 @@ |
923 | 827 | #else | 829 | #else |
924 | 828 | ssize_t ret; | 830 | ssize_t ret; |
925 | 829 | 831 | ||
926 | @@ -855,7 +857,7 @@ | |||
927 | 855 | 857 | ||
928 | 856 | --- a/storage/innodb_plugin/row/row0merge.c | 858 | --- a/storage/innodb_plugin/row/row0merge.c |
929 | 857 | +++ b/storage/innodb_plugin/row/row0merge.c | 859 | +++ b/storage/innodb_plugin/row/row0merge.c |
931 | 858 | @@ -453,7 +453,9 @@ | 860 | @@ -454,7 +454,9 @@ |
932 | 859 | rec = rec_convert_dtuple_to_rec(*buf, index, tuple, n_ext); | 861 | rec = rec_convert_dtuple_to_rec(*buf, index, tuple, n_ext); |
933 | 860 | offsets = rec_get_offsets(rec, index, NULL, ULINT_UNDEFINED, &heap); | 862 | offsets = rec_get_offsets(rec, index, NULL, ULINT_UNDEFINED, &heap); |
934 | 861 | 863 | ||
935 | @@ -866,7 +868,7 @@ | |||
936 | 866 | 868 | ||
937 | 867 | mem_heap_free(heap); | 869 | mem_heap_free(heap); |
938 | 868 | } | 870 | } |
940 | 869 | @@ -1464,8 +1466,10 @@ | 871 | @@ -1465,8 +1467,10 @@ |
941 | 870 | case 0: | 872 | case 0: |
942 | 871 | if (UNIV_UNLIKELY | 873 | if (UNIV_UNLIKELY |
943 | 872 | (dict_index_is_unique(index) && !null_eq)) { | 874 | (dict_index_is_unique(index) && !null_eq)) { |
944 | @@ -879,7 +881,7 @@ | |||
945 | 879 | mem_heap_free(heap); | 881 | mem_heap_free(heap); |
946 | 880 | return(DB_DUPLICATE_KEY); | 882 | return(DB_DUPLICATE_KEY); |
947 | 881 | } | 883 | } |
949 | 882 | @@ -2593,7 +2597,9 @@ | 884 | @@ -2594,7 +2598,9 @@ |
950 | 883 | 885 | ||
951 | 884 | /* Reset the MySQL row buffer that is used when reporting | 886 | /* Reset the MySQL row buffer that is used when reporting |
952 | 885 | duplicate keys. */ | 887 | duplicate keys. */ |
953 | @@ -892,7 +894,19 @@ | |||
954 | 892 | secondary index entries for merge sort */ | 894 | secondary index entries for merge sort */ |
955 | 893 | --- a/storage/innodb_plugin/srv/srv0srv.c | 895 | --- a/storage/innodb_plugin/srv/srv0srv.c |
956 | 894 | +++ b/storage/innodb_plugin/srv/srv0srv.c | 896 | +++ b/storage/innodb_plugin/srv/srv0srv.c |
958 | 895 | @@ -402,6 +402,10 @@ | 897 | @@ -86,11 +86,6 @@ |
959 | 898 | #include "trx0i_s.h" | ||
960 | 899 | #include "os0sync.h" /* for HAVE_ATOMIC_BUILTINS */ | ||
961 | 900 | |||
962 | 901 | -/* prototypes of new functions added to ha_innodb.cc for kill_idle_transaction */ | ||
963 | 902 | -ibool innobase_thd_is_idle(const void* thd); | ||
964 | 903 | -ib_int64_t innobase_thd_get_start_time(const void* thd); | ||
965 | 904 | -void innobase_thd_kill(void* thd); | ||
966 | 905 | - | ||
967 | 906 | /* prototypes for new functions added to ha_innodb.cc */ | ||
968 | 907 | ibool innobase_get_slow_log(); | ||
969 | 908 | |||
970 | 909 | @@ -415,6 +410,10 @@ | ||
971 | 896 | 910 | ||
972 | 897 | UNIV_INTERN ulong srv_replication_delay = 0; | 911 | UNIV_INTERN ulong srv_replication_delay = 0; |
973 | 898 | 912 | ||
974 | @@ -903,7 +917,7 @@ | |||
975 | 903 | UNIV_INTERN long long srv_ibuf_max_size = 0; | 917 | UNIV_INTERN long long srv_ibuf_max_size = 0; |
976 | 904 | UNIV_INTERN ulint srv_ibuf_active_contract = 0; /* 0:disable 1:enable */ | 918 | UNIV_INTERN ulint srv_ibuf_active_contract = 0; /* 0:disable 1:enable */ |
977 | 905 | UNIV_INTERN ulint srv_ibuf_accel_rate = 100; | 919 | UNIV_INTERN ulint srv_ibuf_accel_rate = 100; |
979 | 906 | @@ -1050,7 +1054,7 @@ | 920 | @@ -1065,7 +1064,7 @@ |
980 | 907 | } | 921 | } |
981 | 908 | 922 | ||
982 | 909 | /* Initialize some INFORMATION SCHEMA internal structures */ | 923 | /* Initialize some INFORMATION SCHEMA internal structures */ |
983 | @@ -912,7 +926,7 @@ | |||
984 | 912 | } | 926 | } |
985 | 913 | 927 | ||
986 | 914 | /*********************************************************************//** | 928 | /*********************************************************************//** |
988 | 915 | @@ -1061,6 +1065,7 @@ | 929 | @@ -1076,6 +1075,7 @@ |
989 | 916 | /*==========*/ | 930 | /*==========*/ |
990 | 917 | { | 931 | { |
991 | 918 | os_fast_mutex_free(&srv_conc_mutex); | 932 | os_fast_mutex_free(&srv_conc_mutex); |
992 | @@ -920,7 +934,7 @@ | |||
993 | 920 | mem_free(srv_conc_slots); | 934 | mem_free(srv_conc_slots); |
994 | 921 | srv_conc_slots = NULL; | 935 | srv_conc_slots = NULL; |
995 | 922 | 936 | ||
997 | 923 | @@ -1074,6 +1079,7 @@ | 937 | @@ -1089,6 +1089,7 @@ |
998 | 924 | srv_mysql_table = NULL; | 938 | srv_mysql_table = NULL; |
999 | 925 | 939 | ||
1000 | 926 | trx_i_s_cache_free(trx_i_s_cache); | 940 | trx_i_s_cache_free(trx_i_s_cache); |
1001 | @@ -928,9 +942,46 @@ | |||
1002 | 928 | } | 942 | } |
1003 | 929 | 943 | ||
1004 | 930 | /*********************************************************************//** | 944 | /*********************************************************************//** |
1005 | 945 | @@ -2570,36 +2571,6 @@ | ||
1006 | 946 | old_sema = sema; | ||
1007 | 947 | } | ||
1008 | 948 | |||
1009 | 949 | - if (srv_kill_idle_transaction && trx_sys) { | ||
1010 | 950 | - trx_t* trx; | ||
1011 | 951 | - time_t now; | ||
1012 | 952 | -rescan_idle: | ||
1013 | 953 | - now = time(NULL); | ||
1014 | 954 | - mutex_enter(&kernel_mutex); | ||
1015 | 955 | - trx = UT_LIST_GET_FIRST(trx_sys->mysql_trx_list); | ||
1016 | 956 | - while (trx) { | ||
1017 | 957 | - if (trx->conc_state == TRX_ACTIVE | ||
1018 | 958 | - && trx->mysql_thd | ||
1019 | 959 | - && innobase_thd_is_idle(trx->mysql_thd)) { | ||
1020 | 960 | - ib_int64_t start_time; /* as stmt ID */ | ||
1021 | 961 | - | ||
1022 | 962 | - start_time = innobase_thd_get_start_time(trx->mysql_thd); | ||
1023 | 963 | - if (trx->last_stmt_start != start_time) { | ||
1024 | 964 | - trx->idle_start = now; | ||
1025 | 965 | - trx->last_stmt_start = start_time; | ||
1026 | 966 | - } else if (difftime(now, trx->idle_start) | ||
1027 | 967 | - > srv_kill_idle_transaction) { | ||
1028 | 968 | - /* kill the session */ | ||
1029 | 969 | - mutex_exit(&kernel_mutex); | ||
1030 | 970 | - innobase_thd_kill(trx->mysql_thd); | ||
1031 | 971 | - goto rescan_idle; | ||
1032 | 972 | - } | ||
1033 | 973 | - } | ||
1034 | 974 | - trx = UT_LIST_GET_NEXT(mysql_trx_list, trx); | ||
1035 | 975 | - } | ||
1036 | 976 | - mutex_exit(&kernel_mutex); | ||
1037 | 977 | - } | ||
1038 | 978 | - | ||
1039 | 979 | /* Flush stderr so that a database user gets the output | ||
1040 | 980 | to possible MySQL error file */ | ||
1041 | 981 | |||
1042 | 931 | --- a/storage/innodb_plugin/srv/srv0start.c | 982 | --- a/storage/innodb_plugin/srv/srv0start.c |
1043 | 932 | +++ b/storage/innodb_plugin/srv/srv0start.c | 983 | +++ b/storage/innodb_plugin/srv/srv0start.c |
1045 | 933 | @@ -94,6 +94,8 @@ | 984 | @@ -95,6 +95,8 @@ |
1046 | 934 | /** Log sequence number at shutdown */ | 985 | /** Log sequence number at shutdown */ |
1047 | 935 | UNIV_INTERN ib_uint64_t srv_shutdown_lsn; | 986 | UNIV_INTERN ib_uint64_t srv_shutdown_lsn; |
1048 | 936 | 987 | ||
1049 | @@ -939,7 +990,7 @@ | |||
1050 | 939 | #ifdef HAVE_DARWIN_THREADS | 990 | #ifdef HAVE_DARWIN_THREADS |
1051 | 940 | # include <sys/utsname.h> | 991 | # include <sys/utsname.h> |
1052 | 941 | /** TRUE if the F_FULLFSYNC option is available */ | 992 | /** TRUE if the F_FULLFSYNC option is available */ |
1054 | 942 | @@ -544,7 +546,7 @@ | 993 | @@ -545,7 +547,7 @@ |
1055 | 943 | /*********************************************************************//** | 994 | /*********************************************************************//** |
1056 | 944 | Creates or opens the log files and closes them. | 995 | Creates or opens the log files and closes them. |
1057 | 945 | @return DB_SUCCESS or error code */ | 996 | @return DB_SUCCESS or error code */ |
1058 | @@ -948,7 +999,7 @@ | |||
1059 | 948 | ulint | 999 | ulint |
1060 | 949 | open_or_create_log_file( | 1000 | open_or_create_log_file( |
1061 | 950 | /*====================*/ | 1001 | /*====================*/ |
1063 | 951 | @@ -702,7 +704,7 @@ | 1002 | @@ -703,7 +705,7 @@ |
1064 | 952 | /*********************************************************************//** | 1003 | /*********************************************************************//** |
1065 | 953 | Creates or opens database data files and closes them. | 1004 | Creates or opens database data files and closes them. |
1066 | 954 | @return DB_SUCCESS or error code */ | 1005 | @return DB_SUCCESS or error code */ |
1067 | @@ -957,7 +1008,7 @@ | |||
1068 | 957 | ulint | 1008 | ulint |
1069 | 958 | open_or_create_data_files( | 1009 | open_or_create_data_files( |
1070 | 959 | /*======================*/ | 1010 | /*======================*/ |
1072 | 960 | @@ -1777,6 +1779,10 @@ | 1011 | @@ -1782,6 +1784,10 @@ |
1073 | 961 | are initialized in trx_sys_init_at_db_start(). */ | 1012 | are initialized in trx_sys_init_at_db_start(). */ |
1074 | 962 | 1013 | ||
1075 | 963 | recv_recovery_from_checkpoint_finish(); | 1014 | recv_recovery_from_checkpoint_finish(); |
1076 | @@ -968,7 +1019,7 @@ | |||
1077 | 968 | if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) { | 1019 | if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) { |
1078 | 969 | /* The following call is necessary for the insert | 1020 | /* The following call is necessary for the insert |
1079 | 970 | buffer to work with multiple tablespaces. We must | 1021 | buffer to work with multiple tablespaces. We must |
1081 | 971 | @@ -1952,7 +1958,18 @@ | 1022 | @@ -1962,7 +1968,18 @@ |
1082 | 972 | 1023 | ||
1083 | 973 | if (srv_auto_extend_last_data_file | 1024 | if (srv_auto_extend_last_data_file |
1084 | 974 | && sum_of_data_file_sizes < tablespace_size_in_header) { | 1025 | && sum_of_data_file_sizes < tablespace_size_in_header) { |
1085 | @@ -987,7 +1038,7 @@ | |||
1086 | 987 | fprintf(stderr, | 1038 | fprintf(stderr, |
1087 | 988 | "InnoDB: Error: tablespace size stored in header" | 1039 | "InnoDB: Error: tablespace size stored in header" |
1088 | 989 | " is %lu pages, but\n" | 1040 | " is %lu pages, but\n" |
1090 | 990 | @@ -1977,6 +1994,7 @@ | 1041 | @@ -1987,6 +2004,7 @@ |
1091 | 991 | 1042 | ||
1092 | 992 | return(DB_ERROR); | 1043 | return(DB_ERROR); |
1093 | 993 | } | 1044 | } |
1094 | @@ -995,7 +1046,7 @@ | |||
1095 | 995 | } | 1046 | } |
1096 | 996 | 1047 | ||
1097 | 997 | /* Check that os_fast_mutexes work as expected */ | 1048 | /* Check that os_fast_mutexes work as expected */ |
1099 | 998 | @@ -2079,6 +2097,7 @@ | 1049 | @@ -2089,6 +2107,7 @@ |
1100 | 999 | ibuf_update_max_tablespace_id(); | 1050 | ibuf_update_max_tablespace_id(); |
1101 | 1000 | } | 1051 | } |
1102 | 1001 | 1052 | ||
1103 | @@ -1031,7 +1082,7 @@ | |||
1104 | 1031 | 1082 | ||
1105 | 1032 | --- a/storage/innodb_plugin/trx/trx0sys.c | 1083 | --- a/storage/innodb_plugin/trx/trx0sys.c |
1106 | 1033 | +++ b/storage/innodb_plugin/trx/trx0sys.c | 1084 | +++ b/storage/innodb_plugin/trx/trx0sys.c |
1108 | 1034 | @@ -1931,10 +1931,12 @@ | 1085 | @@ -1941,10 +1941,12 @@ |
1109 | 1035 | UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view); | 1086 | UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view); |
1110 | 1036 | } | 1087 | } |
1111 | 1037 | 1088 | ||
1112 | @@ -1046,27 +1097,27 @@ | |||
1113 | 1046 | 1097 | ||
1114 | 1047 | --- a/storage/innodb_plugin/trx/trx0trx.c | 1098 | --- a/storage/innodb_plugin/trx/trx0trx.c |
1115 | 1048 | +++ b/storage/innodb_plugin/trx/trx0trx.c | 1099 | +++ b/storage/innodb_plugin/trx/trx0trx.c |
1117 | 1049 | @@ -109,8 +109,6 @@ | 1100 | @@ -112,8 +112,6 @@ |
1118 | 1050 | 1101 | ||
1119 | 1051 | trx->support_xa = TRUE; | 1102 | trx->support_xa = TRUE; |
1120 | 1052 | 1103 | ||
1121 | 1053 | - trx->flush_log_at_trx_commit_session = 3; /* means to use innodb_flush_log_at_trx_commit value */ | 1104 | - trx->flush_log_at_trx_commit_session = 3; /* means to use innodb_flush_log_at_trx_commit value */ |
1122 | 1054 | - | 1105 | - |
1123 | 1106 | trx->fake_changes = FALSE; | ||
1124 | 1107 | |||
1125 | 1055 | trx->check_foreigns = TRUE; | 1108 | trx->check_foreigns = TRUE; |
1130 | 1056 | trx->check_unique_secondary = TRUE; | 1109 | @@ -556,8 +554,8 @@ |
1127 | 1057 | |||
1128 | 1058 | @@ -493,8 +491,8 @@ | ||
1129 | 1059 | TRX_ID_PREP_PRINTF(trx->id)); | ||
1131 | 1060 | 1110 | ||
1132 | 1061 | if (srv_force_recovery == 0) { | 1111 | if (srv_force_recovery == 0) { |
1134 | 1062 | - | 1112 | |
1135 | 1063 | - trx->conc_state = TRX_PREPARED; | 1113 | - trx->conc_state = TRX_PREPARED; |
1136 | 1114 | - trx_n_prepared++; | ||
1137 | 1064 | + /* xtrabackup should rollback it */ | 1115 | + /* xtrabackup should rollback it */ |
1138 | 1065 | + trx->conc_state = TRX_ACTIVE; | 1116 | + trx->conc_state = TRX_ACTIVE; |
1139 | 1066 | } else { | 1117 | } else { |
1140 | 1067 | fprintf(stderr, | 1118 | fprintf(stderr, |
1141 | 1068 | "InnoDB: Since" | 1119 | "InnoDB: Since" |
1143 | 1069 | @@ -570,9 +568,9 @@ | 1120 | @@ -633,10 +631,9 @@ |
1144 | 1070 | trx->id)); | 1121 | trx->id)); |
1145 | 1071 | 1122 | ||
1146 | 1072 | if (srv_force_recovery == 0) { | 1123 | if (srv_force_recovery == 0) { |
1147 | @@ -1074,11 +1125,12 @@ | |||
1148 | 1074 | + /* xtrabackup should rollback it */ | 1125 | + /* xtrabackup should rollback it */ |
1149 | 1075 | trx->conc_state | 1126 | trx->conc_state |
1150 | 1076 | - = TRX_PREPARED; | 1127 | - = TRX_PREPARED; |
1151 | 1128 | - trx_n_prepared++; | ||
1152 | 1077 | + = TRX_ACTIVE; | 1129 | + = TRX_ACTIVE; |
1153 | 1078 | } else { | 1130 | } else { |
1154 | 1079 | fprintf(stderr, | 1131 | fprintf(stderr, |
1155 | 1080 | "InnoDB: Since" | 1132 | "InnoDB: Since" |
1157 | 1081 | @@ -737,9 +735,6 @@ | 1133 | @@ -801,9 +798,6 @@ |
1158 | 1082 | generated by the same transaction, doesn't. */ | 1134 | generated by the same transaction, doesn't. */ |
1159 | 1083 | trx->support_xa = thd_supports_xa(trx->mysql_thd); | 1135 | trx->support_xa = thd_supports_xa(trx->mysql_thd); |
1160 | 1084 | 1136 | ||
1161 | @@ -1088,7 +1140,7 @@ | |||
1162 | 1088 | mutex_enter(&kernel_mutex); | 1140 | mutex_enter(&kernel_mutex); |
1163 | 1089 | 1141 | ||
1164 | 1090 | ret = trx_start_low(trx, rseg_id); | 1142 | ret = trx_start_low(trx, rseg_id); |
1166 | 1091 | @@ -921,7 +916,6 @@ | 1143 | @@ -990,7 +984,6 @@ |
1167 | 1092 | trx->read_view = NULL; | 1144 | trx->read_view = NULL; |
1168 | 1093 | 1145 | ||
1169 | 1094 | if (lsn) { | 1146 | if (lsn) { |
1170 | @@ -1096,7 +1148,7 @@ | |||
1171 | 1096 | 1148 | ||
1172 | 1097 | mutex_exit(&kernel_mutex); | 1149 | mutex_exit(&kernel_mutex); |
1173 | 1098 | 1150 | ||
1175 | 1099 | @@ -930,12 +924,6 @@ | 1151 | @@ -999,11 +992,6 @@ |
1176 | 1100 | trx_undo_insert_cleanup(trx); | 1152 | trx_undo_insert_cleanup(trx); |
1177 | 1101 | } | 1153 | } |
1178 | 1102 | 1154 | ||
1179 | @@ -1105,11 +1157,10 @@ | |||
1180 | 1105 | - } else { | 1157 | - } else { |
1181 | 1106 | - flush_log_at_trx_commit = trx->flush_log_at_trx_commit_session; | 1158 | - flush_log_at_trx_commit = trx->flush_log_at_trx_commit_session; |
1182 | 1107 | - } | 1159 | - } |
1184 | 1108 | - | 1160 | |
1185 | 1109 | /* NOTE that we could possibly make a group commit more | 1161 | /* NOTE that we could possibly make a group commit more |
1186 | 1110 | efficient here: call os_thread_yield here to allow also other | 1162 | efficient here: call os_thread_yield here to allow also other |
1189 | 1111 | trxs to come to commit! */ | 1163 | @@ -1036,9 +1024,9 @@ |
1188 | 1112 | @@ -967,9 +955,9 @@ | ||
1190 | 1113 | if (trx->flush_log_later) { | 1164 | if (trx->flush_log_later) { |
1191 | 1114 | /* Do nothing yet */ | 1165 | /* Do nothing yet */ |
1192 | 1115 | trx->must_flush_log_later = TRUE; | 1166 | trx->must_flush_log_later = TRUE; |
1193 | @@ -1121,7 +1172,7 @@ | |||
1194 | 1121 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { | 1172 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { |
1195 | 1122 | /* Write the log but do not flush it to disk */ | 1173 | /* Write the log but do not flush it to disk */ |
1196 | 1123 | 1174 | ||
1198 | 1124 | @@ -981,7 +969,7 @@ | 1175 | @@ -1050,7 +1038,7 @@ |
1199 | 1125 | 1176 | ||
1200 | 1126 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); | 1177 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); |
1201 | 1127 | } | 1178 | } |
1202 | @@ -1130,7 +1181,7 @@ | |||
1203 | 1130 | 1181 | ||
1204 | 1131 | /* Write the log but do not flush it to disk */ | 1182 | /* Write the log but do not flush it to disk */ |
1205 | 1132 | 1183 | ||
1207 | 1133 | @@ -1661,23 +1649,16 @@ | 1184 | @@ -1730,23 +1718,16 @@ |
1208 | 1134 | trx_t* trx) /*!< in: trx handle */ | 1185 | trx_t* trx) /*!< in: trx handle */ |
1209 | 1135 | { | 1186 | { |
1210 | 1136 | ib_uint64_t lsn = trx->commit_lsn; | 1187 | ib_uint64_t lsn = trx->commit_lsn; |
1211 | @@ -1156,7 +1207,7 @@ | |||
1212 | 1156 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { | 1207 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { |
1213 | 1157 | /* Write the log but do not flush it to disk */ | 1208 | /* Write the log but do not flush it to disk */ |
1214 | 1158 | 1209 | ||
1216 | 1159 | @@ -1688,7 +1669,7 @@ | 1210 | @@ -1757,7 +1738,7 @@ |
1217 | 1160 | 1211 | ||
1218 | 1161 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); | 1212 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); |
1219 | 1162 | } | 1213 | } |
1220 | @@ -1165,7 +1216,7 @@ | |||
1221 | 1165 | 1216 | ||
1222 | 1166 | /* Write the log but do not flush it to disk */ | 1217 | /* Write the log but do not flush it to disk */ |
1223 | 1167 | 1218 | ||
1225 | 1168 | @@ -1948,8 +1929,6 @@ | 1219 | @@ -2018,8 +1999,6 @@ |
1226 | 1169 | /*--------------------------------------*/ | 1220 | /*--------------------------------------*/ |
1227 | 1170 | 1221 | ||
1228 | 1171 | if (lsn) { | 1222 | if (lsn) { |
1229 | @@ -1174,7 +1225,7 @@ | |||
1230 | 1174 | /* Depending on the my.cnf options, we may now write the log | 1225 | /* Depending on the my.cnf options, we may now write the log |
1231 | 1175 | buffer to the log files, making the prepared state of the | 1226 | buffer to the log files, making the prepared state of the |
1232 | 1176 | transaction durable if the OS does not crash. We may also | 1227 | transaction durable if the OS does not crash. We may also |
1234 | 1177 | @@ -1969,15 +1948,9 @@ | 1228 | @@ -2039,15 +2018,9 @@ |
1235 | 1178 | 1229 | ||
1236 | 1179 | mutex_exit(&kernel_mutex); | 1230 | mutex_exit(&kernel_mutex); |
1237 | 1180 | 1231 | ||
1238 | @@ -1192,7 +1243,7 @@ | |||
1239 | 1192 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { | 1243 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { |
1240 | 1193 | /* Write the log but do not flush it to disk */ | 1244 | /* Write the log but do not flush it to disk */ |
1241 | 1194 | 1245 | ||
1243 | 1195 | @@ -1989,7 +1962,7 @@ | 1246 | @@ -2059,7 +2032,7 @@ |
1244 | 1196 | 1247 | ||
1245 | 1197 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); | 1248 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); |
1246 | 1198 | } | 1249 | } |
1247 | 1199 | 1250 | ||
1248 | === modified file 'patches/xtradb55.patch' | |||
1249 | --- patches/xtradb55.patch 2011-09-14 12:48:27 +0000 | |||
1250 | +++ patches/xtradb55.patch 2011-11-27 06:47:26 +0000 | |||
1251 | @@ -1,6 +1,6 @@ | |||
1252 | 1 | --- a/storage/innobase/btr/btr0btr.c | 1 | --- a/storage/innobase/btr/btr0btr.c |
1253 | 2 | +++ b/storage/innobase/btr/btr0btr.c | 2 | +++ b/storage/innobase/btr/btr0btr.c |
1255 | 3 | @@ -120,7 +120,7 @@ | 3 | @@ -674,7 +674,7 @@ |
1256 | 4 | /**************************************************************//** | 4 | /**************************************************************//** |
1257 | 5 | Gets the root node of a tree and x-latches it. | 5 | Gets the root node of a tree and x-latches it. |
1258 | 6 | @return root page, x-latched */ | 6 | @return root page, x-latched */ |
1259 | @@ -9,7 +9,7 @@ | |||
1260 | 9 | buf_block_t* | 9 | buf_block_t* |
1261 | 10 | btr_root_block_get( | 10 | btr_root_block_get( |
1262 | 11 | /*===============*/ | 11 | /*===============*/ |
1264 | 12 | @@ -578,7 +578,7 @@ | 12 | @@ -1134,7 +1134,7 @@ |
1265 | 13 | /************************************************************//** | 13 | /************************************************************//** |
1266 | 14 | Returns the child page of a node pointer and x-latches it. | 14 | Returns the child page of a node pointer and x-latches it. |
1267 | 15 | @return child page, x-latched */ | 15 | @return child page, x-latched */ |
1268 | @@ -20,7 +20,7 @@ | |||
1269 | 20 | /*===================*/ | 20 | /*===================*/ |
1270 | 21 | --- a/storage/innobase/buf/buf0buf.c | 21 | --- a/storage/innobase/buf/buf0buf.c |
1271 | 22 | +++ b/storage/innobase/buf/buf0buf.c | 22 | +++ b/storage/innobase/buf/buf0buf.c |
1273 | 23 | @@ -609,7 +609,7 @@ | 23 | @@ -581,7 +581,7 @@ |
1274 | 24 | return(TRUE); | 24 | return(TRUE); |
1275 | 25 | } | 25 | } |
1276 | 26 | 26 | ||
1277 | @@ -29,7 +29,7 @@ | |||
1278 | 29 | if (recv_lsn_checks_on) { | 29 | if (recv_lsn_checks_on) { |
1279 | 30 | ib_uint64_t current_lsn; | 30 | ib_uint64_t current_lsn; |
1280 | 31 | 31 | ||
1282 | 32 | @@ -4901,7 +4901,7 @@ | 32 | @@ -4064,7 +4064,7 @@ |
1283 | 33 | recv_recover_page(TRUE, (buf_block_t*) bpage); | 33 | recv_recover_page(TRUE, (buf_block_t*) bpage); |
1284 | 34 | } | 34 | } |
1285 | 35 | 35 | ||
1286 | @@ -40,7 +40,7 @@ | |||
1287 | 40 | (srv_pass_corrupt_table && bpage->is_corrupt) ? NULL : | 40 | (srv_pass_corrupt_table && bpage->is_corrupt) ? NULL : |
1288 | 41 | --- a/storage/innobase/fil/fil0fil.c | 41 | --- a/storage/innobase/fil/fil0fil.c |
1289 | 42 | +++ b/storage/innobase/fil/fil0fil.c | 42 | +++ b/storage/innobase/fil/fil0fil.c |
1291 | 43 | @@ -305,7 +305,7 @@ | 43 | @@ -307,7 +307,7 @@ |
1292 | 44 | 44 | ||
1293 | 45 | /** The tablespace memory cache. This variable is NULL before the module is | 45 | /** The tablespace memory cache. This variable is NULL before the module is |
1294 | 46 | initialized. */ | 46 | initialized. */ |
1295 | @@ -49,7 +49,7 @@ | |||
1296 | 49 | 49 | ||
1297 | 50 | #ifdef UNIV_DEBUG | 50 | #ifdef UNIV_DEBUG |
1298 | 51 | /** Try fil_validate() every this many times */ | 51 | /** Try fil_validate() every this many times */ |
1300 | 52 | @@ -344,7 +344,7 @@ | 52 | @@ -346,7 +346,7 @@ |
1301 | 53 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys | 53 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
1302 | 54 | mutex. */ | 54 | mutex. */ |
1303 | 55 | static | 55 | static |
1304 | @@ -58,7 +58,7 @@ | |||
1305 | 58 | fil_node_prepare_for_io( | 58 | fil_node_prepare_for_io( |
1306 | 59 | /*====================*/ | 59 | /*====================*/ |
1307 | 60 | fil_node_t* node, /*!< in: file node */ | 60 | fil_node_t* node, /*!< in: file node */ |
1309 | 61 | @@ -669,7 +669,7 @@ | 61 | @@ -671,7 +671,7 @@ |
1310 | 62 | Opens a the file of a node of a tablespace. The caller must own the fil_system | 62 | Opens a the file of a node of a tablespace. The caller must own the fil_system |
1311 | 63 | mutex. */ | 63 | mutex. */ |
1312 | 64 | static | 64 | static |
1313 | @@ -67,7 +67,7 @@ | |||
1314 | 67 | fil_node_open_file( | 67 | fil_node_open_file( |
1315 | 68 | /*===============*/ | 68 | /*===============*/ |
1316 | 69 | fil_node_t* node, /*!< in: file node */ | 69 | fil_node_t* node, /*!< in: file node */ |
1318 | 70 | @@ -704,7 +704,17 @@ | 70 | @@ -706,7 +706,17 @@ |
1319 | 71 | OS_FILE_READ_ONLY, &success); | 71 | OS_FILE_READ_ONLY, &success); |
1320 | 72 | if (!success) { | 72 | if (!success) { |
1321 | 73 | /* The following call prints an error message */ | 73 | /* The following call prints an error message */ |
1322 | @@ -86,7 +86,7 @@ | |||
1323 | 86 | 86 | ||
1324 | 87 | ut_print_timestamp(stderr); | 87 | ut_print_timestamp(stderr); |
1325 | 88 | 88 | ||
1327 | 89 | @@ -765,12 +775,15 @@ | 89 | @@ -767,12 +777,15 @@ |
1328 | 90 | 90 | ||
1329 | 91 | if (UNIV_UNLIKELY(space_id != space->id)) { | 91 | if (UNIV_UNLIKELY(space_id != space->id)) { |
1330 | 92 | fprintf(stderr, | 92 | fprintf(stderr, |
1331 | @@ -105,7 +105,7 @@ | |||
1332 | 105 | } | 105 | } |
1333 | 106 | 106 | ||
1334 | 107 | if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED | 107 | if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED |
1336 | 108 | @@ -794,8 +807,8 @@ | 108 | @@ -796,8 +809,8 @@ |
1337 | 109 | } | 109 | } |
1338 | 110 | 110 | ||
1339 | 111 | if (size_bytes >= 1024 * 1024) { | 111 | if (size_bytes >= 1024 * 1024) { |
1340 | @@ -116,7 +116,7 @@ | |||
1341 | 116 | } | 116 | } |
1342 | 117 | 117 | ||
1343 | 118 | if (!(flags & DICT_TF_ZSSIZE_MASK)) { | 118 | if (!(flags & DICT_TF_ZSSIZE_MASK)) { |
1345 | 119 | @@ -846,6 +859,8 @@ | 119 | @@ -848,6 +861,8 @@ |
1346 | 120 | /* Put the node to the LRU list */ | 120 | /* Put the node to the LRU list */ |
1347 | 121 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); | 121 | UT_LIST_ADD_FIRST(LRU, system->LRU, node); |
1348 | 122 | } | 122 | } |
1349 | @@ -125,7 +125,7 @@ | |||
1350 | 125 | } | 125 | } |
1351 | 126 | 126 | ||
1352 | 127 | /**********************************************************************//** | 127 | /**********************************************************************//** |
1354 | 128 | @@ -1474,7 +1489,12 @@ | 128 | @@ -1477,7 +1492,12 @@ |
1355 | 129 | the file yet; the following calls will open it and update the | 129 | the file yet; the following calls will open it and update the |
1356 | 130 | size fields */ | 130 | size fields */ |
1357 | 131 | 131 | ||
1358 | @@ -139,7 +139,7 @@ | |||
1359 | 139 | fil_node_complete_io(node, fil_system, OS_FILE_READ); | 139 | fil_node_complete_io(node, fil_system, OS_FILE_READ); |
1360 | 140 | } | 140 | } |
1361 | 141 | 141 | ||
1363 | 142 | @@ -1526,7 +1546,12 @@ | 142 | @@ -1529,7 +1549,12 @@ |
1364 | 143 | the file yet; the following calls will open it and update the | 143 | the file yet; the following calls will open it and update the |
1365 | 144 | size fields */ | 144 | size fields */ |
1366 | 145 | 145 | ||
1367 | @@ -153,7 +153,7 @@ | |||
1368 | 153 | fil_node_complete_io(node, fil_system, OS_FILE_READ); | 153 | fil_node_complete_io(node, fil_system, OS_FILE_READ); |
1369 | 154 | } | 154 | } |
1370 | 155 | 155 | ||
1372 | 156 | @@ -2202,7 +2227,7 @@ | 156 | @@ -2205,7 +2230,7 @@ |
1373 | 157 | if (fil_create_new_single_table_tablespace( | 157 | if (fil_create_new_single_table_tablespace( |
1374 | 158 | space_id, name, FALSE, flags, | 158 | space_id, name, FALSE, flags, |
1375 | 159 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { | 159 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { |
1376 | @@ -162,7 +162,7 @@ | |||
1377 | 162 | } | 162 | } |
1378 | 163 | } | 163 | } |
1379 | 164 | 164 | ||
1381 | 165 | @@ -2369,7 +2394,7 @@ | 165 | @@ -2372,7 +2397,7 @@ |
1382 | 166 | } | 166 | } |
1383 | 167 | 167 | ||
1384 | 168 | if (success) { | 168 | if (success) { |
1385 | @@ -171,7 +171,7 @@ | |||
1386 | 171 | /* Write a log record about the deletion of the .ibd | 171 | /* Write a log record about the deletion of the .ibd |
1387 | 172 | file, so that ibbackup can replay it in the | 172 | file, so that ibbackup can replay it in the |
1388 | 173 | --apply-log phase. We use a dummy mtr and the familiar | 173 | --apply-log phase. We use a dummy mtr and the familiar |
1390 | 174 | @@ -2670,7 +2695,7 @@ | 174 | @@ -2673,7 +2698,7 @@ |
1391 | 175 | 175 | ||
1392 | 176 | mutex_exit(&fil_system->mutex); | 176 | mutex_exit(&fil_system->mutex); |
1393 | 177 | 177 | ||
1394 | @@ -180,7 +180,7 @@ | |||
1395 | 180 | if (success) { | 180 | if (success) { |
1396 | 181 | mtr_t mtr; | 181 | mtr_t mtr; |
1397 | 182 | 182 | ||
1399 | 183 | @@ -2861,7 +2886,7 @@ | 183 | @@ -2864,7 +2889,7 @@ |
1400 | 184 | 184 | ||
1401 | 185 | fil_node_create(path, size, space_id, FALSE); | 185 | fil_node_create(path, size, space_id, FALSE); |
1402 | 186 | 186 | ||
1403 | @@ -189,7 +189,7 @@ | |||
1404 | 189 | { | 189 | { |
1405 | 190 | mtr_t mtr; | 190 | mtr_t mtr; |
1406 | 191 | 191 | ||
1408 | 192 | @@ -3116,19 +3141,97 @@ | 192 | @@ -3210,19 +3235,97 @@ |
1409 | 193 | "InnoDB: open the tablespace file ", stderr); | 193 | "InnoDB: open the tablespace file ", stderr); |
1410 | 194 | ut_print_filename(stderr, filepath); | 194 | ut_print_filename(stderr, filepath); |
1411 | 195 | fputs("!\n" | 195 | fputs("!\n" |
1412 | @@ -297,7 +297,7 @@ | |||
1413 | 297 | return(FALSE); | 297 | return(FALSE); |
1414 | 298 | } | 298 | } |
1415 | 299 | 299 | ||
1417 | 300 | @@ -3836,7 +3939,7 @@ | 300 | @@ -4158,7 +4261,7 @@ |
1418 | 301 | cannot be ok. */ | 301 | cannot be ok. */ |
1419 | 302 | 302 | ||
1420 | 303 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; | 303 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; |
1421 | @@ -306,7 +306,7 @@ | |||
1422 | 306 | if (size < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) { | 306 | if (size < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) { |
1423 | 307 | fprintf(stderr, | 307 | fprintf(stderr, |
1424 | 308 | "InnoDB: Error: the size of single-table tablespace" | 308 | "InnoDB: Error: the size of single-table tablespace" |
1426 | 309 | @@ -3977,7 +4080,7 @@ | 309 | @@ -4299,7 +4402,7 @@ |
1427 | 310 | idea is to read as much good data as we can and jump over bad data. | 310 | idea is to read as much good data as we can and jump over bad data. |
1428 | 311 | @return 0 if ok, -1 if error even after the retries, 1 if at the end | 311 | @return 0 if ok, -1 if error even after the retries, 1 if at the end |
1429 | 312 | of the directory */ | 312 | of the directory */ |
1430 | @@ -315,7 +315,7 @@ | |||
1431 | 315 | int | 315 | int |
1432 | 316 | fil_file_readdir_next_file( | 316 | fil_file_readdir_next_file( |
1433 | 317 | /*=======================*/ | 317 | /*=======================*/ |
1435 | 318 | @@ -4276,15 +4379,97 @@ | 318 | @@ -4598,15 +4701,97 @@ |
1436 | 319 | "InnoDB: in InnoDB data dictionary" | 319 | "InnoDB: in InnoDB data dictionary" |
1437 | 320 | " has tablespace id %lu,\n" | 320 | " has tablespace id %lu,\n" |
1438 | 321 | "InnoDB: but tablespace with that id" | 321 | "InnoDB: but tablespace with that id" |
1439 | @@ -421,7 +421,7 @@ | |||
1440 | 421 | } else { | 421 | } else { |
1441 | 422 | ut_print_timestamp(stderr); | 422 | ut_print_timestamp(stderr); |
1442 | 423 | fputs(" InnoDB: Error: table ", stderr); | 423 | fputs(" InnoDB: Error: table ", stderr); |
1444 | 424 | @@ -4683,7 +4868,7 @@ | 424 | @@ -5005,7 +5190,7 @@ |
1445 | 425 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys | 425 | off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
1446 | 426 | mutex. */ | 426 | mutex. */ |
1447 | 427 | static | 427 | static |
1448 | @@ -430,7 +430,7 @@ | |||
1449 | 430 | fil_node_prepare_for_io( | 430 | fil_node_prepare_for_io( |
1450 | 431 | /*====================*/ | 431 | /*====================*/ |
1451 | 432 | fil_node_t* node, /*!< in: file node */ | 432 | fil_node_t* node, /*!< in: file node */ |
1453 | 433 | @@ -4703,10 +4888,13 @@ | 433 | @@ -5025,10 +5210,13 @@ |
1454 | 434 | } | 434 | } |
1455 | 435 | 435 | ||
1456 | 436 | if (node->open == FALSE) { | 436 | if (node->open == FALSE) { |
1457 | @@ -445,7 +445,7 @@ | |||
1458 | 445 | } | 445 | } |
1459 | 446 | 446 | ||
1460 | 447 | if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE | 447 | if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE |
1462 | 448 | @@ -4719,6 +4907,8 @@ | 448 | @@ -5041,6 +5229,8 @@ |
1463 | 449 | } | 449 | } |
1464 | 450 | 450 | ||
1465 | 451 | node->n_pending++; | 451 | node->n_pending++; |
1466 | @@ -454,7 +454,7 @@ | |||
1467 | 454 | } | 454 | } |
1468 | 455 | 455 | ||
1469 | 456 | /********************************************************************//** | 456 | /********************************************************************//** |
1471 | 457 | @@ -4920,6 +5110,16 @@ | 457 | @@ -5240,6 +5430,16 @@ |
1472 | 458 | 458 | ||
1473 | 459 | ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE)); | 459 | ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE)); |
1474 | 460 | 460 | ||
1475 | @@ -473,7 +473,7 @@ | |||
1476 | 473 | for (;;) { | 473 | for (;;) { |
1477 | 474 | --- a/storage/innobase/handler/ha_innodb.cc | 474 | --- a/storage/innobase/handler/ha_innodb.cc |
1478 | 475 | +++ b/storage/innobase/handler/ha_innodb.cc | 475 | +++ b/storage/innobase/handler/ha_innodb.cc |
1480 | 476 | @@ -460,13 +460,6 @@ | 476 | @@ -482,12 +482,6 @@ |
1481 | 477 | "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.", | 477 | "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.", |
1482 | 478 | NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0); | 478 | NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0); |
1483 | 479 | 479 | ||
1484 | @@ -483,15 +483,13 @@ | |||
1485 | 483 | - " or 2 (write at commit, flush once per second).", | 483 | - " or 2 (write at commit, flush once per second).", |
1486 | 484 | - NULL, NULL, 1, 0, 2, 0); | 484 | - NULL, NULL, 1, 0, 2, 0); |
1487 | 485 | - | 485 | - |
1494 | 486 | - | 486 | static MYSQL_THDVAR_BOOL(fake_changes, PLUGIN_VAR_OPCMDARG, |
1495 | 487 | static handler *innobase_create_handler(handlerton *hton, | 487 | "In the transaction after enabled, UPDATE, INSERT and DELETE only move the cursor to the records " |
1496 | 488 | TABLE_SHARE *table, | 488 | "and do nothing other operations (no changes, no ibuf, no undo, no transaction log) in the transaction. " |
1497 | 489 | MEM_ROOT *mem_root) | 489 | @@ -989,17 +983,6 @@ |
1492 | 490 | @@ -958,17 +951,6 @@ | ||
1493 | 491 | } | ||
1498 | 492 | } | 490 | } |
1499 | 493 | 491 | ||
1501 | 494 | -/******************************************************************//** | 492 | /******************************************************************//** |
1502 | 495 | -*/ | 493 | -*/ |
1503 | 496 | -extern "C" UNIV_INTERN | 494 | -extern "C" UNIV_INTERN |
1504 | 497 | -ulong | 495 | -ulong |
1505 | @@ -502,14 +500,14 @@ | |||
1506 | 502 | - return(THDVAR((THD*) thd, flush_log_at_trx_commit)); | 500 | - return(THDVAR((THD*) thd, flush_log_at_trx_commit)); |
1507 | 503 | -} | 501 | -} |
1508 | 504 | - | 502 | - |
1514 | 505 | /********************************************************************//** | 503 | -/******************************************************************//** |
1515 | 506 | Obtain the InnoDB transaction of a MySQL thread. | 504 | Returns true if expand_fast_index_creation is enabled for the current |
1516 | 507 | @return reference to transaction pointer */ | 505 | session. |
1517 | 508 | @@ -11595,18 +11577,12 @@ | 506 | @return the value of the server's expand_fast_index_creation variable */ |
1518 | 509 | innodb_file_format_max_validate, | 507 | @@ -11806,17 +11789,12 @@ |
1519 | 510 | innodb_file_format_max_update, "Antelope"); | 508 | innodb_file_format_max_update, "Antelope"); |
1520 | 511 | 509 | ||
1522 | 512 | -/* Changed to the THDVAR */ | 510 | /* Changed to the THDVAR */ |
1523 | 513 | -//static MYSQL_SYSVAR_ULONG(flush_log_at_trx_commit, srv_flush_log_at_trx_commit, | 511 | -//static MYSQL_SYSVAR_ULONG(flush_log_at_trx_commit, srv_flush_log_at_trx_commit, |
1524 | 514 | -// PLUGIN_VAR_OPCMDARG, | 512 | -// PLUGIN_VAR_OPCMDARG, |
1525 | 515 | -// "Set to 0 (write and flush once per second)," | 513 | -// "Set to 0 (write and flush once per second)," |
1526 | @@ -522,25 +520,25 @@ | |||
1527 | 522 | - "Use global innodb_flush_log_at_trx_commit value. (default: ON).", | 520 | - "Use global innodb_flush_log_at_trx_commit value. (default: ON).", |
1528 | 523 | - NULL, NULL, TRUE); | 521 | - NULL, NULL, TRUE); |
1529 | 524 | +static MYSQL_SYSVAR_ULONG(flush_log_at_trx_commit, srv_flush_log_at_trx_commit, | 522 | +static MYSQL_SYSVAR_ULONG(flush_log_at_trx_commit, srv_flush_log_at_trx_commit, |
1535 | 525 | + PLUGIN_VAR_OPCMDARG, | 523 | + PLUGIN_VAR_OPCMDARG, |
1536 | 526 | + "Set to 0 (write and flush once per second)," | 524 | + "Set to 0 (write and flush once per second)," |
1537 | 527 | + " 1 (write and flush at each commit)" | 525 | + " 1 (write and flush at each commit)" |
1538 | 528 | + " or 2 (write at commit, flush once per second).", | 526 | + " or 2 (write at commit, flush once per second).", |
1539 | 529 | + NULL, NULL, 1, 0, 2, 0); | 527 | + NULL, NULL, 1, 0, 2, 0); |
1540 | 530 | 528 | ||
1541 | 531 | static MYSQL_SYSVAR_STR(flush_method, innobase_file_flush_method, | 529 | static MYSQL_SYSVAR_STR(flush_method, innobase_file_flush_method, |
1542 | 532 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, | 530 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
1544 | 533 | @@ -12073,7 +12049,6 @@ | 531 | @@ -12294,7 +12272,6 @@ |
1545 | 534 | MYSQL_SYSVAR(file_format_check), | 532 | MYSQL_SYSVAR(file_format_check), |
1546 | 535 | MYSQL_SYSVAR(file_format_max), | 533 | MYSQL_SYSVAR(file_format_max), |
1547 | 536 | MYSQL_SYSVAR(flush_log_at_trx_commit), | 534 | MYSQL_SYSVAR(flush_log_at_trx_commit), |
1548 | 537 | - MYSQL_SYSVAR(use_global_flush_log_at_trx_commit), | 535 | - MYSQL_SYSVAR(use_global_flush_log_at_trx_commit), |
1549 | 538 | MYSQL_SYSVAR(flush_method), | 536 | MYSQL_SYSVAR(flush_method), |
1550 | 539 | MYSQL_SYSVAR(force_recovery), | 537 | MYSQL_SYSVAR(force_recovery), |
1552 | 540 | MYSQL_SYSVAR(locks_unsafe_for_binlog), | 538 | MYSQL_SYSVAR(large_prefix), |
1553 | 541 | --- a/storage/innobase/ibuf/ibuf0ibuf.c | 539 | --- a/storage/innobase/ibuf/ibuf0ibuf.c |
1554 | 542 | +++ b/storage/innobase/ibuf/ibuf0ibuf.c | 540 | +++ b/storage/innobase/ibuf/ibuf0ibuf.c |
1556 | 543 | @@ -1202,6 +1202,9 @@ | 541 | @@ -1190,6 +1190,9 @@ |
1557 | 544 | ut_ad(!recv_no_ibuf_operations); | 542 | ut_ad(!recv_no_ibuf_operations); |
1558 | 545 | ut_ad(x_latch || mtr == NULL); | 543 | ut_ad(x_latch || mtr == NULL); |
1559 | 546 | 544 | ||
1560 | @@ -550,7 +548,7 @@ | |||
1561 | 550 | if (ibuf_fixed_addr_page(space, zip_size, page_no)) { | 548 | if (ibuf_fixed_addr_page(space, zip_size, page_no)) { |
1562 | 551 | 549 | ||
1563 | 552 | return(TRUE); | 550 | return(TRUE); |
1565 | 553 | @@ -2733,6 +2736,9 @@ | 551 | @@ -2757,6 +2760,9 @@ |
1566 | 554 | ulint n_bytes; | 552 | ulint n_bytes; |
1567 | 555 | ulint n_pag2; | 553 | ulint n_pag2; |
1568 | 556 | 554 | ||
1569 | @@ -562,7 +560,7 @@ | |||
1570 | 562 | 560 | ||
1571 | 563 | --- a/storage/innobase/include/ha_prototypes.h | 561 | --- a/storage/innobase/include/ha_prototypes.h |
1572 | 564 | +++ b/storage/innobase/include/ha_prototypes.h | 562 | +++ b/storage/innobase/include/ha_prototypes.h |
1574 | 565 | @@ -275,12 +275,5 @@ | 563 | @@ -284,13 +284,6 @@ |
1575 | 566 | /*===================*/ | 564 | /*===================*/ |
1576 | 567 | void* thd, /*!< in: thread handle (THD*) */ | 565 | void* thd, /*!< in: thread handle (THD*) */ |
1577 | 568 | ulint value); /*!< in: time waited for the lock */ | 566 | ulint value); /*!< in: time waited for the lock */ |
1578 | @@ -574,10 +572,11 @@ | |||
1579 | 574 | -/*================================*/ | 572 | -/*================================*/ |
1580 | 575 | - void* thd); | 573 | - void* thd); |
1581 | 576 | 574 | ||
1583 | 577 | #endif | 575 | /**********************************************************************//** |
1584 | 576 | Get the current setting of the lower_case_table_names global parameter from | ||
1585 | 578 | --- a/storage/innobase/include/srv0srv.h | 577 | --- a/storage/innobase/include/srv0srv.h |
1586 | 579 | +++ b/storage/innobase/include/srv0srv.h | 578 | +++ b/storage/innobase/include/srv0srv.h |
1588 | 580 | @@ -148,8 +148,7 @@ | 579 | @@ -145,8 +145,7 @@ |
1589 | 581 | extern ulint srv_n_log_files; | 580 | extern ulint srv_n_log_files; |
1590 | 582 | extern ulint srv_log_file_size; | 581 | extern ulint srv_log_file_size; |
1591 | 583 | extern ulint srv_log_buffer_size; | 582 | extern ulint srv_log_buffer_size; |
1592 | @@ -587,7 +586,7 @@ | |||
1593 | 587 | extern char srv_adaptive_flushing; | 586 | extern char srv_adaptive_flushing; |
1594 | 588 | 587 | ||
1595 | 589 | 588 | ||
1597 | 590 | @@ -253,6 +252,10 @@ | 589 | @@ -247,6 +246,10 @@ |
1598 | 591 | extern ulint srv_dict_size_limit; | 590 | extern ulint srv_dict_size_limit; |
1599 | 592 | 591 | ||
1600 | 593 | extern ulint srv_lazy_drop_table; | 592 | extern ulint srv_lazy_drop_table; |
1601 | @@ -618,7 +617,7 @@ | |||
1602 | 618 | - && thd_flush_log_at_trx_commit(NULL) != 2) { | 617 | - && thd_flush_log_at_trx_commit(NULL) != 2) { |
1603 | 619 | + && srv_flush_log_at_trx_commit != 2) { | 618 | + && srv_flush_log_at_trx_commit != 2) { |
1604 | 620 | 619 | ||
1606 | 621 | fil_flush(group->space_id); | 620 | fil_flush(group->space_id, FALSE); |
1607 | 622 | } | 621 | } |
1608 | 623 | @@ -1389,7 +1389,7 @@ | 622 | @@ -1389,7 +1389,7 @@ |
1609 | 624 | #endif /* UNIV_DEBUG */ | 623 | #endif /* UNIV_DEBUG */ |
1610 | @@ -630,21 +629,23 @@ | |||
1611 | 630 | allowed yet (the variable name .._no_ibuf_.. is misleading) */ | 629 | allowed yet (the variable name .._no_ibuf_.. is misleading) */ |
1612 | 631 | 630 | ||
1613 | 632 | @@ -3151,6 +3151,7 @@ | 631 | @@ -3151,6 +3151,7 @@ |
1616 | 633 | for the 'very fast' shutdown, because the InnoDB layer may have | 632 | shutdown, because the InnoDB layer may have committed or |
1617 | 634 | committed or prepared transactions and we don't want to lose them. */ | 633 | prepared transactions and we don't want to lose them. */ |
1618 | 635 | 634 | ||
1619 | 636 | + if (!srv_apply_log_only) { | 635 | + if (!srv_apply_log_only) { |
1625 | 637 | if (trx_n_mysql_transactions > 0 | 636 | server_busy = trx_n_mysql_transactions > 0 |
1626 | 638 | || UT_LIST_GET_LEN(trx_sys->trx_list) > 0) { | 637 | || UT_LIST_GET_LEN(trx_sys->trx_list) > trx_n_prepared; |
1627 | 639 | 638 | mutex_exit(&kernel_mutex); | |
1628 | 640 | @@ -3158,6 +3159,7 @@ | 639 | @@ -3158,6 +3159,9 @@ |
1629 | 641 | 640 | if (server_busy || srv_is_any_background_thread_active()) { | |
1630 | 642 | goto loop; | 641 | goto loop; |
1631 | 643 | } | 642 | } |
1632 | 643 | + } else { | ||
1633 | 644 | + mutex_exit(&kernel_mutex); | ||
1634 | 644 | + } | 645 | + } |
1635 | 645 | 646 | ||
1638 | 646 | if (srv_fast_shutdown == 2) { | 647 | mutex_enter(&log_sys->mutex); |
1639 | 647 | /* In this fastest shutdown we do not flush the buffer pool: | 648 | server_busy = log_sys->n_pending_checkpoint_writes |
1640 | 648 | --- a/storage/innobase/log/log0recv.c | 649 | --- a/storage/innobase/log/log0recv.c |
1641 | 649 | +++ b/storage/innobase/log/log0recv.c | 650 | +++ b/storage/innobase/log/log0recv.c |
1642 | 650 | @@ -42,27 +42,27 @@ | 651 | @@ -42,27 +42,27 @@ |
1643 | @@ -738,7 +739,7 @@ | |||
1644 | 738 | } | 739 | } |
1645 | 739 | } | 740 | } |
1646 | 740 | 741 | ||
1648 | 741 | @@ -2936,12 +2939,14 @@ | 742 | @@ -2935,12 +2938,14 @@ |
1649 | 742 | 743 | ||
1650 | 743 | if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { | 744 | if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { |
1651 | 744 | 745 | ||
1652 | @@ -754,7 +755,7 @@ | |||
1653 | 754 | } | 755 | } |
1654 | 755 | } | 756 | } |
1655 | 756 | 757 | ||
1657 | 757 | @@ -3110,6 +3115,7 @@ | 758 | @@ -3109,6 +3114,7 @@ |
1658 | 758 | recv_sys->recovered_lsn = checkpoint_lsn; | 759 | recv_sys->recovered_lsn = checkpoint_lsn; |
1659 | 759 | 760 | ||
1660 | 760 | srv_start_lsn = checkpoint_lsn; | 761 | srv_start_lsn = checkpoint_lsn; |
1661 | @@ -762,7 +763,7 @@ | |||
1662 | 762 | } | 763 | } |
1663 | 763 | 764 | ||
1664 | 764 | contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn, | 765 | contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn, |
1666 | 765 | @@ -3475,6 +3481,7 @@ | 766 | @@ -3474,6 +3480,7 @@ |
1667 | 766 | that the data dictionary tables will be free of any locks. | 767 | that the data dictionary tables will be free of any locks. |
1668 | 767 | The data dictionary latch should guarantee that there is at | 768 | The data dictionary latch should guarantee that there is at |
1669 | 768 | most one data dictionary transaction active at a time. */ | 769 | most one data dictionary transaction active at a time. */ |
1670 | @@ -823,7 +824,7 @@ | |||
1671 | 823 | } else if (create_mode == OS_FILE_CREATE) { | 824 | } else if (create_mode == OS_FILE_CREATE) { |
1672 | 824 | mode_str = "CREATE"; | 825 | mode_str = "CREATE"; |
1673 | 825 | create_flag = O_RDWR | O_CREAT | O_EXCL; | 826 | create_flag = O_RDWR | O_CREAT | O_EXCL; |
1675 | 826 | @@ -2732,6 +2737,9 @@ | 827 | @@ -2791,6 +2796,9 @@ |
1676 | 827 | ut_a((offset & 0xFFFFFFFFUL) == offset); | 828 | ut_a((offset & 0xFFFFFFFFUL) == offset); |
1677 | 828 | ut_a((n & 0xFFFFFFFFUL) == n); | 829 | ut_a((n & 0xFFFFFFFFUL) == n); |
1678 | 829 | 830 | ||
1679 | @@ -833,7 +834,7 @@ | |||
1680 | 833 | os_n_file_writes++; | 834 | os_n_file_writes++; |
1681 | 834 | 835 | ||
1682 | 835 | ut_ad(file); | 836 | ut_ad(file); |
1684 | 836 | @@ -2856,6 +2864,9 @@ | 837 | @@ -2915,6 +2923,9 @@ |
1685 | 837 | #else | 838 | #else |
1686 | 838 | ssize_t ret; | 839 | ssize_t ret; |
1687 | 839 | 840 | ||
1688 | @@ -845,7 +846,7 @@ | |||
1689 | 845 | if ((ulint)ret == n) { | 846 | if ((ulint)ret == n) { |
1690 | 846 | --- a/storage/innobase/os/os0thread.c | 847 | --- a/storage/innobase/os/os0thread.c |
1691 | 847 | +++ b/storage/innobase/os/os0thread.c | 848 | +++ b/storage/innobase/os/os0thread.c |
1693 | 848 | @@ -266,12 +266,17 @@ | 849 | @@ -251,11 +251,16 @@ |
1694 | 849 | #ifdef __WIN__ | 850 | #ifdef __WIN__ |
1695 | 850 | Sleep((DWORD) tm / 1000); | 851 | Sleep((DWORD) tm / 1000); |
1696 | 851 | #else | 852 | #else |
1697 | @@ -862,10 +863,9 @@ | |||
1698 | 862 | +*/ | 863 | +*/ |
1699 | 863 | #endif | 864 | #endif |
1700 | 864 | } | 865 | } |
1701 | 865 | |||
1702 | 866 | --- a/storage/innobase/row/row0merge.c | 866 | --- a/storage/innobase/row/row0merge.c |
1703 | 867 | +++ b/storage/innobase/row/row0merge.c | 867 | +++ b/storage/innobase/row/row0merge.c |
1705 | 868 | @@ -459,7 +459,9 @@ | 868 | @@ -460,7 +460,9 @@ |
1706 | 869 | rec = rec_convert_dtuple_to_rec(*buf, index, tuple, n_ext); | 869 | rec = rec_convert_dtuple_to_rec(*buf, index, tuple, n_ext); |
1707 | 870 | offsets = rec_get_offsets(rec, index, NULL, ULINT_UNDEFINED, &heap); | 870 | offsets = rec_get_offsets(rec, index, NULL, ULINT_UNDEFINED, &heap); |
1708 | 871 | 871 | ||
1709 | @@ -876,7 +876,7 @@ | |||
1710 | 876 | 876 | ||
1711 | 877 | mem_heap_free(heap); | 877 | mem_heap_free(heap); |
1712 | 878 | } | 878 | } |
1714 | 879 | @@ -1485,8 +1487,10 @@ | 879 | @@ -1486,8 +1488,10 @@ |
1715 | 880 | case 0: | 880 | case 0: |
1716 | 881 | if (UNIV_UNLIKELY | 881 | if (UNIV_UNLIKELY |
1717 | 882 | (dict_index_is_unique(index) && !null_eq)) { | 882 | (dict_index_is_unique(index) && !null_eq)) { |
1718 | @@ -889,7 +889,7 @@ | |||
1719 | 889 | mem_heap_free(heap); | 889 | mem_heap_free(heap); |
1720 | 890 | return(DB_DUPLICATE_KEY); | 890 | return(DB_DUPLICATE_KEY); |
1721 | 891 | } | 891 | } |
1723 | 892 | @@ -2613,7 +2617,9 @@ | 892 | @@ -2636,7 +2640,9 @@ |
1724 | 893 | 893 | ||
1725 | 894 | /* Reset the MySQL row buffer that is used when reporting | 894 | /* Reset the MySQL row buffer that is used when reporting |
1726 | 895 | duplicate keys. */ | 895 | duplicate keys. */ |
1727 | @@ -902,7 +902,19 @@ | |||
1728 | 902 | secondary index entries for merge sort */ | 902 | secondary index entries for merge sort */ |
1729 | 903 | --- a/storage/innobase/srv/srv0srv.c | 903 | --- a/storage/innobase/srv/srv0srv.c |
1730 | 904 | +++ b/storage/innobase/srv/srv0srv.c | 904 | +++ b/storage/innobase/srv/srv0srv.c |
1732 | 905 | @@ -197,8 +197,7 @@ | 905 | @@ -87,11 +87,6 @@ |
1733 | 906 | #include "mysql/plugin.h" | ||
1734 | 907 | #include "mysql/service_thd_wait.h" | ||
1735 | 908 | |||
1736 | 909 | -/* prototypes of new functions added to ha_innodb.cc for kill_idle_transaction */ | ||
1737 | 910 | -ibool innobase_thd_is_idle(const void* thd); | ||
1738 | 911 | -ib_int64_t innobase_thd_get_start_time(const void* thd); | ||
1739 | 912 | -void innobase_thd_kill(void* thd); | ||
1740 | 913 | - | ||
1741 | 914 | /* prototypes for new functions added to ha_innodb.cc */ | ||
1742 | 915 | ibool innobase_get_slow_log(); | ||
1743 | 916 | |||
1744 | 917 | @@ -198,8 +193,7 @@ | ||
1745 | 906 | UNIV_INTERN ulint srv_log_file_size = ULINT_MAX; | 918 | UNIV_INTERN ulint srv_log_file_size = ULINT_MAX; |
1746 | 907 | /* size in database pages */ | 919 | /* size in database pages */ |
1747 | 908 | UNIV_INTERN ulint srv_log_buffer_size = ULINT_MAX; | 920 | UNIV_INTERN ulint srv_log_buffer_size = ULINT_MAX; |
1748 | @@ -912,7 +924,7 @@ | |||
1749 | 912 | 924 | ||
1750 | 913 | /* Try to flush dirty pages so as to avoid IO bursts at | 925 | /* Try to flush dirty pages so as to avoid IO bursts at |
1751 | 914 | the checkpoints. */ | 926 | the checkpoints. */ |
1753 | 915 | @@ -449,6 +448,10 @@ | 927 | @@ -457,6 +451,10 @@ |
1754 | 916 | UNIV_INTERN ulint srv_dict_size_limit = 0; | 928 | UNIV_INTERN ulint srv_dict_size_limit = 0; |
1755 | 917 | 929 | ||
1756 | 918 | UNIV_INTERN ulint srv_lazy_drop_table = 0; | 930 | UNIV_INTERN ulint srv_lazy_drop_table = 0; |
1757 | @@ -923,7 +935,7 @@ | |||
1758 | 923 | /*-------------------------------------------*/ | 935 | /*-------------------------------------------*/ |
1759 | 924 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; | 936 | UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; |
1760 | 925 | UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; | 937 | UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; |
1762 | 926 | @@ -1148,7 +1151,7 @@ | 938 | @@ -1137,7 +1135,7 @@ |
1763 | 927 | } | 939 | } |
1764 | 928 | 940 | ||
1765 | 929 | /* Initialize some INFORMATION SCHEMA internal structures */ | 941 | /* Initialize some INFORMATION SCHEMA internal structures */ |
1766 | @@ -932,7 +944,7 @@ | |||
1767 | 932 | } | 944 | } |
1768 | 933 | 945 | ||
1769 | 934 | /*********************************************************************//** | 946 | /*********************************************************************//** |
1771 | 935 | @@ -1159,6 +1162,7 @@ | 947 | @@ -1148,6 +1146,7 @@ |
1772 | 936 | /*==========*/ | 948 | /*==========*/ |
1773 | 937 | { | 949 | { |
1774 | 938 | os_fast_mutex_free(&srv_conc_mutex); | 950 | os_fast_mutex_free(&srv_conc_mutex); |
1775 | @@ -940,7 +952,7 @@ | |||
1776 | 940 | mem_free(srv_conc_slots); | 952 | mem_free(srv_conc_slots); |
1777 | 941 | srv_conc_slots = NULL; | 953 | srv_conc_slots = NULL; |
1778 | 942 | 954 | ||
1780 | 943 | @@ -1172,6 +1176,7 @@ | 955 | @@ -1161,6 +1160,7 @@ |
1781 | 944 | srv_mysql_table = NULL; | 956 | srv_mysql_table = NULL; |
1782 | 945 | 957 | ||
1783 | 946 | trx_i_s_cache_free(trx_i_s_cache); | 958 | trx_i_s_cache_free(trx_i_s_cache); |
1784 | @@ -948,7 +960,7 @@ | |||
1785 | 948 | } | 960 | } |
1786 | 949 | 961 | ||
1787 | 950 | /*********************************************************************//** | 962 | /*********************************************************************//** |
1789 | 951 | @@ -1876,7 +1881,7 @@ | 963 | @@ -1886,7 +1886,7 @@ |
1790 | 952 | } | 964 | } |
1791 | 953 | 965 | ||
1792 | 954 | /* Record the lock wait time for this thread */ | 966 | /* Record the lock wait time for this thread */ |
1793 | @@ -957,6 +969,43 @@ | |||
1794 | 957 | } | 969 | } |
1795 | 958 | 970 | ||
1796 | 959 | if (trx->was_chosen_as_deadlock_victim) { | 971 | if (trx->was_chosen_as_deadlock_victim) { |
1797 | 972 | @@ -2842,36 +2842,6 @@ | ||
1798 | 973 | old_sema = sema; | ||
1799 | 974 | } | ||
1800 | 975 | |||
1801 | 976 | - if (srv_kill_idle_transaction && trx_sys) { | ||
1802 | 977 | - trx_t* trx; | ||
1803 | 978 | - time_t now; | ||
1804 | 979 | -rescan_idle: | ||
1805 | 980 | - now = time(NULL); | ||
1806 | 981 | - mutex_enter(&kernel_mutex); | ||
1807 | 982 | - trx = UT_LIST_GET_FIRST(trx_sys->mysql_trx_list); | ||
1808 | 983 | - while (trx) { | ||
1809 | 984 | - if (trx->conc_state == TRX_ACTIVE | ||
1810 | 985 | - && trx->mysql_thd | ||
1811 | 986 | - && innobase_thd_is_idle(trx->mysql_thd)) { | ||
1812 | 987 | - ib_int64_t start_time; /* as stmt ID */ | ||
1813 | 988 | - | ||
1814 | 989 | - start_time = innobase_thd_get_start_time(trx->mysql_thd); | ||
1815 | 990 | - if (trx->last_stmt_start != start_time) { | ||
1816 | 991 | - trx->idle_start = now; | ||
1817 | 992 | - trx->last_stmt_start = start_time; | ||
1818 | 993 | - } else if (difftime(now, trx->idle_start) | ||
1819 | 994 | - > srv_kill_idle_transaction) { | ||
1820 | 995 | - /* kill the session */ | ||
1821 | 996 | - mutex_exit(&kernel_mutex); | ||
1822 | 997 | - innobase_thd_kill(trx->mysql_thd); | ||
1823 | 998 | - goto rescan_idle; | ||
1824 | 999 | - } | ||
1825 | 1000 | - } | ||
1826 | 1001 | - trx = UT_LIST_GET_NEXT(mysql_trx_list, trx); | ||
1827 | 1002 | - } | ||
1828 | 1003 | - mutex_exit(&kernel_mutex); | ||
1829 | 1004 | - } | ||
1830 | 1005 | - | ||
1831 | 1006 | /* Flush stderr so that a database user gets the output | ||
1832 | 1007 | to possible MySQL error file */ | ||
1833 | 1008 | |||
1834 | 960 | --- a/storage/innobase/srv/srv0start.c | 1009 | --- a/storage/innobase/srv/srv0start.c |
1835 | 961 | +++ b/storage/innobase/srv/srv0start.c | 1010 | +++ b/storage/innobase/srv/srv0start.c |
1836 | 962 | @@ -94,6 +94,8 @@ | 1011 | @@ -94,6 +94,8 @@ |
1837 | @@ -986,7 +1035,7 @@ | |||
1838 | 986 | ulint | 1035 | ulint |
1839 | 987 | open_or_create_data_files( | 1036 | open_or_create_data_files( |
1840 | 988 | /*======================*/ | 1037 | /*======================*/ |
1842 | 989 | @@ -1868,6 +1870,10 @@ | 1038 | @@ -1875,6 +1877,10 @@ |
1843 | 990 | are initialized in trx_sys_init_at_db_start(). */ | 1039 | are initialized in trx_sys_init_at_db_start(). */ |
1844 | 991 | 1040 | ||
1845 | 992 | recv_recovery_from_checkpoint_finish(); | 1041 | recv_recovery_from_checkpoint_finish(); |
1846 | @@ -997,7 +1046,7 @@ | |||
1847 | 997 | if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) { | 1046 | if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) { |
1848 | 998 | /* The following call is necessary for the insert | 1047 | /* The following call is necessary for the insert |
1849 | 999 | buffer to work with multiple tablespaces. We must | 1048 | buffer to work with multiple tablespaces. We must |
1851 | 1000 | @@ -2042,6 +2048,17 @@ | 1049 | @@ -2054,6 +2060,17 @@ |
1852 | 1001 | if (!srv_auto_extend_last_data_file | 1050 | if (!srv_auto_extend_last_data_file |
1853 | 1002 | && sum_of_data_file_sizes != tablespace_size_in_header) { | 1051 | && sum_of_data_file_sizes != tablespace_size_in_header) { |
1854 | 1003 | 1052 | ||
1855 | @@ -1015,7 +1064,7 @@ | |||
1856 | 1015 | ut_print_timestamp(stderr); | 1064 | ut_print_timestamp(stderr); |
1857 | 1016 | fprintf(stderr, | 1065 | fprintf(stderr, |
1858 | 1017 | " InnoDB: Error: tablespace size" | 1066 | " InnoDB: Error: tablespace size" |
1860 | 1018 | @@ -2121,6 +2138,7 @@ | 1067 | @@ -2133,6 +2150,7 @@ |
1861 | 1019 | 1068 | ||
1862 | 1020 | return(DB_ERROR); | 1069 | return(DB_ERROR); |
1863 | 1021 | } | 1070 | } |
1864 | @@ -1023,7 +1072,7 @@ | |||
1865 | 1023 | } | 1072 | } |
1866 | 1024 | 1073 | ||
1867 | 1025 | /* Check that os_fast_mutexes work as expected */ | 1074 | /* Check that os_fast_mutexes work as expected */ |
1869 | 1026 | @@ -2240,6 +2258,7 @@ | 1075 | @@ -2252,6 +2270,7 @@ |
1870 | 1027 | ibuf_update_max_tablespace_id(); | 1076 | ibuf_update_max_tablespace_id(); |
1871 | 1028 | } | 1077 | } |
1872 | 1029 | 1078 | ||
1873 | @@ -1033,16 +1082,16 @@ | |||
1874 | 1033 | srv_was_started = TRUE; | 1082 | srv_was_started = TRUE; |
1875 | 1034 | --- a/storage/innobase/trx/trx0purge.c | 1083 | --- a/storage/innobase/trx/trx0purge.c |
1876 | 1035 | +++ b/storage/innobase/trx/trx0purge.c | 1084 | +++ b/storage/innobase/trx/trx0purge.c |
1879 | 1036 | @@ -1100,6 +1100,9 @@ | 1085 | @@ -1129,6 +1129,9 @@ |
1880 | 1037 | /* que_thr_t* thr2; */ | 1086 | que_thr_t* thr; |
1881 | 1038 | ulint old_pages_handled; | 1087 | ulint old_pages_handled; |
1882 | 1039 | 1088 | ||
1883 | 1040 | + if (srv_fake_write) | 1089 | + if (srv_fake_write) |
1884 | 1041 | + return(0); | 1090 | + return(0); |
1885 | 1042 | + | 1091 | + |
1887 | 1043 | mutex_enter(&(purge_sys->mutex)); | 1092 | ut_a(purge_sys->trx->n_active_thrs == 0); |
1888 | 1044 | 1093 | ||
1890 | 1045 | if (purge_sys->trx->n_active_thrs > 0) { | 1094 | rw_lock_x_lock(&purge_sys->latch); |
1891 | 1046 | --- a/storage/innobase/trx/trx0rseg.c | 1095 | --- a/storage/innobase/trx/trx0rseg.c |
1892 | 1047 | +++ b/storage/innobase/trx/trx0rseg.c | 1096 | +++ b/storage/innobase/trx/trx0rseg.c |
1893 | 1048 | @@ -140,9 +140,11 @@ | 1097 | @@ -140,9 +140,11 @@ |
1894 | @@ -1059,7 +1108,7 @@ | |||
1895 | 1059 | 1108 | ||
1896 | 1060 | --- a/storage/innobase/trx/trx0sys.c | 1109 | --- a/storage/innobase/trx/trx0sys.c |
1897 | 1061 | +++ b/storage/innobase/trx/trx0sys.c | 1110 | +++ b/storage/innobase/trx/trx0sys.c |
1899 | 1062 | @@ -1938,10 +1938,12 @@ | 1111 | @@ -1983,10 +1983,12 @@ |
1900 | 1063 | UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view); | 1112 | UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view); |
1901 | 1064 | } | 1113 | } |
1902 | 1065 | 1114 | ||
1903 | @@ -1074,18 +1123,19 @@ | |||
1904 | 1074 | 1123 | ||
1905 | 1075 | --- a/storage/innobase/trx/trx0trx.c | 1124 | --- a/storage/innobase/trx/trx0trx.c |
1906 | 1076 | +++ b/storage/innobase/trx/trx0trx.c | 1125 | +++ b/storage/innobase/trx/trx0trx.c |
1908 | 1077 | @@ -505,8 +505,8 @@ | 1126 | @@ -563,9 +563,8 @@ |
1909 | 1078 | (ullint) trx->id); | 1127 | (ullint) trx->id); |
1910 | 1079 | 1128 | ||
1911 | 1080 | if (srv_force_recovery == 0) { | 1129 | if (srv_force_recovery == 0) { |
1912 | 1081 | - | 1130 | - |
1913 | 1082 | - trx->conc_state = TRX_PREPARED; | 1131 | - trx->conc_state = TRX_PREPARED; |
1914 | 1132 | - trx_n_prepared++; | ||
1915 | 1083 | + /* xtrabackup should rollback it */ | 1133 | + /* xtrabackup should rollback it */ |
1916 | 1084 | + trx->conc_state = TRX_ACTIVE; | 1134 | + trx->conc_state = TRX_ACTIVE; |
1917 | 1085 | } else { | 1135 | } else { |
1918 | 1086 | fprintf(stderr, | 1136 | fprintf(stderr, |
1919 | 1087 | "InnoDB: Since" | 1137 | "InnoDB: Since" |
1921 | 1088 | @@ -580,9 +580,9 @@ | 1138 | @@ -639,10 +638,9 @@ |
1922 | 1089 | (ullint) trx->id); | 1139 | (ullint) trx->id); |
1923 | 1090 | 1140 | ||
1924 | 1091 | if (srv_force_recovery == 0) { | 1141 | if (srv_force_recovery == 0) { |
1925 | @@ -1093,11 +1143,12 @@ | |||
1926 | 1093 | + /* xtrabackup should rollback it */ | 1143 | + /* xtrabackup should rollback it */ |
1927 | 1094 | trx->conc_state | 1144 | trx->conc_state |
1928 | 1095 | - = TRX_PREPARED; | 1145 | - = TRX_PREPARED; |
1929 | 1146 | - trx_n_prepared++; | ||
1930 | 1096 | + = TRX_ACTIVE; | 1147 | + = TRX_ACTIVE; |
1931 | 1097 | } else { | 1148 | } else { |
1932 | 1098 | fprintf(stderr, | 1149 | fprintf(stderr, |
1933 | 1099 | "InnoDB: Since" | 1150 | "InnoDB: Since" |
1935 | 1100 | @@ -925,7 +925,6 @@ | 1151 | @@ -1051,7 +1049,6 @@ |
1936 | 1101 | trx->read_view = NULL; | 1152 | trx->read_view = NULL; |
1937 | 1102 | 1153 | ||
1938 | 1103 | if (lsn) { | 1154 | if (lsn) { |
1939 | @@ -1105,7 +1156,7 @@ | |||
1940 | 1105 | 1156 | ||
1941 | 1106 | mutex_exit(&kernel_mutex); | 1157 | mutex_exit(&kernel_mutex); |
1942 | 1107 | 1158 | ||
1944 | 1108 | @@ -934,12 +933,6 @@ | 1159 | @@ -1060,12 +1057,6 @@ |
1945 | 1109 | trx_undo_insert_cleanup(trx); | 1160 | trx_undo_insert_cleanup(trx); |
1946 | 1110 | } | 1161 | } |
1947 | 1111 | 1162 | ||
1948 | @@ -1118,7 +1169,7 @@ | |||
1949 | 1118 | /* NOTE that we could possibly make a group commit more | 1169 | /* NOTE that we could possibly make a group commit more |
1950 | 1119 | efficient here: call os_thread_yield here to allow also other | 1170 | efficient here: call os_thread_yield here to allow also other |
1951 | 1120 | trxs to come to commit! */ | 1171 | trxs to come to commit! */ |
1953 | 1121 | @@ -971,9 +964,9 @@ | 1172 | @@ -1097,9 +1088,9 @@ |
1954 | 1122 | if (trx->flush_log_later) { | 1173 | if (trx->flush_log_later) { |
1955 | 1123 | /* Do nothing yet */ | 1174 | /* Do nothing yet */ |
1956 | 1124 | trx->must_flush_log_later = TRUE; | 1175 | trx->must_flush_log_later = TRUE; |
1957 | @@ -1130,7 +1181,7 @@ | |||
1958 | 1130 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { | 1181 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { |
1959 | 1131 | /* Write the log but do not flush it to disk */ | 1182 | /* Write the log but do not flush it to disk */ |
1960 | 1132 | 1183 | ||
1962 | 1133 | @@ -985,7 +978,7 @@ | 1184 | @@ -1111,7 +1102,7 @@ |
1963 | 1134 | 1185 | ||
1964 | 1135 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); | 1186 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); |
1965 | 1136 | } | 1187 | } |
1966 | @@ -1139,7 +1190,7 @@ | |||
1967 | 1139 | 1190 | ||
1968 | 1140 | /* Write the log but do not flush it to disk */ | 1191 | /* Write the log but do not flush it to disk */ |
1969 | 1141 | 1192 | ||
1971 | 1142 | @@ -1665,23 +1658,16 @@ | 1193 | @@ -1791,23 +1782,16 @@ |
1972 | 1143 | trx_t* trx) /*!< in: trx handle */ | 1194 | trx_t* trx) /*!< in: trx handle */ |
1973 | 1144 | { | 1195 | { |
1974 | 1145 | ib_uint64_t lsn = trx->commit_lsn; | 1196 | ib_uint64_t lsn = trx->commit_lsn; |
1975 | @@ -1165,7 +1216,7 @@ | |||
1976 | 1165 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { | 1216 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { |
1977 | 1166 | /* Write the log but do not flush it to disk */ | 1217 | /* Write the log but do not flush it to disk */ |
1978 | 1167 | 1218 | ||
1980 | 1168 | @@ -1692,7 +1678,7 @@ | 1219 | @@ -1818,7 +1802,7 @@ |
1981 | 1169 | 1220 | ||
1982 | 1170 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); | 1221 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); |
1983 | 1171 | } | 1222 | } |
1984 | @@ -1174,7 +1225,7 @@ | |||
1985 | 1174 | 1225 | ||
1986 | 1175 | /* Write the log but do not flush it to disk */ | 1226 | /* Write the log but do not flush it to disk */ |
1987 | 1176 | 1227 | ||
1989 | 1177 | @@ -1945,7 +1931,6 @@ | 1228 | @@ -2066,7 +2050,6 @@ |
1990 | 1178 | /*--------------------------------------*/ | 1229 | /*--------------------------------------*/ |
1991 | 1179 | 1230 | ||
1992 | 1180 | if (lsn) { | 1231 | if (lsn) { |
1993 | @@ -1182,7 +1233,7 @@ | |||
1994 | 1182 | 1233 | ||
1995 | 1183 | /* Depending on the my.cnf options, we may now write the log | 1234 | /* Depending on the my.cnf options, we may now write the log |
1996 | 1184 | buffer to the log files, making the prepared state of the | 1235 | buffer to the log files, making the prepared state of the |
1998 | 1185 | @@ -1966,15 +1951,9 @@ | 1236 | @@ -2087,15 +2070,9 @@ |
1999 | 1186 | 1237 | ||
2000 | 1187 | mutex_exit(&kernel_mutex); | 1238 | mutex_exit(&kernel_mutex); |
2001 | 1188 | 1239 | ||
2002 | @@ -1200,7 +1251,7 @@ | |||
2003 | 1200 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { | 1251 | if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { |
2004 | 1201 | /* Write the log but do not flush it to disk */ | 1252 | /* Write the log but do not flush it to disk */ |
2005 | 1202 | 1253 | ||
2007 | 1203 | @@ -1986,7 +1965,7 @@ | 1254 | @@ -2107,7 +2084,7 @@ |
2008 | 1204 | 1255 | ||
2009 | 1205 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); | 1256 | log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE); |
2010 | 1206 | } | 1257 | } |
2011 | 1207 | 1258 | ||
2012 | === modified file 'utils/build.sh' | |||
2013 | --- utils/build.sh 2011-10-05 02:29:27 +0000 | |||
2014 | +++ utils/build.sh 2011-11-27 06:47:26 +0000 | |||
2015 | @@ -1,7 +1,9 @@ | |||
2016 | 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
2017 | 2 | 2 | ||
2020 | 3 | MYSQL_51_VERSION=5.1.56 | 3 | MYSQL_51_VERSION=5.1.59 |
2021 | 4 | MYSQL_55_VERSION=5.5.10 | 4 | MYSQL_55_VERSION=5.5.17 |
2022 | 5 | PS_51_VERSION=5.1.59-13.0 | ||
2023 | 6 | PS_55_VERSION=5.5.16-22.0 | ||
2024 | 5 | 7 | ||
2025 | 6 | AUTO_DOWNLOAD=${AUTO_DOWNLOAD:-no} | 8 | AUTO_DOWNLOAD=${AUTO_DOWNLOAD:-no} |
2026 | 7 | MASTER_SITE="http://s3.amazonaws.com/percona.com/downloads/community" | 9 | MASTER_SITE="http://s3.amazonaws.com/percona.com/downloads/community" |
2027 | @@ -216,13 +218,15 @@ | |||
2028 | 216 | cd $branch_dir | 218 | cd $branch_dir |
2029 | 217 | bzr pull | 219 | bzr pull |
2030 | 218 | else | 220 | else |
2032 | 219 | bzr branch lp:~percona-dev/percona-server/$branch_dir $branch_dir | 221 | bzr branch -r tag:Percona-Server-$PS_51_VERSION \ |
2033 | 222 | lp:percona-server/5.1 $branch_dir | ||
2034 | 220 | cd $branch_dir | 223 | cd $branch_dir |
2035 | 221 | fi | 224 | fi |
2036 | 222 | 225 | ||
2037 | 223 | $MAKE_CMD main | 226 | $MAKE_CMD main |
2038 | 227 | cd $top_dir | ||
2039 | 224 | rm -rf $server_dir | 228 | rm -rf $server_dir |
2041 | 225 | mv Percona-Server $top_dir | 229 | ln -s $branch_dir/Percona-Server $server_dir |
2042 | 226 | 230 | ||
2043 | 227 | # Patch Percona Server | 231 | # Patch Percona Server |
2044 | 228 | cd $server_dir | 232 | cd $server_dir |
2045 | @@ -264,13 +268,15 @@ | |||
2046 | 264 | cd $branch_dir | 268 | cd $branch_dir |
2047 | 265 | bzr pull | 269 | bzr pull |
2048 | 266 | else | 270 | else |
2050 | 267 | bzr branch lp:~percona-dev/percona-server/$branch_dir $branch_dir | 271 | bzr branch -r tag:Percona-Server-$PS_55_VERSION \ |
2051 | 272 | lp:percona-server $branch_dir | ||
2052 | 268 | cd $branch_dir | 273 | cd $branch_dir |
2053 | 269 | fi | 274 | fi |
2054 | 270 | 275 | ||
2055 | 271 | $MAKE_CMD PERCONA_SERVER=Percona-Server-5.5 main | 276 | $MAKE_CMD PERCONA_SERVER=Percona-Server-5.5 main |
2056 | 277 | cd $top_dir | ||
2057 | 272 | rm -rf $server_dir | 278 | rm -rf $server_dir |
2059 | 273 | mv Percona-Server-5.5 $top_dir | 279 | ln -s $branch_dir/Percona-Server $server_dir |
2060 | 274 | 280 | ||
2061 | 275 | # Patch Percona Server | 281 | # Patch Percona Server |
2062 | 276 | cd $server_dir | 282 | cd $server_dir |
2063 | 277 | 283 | ||
2064 | === modified file 'xtrabackup.c' | |||
2065 | --- xtrabackup.c 2011-10-05 02:29:27 +0000 | |||
2066 | +++ xtrabackup.c 2011-11-27 06:47:26 +0000 | |||
2067 | @@ -135,7 +135,7 @@ | |||
2068 | 135 | #include <mysql/plugin.h> | 135 | #include <mysql/plugin.h> |
2069 | 136 | #include <mysql/service_thd_wait.h> | 136 | #include <mysql/service_thd_wait.h> |
2070 | 137 | 137 | ||
2072 | 138 | void thd_wait_begin(MYSQL_THD thd, thd_wait_type wait_type) | 138 | void thd_wait_begin(MYSQL_THD thd, int wait_type) |
2073 | 139 | { | 139 | { |
2074 | 140 | (void)thd; | 140 | (void)thd; |
2075 | 141 | (void)wait_type; | 141 | (void)wait_type; |
2076 | @@ -251,6 +251,15 @@ | |||
2077 | 251 | a file, so this is either "open" or | 251 | a file, so this is either "open" or |
2078 | 252 | "create" */ | 252 | "create" */ |
2079 | 253 | 253 | ||
2080 | 254 | /***********************************************************************//** | ||
2081 | 255 | Compatibility wrapper around os_file_flush(). | ||
2082 | 256 | @return TRUE if success */ | ||
2083 | 257 | static | ||
2084 | 258 | ibool | ||
2085 | 259 | xb_file_flush( | ||
2086 | 260 | /*==========*/ | ||
2087 | 261 | os_file_t file); /*!< in, own: handle to a file */ | ||
2088 | 262 | |||
2089 | 254 | #include <fcntl.h> | 263 | #include <fcntl.h> |
2090 | 255 | #include <regex.h> | 264 | #include <regex.h> |
2091 | 256 | 265 | ||
2092 | @@ -510,7 +519,7 @@ | |||
2093 | 510 | struct fil_system_struct { | 519 | struct fil_system_struct { |
2094 | 511 | #ifndef UNIV_HOTBACKUP | 520 | #ifndef UNIV_HOTBACKUP |
2095 | 512 | mutex_t mutex; /*!< The mutex protecting the cache */ | 521 | mutex_t mutex; /*!< The mutex protecting the cache */ |
2097 | 513 | #ifdef XTRADB55 | 522 | #ifdef XTRADB_BASED |
2098 | 514 | mutex_t file_extend_mutex; | 523 | mutex_t file_extend_mutex; |
2099 | 515 | #endif | 524 | #endif |
2100 | 516 | #endif /* !UNIV_HOTBACKUP */ | 525 | #endif /* !UNIV_HOTBACKUP */ |
2101 | @@ -557,6 +566,10 @@ | |||
2102 | 557 | request */ | 566 | request */ |
2103 | 558 | UT_LIST_BASE_NODE_T(fil_space_t) space_list; | 567 | UT_LIST_BASE_NODE_T(fil_space_t) space_list; |
2104 | 559 | /*!< list of all file spaces */ | 568 | /*!< list of all file spaces */ |
2105 | 569 | ibool space_id_reuse_warned; | ||
2106 | 570 | /* !< TRUE if fil_space_create() | ||
2107 | 571 | has issued a warning about | ||
2108 | 572 | potential space_id reuse */ | ||
2109 | 560 | }; | 573 | }; |
2110 | 561 | 574 | ||
2111 | 562 | #endif /* INNODB_VERSION_SHORT */ | 575 | #endif /* INNODB_VERSION_SHORT */ |
2112 | @@ -1520,6 +1533,31 @@ | |||
2113 | 1520 | putc(q, f); | 1533 | putc(q, f); |
2114 | 1521 | } | 1534 | } |
2115 | 1522 | 1535 | ||
2116 | 1536 | /**********************************************************************//** | ||
2117 | 1537 | It should be safe to use lower_case_table_names=0 for xtrabackup. If it causes | ||
2118 | 1538 | any problems, we can add the lower_case_table_names option to xtrabackup | ||
2119 | 1539 | later. | ||
2120 | 1540 | @return 0 */ | ||
2121 | 1541 | ulint | ||
2122 | 1542 | innobase_get_lower_case_table_names(void) | ||
2123 | 1543 | /*=====================================*/ | ||
2124 | 1544 | { | ||
2125 | 1545 | return(0); | ||
2126 | 1546 | } | ||
2127 | 1547 | |||
2128 | 1548 | /******************************************************************//** | ||
2129 | 1549 | Strip dir name from a full path name and return only the file name | ||
2130 | 1550 | @return file name or "null" if no file name */ | ||
2131 | 1551 | const char* | ||
2132 | 1552 | innobase_basename( | ||
2133 | 1553 | /*==============*/ | ||
2134 | 1554 | const char* path_name) /*!< in: full path name */ | ||
2135 | 1555 | { | ||
2136 | 1556 | const char* name = base_name(path_name); | ||
2137 | 1557 | |||
2138 | 1558 | return((name) ? name : "null"); | ||
2139 | 1559 | } | ||
2140 | 1560 | |||
2141 | 1523 | /*****************************************************************//** | 1561 | /*****************************************************************//** |
2142 | 1524 | Convert an SQL identifier to the MySQL system_charset_info (UTF-8) | 1562 | Convert an SQL identifier to the MySQL system_charset_info (UTF-8) |
2143 | 1525 | and quote it if needed. | 1563 | and quote it if needed. |
2144 | @@ -1856,6 +1894,22 @@ | |||
2145 | 1856 | #endif | 1894 | #endif |
2146 | 1857 | #endif | 1895 | #endif |
2147 | 1858 | 1896 | ||
2148 | 1897 | /***********************************************************************//** | ||
2149 | 1898 | Compatibility wrapper around os_file_flush(). | ||
2150 | 1899 | @return TRUE if success */ | ||
2151 | 1900 | static | ||
2152 | 1901 | ibool | ||
2153 | 1902 | xb_file_flush( | ||
2154 | 1903 | /*==========*/ | ||
2155 | 1904 | os_file_t file) /*!< in, own: handle to a file */ | ||
2156 | 1905 | { | ||
2157 | 1906 | #ifdef XTRADB_BASED | ||
2158 | 1907 | return os_file_flush(file, TRUE); | ||
2159 | 1908 | #else | ||
2160 | 1909 | return os_file_flush(file); | ||
2161 | 1910 | #endif | ||
2162 | 1911 | } | ||
2163 | 1912 | |||
2164 | 1859 | /*********************************************************************** | 1913 | /*********************************************************************** |
2165 | 1860 | Computes bit shift for a given value. If the argument is not a power | 1914 | Computes bit shift for a given value. If the argument is not a power |
2166 | 1861 | of 2, returns 0.*/ | 1915 | of 2, returns 0.*/ |
2167 | @@ -2925,7 +2979,7 @@ | |||
2168 | 2925 | } | 2979 | } |
2169 | 2926 | } | 2980 | } |
2170 | 2927 | 2981 | ||
2172 | 2928 | success = os_file_flush(dst_file); | 2982 | success = xb_file_flush(dst_file); |
2173 | 2929 | if (!success) { | 2983 | if (!success) { |
2174 | 2930 | goto error; | 2984 | goto error; |
2175 | 2931 | } | 2985 | } |
2176 | @@ -3237,7 +3291,7 @@ | |||
2177 | 3237 | 3291 | ||
2178 | 3238 | 3292 | ||
2179 | 3239 | if (!xtrabackup_stream) { | 3293 | if (!xtrabackup_stream) { |
2181 | 3240 | success = os_file_flush(dst_log); | 3294 | success = xb_file_flush(dst_log); |
2182 | 3241 | } else { | 3295 | } else { |
2183 | 3242 | fflush(stdout); | 3296 | fflush(stdout); |
2184 | 3243 | success = TRUE; | 3297 | success = TRUE; |
2185 | @@ -4270,7 +4324,11 @@ | |||
2186 | 4270 | #ifndef INNODB_VERSION_SHORT | 4324 | #ifndef INNODB_VERSION_SHORT |
2187 | 4271 | local_page = buf_page_get(space_id, page_no, RW_S_LATCH, &local_mtr); | 4325 | local_page = buf_page_get(space_id, page_no, RW_S_LATCH, &local_mtr); |
2188 | 4272 | #else | 4326 | #else |
2189 | 4327 | #if (MYSQL_VERSION_ID < 50517) | ||
2190 | 4273 | local_block = btr_block_get(space_id, zip_size, page_no, RW_S_LATCH, &local_mtr); | 4328 | local_block = btr_block_get(space_id, zip_size, page_no, RW_S_LATCH, &local_mtr); |
2191 | 4329 | #else | ||
2192 | 4330 | local_block = btr_block_get(space_id, zip_size, page_no, RW_S_LATCH, index, &local_mtr); | ||
2193 | 4331 | #endif | ||
2194 | 4274 | local_page = buf_block_get_frame(local_block); | 4332 | local_page = buf_block_get_frame(local_block); |
2195 | 4275 | #endif | 4333 | #endif |
2196 | 4276 | blob_header = local_page + offset; | 4334 | blob_header = local_page + offset; |
2197 | @@ -4315,7 +4373,13 @@ | |||
2198 | 4315 | #ifndef INNODB_VERSION_SHORT | 4373 | #ifndef INNODB_VERSION_SHORT |
2199 | 4316 | page = btr_page_get(space, right_page_no, RW_X_LATCH, &mtr); | 4374 | page = btr_page_get(space, right_page_no, RW_X_LATCH, &mtr); |
2200 | 4317 | #else | 4375 | #else |
2202 | 4318 | block = btr_block_get(space, zip_size, right_page_no, RW_X_LATCH, &mtr); | 4376 | #if (MYSQL_VERSION_ID < 50517) |
2203 | 4377 | block = btr_block_get(space, zip_size, right_page_no, | ||
2204 | 4378 | RW_X_LATCH, &mtr); | ||
2205 | 4379 | #else | ||
2206 | 4380 | block = btr_block_get(space, zip_size, right_page_no, | ||
2207 | 4381 | RW_X_LATCH, index, &mtr); | ||
2208 | 4382 | #endif | ||
2209 | 4319 | page = buf_block_get_frame(block); | 4383 | page = buf_block_get_frame(block); |
2210 | 4320 | #endif | 4384 | #endif |
2211 | 4321 | goto loop; | 4385 | goto loop; |
2212 | @@ -5771,7 +5835,7 @@ | |||
2213 | 5771 | os_file_get_last_error(TRUE); | 5835 | os_file_get_last_error(TRUE); |
2214 | 5772 | goto next_node; | 5836 | goto next_node; |
2215 | 5773 | } | 5837 | } |
2217 | 5774 | success = os_file_flush(info_file); | 5838 | success = xb_file_flush(info_file); |
2218 | 5775 | if (!success) { | 5839 | if (!success) { |
2219 | 5776 | os_file_get_last_error(TRUE); | 5840 | os_file_get_last_error(TRUE); |
2220 | 5777 | goto next_node; | 5841 | goto next_node; |
http:// jenkins. percona. com/view/ Percona% 20Xtrabackup/ job/percona- xtrabackup- 1.6-param/ 61/