Merge lp:~percona-dev/percona-xtrabackup/port_to_latest into lp:percona-xtrabackup/2.0

Proposed by Alexey Kopytov
Status: Merged
Approved by: Vadim Tkachenko
Approved revision: no longer in the source branch.
Merged at revision: 228
Proposed branch: lp:~percona-dev/percona-xtrabackup/port_to_latest
Merge into: lp:percona-xtrabackup/2.0
Diff against target: 2595 lines (+558/-499)
16 files modified
Makefile (+4/-0)
fix_innodb_for_backup51.patch (+53/-53)
fix_innodb_for_backup55.patch (+83/-84)
fix_innodb_for_backup_5.1_plugin.patch (+59/-59)
fix_innodb_for_backup_percona-server.patch (+74/-74)
test/inc/common.sh (+10/-1)
test/run.sh (+1/-1)
test/t/xb_export.sh (+12/-10)
test/t/xb_incremental.sh (+10/-5)
test/t/xb_incremental_compressed.sh (+8/-7)
test/t/xb_part_range.sh (+10/-5)
test/t/xb_partial.sh (+4/-2)
utils/build.sh (+178/-179)
utils/debian/rules (+3/-3)
utils/xtrabackup.spec (+4/-4)
xtrabackup.c (+45/-12)
To merge this branch: bzr merge lp:~percona-dev/percona-xtrabackup/port_to_latest
Reviewer Review Type Date Requested Status
Vadim Tkachenko Approve
Review via email: mp+53175@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Vadim Tkachenko (vadim-tk) wrote :

looks good for me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2010-12-28 19:01:51 +0000
3+++ Makefile 2011-03-13 15:54:09 +0000
4@@ -70,6 +70,10 @@
5 5.5: LIBS += -laio
6 endif
7 5.5: TARGET := xtrabackup_55
8+# In CMake server builds it is important to build with exactly the same preprocessor flags
9+# as were used to build InnoDB
10+5.5: DEFS = $(shell grep C_DEFINES ../CMakeFiles/innobase.dir/flags.make | \
11+ sed -e 's/C_DEFINES = //')
12 5.5: $(TARGET)
13
14 # XtraBackup for XtraDB
15
16=== modified file 'fix_innodb_for_backup51.patch'
17--- fix_innodb_for_backup51.patch 2010-12-15 21:44:42 +0000
18+++ fix_innodb_for_backup51.patch 2011-03-13 15:54:09 +0000
19@@ -1,5 +1,5 @@
20---- a/storage/innobase/btr/btr0btr.c 2010-11-03 06:39:52.000000000 -0700
21-+++ b/storage/innobase/btr/btr0btr.c 2010-12-15 12:41:14.000000000 -0800
22+--- a/storage/innobase/btr/btr0btr.c 2011-03-11 06:29:45.000000000 -0800
23++++ b/storage/innobase/btr/btr0btr.c 2011-03-11 06:30:17.000000000 -0800
24 @@ -515,7 +515,7 @@
25
26 /****************************************************************
27@@ -9,8 +9,8 @@
28 page_t*
29 btr_node_ptr_get_child(
30 /*===================*/
31---- a/storage/innobase/buf/buf0buf.c 2010-11-03 06:39:52.000000000 -0700
32-+++ b/storage/innobase/buf/buf0buf.c 2010-12-15 12:41:14.000000000 -0800
33+--- a/storage/innobase/buf/buf0buf.c 2011-03-11 06:29:45.000000000 -0800
34++++ b/storage/innobase/buf/buf0buf.c 2011-03-11 06:30:17.000000000 -0800
35 @@ -317,7 +317,7 @@
36 return(TRUE);
37 }
38@@ -29,8 +29,8 @@
39 ibuf_merge_or_delete_for_page(
40 block->frame, block->space, block->offset,
41 TRUE);
42---- a/storage/innobase/buf/buf0flu.c 2010-11-03 06:39:52.000000000 -0700
43-+++ b/storage/innobase/buf/buf0flu.c 2010-12-15 12:41:14.000000000 -0800
44+--- a/storage/innobase/buf/buf0flu.c 2011-03-11 06:29:45.000000000 -0800
45++++ b/storage/innobase/buf/buf0flu.c 2011-03-11 06:30:17.000000000 -0800
46 @@ -81,6 +81,22 @@
47 prev_b = NULL;
48 b = UT_LIST_GET_FIRST(buf_pool->flush_list);
49@@ -62,8 +62,8 @@
50
51 ut_ad(buf_flush_validate_low());
52 }
53---- a/storage/innobase/buf/buf0rea.c 2010-11-03 06:39:54.000000000 -0700
54-+++ b/storage/innobase/buf/buf0rea.c 2010-12-15 12:41:14.000000000 -0800
55+--- a/storage/innobase/buf/buf0rea.c 2011-03-11 06:29:45.000000000 -0800
56++++ b/storage/innobase/buf/buf0rea.c 2011-03-11 06:30:17.000000000 -0800
57 @@ -114,6 +114,45 @@
58 block = buf_page_init_for_read(err, mode, space, tablespace_version,
59 offset);
60@@ -124,8 +124,8 @@
61 fprintf(stderr,
62 "InnoDB: Error: InnoDB has waited for"
63 " 50 seconds for pending\n"
64---- a/storage/innobase/fil/fil0fil.c 2010-11-03 06:39:53.000000000 -0700
65-+++ b/storage/innobase/fil/fil0fil.c 2010-12-15 12:41:14.000000000 -0800
66+--- a/storage/innobase/fil/fil0fil.c 2011-03-11 06:29:45.000000000 -0800
67++++ b/storage/innobase/fil/fil0fil.c 2011-03-11 06:30:17.000000000 -0800
68 @@ -26,6 +26,9 @@
69 #include "mtr0mtr.h"
70 #include "mtr0log.h"
71@@ -440,8 +440,8 @@
72 node = UT_LIST_GET_FIRST(space->chain);
73
74 for (;;) {
75---- a/storage/innobase/ibuf/ibuf0ibuf.c 2010-11-03 06:39:52.000000000 -0700
76-+++ b/storage/innobase/ibuf/ibuf0ibuf.c 2010-12-15 12:41:14.000000000 -0800
77+--- a/storage/innobase/ibuf/ibuf0ibuf.c 2011-03-11 06:29:45.000000000 -0800
78++++ b/storage/innobase/ibuf/ibuf0ibuf.c 2011-03-11 06:30:17.000000000 -0800
79 @@ -984,7 +984,7 @@
80 mtr_t mtr;
81 ibool ret;
82@@ -461,8 +461,8 @@
83 while (sum_pages < n_pages) {
84 n_bytes = ibuf_contract_ext(&n_pag2, sync);
85
86---- a/storage/innobase/include/mem0mem.h 2010-11-03 06:39:54.000000000 -0700
87-+++ b/storage/innobase/include/mem0mem.h 2010-12-15 12:41:14.000000000 -0800
88+--- a/storage/innobase/include/mem0mem.h 2011-03-11 06:29:45.000000000 -0800
89++++ b/storage/innobase/include/mem0mem.h 2011-03-11 06:30:17.000000000 -0800
90 @@ -401,6 +401,7 @@
91 allocated buffer frame, which can be appended as a
92 free block to the heap, if we need more space;
93@@ -471,8 +471,8 @@
94 #ifdef MEM_PERIODIC_CHECK
95 UT_LIST_NODE_T(mem_block_t) mem_block_list;
96 /* List of all mem blocks allocated; protected
97---- a/storage/innobase/include/mem0mem.ic 2010-11-03 06:39:54.000000000 -0700
98-+++ b/storage/innobase/include/mem0mem.ic 2010-12-15 12:41:14.000000000 -0800
99+--- a/storage/innobase/include/mem0mem.ic 2011-03-11 06:29:45.000000000 -0800
100++++ b/storage/innobase/include/mem0mem.ic 2011-03-11 06:30:17.000000000 -0800
101 @@ -452,6 +452,7 @@
102
103 /* Add the created block itself as the first block in the list */
104@@ -498,8 +498,8 @@
105
106 if (heap->free_block) {
107 size += UNIV_PAGE_SIZE;
108---- a/storage/innobase/include/srv0srv.h 2010-11-03 06:39:55.000000000 -0700
109-+++ b/storage/innobase/include/srv0srv.h 2010-12-15 12:41:14.000000000 -0800
110+--- a/storage/innobase/include/srv0srv.h 2011-03-11 06:29:45.000000000 -0800
111++++ b/storage/innobase/include/srv0srv.h 2011-03-11 06:30:17.000000000 -0800
112 @@ -60,6 +60,8 @@
113 extern ibool srv_file_per_table;
114 extern ibool srv_locks_unsafe_for_binlog;
115@@ -528,8 +528,8 @@
116 /*-------------------------------------------*/
117
118 extern ulint srv_n_rows_inserted;
119---- a/storage/innobase/include/srv0start.h 2010-11-03 06:39:55.000000000 -0700
120-+++ b/storage/innobase/include/srv0start.h 2010-12-15 12:41:14.000000000 -0800
121+--- a/storage/innobase/include/srv0start.h 2011-03-11 06:29:45.000000000 -0800
122++++ b/storage/innobase/include/srv0start.h 2011-03-11 06:30:17.000000000 -0800
123 @@ -80,6 +80,7 @@
124 /* out: DB_SUCCESS or error code */
125 extern dulint srv_shutdown_lsn;
126@@ -538,8 +538,8 @@
127
128 #ifdef __NETWARE__
129 void set_panic_flag_for_netware(void);
130---- a/storage/innobase/include/ut0byte.ic 2010-11-03 06:39:55.000000000 -0700
131-+++ b/storage/innobase/include/ut0byte.ic 2010-12-15 12:41:14.000000000 -0800
132+--- a/storage/innobase/include/ut0byte.ic 2011-03-11 06:29:45.000000000 -0800
133++++ b/storage/innobase/include/ut0byte.ic 2011-03-11 06:30:17.000000000 -0800
134 @@ -152,6 +152,14 @@
135 dulint a, /* in: dulint */
136 ulint b) /* in: ulint */
137@@ -581,8 +581,8 @@
138 return(diff);
139 }
140
141---- a/storage/innobase/include/ut0mem.h 2010-11-03 06:39:55.000000000 -0700
142-+++ b/storage/innobase/include/ut0mem.h 2010-12-15 12:41:14.000000000 -0800
143+--- a/storage/innobase/include/ut0mem.h 2011-03-11 06:29:45.000000000 -0800
144++++ b/storage/innobase/include/ut0mem.h 2011-03-11 06:30:17.000000000 -0800
145 @@ -30,6 +30,13 @@
146
147
148@@ -597,8 +597,8 @@
149 Allocates memory. Sets it also to zero if UNIV_SET_MEM_TO_ZERO is
150 defined and set_to_zero is TRUE. */
151
152---- a/storage/innobase/log/log0log.c 2010-11-03 06:39:55.000000000 -0700
153-+++ b/storage/innobase/log/log0log.c 2010-12-15 12:41:14.000000000 -0800
154+--- a/storage/innobase/log/log0log.c 2011-03-11 06:29:45.000000000 -0800
155++++ b/storage/innobase/log/log0log.c 2011-03-11 06:30:17.000000000 -0800
156 @@ -538,7 +538,9 @@
157
158 offset = (gr_lsn_size_offset + difference) % group_size;
159@@ -634,8 +634,8 @@
160
161 if (srv_fast_shutdown == 2) {
162 /* In this fastest shutdown we do not flush the buffer pool:
163---- a/storage/innobase/log/log0recv.c 2010-11-03 06:39:52.000000000 -0700
164-+++ b/storage/innobase/log/log0recv.c 2010-12-15 12:41:14.000000000 -0800
165+--- a/storage/innobase/log/log0recv.c 2011-03-11 06:29:45.000000000 -0800
166++++ b/storage/innobase/log/log0recv.c 2011-03-11 06:30:17.000000000 -0800
167 @@ -35,19 +35,19 @@
168 #include "fil0fil.h"
169 #include "sync0sync.h"
170@@ -776,8 +776,8 @@
171 }
172
173 /**********************************************************
174---- a/storage/innobase/mem/mem0dbg.c 2010-11-03 06:39:55.000000000 -0700
175-+++ b/storage/innobase/mem/mem0dbg.c 2010-12-15 12:41:14.000000000 -0800
176+--- a/storage/innobase/mem/mem0dbg.c 2011-03-11 06:29:45.000000000 -0800
177++++ b/storage/innobase/mem/mem0dbg.c 2011-03-11 06:30:17.000000000 -0800
178 @@ -133,6 +133,14 @@
179 mem_hash_initialized = TRUE;
180 #endif
181@@ -793,8 +793,8 @@
182 mem_comm_pool = mem_pool_create(size);
183 }
184
185---- a/storage/innobase/mem/mem0mem.c 2010-11-03 06:39:55.000000000 -0700
186-+++ b/storage/innobase/mem/mem0mem.c 2010-12-15 12:41:14.000000000 -0800
187+--- a/storage/innobase/mem/mem0mem.c 2011-03-11 06:29:45.000000000 -0800
188++++ b/storage/innobase/mem/mem0mem.c 2011-03-11 06:30:17.000000000 -0800
189 @@ -472,6 +472,7 @@
190 /* Add the new block as the last block */
191
192@@ -827,8 +827,8 @@
193
194 if (init_block) {
195 /* Do not have to free: do nothing */
196---- a/storage/innobase/mem/mem0pool.c 2010-11-03 06:39:55.000000000 -0700
197-+++ b/storage/innobase/mem/mem0pool.c 2010-12-15 12:41:14.000000000 -0800
198+--- a/storage/innobase/mem/mem0pool.c 2011-03-11 06:29:45.000000000 -0800
199++++ b/storage/innobase/mem/mem0pool.c 2011-03-11 06:30:17.000000000 -0800
200 @@ -11,6 +11,7 @@
201 #include "mem0pool.ic"
202 #endif
203@@ -869,8 +869,8 @@
204 /* It may be that the area was really allocated from the OS with
205 regular malloc: check if ptr points within our memory pool */
206
207---- a/storage/innobase/os/os0file.c 2010-11-03 06:39:52.000000000 -0700
208-+++ b/storage/innobase/os/os0file.c 2010-12-15 12:43:49.000000000 -0800
209+--- a/storage/innobase/os/os0file.c 2011-03-11 06:29:45.000000000 -0800
210++++ b/storage/innobase/os/os0file.c 2011-03-11 06:30:17.000000000 -0800
211 @@ -466,7 +466,7 @@
212 }
213
214@@ -969,8 +969,8 @@
215
216 array->n_reserved++;
217
218---- a/storage/innobase/os/os0thread.c 2010-11-03 06:39:55.000000000 -0700
219-+++ b/storage/innobase/os/os0thread.c 2010-12-15 12:41:14.000000000 -0800
220+--- a/storage/innobase/os/os0thread.c 2011-03-11 06:29:45.000000000 -0800
221++++ b/storage/innobase/os/os0thread.c 2011-03-11 06:30:17.000000000 -0800
222 @@ -273,12 +273,17 @@
223 #elif defined(__NETWARE__)
224 delay(tm / 1000);
225@@ -989,8 +989,8 @@
226 #endif
227 }
228
229---- a/storage/innobase/srv/srv0srv.c 2010-11-03 06:39:55.000000000 -0700
230-+++ b/storage/innobase/srv/srv0srv.c 2010-12-15 12:41:14.000000000 -0800
231+--- a/storage/innobase/srv/srv0srv.c 2011-03-11 06:29:45.000000000 -0800
232++++ b/storage/innobase/srv/srv0srv.c 2011-03-11 06:30:17.000000000 -0800
233 @@ -94,6 +94,8 @@
234 duplicate key checking
235 and foreign key
236@@ -1027,8 +1027,8 @@
237 os_sync_init();
238 sync_init();
239 mem_init(srv_mem_pool_size);
240---- a/storage/innobase/srv/srv0start.c 2010-11-03 06:39:55.000000000 -0700
241-+++ b/storage/innobase/srv/srv0start.c 2010-12-15 12:41:14.000000000 -0800
242+--- a/storage/innobase/srv/srv0start.c 2011-03-11 06:29:45.000000000 -0800
243++++ b/storage/innobase/srv/srv0start.c 2011-03-11 06:30:17.000000000 -0800
244 @@ -61,6 +61,8 @@
245 /* Log sequence number at shutdown */
246 dulint srv_shutdown_lsn;
247@@ -1083,7 +1083,7 @@
248 } else {
249 os_aio_init(SRV_N_PENDING_IOS_PER_THREAD
250 * srv_n_file_io_threads,
251-@@ -1299,7 +1306,7 @@
252+@@ -1321,7 +1328,7 @@
253 }
254 #endif /* UNIV_LOG_ARCHIVE */
255
256@@ -1092,7 +1092,7 @@
257 fprintf(stderr,
258 "InnoDB: Error: combined size of log files"
259 " must be < 4 GB\n");
260-@@ -1541,6 +1548,11 @@
261+@@ -1563,6 +1570,11 @@
262 are initialized in trx_sys_init_at_db_start(). */
263
264 recv_recovery_from_checkpoint_finish();
265@@ -1104,7 +1104,7 @@
266 }
267
268 if (!create_new_db && sum_of_new_sizes > 0) {
269-@@ -1660,7 +1672,18 @@
270+@@ -1682,7 +1694,18 @@
271
272 if (srv_auto_extend_last_data_file
273 && sum_of_data_file_sizes < tablespace_size_in_header) {
274@@ -1123,7 +1123,7 @@
275 fprintf(stderr,
276 "InnoDB: Error: tablespace size stored in header"
277 " is %lu pages, but\n"
278-@@ -1685,6 +1708,7 @@
279+@@ -1707,6 +1730,7 @@
280
281 return(DB_ERROR);
282 }
283@@ -1131,7 +1131,7 @@
284 }
285
286 /* Check that os_fast_mutexes work as expected */
287-@@ -1781,6 +1805,7 @@
288+@@ -1803,6 +1827,7 @@
289 ibuf_update_max_tablespace_id();
290 }
291
292@@ -1139,8 +1139,8 @@
293 srv_file_per_table = srv_file_per_table_original_value;
294
295 return((int) DB_SUCCESS);
296---- a/storage/innobase/trx/trx0purge.c 2010-11-03 06:39:52.000000000 -0700
297-+++ b/storage/innobase/trx/trx0purge.c 2010-12-15 12:41:14.000000000 -0800
298+--- a/storage/innobase/trx/trx0purge.c 2011-03-11 06:29:45.000000000 -0800
299++++ b/storage/innobase/trx/trx0purge.c 2011-03-11 06:30:17.000000000 -0800
300 @@ -1024,6 +1024,9 @@
301 /* que_thr_t* thr2; */
302 ulint old_pages_handled;
303@@ -1151,8 +1151,8 @@
304 mutex_enter(&(purge_sys->mutex));
305
306 if (purge_sys->trx->n_active_thrs > 0) {
307---- a/storage/innobase/trx/trx0trx.c 2010-11-03 06:39:52.000000000 -0700
308-+++ b/storage/innobase/trx/trx0trx.c 2010-12-15 12:41:14.000000000 -0800
309+--- a/storage/innobase/trx/trx0trx.c 2011-03-11 06:29:45.000000000 -0800
310++++ b/storage/innobase/trx/trx0trx.c 2011-03-11 06:30:17.000000000 -0800
311 @@ -478,8 +478,8 @@
312 ut_dulint_get_low(trx->id));
313
314@@ -1176,8 +1176,8 @@
315 } else {
316 fprintf(stderr,
317 "InnoDB: Since"
318---- a/storage/innobase/ut/ut0mem.c 2010-11-03 06:39:55.000000000 -0700
319-+++ b/storage/innobase/ut/ut0mem.c 2010-12-15 12:41:14.000000000 -0800
320+--- a/storage/innobase/ut/ut0mem.c 2011-03-11 06:29:45.000000000 -0800
321++++ b/storage/innobase/ut/ut0mem.c 2011-03-11 06:30:17.000000000 -0800
322 @@ -15,6 +15,7 @@
323 #include "mem0mem.h"
324 #include "os0sync.h"
325
326=== modified file 'fix_innodb_for_backup55.patch'
327--- fix_innodb_for_backup55.patch 2011-02-06 13:34:45 +0000
328+++ fix_innodb_for_backup55.patch 2011-03-13 15:54:09 +0000
329@@ -1,5 +1,5 @@
330---- a/storage/innobase/btr/btr0btr.c 2010-12-03 09:58:26.000000000 -0800
331-+++ b/storage/innobase/btr/btr0btr.c 2010-12-15 13:29:50.000000000 -0800
332+--- a/storage/innobase/btr/btr0btr.c 2011-01-19 14:37:08.000000000 -0800
333++++ b/storage/innobase/btr/btr0btr.c 2011-03-11 07:20:18.000000000 -0800
334 @@ -120,7 +120,7 @@
335 /**************************************************************//**
336 Gets the root node of a tree and x-latches it.
337@@ -18,8 +18,8 @@
338 buf_block_t*
339 btr_node_ptr_get_child(
340 /*===================*/
341---- a/storage/innobase/buf/buf0buf.c 2010-12-03 09:58:26.000000000 -0800
342-+++ b/storage/innobase/buf/buf0buf.c 2010-12-15 13:29:50.000000000 -0800
343+--- a/storage/innobase/buf/buf0buf.c 2011-01-19 14:37:08.000000000 -0800
344++++ b/storage/innobase/buf/buf0buf.c 2011-03-11 07:20:18.000000000 -0800
345 @@ -517,7 +517,7 @@
346 return(TRUE);
347 }
348@@ -29,7 +29,7 @@
349 if (recv_lsn_checks_on) {
350 ib_uint64_t current_lsn;
351
352-@@ -4055,7 +4055,7 @@
353+@@ -4056,7 +4056,7 @@
354 recv_recover_page(TRUE, (buf_block_t*) bpage);
355 }
356
357@@ -38,8 +38,8 @@
358 ibuf_merge_or_delete_for_page(
359 (buf_block_t*) bpage, bpage->space,
360 bpage->offset, buf_page_get_zip_size(bpage),
361---- a/storage/innobase/buf/buf0rea.c 2010-12-03 09:58:26.000000000 -0800
362-+++ b/storage/innobase/buf/buf0rea.c 2010-12-15 13:29:50.000000000 -0800
363+--- a/storage/innobase/buf/buf0rea.c 2011-01-19 14:37:08.000000000 -0800
364++++ b/storage/innobase/buf/buf0rea.c 2011-03-11 07:20:18.000000000 -0800
365 @@ -122,6 +122,45 @@
366 bpage = buf_page_init_for_read(err, mode, space, zip_size, unzip,
367 tablespace_version, offset);
368@@ -137,8 +137,8 @@
369 return;
370 }
371
372---- a/storage/innobase/fil/fil0fil.c 2010-12-03 09:58:26.000000000 -0800
373-+++ b/storage/innobase/fil/fil0fil.c 2010-12-15 13:29:50.000000000 -0800
374+--- a/storage/innobase/fil/fil0fil.c 2011-01-19 14:37:08.000000000 -0800
375++++ b/storage/innobase/fil/fil0fil.c 2011-03-11 07:20:18.000000000 -0800
376 @@ -40,6 +40,8 @@
377 #include "dict0dict.h"
378 #include "page0page.h"
379@@ -155,9 +155,9 @@
380 -static fil_system_t* fil_system = NULL;
381 +fil_system_t* fil_system = NULL;
382
383-
384- /********************************************************************//**
385-@@ -308,7 +310,7 @@
386+ #ifdef UNIV_DEBUG
387+ /** Try fil_validate() every this many times */
388+@@ -336,7 +338,7 @@
389 off the LRU list if it is in the LRU list. The caller must hold the fil_sys
390 mutex. */
391 static
392@@ -166,7 +166,7 @@
393 fil_node_prepare_for_io(
394 /*====================*/
395 fil_node_t* node, /*!< in: file node */
396-@@ -633,7 +635,7 @@
397+@@ -661,7 +663,7 @@
398 Opens a the file of a node of a tablespace. The caller must own the fil_system
399 mutex. */
400 static
401@@ -175,7 +175,7 @@
402 fil_node_open_file(
403 /*===============*/
404 fil_node_t* node, /*!< in: file node */
405-@@ -668,7 +670,14 @@
406+@@ -696,7 +698,14 @@
407 OS_FILE_READ_ONLY, &success);
408 if (!success) {
409 /* The following call prints an error message */
410@@ -191,7 +191,7 @@
411
412 ut_print_timestamp(stderr);
413
414-@@ -758,8 +767,8 @@
415+@@ -786,8 +795,8 @@
416 }
417
418 if (size_bytes >= 1024 * 1024) {
419@@ -202,7 +202,7 @@
420 }
421
422 if (!(flags & DICT_TF_ZSSIZE_MASK)) {
423-@@ -810,6 +819,8 @@
424+@@ -838,6 +847,8 @@
425 /* Put the node to the LRU list */
426 UT_LIST_ADD_FIRST(LRU, system->LRU, node);
427 }
428@@ -211,7 +211,7 @@
429 }
430
431 /**********************************************************************//**
432-@@ -1435,7 +1446,12 @@
433+@@ -1463,7 +1474,12 @@
434 the file yet; the following calls will open it and update the
435 size fields */
436
437@@ -225,7 +225,7 @@
438 fil_node_complete_io(node, fil_system, OS_FILE_READ);
439 }
440
441-@@ -1487,7 +1503,12 @@
442+@@ -1515,7 +1531,12 @@
443 the file yet; the following calls will open it and update the
444 size fields */
445
446@@ -239,7 +239,7 @@
447 fil_node_complete_io(node, fil_system, OS_FILE_READ);
448 }
449
450-@@ -2152,7 +2173,7 @@
451+@@ -2180,7 +2201,7 @@
452 if (fil_create_new_single_table_tablespace(
453 space_id, name, FALSE, flags,
454 FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) {
455@@ -248,7 +248,7 @@
456 }
457 }
458
459-@@ -2315,7 +2336,7 @@
460+@@ -2343,7 +2364,7 @@
461 }
462
463 if (success) {
464@@ -257,7 +257,7 @@
465 /* Write a log record about the deletion of the .ibd
466 file, so that ibbackup can replay it in the
467 --apply-log phase. We use a dummy mtr and the familiar
468-@@ -2616,7 +2637,7 @@
469+@@ -2644,7 +2665,7 @@
470
471 mutex_exit(&fil_system->mutex);
472
473@@ -266,7 +266,7 @@
474 if (success) {
475 mtr_t mtr;
476
477-@@ -2807,7 +2828,7 @@
478+@@ -2835,7 +2856,7 @@
479
480 fil_node_create(path, size, space_id, FALSE);
481
482@@ -275,7 +275,7 @@
483 {
484 mtr_t mtr;
485
486-@@ -3062,19 +3083,97 @@
487+@@ -3090,19 +3111,97 @@
488 "InnoDB: open the tablespace file ", stderr);
489 ut_print_filename(stderr, filepath);
490 fputs("!\n"
491@@ -383,7 +383,7 @@
492 return(FALSE);
493 }
494
495-@@ -3306,7 +3405,7 @@
496+@@ -3334,7 +3433,7 @@
497 cannot be ok. */
498
499 size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low;
500@@ -392,7 +392,7 @@
501 if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) {
502 fprintf(stderr,
503 "InnoDB: Error: the size of single-table tablespace"
504-@@ -3447,7 +3546,7 @@
505+@@ -3475,7 +3574,7 @@
506 idea is to read as much good data as we can and jump over bad data.
507 @return 0 if ok, -1 if error even after the retries, 1 if at the end
508 of the directory */
509@@ -401,7 +401,7 @@
510 int
511 fil_file_readdir_next_file(
512 /*=======================*/
513-@@ -3746,15 +3845,97 @@
514+@@ -3774,15 +3873,97 @@
515 "InnoDB: in InnoDB data dictionary"
516 " has tablespace id %lu,\n"
517 "InnoDB: but tablespace with that id"
518@@ -507,7 +507,7 @@
519 } else {
520 ut_print_timestamp(stderr);
521 fputs(" InnoDB: Error: table ", stderr);
522-@@ -4143,7 +4324,7 @@
523+@@ -4171,7 +4352,7 @@
524 off the LRU list if it is in the LRU list. The caller must hold the fil_sys
525 mutex. */
526 static
527@@ -516,7 +516,7 @@
528 fil_node_prepare_for_io(
529 /*====================*/
530 fil_node_t* node, /*!< in: file node */
531-@@ -4163,10 +4344,13 @@
532+@@ -4191,10 +4372,13 @@
533 }
534
535 if (node->open == FALSE) {
536@@ -531,7 +531,7 @@
537 }
538
539 if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE
540-@@ -4179,6 +4363,8 @@
541+@@ -4207,6 +4391,8 @@
542 }
543
544 node->n_pending++;
545@@ -540,7 +540,7 @@
546 }
547
548 /********************************************************************//**
549-@@ -4363,6 +4549,16 @@
550+@@ -4391,6 +4577,16 @@
551
552 ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE));
553
554@@ -557,11 +557,11 @@
555 node = UT_LIST_GET_FIRST(space->chain);
556
557 for (;;) {
558---- a/storage/innobase/ibuf/ibuf0ibuf.c 2010-12-03 09:58:26.000000000 -0800
559-+++ b/storage/innobase/ibuf/ibuf0ibuf.c 2010-12-15 13:29:50.000000000 -0800
560-@@ -1125,6 +1125,9 @@
561-
562+--- a/storage/innobase/ibuf/ibuf0ibuf.c 2011-01-19 14:37:08.000000000 -0800
563++++ b/storage/innobase/ibuf/ibuf0ibuf.c 2011-03-11 07:20:18.000000000 -0800
564+@@ -1160,6 +1160,9 @@
565 ut_ad(!recv_no_ibuf_operations);
566+ ut_ad(x_latch || mtr == NULL);
567
568 + if (srv_fake_write)
569 + return(FALSE);
570@@ -569,7 +569,7 @@
571 if (ibuf_fixed_addr_page(space, zip_size, page_no)) {
572
573 return(TRUE);
574-@@ -2613,6 +2616,9 @@
575+@@ -2691,6 +2694,9 @@
576 ulint n_bytes;
577 ulint n_pag2;
578
579@@ -579,8 +579,8 @@
580 while (sum_pages < n_pages) {
581 n_bytes = ibuf_contract_ext(&n_pag2, sync);
582
583---- a/storage/innobase/include/srv0srv.h 2010-12-03 09:58:26.000000000 -0800
584-+++ b/storage/innobase/include/srv0srv.h 2010-12-15 13:29:50.000000000 -0800
585+--- a/storage/innobase/include/srv0srv.h 2011-01-19 14:37:08.000000000 -0800
586++++ b/storage/innobase/include/srv0srv.h 2011-03-11 07:20:18.000000000 -0800
587 @@ -211,6 +211,10 @@
588 extern ulong srv_max_purge_lag;
589
590@@ -592,8 +592,8 @@
591 /*-------------------------------------------*/
592
593 extern ulint srv_n_rows_inserted;
594---- a/storage/innobase/include/srv0start.h 2010-12-03 09:58:26.000000000 -0800
595-+++ b/storage/innobase/include/srv0start.h 2010-12-15 13:29:50.000000000 -0800
596+--- a/storage/innobase/include/srv0start.h 2011-01-19 14:37:08.000000000 -0800
597++++ b/storage/innobase/include/srv0start.h 2011-03-11 07:20:18.000000000 -0800
598 @@ -91,6 +91,8 @@
599 /** Log sequence number immediately after startup */
600 extern ib_uint64_t srv_start_lsn;
601@@ -603,8 +603,8 @@
602 #ifdef HAVE_DARWIN_THREADS
603 /** TRUE if the F_FULLFSYNC option is available */
604 extern ibool srv_have_fullfsync;
605---- a/storage/innobase/log/log0log.c 2010-12-03 09:58:26.000000000 -0800
606-+++ b/storage/innobase/log/log0log.c 2010-12-15 13:29:50.000000000 -0800
607+--- a/storage/innobase/log/log0log.c 2011-01-19 14:37:08.000000000 -0800
608++++ b/storage/innobase/log/log0log.c 2011-03-11 07:20:18.000000000 -0800
609 @@ -576,7 +576,9 @@
610
611 offset = (gr_lsn_size_offset + difference) % group_size;
612@@ -640,8 +640,8 @@
613
614 if (srv_fast_shutdown == 2) {
615 /* In this fastest shutdown we do not flush the buffer pool:
616---- a/storage/innobase/log/log0recv.c 2010-12-03 09:58:26.000000000 -0800
617-+++ b/storage/innobase/log/log0recv.c 2010-12-15 13:29:50.000000000 -0800
618+--- a/storage/innobase/log/log0recv.c 2011-01-19 14:37:08.000000000 -0800
619++++ b/storage/innobase/log/log0recv.c 2011-03-11 07:20:18.000000000 -0800
620 @@ -42,27 +42,27 @@
621 #include "trx0undo.h"
622 #include "trx0rec.h"
623@@ -751,7 +751,7 @@
624 "InnoDB: Doing recovery: scanned up to"
625 - " log sequence number %llu\n",
626 - *group_scanned_lsn);
627-+ " log sequence number %llu (%lu %)\n",
628++ " log sequence number %llu (%lu %%)\n",
629 + *group_scanned_lsn,
630 + (ulong) (*group_scanned_lsn - srv_oldest_lsn)
631 + / (8 * log_group_get_capacity(UT_LIST_GET_FIRST(log_sys->log_groups))/900)
632@@ -791,9 +791,9 @@
633 trx_rollback_or_clean_recovered(FALSE);
634 }
635
636---- a/storage/innobase/os/os0file.c 2010-12-03 09:58:26.000000000 -0800
637-+++ b/storage/innobase/os/os0file.c 2010-12-15 13:29:50.000000000 -0800
638-@@ -631,7 +631,7 @@
639+--- a/storage/innobase/os/os0file.c 2011-01-19 14:37:08.000000000 -0800
640++++ b/storage/innobase/os/os0file.c 2011-03-11 07:20:18.000000000 -0800
641+@@ -656,7 +656,7 @@
642 }
643
644 #undef USE_FILE_LOCK
645@@ -802,7 +802,7 @@
646 #if defined(UNIV_HOTBACKUP) || defined(__WIN__)
647 /* InnoDB Hot Backup does not lock the data files.
648 * On Windows, mandatory locking is used.
649-@@ -1431,8 +1431,9 @@
650+@@ -1456,8 +1456,9 @@
651 attributes = 0;
652 ut_error;
653 }
654@@ -813,7 +813,7 @@
655 GENERIC_READ | GENERIC_WRITE, /* read and write
656 access */
657 share_mode, /* File can be read also by other
658-@@ -1491,7 +1492,11 @@
659+@@ -1516,7 +1517,11 @@
660 if (create_mode == OS_FILE_OPEN || create_mode == OS_FILE_OPEN_RAW
661 || create_mode == OS_FILE_OPEN_RETRY) {
662 mode_str = "OPEN";
663@@ -826,7 +826,7 @@
664 } else if (create_mode == OS_FILE_CREATE) {
665 mode_str = "CREATE";
666 create_flag = O_RDWR | O_CREAT | O_EXCL;
667-@@ -2669,6 +2674,9 @@
668+@@ -2694,6 +2699,9 @@
669 ut_a((offset & 0xFFFFFFFFUL) == offset);
670 ut_a((n & 0xFFFFFFFFUL) == n);
671
672@@ -836,7 +836,7 @@
673 os_n_file_writes++;
674
675 ut_ad(file);
676-@@ -2793,6 +2801,9 @@
677+@@ -2818,6 +2826,9 @@
678 #else
679 ssize_t ret;
680
681@@ -846,8 +846,8 @@
682 ret = os_file_pwrite(file, buf, n, offset, offset_high);
683
684 if ((ulint)ret == n) {
685---- a/storage/innobase/os/os0thread.c 2010-12-03 09:58:26.000000000 -0800
686-+++ b/storage/innobase/os/os0thread.c 2010-12-15 13:29:50.000000000 -0800
687+--- a/storage/innobase/os/os0thread.c 2011-01-19 14:37:08.000000000 -0800
688++++ b/storage/innobase/os/os0thread.c 2011-03-11 07:20:18.000000000 -0800
689 @@ -266,12 +266,17 @@
690 #ifdef __WIN__
691 Sleep((DWORD) tm / 1000);
692@@ -866,8 +866,8 @@
693 #endif
694 }
695
696---- a/storage/innobase/row/row0merge.c 2010-12-03 09:58:26.000000000 -0800
697-+++ b/storage/innobase/row/row0merge.c 2010-12-15 13:29:50.000000000 -0800
698+--- a/storage/innobase/row/row0merge.c 2011-01-19 14:37:08.000000000 -0800
699++++ b/storage/innobase/row/row0merge.c 2011-03-11 07:20:18.000000000 -0800
700 @@ -459,7 +459,9 @@
701 rec = rec_convert_dtuple_to_rec(*buf, index, tuple, n_ext);
702 offsets = rec_get_offsets(rec, index, NULL, ULINT_UNDEFINED, &heap);
703@@ -903,9 +903,9 @@
704
705 /* Read clustered index of the table and create files for
706 secondary index entries for merge sort */
707---- a/storage/innobase/srv/srv0srv.c 2010-12-03 09:58:26.000000000 -0800
708-+++ b/storage/innobase/srv/srv0srv.c 2010-12-15 13:29:50.000000000 -0800
709-@@ -394,6 +394,9 @@
710+--- a/storage/innobase/srv/srv0srv.c 2011-01-19 14:37:08.000000000 -0800
711++++ b/storage/innobase/srv/srv0srv.c 2011-03-11 07:20:18.000000000 -0800
712+@@ -396,6 +396,9 @@
713
714 UNIV_INTERN ulong srv_replication_delay = 0;
715
716@@ -915,7 +915,7 @@
717 /*-------------------------------------------*/
718 UNIV_INTERN ulong srv_n_spin_wait_rounds = 30;
719 UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500;
720-@@ -1060,7 +1063,7 @@
721+@@ -1094,7 +1097,7 @@
722 }
723
724 /* Initialize some INFORMATION SCHEMA internal structures */
725@@ -924,7 +924,7 @@
726 }
727
728 /*********************************************************************//**
729-@@ -1071,6 +1074,7 @@
730+@@ -1105,6 +1108,7 @@
731 /*==========*/
732 {
733 os_fast_mutex_free(&srv_conc_mutex);
734@@ -932,7 +932,7 @@
735 mem_free(srv_conc_slots);
736 srv_conc_slots = NULL;
737
738-@@ -1084,6 +1088,7 @@
739+@@ -1118,6 +1122,7 @@
740 srv_mysql_table = NULL;
741
742 trx_i_s_cache_free(trx_i_s_cache);
743@@ -940,7 +940,7 @@
744 }
745
746 /*********************************************************************//**
747-@@ -1679,7 +1684,7 @@
748+@@ -1713,7 +1718,7 @@
749 }
750
751 /* Record the lock wait time for this thread */
752@@ -949,8 +949,8 @@
753 }
754
755 if (trx->was_chosen_as_deadlock_victim) {
756---- a/storage/innobase/srv/srv0start.c 2010-12-03 09:58:26.000000000 -0800
757-+++ b/storage/innobase/srv/srv0start.c 2010-12-15 13:29:50.000000000 -0800
758+--- a/storage/innobase/srv/srv0start.c 2011-01-19 14:37:08.000000000 -0800
759++++ b/storage/innobase/srv/srv0start.c 2011-03-11 07:35:47.000000000 -0800
760 @@ -94,6 +94,8 @@
761 /** Log sequence number at shutdown */
762 UNIV_INTERN ib_uint64_t srv_shutdown_lsn;
763@@ -978,16 +978,16 @@
764 ulint
765 open_or_create_data_files(
766 /*======================*/
767-@@ -1379,7 +1381,7 @@
768+@@ -1411,7 +1413,7 @@
769 }
770 #endif /* UNIV_LOG_ARCHIVE */
771
772 - if (srv_n_log_files * srv_log_file_size >= 262144) {
773 + if (sizeof(ulint) == 4 && srv_n_log_files * srv_log_file_size >= 262144) {
774+ ut_print_timestamp(stderr);
775 fprintf(stderr,
776- "InnoDB: Error: combined size of log files"
777- " must be < 4 GB\n");
778-@@ -1630,6 +1632,10 @@
779+ " InnoDB: Error: combined size of log files"
780+@@ -1706,6 +1708,10 @@
781 are initialized in trx_sys_init_at_db_start(). */
782
783 recv_recovery_from_checkpoint_finish();
784@@ -998,10 +998,10 @@
785 if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {
786 /* The following call is necessary for the insert
787 buffer to work with multiple tablespaces. We must
788-@@ -1801,7 +1807,18 @@
789+@@ -1865,6 +1871,17 @@
790+ if (!srv_auto_extend_last_data_file
791+ && sum_of_data_file_sizes != tablespace_size_in_header) {
792
793- if (srv_auto_extend_last_data_file
794- && sum_of_data_file_sizes < tablespace_size_in_header) {
795 + /* extend table space size aligning with header */
796 + ulint actual_size;
797 + fil_extend_space_to_desired_size(&actual_size, 0, tablespace_size_in_header);
798@@ -1012,12 +1012,11 @@
799 + (ulong) actual_size,
800 + (ulong) tablespace_size_in_header);
801 + }
802-
803 +#ifdef UNDEFINED
804+ ut_print_timestamp(stderr);
805 fprintf(stderr,
806- "InnoDB: Error: tablespace size stored in header"
807- " is %lu pages, but\n"
808-@@ -1826,6 +1843,7 @@
809+ " InnoDB: Error: tablespace size"
810+@@ -1944,6 +1961,7 @@
811
812 return(DB_ERROR);
813 }
814@@ -1025,7 +1024,7 @@
815 }
816
817 /* Check that os_fast_mutexes work as expected */
818-@@ -1921,6 +1939,7 @@
819+@@ -2056,6 +2074,7 @@
820 ibuf_update_max_tablespace_id();
821 }
822
823@@ -1033,8 +1032,8 @@
824 srv_file_per_table = srv_file_per_table_original_value;
825
826 srv_was_started = TRUE;
827---- a/storage/innobase/trx/trx0purge.c 2010-12-03 09:58:26.000000000 -0800
828-+++ b/storage/innobase/trx/trx0purge.c 2010-12-15 13:29:50.000000000 -0800
829+--- a/storage/innobase/trx/trx0purge.c 2011-01-19 14:37:08.000000000 -0800
830++++ b/storage/innobase/trx/trx0purge.c 2011-03-11 07:20:18.000000000 -0800
831 @@ -1100,6 +1100,9 @@
832 /* que_thr_t* thr2; */
833 ulint old_pages_handled;
834@@ -1045,8 +1044,8 @@
835 mutex_enter(&(purge_sys->mutex));
836
837 if (purge_sys->trx->n_active_thrs > 0) {
838---- a/storage/innobase/trx/trx0rseg.c 2010-12-03 09:58:26.000000000 -0800
839-+++ b/storage/innobase/trx/trx0rseg.c 2010-12-15 13:29:50.000000000 -0800
840+--- a/storage/innobase/trx/trx0rseg.c 2011-01-19 14:37:08.000000000 -0800
841++++ b/storage/innobase/trx/trx0rseg.c 2011-03-11 07:20:18.000000000 -0800
842 @@ -140,9 +140,11 @@
843
844 mutex_free(&rseg->mutex);
845@@ -1059,8 +1058,8 @@
846
847 undo = UT_LIST_GET_FIRST(rseg->update_undo_cached);
848
849---- a/storage/innobase/trx/trx0sys.c 2010-12-03 09:58:26.000000000 -0800
850-+++ b/storage/innobase/trx/trx0sys.c 2010-12-15 13:29:50.000000000 -0800
851+--- a/storage/innobase/trx/trx0sys.c 2011-01-19 14:37:08.000000000 -0800
852++++ b/storage/innobase/trx/trx0sys.c 2011-03-11 07:20:18.000000000 -0800
853 @@ -1641,10 +1641,12 @@
854 UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view);
855 }
856@@ -1074,8 +1073,8 @@
857
858 mem_free(trx_sys);
859
860---- a/storage/innobase/trx/trx0trx.c 2010-12-03 09:58:26.000000000 -0800
861-+++ b/storage/innobase/trx/trx0trx.c 2010-12-15 13:29:50.000000000 -0800
862+--- a/storage/innobase/trx/trx0trx.c 2011-01-19 14:37:08.000000000 -0800
863++++ b/storage/innobase/trx/trx0trx.c 2011-03-11 07:20:18.000000000 -0800
864 @@ -469,8 +469,8 @@
865 (ullint) trx->id);
866
867
868=== modified file 'fix_innodb_for_backup_5.1_plugin.patch'
869--- fix_innodb_for_backup_5.1_plugin.patch 2011-02-06 13:34:45 +0000
870+++ fix_innodb_for_backup_5.1_plugin.patch 2011-03-13 15:54:09 +0000
871@@ -1,5 +1,5 @@
872---- a/storage/innodb_plugin/btr/btr0btr.c 2010-12-15 13:04:37.000000000 -0800
873-+++ b/storage/innodb_plugin/btr/btr0btr.c 2010-12-15 13:05:10.000000000 -0800
874+--- a/storage/innodb_plugin/btr/btr0btr.c 2011-03-12 06:27:32.000000000 -0800
875++++ b/storage/innodb_plugin/btr/btr0btr.c 2011-03-12 06:28:08.000000000 -0800
876 @@ -120,7 +120,7 @@
877 /**************************************************************//**
878 Gets the root node of a tree and x-latches it.
879@@ -18,8 +18,8 @@
880 buf_block_t*
881 btr_node_ptr_get_child(
882 /*===================*/
883---- a/storage/innodb_plugin/buf/buf0buf.c 2010-12-15 13:04:37.000000000 -0800
884-+++ b/storage/innodb_plugin/buf/buf0buf.c 2010-12-15 13:05:10.000000000 -0800
885+--- a/storage/innodb_plugin/buf/buf0buf.c 2011-03-12 06:27:32.000000000 -0800
886++++ b/storage/innodb_plugin/buf/buf0buf.c 2011-03-12 06:28:08.000000000 -0800
887 @@ -358,7 +358,7 @@
888 return(TRUE);
889 }
890@@ -38,8 +38,8 @@
891 ibuf_merge_or_delete_for_page(
892 (buf_block_t*) bpage, bpage->space,
893 bpage->offset, buf_page_get_zip_size(bpage),
894---- a/storage/innodb_plugin/buf/buf0rea.c 2010-12-15 13:04:37.000000000 -0800
895-+++ b/storage/innodb_plugin/buf/buf0rea.c 2010-12-15 13:05:10.000000000 -0800
896+--- a/storage/innodb_plugin/buf/buf0rea.c 2011-03-12 06:27:32.000000000 -0800
897++++ b/storage/innodb_plugin/buf/buf0rea.c 2011-03-12 06:28:08.000000000 -0800
898 @@ -120,6 +120,45 @@
899 bpage = buf_page_init_for_read(err, mode, space, zip_size, unzip,
900 tablespace_version, offset);
901@@ -137,8 +137,8 @@
902 return;
903 }
904
905---- a/storage/innodb_plugin/fil/fil0fil.c 2010-12-15 13:04:37.000000000 -0800
906-+++ b/storage/innodb_plugin/fil/fil0fil.c 2010-12-15 13:05:10.000000000 -0800
907+--- a/storage/innodb_plugin/fil/fil0fil.c 2011-03-12 06:27:32.000000000 -0800
908++++ b/storage/innodb_plugin/fil/fil0fil.c 2011-03-12 06:28:08.000000000 -0800
909 @@ -48,6 +48,7 @@
910 #else /* !UNIV_HOTBACKUP */
911 static ulint srv_data_read, srv_data_written;
912@@ -165,7 +165,7 @@
913 fil_node_prepare_for_io(
914 /*====================*/
915 fil_node_t* node, /*!< in: file node */
916-@@ -622,7 +623,7 @@
917+@@ -623,7 +624,7 @@
918 Opens a the file of a node of a tablespace. The caller must own the fil_system
919 mutex. */
920 static
921@@ -174,7 +174,7 @@
922 fil_node_open_file(
923 /*===============*/
924 fil_node_t* node, /*!< in: file node */
925-@@ -656,7 +657,14 @@
926+@@ -657,7 +658,14 @@
927 node->name, OS_FILE_OPEN, OS_FILE_READ_ONLY, &success);
928 if (!success) {
929 /* The following call prints an error message */
930@@ -190,7 +190,7 @@
931
932 ut_print_timestamp(stderr);
933
934-@@ -746,8 +754,8 @@
935+@@ -747,8 +755,8 @@
936 }
937
938 if (size_bytes >= 1024 * 1024) {
939@@ -201,7 +201,7 @@
940 }
941
942 if (!(flags & DICT_TF_ZSSIZE_MASK)) {
943-@@ -792,6 +800,8 @@
944+@@ -793,6 +801,8 @@
945 /* Put the node to the LRU list */
946 UT_LIST_ADD_FIRST(LRU, system->LRU, node);
947 }
948@@ -239,7 +239,7 @@
949 fil_node_complete_io(node, fil_system, OS_FILE_READ);
950 }
951
952-@@ -2132,7 +2153,7 @@
953+@@ -2134,7 +2155,7 @@
954 if (fil_create_new_single_table_tablespace(
955 space_id, name, FALSE, flags,
956 FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) {
957@@ -248,7 +248,7 @@
958 }
959 }
960
961-@@ -2276,7 +2297,7 @@
962+@@ -2297,7 +2318,7 @@
963 }
964
965 if (success) {
966@@ -257,7 +257,7 @@
967 /* Write a log record about the deletion of the .ibd
968 file, so that ibbackup can replay it in the
969 --apply-log phase. We use a dummy mtr and the familiar
970-@@ -2552,7 +2573,7 @@
971+@@ -2598,7 +2619,7 @@
972
973 mutex_exit(&fil_system->mutex);
974
975@@ -266,7 +266,7 @@
976 if (success) {
977 mtr_t mtr;
978
979-@@ -2742,7 +2763,7 @@
980+@@ -2788,7 +2809,7 @@
981
982 fil_node_create(path, size, space_id, FALSE);
983
984@@ -275,7 +275,7 @@
985 {
986 mtr_t mtr;
987
988-@@ -2995,19 +3016,97 @@
989+@@ -3041,19 +3062,97 @@
990 "InnoDB: open the tablespace file ", stderr);
991 ut_print_filename(stderr, filepath);
992 fputs("!\n"
993@@ -383,7 +383,7 @@
994 return(FALSE);
995 }
996
997-@@ -3238,7 +3337,7 @@
998+@@ -3284,7 +3383,7 @@
999 cannot be ok. */
1000
1001 size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low;
1002@@ -392,7 +392,7 @@
1003 if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) {
1004 fprintf(stderr,
1005 "InnoDB: Error: the size of single-table tablespace"
1006-@@ -3379,7 +3478,7 @@
1007+@@ -3425,7 +3524,7 @@
1008 idea is to read as much good data as we can and jump over bad data.
1009 @return 0 if ok, -1 if error even after the retries, 1 if at the end
1010 of the directory */
1011@@ -401,7 +401,7 @@
1012 int
1013 fil_file_readdir_next_file(
1014 /*=======================*/
1015-@@ -3678,15 +3777,97 @@
1016+@@ -3724,15 +3823,97 @@
1017 "InnoDB: in InnoDB data dictionary"
1018 " has tablespace id %lu,\n"
1019 "InnoDB: but tablespace with that id"
1020@@ -507,7 +507,7 @@
1021 } else {
1022 ut_print_timestamp(stderr);
1023 fputs(" InnoDB: Error: table ", stderr);
1024-@@ -4075,7 +4256,7 @@
1025+@@ -4121,7 +4302,7 @@
1026 off the LRU list if it is in the LRU list. The caller must hold the fil_sys
1027 mutex. */
1028 static
1029@@ -516,7 +516,7 @@
1030 fil_node_prepare_for_io(
1031 /*====================*/
1032 fil_node_t* node, /*!< in: file node */
1033-@@ -4095,10 +4276,13 @@
1034+@@ -4141,10 +4322,13 @@
1035 }
1036
1037 if (node->open == FALSE) {
1038@@ -531,7 +531,7 @@
1039 }
1040
1041 if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE
1042-@@ -4111,6 +4295,8 @@
1043+@@ -4157,6 +4341,8 @@
1044 }
1045
1046 node->n_pending++;
1047@@ -540,7 +540,7 @@
1048 }
1049
1050 /********************************************************************//**
1051-@@ -4295,6 +4481,16 @@
1052+@@ -4341,6 +4527,16 @@
1053
1054 ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE));
1055
1056@@ -557,8 +557,8 @@
1057 node = UT_LIST_GET_FIRST(space->chain);
1058
1059 for (;;) {
1060---- a/storage/innodb_plugin/ibuf/ibuf0ibuf.c 2010-12-15 13:04:37.000000000 -0800
1061-+++ b/storage/innodb_plugin/ibuf/ibuf0ibuf.c 2010-12-15 13:05:10.000000000 -0800
1062+--- a/storage/innodb_plugin/ibuf/ibuf0ibuf.c 2011-03-12 06:27:32.000000000 -0800
1063++++ b/storage/innodb_plugin/ibuf/ibuf0ibuf.c 2011-03-12 06:28:08.000000000 -0800
1064 @@ -1061,6 +1061,9 @@
1065
1066 ut_ad(!recv_no_ibuf_operations);
1067@@ -579,8 +579,8 @@
1068 while (sum_pages < n_pages) {
1069 n_bytes = ibuf_contract_ext(&n_pag2, sync);
1070
1071---- a/storage/innodb_plugin/include/srv0srv.h 2010-12-15 13:04:37.000000000 -0800
1072-+++ b/storage/innodb_plugin/include/srv0srv.h 2010-12-15 13:05:10.000000000 -0800
1073+--- a/storage/innodb_plugin/include/srv0srv.h 2011-03-12 06:27:32.000000000 -0800
1074++++ b/storage/innodb_plugin/include/srv0srv.h 2011-03-12 06:28:08.000000000 -0800
1075 @@ -196,6 +196,10 @@
1076 extern ulong srv_max_purge_lag;
1077
1078@@ -592,8 +592,8 @@
1079 /*-------------------------------------------*/
1080
1081 extern ulint srv_n_rows_inserted;
1082---- a/storage/innodb_plugin/include/srv0start.h 2010-12-15 13:04:37.000000000 -0800
1083-+++ b/storage/innodb_plugin/include/srv0start.h 2010-12-15 13:05:10.000000000 -0800
1084+--- a/storage/innodb_plugin/include/srv0start.h 2011-03-12 06:27:32.000000000 -0800
1085++++ b/storage/innodb_plugin/include/srv0start.h 2011-03-12 06:28:08.000000000 -0800
1086 @@ -91,6 +91,8 @@
1087 /** Log sequence number immediately after startup */
1088 extern ib_uint64_t srv_start_lsn;
1089@@ -603,8 +603,8 @@
1090 #ifdef __NETWARE__
1091 void set_panic_flag_for_netware(void);
1092 #endif
1093---- a/storage/innodb_plugin/include/ut0byte.ic 2010-12-15 13:04:37.000000000 -0800
1094-+++ b/storage/innodb_plugin/include/ut0byte.ic 2010-12-15 13:05:10.000000000 -0800
1095+--- a/storage/innodb_plugin/include/ut0byte.ic 2011-03-12 06:27:32.000000000 -0800
1096++++ b/storage/innodb_plugin/include/ut0byte.ic 2011-03-12 06:28:08.000000000 -0800
1097 @@ -168,6 +168,14 @@
1098 dulint a, /*!< in: dulint */
1099 ulint b) /*!< in: ulint */
1100@@ -646,8 +646,8 @@
1101 return(diff);
1102 }
1103
1104---- a/storage/innodb_plugin/log/log0log.c 2010-12-15 13:04:37.000000000 -0800
1105-+++ b/storage/innodb_plugin/log/log0log.c 2010-12-15 13:05:10.000000000 -0800
1106+--- a/storage/innodb_plugin/log/log0log.c 2011-03-12 06:27:32.000000000 -0800
1107++++ b/storage/innodb_plugin/log/log0log.c 2011-03-12 06:28:08.000000000 -0800
1108 @@ -564,7 +564,9 @@
1109
1110 offset = (gr_lsn_size_offset + difference) % group_size;
1111@@ -683,8 +683,8 @@
1112
1113 if (srv_fast_shutdown == 2) {
1114 /* In this fastest shutdown we do not flush the buffer pool:
1115---- a/storage/innodb_plugin/log/log0recv.c 2010-12-15 13:04:37.000000000 -0800
1116-+++ b/storage/innodb_plugin/log/log0recv.c 2010-12-15 13:05:10.000000000 -0800
1117+--- a/storage/innodb_plugin/log/log0recv.c 2011-03-12 06:27:32.000000000 -0800
1118++++ b/storage/innodb_plugin/log/log0recv.c 2011-03-12 06:28:08.000000000 -0800
1119 @@ -42,27 +42,27 @@
1120 #include "trx0undo.h"
1121 #include "trx0rec.h"
1122@@ -834,8 +834,8 @@
1123 trx_rollback_or_clean_recovered(FALSE);
1124 }
1125
1126---- a/storage/innodb_plugin/os/os0file.c 2010-12-15 13:04:37.000000000 -0800
1127-+++ b/storage/innodb_plugin/os/os0file.c 2010-12-15 13:05:10.000000000 -0800
1128+--- a/storage/innodb_plugin/os/os0file.c 2011-03-12 06:27:32.000000000 -0800
1129++++ b/storage/innodb_plugin/os/os0file.c 2011-03-12 06:28:08.000000000 -0800
1130 @@ -514,7 +514,7 @@
1131 }
1132
1133@@ -889,8 +889,8 @@
1134 ret = os_file_pwrite(file, buf, n, offset, offset_high);
1135
1136 if ((ulint)ret == n) {
1137---- a/storage/innodb_plugin/os/os0thread.c 2010-12-15 13:04:37.000000000 -0800
1138-+++ b/storage/innodb_plugin/os/os0thread.c 2010-12-15 13:05:10.000000000 -0800
1139+--- a/storage/innodb_plugin/os/os0thread.c 2011-03-12 06:27:32.000000000 -0800
1140++++ b/storage/innodb_plugin/os/os0thread.c 2011-03-12 06:28:08.000000000 -0800
1141 @@ -287,12 +287,17 @@
1142 #elif defined(__NETWARE__)
1143 delay(tm / 1000);
1144@@ -909,8 +909,8 @@
1145 #endif
1146 }
1147
1148---- a/storage/innodb_plugin/row/row0merge.c 2010-12-15 13:04:37.000000000 -0800
1149-+++ b/storage/innodb_plugin/row/row0merge.c 2010-12-15 13:05:10.000000000 -0800
1150+--- a/storage/innodb_plugin/row/row0merge.c 2011-03-12 06:27:32.000000000 -0800
1151++++ b/storage/innodb_plugin/row/row0merge.c 2011-03-12 06:28:08.000000000 -0800
1152 @@ -453,7 +453,9 @@
1153 rec = rec_convert_dtuple_to_rec(*buf, index, tuple, n_ext);
1154 offsets = rec_get_offsets(rec, index, NULL, ULINT_UNDEFINED, &heap);
1155@@ -948,8 +948,8 @@
1156
1157 /* Read clustered index of the table and create files for
1158 secondary index entries for merge sort */
1159---- a/storage/innodb_plugin/srv/srv0srv.c 2010-12-15 13:04:37.000000000 -0800
1160-+++ b/storage/innodb_plugin/srv/srv0srv.c 2010-12-15 13:05:10.000000000 -0800
1161+--- a/storage/innodb_plugin/srv/srv0srv.c 2011-03-12 06:27:32.000000000 -0800
1162++++ b/storage/innodb_plugin/srv/srv0srv.c 2011-03-12 06:28:08.000000000 -0800
1163 @@ -367,6 +367,9 @@
1164
1165 UNIV_INTERN ulong srv_replication_delay = 0;
1166@@ -985,8 +985,8 @@
1167 }
1168
1169 /*********************************************************************//**
1170---- a/storage/innodb_plugin/srv/srv0start.c 2010-12-15 13:04:37.000000000 -0800
1171-+++ b/storage/innodb_plugin/srv/srv0start.c 2010-12-15 13:05:10.000000000 -0800
1172+--- a/storage/innodb_plugin/srv/srv0start.c 2011-03-12 06:27:32.000000000 -0800
1173++++ b/storage/innodb_plugin/srv/srv0start.c 2011-03-12 06:28:08.000000000 -0800
1174 @@ -94,6 +94,8 @@
1175 /** Log sequence number at shutdown */
1176 UNIV_INTERN ib_uint64_t srv_shutdown_lsn;
1177@@ -1014,7 +1014,7 @@
1178 ulint
1179 open_or_create_data_files(
1180 /*======================*/
1181-@@ -1333,7 +1335,7 @@
1182+@@ -1353,7 +1355,7 @@
1183 }
1184 #endif /* UNIV_LOG_ARCHIVE */
1185
1186@@ -1023,7 +1023,7 @@
1187 fprintf(stderr,
1188 "InnoDB: Error: combined size of log files"
1189 " must be < 4 GB\n");
1190-@@ -1575,6 +1577,10 @@
1191+@@ -1595,6 +1597,10 @@
1192 are initialized in trx_sys_init_at_db_start(). */
1193
1194 recv_recovery_from_checkpoint_finish();
1195@@ -1034,7 +1034,7 @@
1196 if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {
1197 /* The following call is necessary for the insert
1198 buffer to work with multiple tablespaces. We must
1199-@@ -1721,7 +1727,18 @@
1200+@@ -1741,7 +1747,18 @@
1201
1202 if (srv_auto_extend_last_data_file
1203 && sum_of_data_file_sizes < tablespace_size_in_header) {
1204@@ -1053,7 +1053,7 @@
1205 fprintf(stderr,
1206 "InnoDB: Error: tablespace size stored in header"
1207 " is %lu pages, but\n"
1208-@@ -1746,6 +1763,7 @@
1209+@@ -1766,6 +1783,7 @@
1210
1211 return(DB_ERROR);
1212 }
1213@@ -1061,7 +1061,7 @@
1214 }
1215
1216 /* Check that os_fast_mutexes work as expected */
1217-@@ -1841,6 +1859,7 @@
1218+@@ -1861,6 +1879,7 @@
1219 ibuf_update_max_tablespace_id();
1220 }
1221
1222@@ -1069,8 +1069,8 @@
1223 srv_file_per_table = srv_file_per_table_original_value;
1224
1225 srv_was_started = TRUE;
1226---- a/storage/innodb_plugin/trx/trx0purge.c 2010-12-15 13:04:37.000000000 -0800
1227-+++ b/storage/innodb_plugin/trx/trx0purge.c 2010-12-15 13:05:10.000000000 -0800
1228+--- a/storage/innodb_plugin/trx/trx0purge.c 2011-03-12 06:27:32.000000000 -0800
1229++++ b/storage/innodb_plugin/trx/trx0purge.c 2011-03-12 06:28:08.000000000 -0800
1230 @@ -1087,6 +1087,9 @@
1231 /* que_thr_t* thr2; */
1232 ulint old_pages_handled;
1233@@ -1081,8 +1081,8 @@
1234 mutex_enter(&(purge_sys->mutex));
1235
1236 if (purge_sys->trx->n_active_thrs > 0) {
1237---- a/storage/innodb_plugin/trx/trx0rseg.c 2010-12-15 13:04:37.000000000 -0800
1238-+++ b/storage/innodb_plugin/trx/trx0rseg.c 2010-12-15 13:05:10.000000000 -0800
1239+--- a/storage/innodb_plugin/trx/trx0rseg.c 2011-03-12 06:27:32.000000000 -0800
1240++++ b/storage/innodb_plugin/trx/trx0rseg.c 2011-03-12 06:28:08.000000000 -0800
1241 @@ -143,9 +143,11 @@
1242
1243 mutex_free(&rseg->mutex);
1244@@ -1095,8 +1095,8 @@
1245
1246 undo = UT_LIST_GET_FIRST(rseg->update_undo_cached);
1247
1248---- a/storage/innodb_plugin/trx/trx0sys.c 2010-12-15 13:04:37.000000000 -0800
1249-+++ b/storage/innodb_plugin/trx/trx0sys.c 2010-12-15 13:05:10.000000000 -0800
1250+--- a/storage/innodb_plugin/trx/trx0sys.c 2011-03-12 06:27:32.000000000 -0800
1251++++ b/storage/innodb_plugin/trx/trx0sys.c 2011-03-12 06:28:08.000000000 -0800
1252 @@ -1607,10 +1607,12 @@
1253 UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view);
1254 }
1255@@ -1110,8 +1110,8 @@
1256
1257 mem_free(trx_sys);
1258
1259---- a/storage/innodb_plugin/trx/trx0trx.c 2010-12-15 13:04:37.000000000 -0800
1260-+++ b/storage/innodb_plugin/trx/trx0trx.c 2010-12-15 13:05:10.000000000 -0800
1261+--- a/storage/innodb_plugin/trx/trx0trx.c 2011-03-12 06:27:32.000000000 -0800
1262++++ b/storage/innodb_plugin/trx/trx0trx.c 2011-03-12 06:28:08.000000000 -0800
1263 @@ -461,8 +461,8 @@
1264 TRX_ID_PREP_PRINTF(trx->id));
1265
1266
1267=== modified file 'fix_innodb_for_backup_percona-server.patch'
1268--- fix_innodb_for_backup_percona-server.patch 2011-02-06 13:34:45 +0000
1269+++ fix_innodb_for_backup_percona-server.patch 2011-03-13 15:54:09 +0000
1270@@ -1,5 +1,5 @@
1271---- a/storage/innodb_plugin/btr/btr0btr.c 2010-12-01 23:44:53.000000000 +0300
1272-+++ b/storage/innodb_plugin/btr/btr0btr.c 2010-12-01 23:48:55.000000000 +0300
1273+--- a/storage/innodb_plugin/btr/btr0btr.c 2011-03-12 12:22:30.000000000 -0800
1274++++ b/storage/innodb_plugin/btr/btr0btr.c 2011-03-12 12:23:27.000000000 -0800
1275 @@ -120,7 +120,7 @@
1276 /**************************************************************//**
1277 Gets the root node of a tree and x-latches it.
1278@@ -18,8 +18,8 @@
1279 buf_block_t*
1280 btr_node_ptr_get_child(
1281 /*===================*/
1282---- a/storage/innodb_plugin/buf/buf0buf.c 2010-12-01 23:44:55.000000000 +0300
1283-+++ b/storage/innodb_plugin/buf/buf0buf.c 2010-12-01 23:48:55.000000000 +0300
1284+--- a/storage/innodb_plugin/buf/buf0buf.c 2011-03-12 12:22:30.000000000 -0800
1285++++ b/storage/innodb_plugin/buf/buf0buf.c 2011-03-12 12:23:27.000000000 -0800
1286 @@ -440,7 +440,7 @@
1287 return(TRUE);
1288 }
1289@@ -38,8 +38,8 @@
1290 ibuf_merge_or_delete_for_page(
1291 /* Delete possible entries, if bpage is_corrupt */
1292 (srv_pass_corrupt_table && bpage->is_corrupt) ? NULL :
1293---- a/storage/innodb_plugin/fil/fil0fil.c 2010-12-01 23:44:54.000000000 +0300
1294-+++ b/storage/innodb_plugin/fil/fil0fil.c 2010-12-01 23:48:55.000000000 +0300
1295+--- a/storage/innodb_plugin/fil/fil0fil.c 2011-03-12 12:22:30.000000000 -0800
1296++++ b/storage/innodb_plugin/fil/fil0fil.c 2011-03-12 12:27:51.000000000 -0800
1297 @@ -294,7 +294,7 @@
1298
1299 /** The tablespace memory cache. This variable is NULL before the module is
1300@@ -58,7 +58,7 @@
1301 fil_node_prepare_for_io(
1302 /*====================*/
1303 fil_node_t* node, /*!< in: file node */
1304-@@ -629,7 +629,7 @@
1305+@@ -630,7 +630,7 @@
1306 Opens a the file of a node of a tablespace. The caller must own the fil_system
1307 mutex. */
1308 static
1309@@ -67,7 +67,7 @@
1310 fil_node_open_file(
1311 /*===============*/
1312 fil_node_t* node, /*!< in: file node */
1313-@@ -663,7 +663,14 @@
1314+@@ -664,7 +664,14 @@
1315 node->name, OS_FILE_OPEN, OS_FILE_READ_ONLY, &success);
1316 if (!success) {
1317 /* The following call prints an error message */
1318@@ -83,7 +83,7 @@
1319
1320 ut_print_timestamp(stderr);
1321
1322-@@ -753,8 +760,8 @@
1323+@@ -754,8 +761,8 @@
1324 }
1325
1326 if (size_bytes >= 1024 * 1024) {
1327@@ -94,7 +94,7 @@
1328 }
1329
1330 if (!(flags & DICT_TF_ZSSIZE_MASK)) {
1331-@@ -799,6 +806,8 @@
1332+@@ -800,6 +807,8 @@
1333 /* Put the node to the LRU list */
1334 UT_LIST_ADD_FIRST(LRU, system->LRU, node);
1335 }
1336@@ -131,7 +131,7 @@
1337 fil_node_complete_io(node, fil_system, OS_FILE_READ);
1338 }
1339
1340-@@ -2151,7 +2170,7 @@
1341+@@ -2153,7 +2172,7 @@
1342 if (fil_create_new_single_table_tablespace(
1343 space_id, name, FALSE, flags,
1344 FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) {
1345@@ -140,7 +140,7 @@
1346 }
1347 }
1348
1349-@@ -2295,7 +2314,7 @@
1350+@@ -2316,7 +2335,7 @@
1351 }
1352
1353 if (success) {
1354@@ -149,7 +149,7 @@
1355 /* Write a log record about the deletion of the .ibd
1356 file, so that ibbackup can replay it in the
1357 --apply-log phase. We use a dummy mtr and the familiar
1358-@@ -2571,7 +2590,7 @@
1359+@@ -2617,7 +2636,7 @@
1360
1361 mutex_exit(&fil_system->mutex);
1362
1363@@ -158,7 +158,7 @@
1364 if (success) {
1365 mtr_t mtr;
1366
1367-@@ -2761,7 +2780,7 @@
1368+@@ -2807,7 +2826,7 @@
1369
1370 fil_node_create(path, size, space_id, FALSE);
1371
1372@@ -167,7 +167,7 @@
1373 {
1374 mtr_t mtr;
1375
1376-@@ -3014,19 +3033,97 @@
1377+@@ -3060,19 +3079,97 @@
1378 "InnoDB: open the tablespace file ", stderr);
1379 ut_print_filename(stderr, filepath);
1380 fputs("!\n"
1381@@ -275,16 +275,16 @@
1382 return(FALSE);
1383 }
1384
1385-@@ -3731,7 +3828,7 @@
1386+@@ -3777,7 +3874,7 @@
1387 cannot be ok. */
1388
1389 size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low;
1390 -#ifndef UNIV_HOTBACKUP
1391 +#ifdef UNDEFINED
1392- if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) {
1393+ if (size < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) {
1394 fprintf(stderr,
1395 "InnoDB: Error: the size of single-table tablespace"
1396-@@ -3872,7 +3969,7 @@
1397+@@ -3918,7 +4015,7 @@
1398 idea is to read as much good data as we can and jump over bad data.
1399 @return 0 if ok, -1 if error even after the retries, 1 if at the end
1400 of the directory */
1401@@ -293,7 +293,7 @@
1402 int
1403 fil_file_readdir_next_file(
1404 /*=======================*/
1405-@@ -4171,15 +4268,97 @@
1406+@@ -4217,15 +4314,97 @@
1407 "InnoDB: in InnoDB data dictionary"
1408 " has tablespace id %lu,\n"
1409 "InnoDB: but tablespace with that id"
1410@@ -399,7 +399,7 @@
1411 } else {
1412 ut_print_timestamp(stderr);
1413 fputs(" InnoDB: Error: table ", stderr);
1414-@@ -4568,7 +4747,7 @@
1415+@@ -4614,7 +4793,7 @@
1416 off the LRU list if it is in the LRU list. The caller must hold the fil_sys
1417 mutex. */
1418 static
1419@@ -408,7 +408,7 @@
1420 fil_node_prepare_for_io(
1421 /*====================*/
1422 fil_node_t* node, /*!< in: file node */
1423-@@ -4588,10 +4767,13 @@
1424+@@ -4634,10 +4813,13 @@
1425 }
1426
1427 if (node->open == FALSE) {
1428@@ -423,7 +423,7 @@
1429 }
1430
1431 if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE
1432-@@ -4789,6 +4971,16 @@
1433+@@ -4835,6 +5017,16 @@
1434
1435 ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE));
1436
1437@@ -440,9 +440,9 @@
1438 node = UT_LIST_GET_FIRST(space->chain);
1439
1440 for (;;) {
1441---- a/storage/innodb_plugin/handler/ha_innodb.cc 2010-12-01 23:44:55.000000000 +0300
1442-+++ b/storage/innodb_plugin/handler/ha_innodb.cc 2010-12-02 00:44:30.000000000 +0300
1443-@@ -342,12 +342,6 @@
1444+--- a/storage/innodb_plugin/handler/ha_innodb.cc 2011-03-12 12:22:30.000000000 -0800
1445++++ b/storage/innodb_plugin/handler/ha_innodb.cc 2011-03-12 12:23:27.000000000 -0800
1446+@@ -343,12 +343,6 @@
1447 "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.",
1448 NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0);
1449
1450@@ -455,7 +455,7 @@
1451
1452 static handler *innobase_create_handler(handlerton *hton,
1453 TABLE_SHARE *table,
1454-@@ -728,17 +722,6 @@
1455+@@ -729,17 +723,6 @@
1456 return(THDVAR((THD*) thd, lock_wait_timeout));
1457 }
1458
1459@@ -473,7 +473,7 @@
1460 /********************************************************************//**
1461 Obtain the InnoDB transaction of a MySQL thread.
1462 @return reference to transaction pointer */
1463-@@ -11727,7 +11710,6 @@
1464+@@ -11775,7 +11758,6 @@
1465 MYSQL_SYSVAR(flush_neighbor_pages),
1466 MYSQL_SYSVAR(read_ahead),
1467 MYSQL_SYSVAR(adaptive_checkpoint),
1468@@ -481,8 +481,8 @@
1469 MYSQL_SYSVAR(enable_unsafe_group_commit),
1470 MYSQL_SYSVAR(expand_import),
1471 MYSQL_SYSVAR(extra_rsegments),
1472---- a/storage/innodb_plugin/ibuf/ibuf0ibuf.c 2010-12-01 23:44:52.000000000 +0300
1473-+++ b/storage/innodb_plugin/ibuf/ibuf0ibuf.c 2010-12-01 23:48:55.000000000 +0300
1474+--- a/storage/innodb_plugin/ibuf/ibuf0ibuf.c 2011-03-12 12:22:30.000000000 -0800
1475++++ b/storage/innodb_plugin/ibuf/ibuf0ibuf.c 2011-03-12 12:23:27.000000000 -0800
1476 @@ -1064,6 +1064,9 @@
1477
1478 ut_ad(!recv_no_ibuf_operations);
1479@@ -503,8 +503,8 @@
1480 while (sum_pages < n_pages) {
1481 n_bytes = ibuf_contract_ext(&n_pag2, sync);
1482
1483---- a/storage/innodb_plugin/include/ha_prototypes.h 2010-12-01 23:44:52.000000000 +0300
1484-+++ b/storage/innodb_plugin/include/ha_prototypes.h 2010-12-02 00:45:06.000000000 +0300
1485+--- a/storage/innodb_plugin/include/ha_prototypes.h 2011-03-12 12:22:30.000000000 -0800
1486++++ b/storage/innodb_plugin/include/ha_prototypes.h 2011-03-12 12:23:27.000000000 -0800
1487 @@ -268,12 +268,4 @@
1488 void* thd); /*!< in: thread handle (THD*), or NULL to query
1489 the global innodb_lock_wait_timeout */
1490@@ -518,8 +518,8 @@
1491 - void* thd);
1492 -
1493 #endif
1494---- a/storage/innodb_plugin/include/srv0srv.h 2010-12-01 23:44:55.000000000 +0300
1495-+++ b/storage/innodb_plugin/include/srv0srv.h 2010-12-01 23:48:55.000000000 +0300
1496+--- a/storage/innodb_plugin/include/srv0srv.h 2011-03-12 12:22:31.000000000 -0800
1497++++ b/storage/innodb_plugin/include/srv0srv.h 2011-03-12 12:23:27.000000000 -0800
1498 @@ -228,6 +228,10 @@
1499
1500 extern ulong srv_replication_delay;
1501@@ -531,8 +531,8 @@
1502 extern long long srv_ibuf_max_size;
1503 extern ulint srv_ibuf_active_contract;
1504 extern ulint srv_ibuf_accel_rate;
1505---- a/storage/innodb_plugin/include/srv0start.h 2010-11-03 16:39:54.000000000 +0300
1506-+++ b/storage/innodb_plugin/include/srv0start.h 2010-12-01 23:48:55.000000000 +0300
1507+--- a/storage/innodb_plugin/include/srv0start.h 2011-03-12 12:22:30.000000000 -0800
1508++++ b/storage/innodb_plugin/include/srv0start.h 2011-03-12 12:23:27.000000000 -0800
1509 @@ -91,6 +91,8 @@
1510 /** Log sequence number immediately after startup */
1511 extern ib_uint64_t srv_start_lsn;
1512@@ -542,8 +542,8 @@
1513 #ifdef __NETWARE__
1514 void set_panic_flag_for_netware(void);
1515 #endif
1516---- a/storage/innodb_plugin/include/trx0trx.h 2010-12-01 23:44:53.000000000 +0300
1517-+++ b/storage/innodb_plugin/include/trx0trx.h 2010-12-02 00:45:52.000000000 +0300
1518+--- a/storage/innodb_plugin/include/trx0trx.h 2011-03-12 12:22:30.000000000 -0800
1519++++ b/storage/innodb_plugin/include/trx0trx.h 2011-03-12 12:23:27.000000000 -0800
1520 @@ -497,7 +497,6 @@
1521 FALSE, one can save CPU time and about
1522 150 bytes in the undo log size as then
1523@@ -552,8 +552,8 @@
1524 ulint flush_log_later;/* In 2PC, we hold the
1525 prepare_commit mutex across
1526 both phases. In that case, we
1527---- a/storage/innodb_plugin/include/ut0byte.ic 2010-11-03 16:39:54.000000000 +0300
1528-+++ b/storage/innodb_plugin/include/ut0byte.ic 2010-12-01 23:48:55.000000000 +0300
1529+--- a/storage/innodb_plugin/include/ut0byte.ic 2011-01-25 07:04:39.000000000 -0800
1530++++ b/storage/innodb_plugin/include/ut0byte.ic 2011-03-12 12:23:27.000000000 -0800
1531 @@ -168,6 +168,14 @@
1532 dulint a, /*!< in: dulint */
1533 ulint b) /*!< in: ulint */
1534@@ -595,9 +595,9 @@
1535 return(diff);
1536 }
1537
1538---- a/storage/innodb_plugin/log/log0log.c 2010-12-01 23:44:55.000000000 +0300
1539-+++ b/storage/innodb_plugin/log/log0log.c 2010-12-01 23:48:55.000000000 +0300
1540-@@ -1367,7 +1367,7 @@
1541+--- a/storage/innodb_plugin/log/log0log.c 2011-03-12 12:22:31.000000000 -0800
1542++++ b/storage/innodb_plugin/log/log0log.c 2011-03-12 12:23:27.000000000 -0800
1543+@@ -1370,7 +1370,7 @@
1544 #endif /* UNIV_DEBUG */
1545 ulint unlock;
1546
1547@@ -606,7 +606,7 @@
1548 /* Recovery is running and no operations on the log files are
1549 allowed yet (the variable name .._no_ibuf_.. is misleading) */
1550
1551-@@ -3125,6 +3125,7 @@
1552+@@ -3126,6 +3126,7 @@
1553 for the 'very fast' shutdown, because the InnoDB layer may have
1554 committed or prepared transactions and we don't want to lose them. */
1555
1556@@ -614,7 +614,7 @@
1557 if (trx_n_mysql_transactions > 0
1558 || UT_LIST_GET_LEN(trx_sys->trx_list) > 0) {
1559
1560-@@ -3132,6 +3133,7 @@
1561+@@ -3133,6 +3134,7 @@
1562
1563 goto loop;
1564 }
1565@@ -622,8 +622,8 @@
1566
1567 if (srv_fast_shutdown == 2) {
1568 /* In this fastest shutdown we do not flush the buffer pool:
1569---- a/storage/innodb_plugin/log/log0recv.c 2010-12-01 23:44:55.000000000 +0300
1570-+++ b/storage/innodb_plugin/log/log0recv.c 2010-12-01 23:48:55.000000000 +0300
1571+--- a/storage/innodb_plugin/log/log0recv.c 2011-03-12 12:22:30.000000000 -0800
1572++++ b/storage/innodb_plugin/log/log0recv.c 2011-03-12 12:23:27.000000000 -0800
1573 @@ -42,27 +42,27 @@
1574 #include "trx0undo.h"
1575 #include "trx0rec.h"
1576@@ -731,7 +731,7 @@
1577 }
1578 }
1579
1580-@@ -3081,6 +3086,7 @@
1581+@@ -3096,6 +3101,7 @@
1582 recv_sys->recovered_lsn = checkpoint_lsn;
1583
1584 srv_start_lsn = checkpoint_lsn;
1585@@ -739,7 +739,7 @@
1586 }
1587
1588 contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn,
1589-@@ -3439,6 +3445,7 @@
1590+@@ -3454,6 +3460,7 @@
1591 that the data dictionary tables will be free of any locks.
1592 The data dictionary latch should guarantee that there is at
1593 most one data dictionary transaction active at a time. */
1594@@ -747,8 +747,8 @@
1595 trx_rollback_or_clean_recovered(FALSE);
1596 }
1597
1598---- a/storage/innodb_plugin/os/os0file.c 2010-12-01 23:44:53.000000000 +0300
1599-+++ b/storage/innodb_plugin/os/os0file.c 2010-12-01 23:48:55.000000000 +0300
1600+--- a/storage/innodb_plugin/os/os0file.c 2011-03-12 12:22:30.000000000 -0800
1601++++ b/storage/innodb_plugin/os/os0file.c 2011-03-12 12:23:27.000000000 -0800
1602 @@ -554,7 +554,7 @@
1603 }
1604
1605@@ -802,8 +802,8 @@
1606 ret = os_file_pwrite(file, buf, n, offset, offset_high);
1607
1608 if ((ulint)ret == n) {
1609---- a/storage/innodb_plugin/os/os0thread.c 2010-11-03 16:39:54.000000000 +0300
1610-+++ b/storage/innodb_plugin/os/os0thread.c 2010-12-01 23:48:55.000000000 +0300
1611+--- a/storage/innodb_plugin/os/os0thread.c 2011-01-25 07:04:39.000000000 -0800
1612++++ b/storage/innodb_plugin/os/os0thread.c 2011-03-12 12:23:27.000000000 -0800
1613 @@ -287,12 +287,17 @@
1614 #elif defined(__NETWARE__)
1615 delay(tm / 1000);
1616@@ -822,8 +822,8 @@
1617 #endif
1618 }
1619
1620---- a/storage/innodb_plugin/row/row0merge.c 2010-12-01 23:44:54.000000000 +0300
1621-+++ b/storage/innodb_plugin/row/row0merge.c 2010-12-01 23:48:55.000000000 +0300
1622+--- a/storage/innodb_plugin/row/row0merge.c 2011-03-12 12:22:30.000000000 -0800
1623++++ b/storage/innodb_plugin/row/row0merge.c 2011-03-12 12:23:27.000000000 -0800
1624 @@ -453,7 +453,9 @@
1625 rec = rec_convert_dtuple_to_rec(*buf, index, tuple, n_ext);
1626 offsets = rec_get_offsets(rec, index, NULL, ULINT_UNDEFINED, &heap);
1627@@ -859,9 +859,9 @@
1628
1629 /* Read clustered index of the table and create files for
1630 secondary index entries for merge sort */
1631---- a/storage/innodb_plugin/srv/srv0srv.c 2010-12-01 23:44:55.000000000 +0300
1632-+++ b/storage/innodb_plugin/srv/srv0srv.c 2010-12-01 23:48:55.000000000 +0300
1633-@@ -399,6 +399,10 @@
1634+--- a/storage/innodb_plugin/srv/srv0srv.c 2011-03-12 12:22:31.000000000 -0800
1635++++ b/storage/innodb_plugin/srv/srv0srv.c 2011-03-12 12:23:27.000000000 -0800
1636+@@ -402,6 +402,10 @@
1637
1638 UNIV_INTERN ulong srv_replication_delay = 0;
1639
1640@@ -872,7 +872,7 @@
1641 UNIV_INTERN long long srv_ibuf_max_size = 0;
1642 UNIV_INTERN ulint srv_ibuf_active_contract = 0; /* 0:disable 1:enable */
1643 UNIV_INTERN ulint srv_ibuf_accel_rate = 100;
1644-@@ -1047,7 +1051,7 @@
1645+@@ -1050,7 +1054,7 @@
1646 }
1647
1648 /* Initialize some INFORMATION SCHEMA internal structures */
1649@@ -881,7 +881,7 @@
1650 }
1651
1652 /*********************************************************************//**
1653-@@ -1058,6 +1062,7 @@
1654+@@ -1061,6 +1065,7 @@
1655 /*==========*/
1656 {
1657 os_fast_mutex_free(&srv_conc_mutex);
1658@@ -889,7 +889,7 @@
1659 mem_free(srv_conc_slots);
1660 srv_conc_slots = NULL;
1661
1662-@@ -1071,6 +1076,7 @@
1663+@@ -1074,6 +1079,7 @@
1664 srv_mysql_table = NULL;
1665
1666 trx_i_s_cache_free(trx_i_s_cache);
1667@@ -897,8 +897,8 @@
1668 }
1669
1670 /*********************************************************************//**
1671---- a/storage/innodb_plugin/srv/srv0start.c 2010-12-01 23:44:55.000000000 +0300
1672-+++ b/storage/innodb_plugin/srv/srv0start.c 2010-12-01 23:48:55.000000000 +0300
1673+--- a/storage/innodb_plugin/srv/srv0start.c 2011-03-12 12:22:30.000000000 -0800
1674++++ b/storage/innodb_plugin/srv/srv0start.c 2011-03-12 12:23:27.000000000 -0800
1675 @@ -94,6 +94,8 @@
1676 /** Log sequence number at shutdown */
1677 UNIV_INTERN ib_uint64_t srv_shutdown_lsn;
1678@@ -926,7 +926,7 @@
1679 ulint
1680 open_or_create_data_files(
1681 /*======================*/
1682-@@ -1749,6 +1751,10 @@
1683+@@ -1777,6 +1779,10 @@
1684 are initialized in trx_sys_init_at_db_start(). */
1685
1686 recv_recovery_from_checkpoint_finish();
1687@@ -937,7 +937,7 @@
1688 if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {
1689 /* The following call is necessary for the insert
1690 buffer to work with multiple tablespaces. We must
1691-@@ -1913,7 +1919,18 @@
1692+@@ -1952,7 +1958,18 @@
1693
1694 if (srv_auto_extend_last_data_file
1695 && sum_of_data_file_sizes < tablespace_size_in_header) {
1696@@ -956,7 +956,7 @@
1697 fprintf(stderr,
1698 "InnoDB: Error: tablespace size stored in header"
1699 " is %lu pages, but\n"
1700-@@ -1938,6 +1955,7 @@
1701+@@ -1977,6 +1994,7 @@
1702
1703 return(DB_ERROR);
1704 }
1705@@ -964,7 +964,7 @@
1706 }
1707
1708 /* Check that os_fast_mutexes work as expected */
1709-@@ -2040,6 +2058,7 @@
1710+@@ -2079,6 +2097,7 @@
1711 ibuf_update_max_tablespace_id();
1712 }
1713
1714@@ -972,8 +972,8 @@
1715 srv_file_per_table = srv_file_per_table_original_value;
1716
1717 srv_was_started = TRUE;
1718---- a/storage/innodb_plugin/trx/trx0purge.c 2010-12-01 23:44:54.000000000 +0300
1719-+++ b/storage/innodb_plugin/trx/trx0purge.c 2010-12-01 23:48:55.000000000 +0300
1720+--- a/storage/innodb_plugin/trx/trx0purge.c 2011-03-12 12:22:30.000000000 -0800
1721++++ b/storage/innodb_plugin/trx/trx0purge.c 2011-03-12 12:23:27.000000000 -0800
1722 @@ -1113,6 +1113,9 @@
1723 /* que_thr_t* thr2; */
1724 ulint old_pages_handled;
1725@@ -984,8 +984,8 @@
1726 mutex_enter(&(purge_sys->mutex));
1727
1728 if (purge_sys->trx->n_active_thrs > 0) {
1729---- a/storage/innodb_plugin/trx/trx0rseg.c 2010-12-01 23:44:52.000000000 +0300
1730-+++ b/storage/innodb_plugin/trx/trx0rseg.c 2010-12-01 23:48:55.000000000 +0300
1731+--- a/storage/innodb_plugin/trx/trx0rseg.c 2011-03-12 12:22:30.000000000 -0800
1732++++ b/storage/innodb_plugin/trx/trx0rseg.c 2011-03-12 12:23:27.000000000 -0800
1733 @@ -143,9 +143,11 @@
1734
1735 mutex_free(&rseg->mutex);
1736@@ -998,8 +998,8 @@
1737
1738 undo = UT_LIST_GET_FIRST(rseg->update_undo_cached);
1739
1740---- a/storage/innodb_plugin/trx/trx0sys.c 2010-12-01 23:44:53.000000000 +0300
1741-+++ b/storage/innodb_plugin/trx/trx0sys.c 2010-12-01 23:48:55.000000000 +0300
1742+--- a/storage/innodb_plugin/trx/trx0sys.c 2011-03-12 12:22:30.000000000 -0800
1743++++ b/storage/innodb_plugin/trx/trx0sys.c 2011-03-12 12:23:27.000000000 -0800
1744 @@ -1931,10 +1931,12 @@
1745 UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view);
1746 }
1747@@ -1013,8 +1013,8 @@
1748
1749 mem_free(trx_sys);
1750
1751---- a/storage/innodb_plugin/trx/trx0trx.c 2010-12-01 23:44:53.000000000 +0300
1752-+++ b/storage/innodb_plugin/trx/trx0trx.c 2010-12-02 00:49:44.000000000 +0300
1753+--- a/storage/innodb_plugin/trx/trx0trx.c 2011-03-12 12:22:30.000000000 -0800
1754++++ b/storage/innodb_plugin/trx/trx0trx.c 2011-03-12 12:23:27.000000000 -0800
1755 @@ -109,8 +109,6 @@
1756
1757 trx->support_xa = TRUE;
1758
1759=== modified file 'test/inc/common.sh'
1760--- test/inc/common.sh 2011-03-01 16:59:27 +0000
1761+++ test/inc/common.sh 2011-03-13 15:54:09 +0000
1762@@ -4,13 +4,22 @@
1763 topdir="`pwd`/var"
1764 mysql_datadir="$topdir/mysql"
1765 mysql_port="3306"
1766-mysql_socket="/tmp/xtrabackup.mysql.sock"
1767+mysql_socket=${mysql_socket:-"/tmp/xtrabackup.mysql.sock"}
1768
1769 function vlog
1770 {
1771 echo "`date +"%F %T"`: `basename "$0"`: $@"
1772 }
1773
1774+function clean_datadir()
1775+{
1776+ vlog "Removing MySQL data directory: $mysql_datadir"
1777+ rm -rf "$mysql_datadir"
1778+ vlog "Creating MySQL data directory: $mysql_datadir"
1779+ mkdir -p "$mysql_datadir"
1780+ init_mysql_dir
1781+}
1782+
1783 function clean()
1784 {
1785 vlog "Removing temporary $topdir"
1786
1787=== modified file 'test/run.sh'
1788--- test/run.sh 2011-03-01 16:59:27 +0000
1789+++ test/run.sh 2011-03-13 15:54:09 +0000
1790@@ -9,7 +9,7 @@
1791 echo "-m version MySQL version to use. Possible values: system, 5.0, 5.1, 5.5, percona. Default is system"
1792 echo "-g Output debug information to results/*.out"
1793 echo "-t Run only a single named test"
1794- echo "-h Print this help megssage"
1795+ echo "-h Print this help message"
1796 echo "-s Select a test suite to run. Possible values: experimental, t. Default is t"
1797 }
1798 XTRACE_OPTION=""
1799
1800=== modified file 'test/t/xb_export.sh'
1801--- test/t/xb_export.sh 2011-02-10 12:08:04 +0000
1802+++ test/t/xb_export.sh 2011-03-13 15:54:09 +0000
1803@@ -2,7 +2,11 @@
1804
1805 init
1806
1807-backup_dir=/tmp/xb_export_backup
1808+if [ "$MYSQL_VERSION" != "percona" ]; then
1809+ exit $SKIPPED_EXIT_CODE
1810+fi
1811+
1812+backup_dir=$topdir/xb_export_backup
1813 rm -rf $backup_dir
1814 mkdir $backup_dir
1815 # Starting database server
1816@@ -28,21 +32,19 @@
1817 vlog "checksum_1 is $checksum_1"
1818
1819 # Performing table backup
1820-#run_cmd xtrabackup --datadir=$mysql_datadir --backup --tables="^incremental_sample[.]test" --target-dir=$backup_dir
1821-run_cmd xtrabackup --datadir=$mysql_datadir --backup --target-dir=$backup_dir
1822+run_cmd xtrabackup --no-defaults --datadir=$mysql_datadir --backup --target-dir=$backup_dir
1823 vlog "Table was backed up"
1824
1825 vlog "Re-initializing database server"
1826 stop_mysqld
1827-clean
1828-init
1829+# Can't use clean/init because that will remove $backup_dir as well
1830+clean_datadir
1831 run_mysqld --innodb_file_per_table --innodb_expand_import=1 --innodb_file_format=Barracuda
1832 load_dbase_schema incremental_sample
1833 vlog "Database was re-initialized"
1834
1835 run_cmd ${MYSQL} ${MYSQL_ARGS} -e "alter table test discard tablespace;" incremental_sample
1836-#run_cmd xtrabackup --datadir=$mysql_datadir --prepare --target-dir=$backup_dir
1837-run_cmd xtrabackup --datadir=$mysql_datadir --prepare --export --target-dir=$backup_dir
1838+run_cmd xtrabackup --no-defaults --datadir=$mysql_datadir --prepare --export --target-dir=$backup_dir
1839 run_cmd cp $backup_dir/incremental_sample/test* $mysql_datadir/incremental_sample/
1840 run_cmd ls -lah $mysql_datadir/incremental_sample/
1841 run_cmd ${MYSQL} ${MYSQL_ARGS} -e "alter table test import tablespace" incremental_sample
1842@@ -69,9 +71,9 @@
1843 # Performing full backup of imported table
1844 mkdir -p $topdir/backup/full
1845
1846-xtrabackup --datadir=$mysql_datadir --backup --target-dir=$topdir/backup/full
1847-xtrabackup --datadir=$mysql_datadir --prepare --apply-log-only --target-dir=$topdir/backup/full
1848-xtrabackup --datadir=$mysql_datadir --prepare --target-dir=$topdir/backup/full
1849+xtrabackup --no-defaults --datadir=$mysql_datadir --backup --target-dir=$topdir/backup/full
1850+xtrabackup --no-defaults --datadir=$mysql_datadir --prepare --apply-log-only --target-dir=$topdir/backup/full
1851+xtrabackup --no-defaults --datadir=$mysql_datadir --prepare --target-dir=$topdir/backup/full
1852
1853 run_cmd ${MYSQL} ${MYSQL_ARGS} -e "delete from test;" incremental_sample
1854
1855
1856=== modified file 'test/t/xb_incremental.sh'
1857--- test/t/xb_incremental.sh 2010-12-09 09:37:20 +0000
1858+++ test/t/xb_incremental.sh 2011-03-13 15:54:09 +0000
1859@@ -28,7 +28,8 @@
1860
1861 vlog "Starting backup"
1862
1863-xtrabackup --datadir=$mysql_datadir --backup --target-dir=$topdir/data/full
1864+xtrabackup --no-defaults --datadir=$mysql_datadir --backup \
1865+ --target-dir=$topdir/data/full
1866
1867 vlog "Full backup done"
1868
1869@@ -54,17 +55,21 @@
1870 vlog "Making incremental backup"
1871
1872 # Incremental backup
1873-xtrabackup --datadir=$mysql_datadir --backup --target-dir=$topdir/data/delta --incremental-basedir=$topdir/data/full
1874+xtrabackup --no-defaults --datadir=$mysql_datadir --backup \
1875+ --target-dir=$topdir/data/delta --incremental-basedir=$topdir/data/full
1876
1877 vlog "Incremental backup done"
1878 vlog "Preparing backup"
1879
1880 # Prepare backup
1881-xtrabackup --datadir=$mysql_datadir --prepare --apply-log-only --target-dir=$topdir/data/full
1882+xtrabackup --no-defaults --datadir=$mysql_datadir --prepare --apply-log-only \
1883+ --target-dir=$topdir/data/full
1884 vlog "Log applied to backup"
1885-xtrabackup --datadir=$mysql_datadir --prepare --apply-log-only --target-dir=$topdir/data/full --incremental-dir=$topdir/data/delta
1886+xtrabackup --no-defaults --datadir=$mysql_datadir --prepare --apply-log-only \
1887+ --target-dir=$topdir/data/full --incremental-dir=$topdir/data/delta
1888 vlog "Delta applied to backup"
1889-xtrabackup --datadir=$mysql_datadir --prepare --target-dir=$topdir/data/full
1890+xtrabackup --no-defaults --datadir=$mysql_datadir --prepare \
1891+ --target-dir=$topdir/data/full
1892 vlog "Data prepared for restore"
1893
1894 # removing rows
1895
1896=== modified file 'test/t/xb_incremental_compressed.sh'
1897--- test/t/xb_incremental_compressed.sh 2010-12-30 16:52:32 +0000
1898+++ test/t/xb_incremental_compressed.sh 2011-03-13 15:54:09 +0000
1899@@ -76,7 +76,7 @@
1900
1901 vlog "Starting backup"
1902
1903- run_cmd xtrabackup --datadir=$mysql_datadir --backup \
1904+ run_cmd xtrabackup --no-defaults --datadir=$mysql_datadir --backup \
1905 --target-dir=$topdir/data/full
1906
1907 vlog "Full backup done"
1908@@ -115,20 +115,21 @@
1909 vlog "Making incremental backup"
1910
1911 # Incremental backup
1912- run_cmd xtrabackup --datadir=$mysql_datadir --backup \
1913+ run_cmd xtrabackup --no-defaults --datadir=$mysql_datadir --backup \
1914 --target-dir=$topdir/data/delta --incremental-basedir=$topdir/data/full
1915
1916 vlog "Incremental backup done"
1917 vlog "Preparing backup"
1918
1919 # Prepare backup
1920- run_cmd xtrabackup --datadir=$mysql_datadir --prepare --apply-log-only \
1921- --target-dir=$topdir/data/full
1922+ run_cmd xtrabackup --no-defaults --datadir=$mysql_datadir --prepare \
1923+ --apply-log-only --target-dir=$topdir/data/full
1924 vlog "Log applied to backup"
1925- run_cmd xtrabackup --datadir=$mysql_datadir --prepare --apply-log-only \
1926- --target-dir=$topdir/data/full --incremental-dir=$topdir/data/delta
1927+ run_cmd xtrabackup --no-defaults --datadir=$mysql_datadir --prepare \
1928+ --apply-log-only --target-dir=$topdir/data/full \
1929+ --incremental-dir=$topdir/data/delta
1930 vlog "Delta applied to backup"
1931- run_cmd xtrabackup --datadir=$mysql_datadir --prepare \
1932+ run_cmd xtrabackup --no-defaults --datadir=$mysql_datadir --prepare \
1933 --target-dir=$topdir/data/full
1934 vlog "Data prepared for restore"
1935
1936
1937=== modified file 'test/t/xb_part_range.sh'
1938--- test/t/xb_part_range.sh 2011-02-09 11:48:28 +0000
1939+++ test/t/xb_part_range.sh 2011-03-13 15:54:09 +0000
1940@@ -28,7 +28,8 @@
1941
1942 vlog "Starting backup"
1943
1944-xtrabackup --datadir=$mysql_datadir --backup --target-dir=$topdir/data/full
1945+xtrabackup --no-defaults --datadir=$mysql_datadir --backup \
1946+ --target-dir=$topdir/data/full
1947
1948 vlog "Full backup done"
1949
1950@@ -54,17 +55,21 @@
1951 vlog "Making incremental backup"
1952
1953 # Incremental backup
1954-xtrabackup --datadir=$mysql_datadir --backup --target-dir=$topdir/data/delta --incremental-basedir=$topdir/data/full
1955+xtrabackup --no-defaults --datadir=$mysql_datadir --backup \
1956+ --target-dir=$topdir/data/delta --incremental-basedir=$topdir/data/full
1957
1958 vlog "Incremental backup done"
1959 vlog "Preparing backup"
1960
1961 # Prepare backup
1962-xtrabackup --datadir=$mysql_datadir --prepare --apply-log-only --target-dir=$topdir/data/full
1963+xtrabackup --no-defaults --datadir=$mysql_datadir --prepare --apply-log-only \
1964+ --target-dir=$topdir/data/full
1965 vlog "Log applied to backup"
1966-xtrabackup --datadir=$mysql_datadir --prepare --apply-log-only --target-dir=$topdir/data/full --incremental-dir=$topdir/data/delta
1967+xtrabackup --no-defaults --datadir=$mysql_datadir --prepare --apply-log-only \
1968+ --target-dir=$topdir/data/full --incremental-dir=$topdir/data/delta
1969 vlog "Delta applied to backup"
1970-xtrabackup --datadir=$mysql_datadir --prepare --target-dir=$topdir/data/full
1971+xtrabackup --no-defaults --datadir=$mysql_datadir --prepare \
1972+ --target-dir=$topdir/data/full
1973 vlog "Data prepared for restore"
1974
1975 # removing rows
1976
1977=== modified file 'test/t/xb_partial.sh'
1978--- test/t/xb_partial.sh 2010-12-09 09:37:20 +0000
1979+++ test/t/xb_partial.sh 2011-03-13 15:54:09 +0000
1980@@ -28,11 +28,13 @@
1981 mkdir -p $topdir/data/parted
1982
1983 vlog "Starting backup"
1984-xtrabackup --datadir=$mysql_datadir --backup --target-dir=$topdir/data/parted --tables="^incremental_sample[.]test"
1985+xtrabackup --no-defaults --datadir=$mysql_datadir --backup \
1986+ --target-dir=$topdir/data/parted --tables="^incremental_sample[.]test"
1987 vlog "Partial backup done"
1988
1989 # Prepare backup
1990-xtrabackup --datadir=$mysql_datadir --prepare --target-dir=$topdir/data/parted
1991+xtrabackup --no-defaults --datadir=$mysql_datadir --prepare \
1992+ --target-dir=$topdir/data/parted
1993 vlog "Data prepared for restore"
1994
1995 # removing rows
1996
1997=== modified file 'utils/build.sh'
1998--- utils/build.sh 2011-01-25 17:58:35 +0000
1999+++ utils/build.sh 2011-03-13 15:54:09 +0000
2000@@ -1,22 +1,137 @@
2001 #!/usr/bin/env bash
2002
2003+MYSQL_51_VERSION=5.1.55
2004+MYSQL_55_VERSION=5.5.9
2005+
2006 AUTO_DOWNLOAD=${AUTO_DOWNLOAD:-no}
2007 MASTER_SITE="http://www.percona.com/downloads/community/"
2008
2009 set -e
2010 export CFLAGS="$CFLAGS -g -O3"
2011 export CXXFLAGS="$CXXFLAGS -g -O3"
2012+
2013 MAKE_CMD=make
2014-if [ "`uname -s`" = "FreeBSD" ]
2015+if gmake --version > /dev/null 2>&1
2016 then
2017 MAKE_CMD=gmake
2018 fi
2019+MAKE_CMD="$MAKE_CMD -j6"
2020
2021 function usage(){
2022 echo "Usage: `basename $0` 5.1|5.5|plugin|xtradb"
2023 exit -1
2024 }
2025
2026+################################################################################
2027+# Download files specified as arguments from $MASTER_SITE if $AUTO_DOWNLOAD is
2028+# "yes". Otherwise print an error message and exit.
2029+################################################################################
2030+function auto_download()
2031+{
2032+ for i in $*
2033+ do
2034+ if ! test -f $i
2035+ then
2036+ if [ "$AUTO_DOWNLOAD" = "yes" ]
2037+ then
2038+ wget "$MASTER_SITE"/$i
2039+ else
2040+ echo "Put $i in $top_dir or set environment variable \
2041+AUTO_DOWNLOAD to \"yes\""
2042+ exit -1
2043+ fi
2044+ fi
2045+ done
2046+}
2047+
2048+################################################################################
2049+# Unpack the tarball specified as the first argument and apply the patch
2050+# specified as the second argument to the resulting directory.
2051+################################################################################
2052+function unpack_and_patch()
2053+{
2054+ tar xzf $top_dir/$1
2055+ cd `basename "$1" ".tar.gz"`
2056+ patch -p1 < $top_dir/$2
2057+ cd ..
2058+}
2059+
2060+################################################################################
2061+# Invoke 'make' in the specified directoies
2062+################################################################################
2063+function make_dirs()
2064+{
2065+ for d in $*
2066+ do
2067+ $MAKE_CMD -C $d
2068+ done
2069+}
2070+
2071+function build_server()
2072+{
2073+ echo "Configuring the server"
2074+ cd $server_dir
2075+ eval $configure_cmd
2076+
2077+ echo "Building the server"
2078+ make_dirs include zlib strings mysys dbug extra $innodb_dir
2079+ cd $top_dir
2080+}
2081+
2082+function build_xtrabackup()
2083+{
2084+ echo "Building XtraBackup"
2085+ mkdir $build_dir
2086+ cp $top_dir/Makefile $top_dir/xtrabackup.c $build_dir
2087+
2088+ cd $build_dir
2089+ $MAKE_CMD $xtrabackup_target
2090+ cd $top_dir
2091+}
2092+
2093+function build_tar4ibd()
2094+{
2095+ echo "Building tar4ibd"
2096+ unpack_and_patch libtar-1.2.11.tar.gz tar4ibd_libtar-1.2.11.patch
2097+ cd libtar-1.2.11
2098+ ./configure
2099+ $MAKE_CMD
2100+ cd $topdir
2101+}
2102+
2103+################################################################################
2104+# Do all steps to build the server, xtrabackup and tar4ibd
2105+# Expects the following variables to be set before calling:
2106+# mysql_version version string (e.g. "5.1.53")
2107+# server_patch name of the patch to apply to server source before
2108+# building (e.g. "fix_innodb_for_backup51.patch")
2109+# innodb_name either "innobase" or "innodb_plugin"
2110+# configure_cmd server configure command
2111+# xtrabackup_target 'make' target to build in the xtrabackup build directory
2112+#
2113+################################################################################
2114+function build_all()
2115+{
2116+ server_dir=$top_dir/mysql-$mysql_version
2117+ server_tarball=mysql-$mysql_version.tar.gz
2118+ innodb_dir=$server_dir/storage/$innodb_name
2119+ build_dir=$innodb_dir/xtrabackup
2120+
2121+ echo "Downloading sources"
2122+ auto_download $server_tarball libtar-1.2.11.tar.gz
2123+
2124+ test -d $server_dir && rm -r $server_dir
2125+
2126+ echo "Preparing sources"
2127+ unpack_and_patch $server_tarball $server_patch
2128+
2129+ build_server
2130+
2131+ build_xtrabackup
2132+
2133+ build_tar4ibd
2134+}
2135+
2136 if ! test -f xtrabackup.c
2137 then
2138 echo "`basename $0` must be run from the directory with XtraBackup sources"
2139@@ -28,210 +143,94 @@
2140
2141 case "$type" in
2142 "5.1")
2143- mysql_version=5.1.53
2144- reqs="mysql-$mysql_version.tar.gz libtar-1.2.11.tar.gz"
2145- for i in $reqs
2146- do
2147- if ! test -f $i
2148- then
2149- if [ "$AUTO_DOWNLOAD" = "yes" ]
2150- then
2151- wget "$MASTER_SITE"/$i
2152- else
2153- echo "Put $i in $top_dir or set environment variable AUTO_DOWNLOAD to \"yes\""
2154- exit -1
2155- fi
2156- fi
2157- done
2158- test -d mysql-$mysql_version && rm -r mysql-$mysql_version
2159-
2160- echo "Prepare sources"
2161- tar zxf mysql-$mysql_version.tar.gz
2162- cd $top_dir/mysql-$mysql_version
2163- patch -p1 < $top_dir/fix_innodb_for_backup51.patch
2164-
2165- cd $top_dir/mysql-$mysql_version
2166- tar zxf $top_dir/libtar-1.2.11.tar.gz
2167- cd $top_dir/mysql-$mysql_version/libtar-1.2.11
2168- patch -p1 < $top_dir/tar4ibd_libtar-1.2.11.patch
2169-
2170- mkdir $top_dir/mysql-$mysql_version/storage/innobase/xtrabackup
2171- cp $top_dir/Makefile $top_dir/xtrabackup.c $top_dir/innobackupex-1.5.1 $top_dir/mysql-$mysql_version/storage/innobase/xtrabackup
2172-
2173- echo "Compile MySQL"
2174- cd $top_dir/mysql-$mysql_version
2175- ./configure --enable-local-infile \
2176+ mysql_version=$MYSQL_51_VERSION
2177+ server_patch=fix_innodb_for_backup51.patch
2178+ innodb_name=innobase
2179+ xtrabackup_target=5.1
2180+ configure_cmd="./configure --enable-local-infile \
2181 --enable-thread-safe-client \
2182 --with-plugins=innobase \
2183 --with-zlib-dir=bundled \
2184 --enable-shared \
2185- --with-extra-charsets=complex
2186- $MAKE_CMD all
2187-
2188- echo "Compile XtraBackup"
2189- cd $top_dir/mysql-$mysql_version/storage/innobase/xtrabackup
2190- $MAKE_CMD 5.1
2191-
2192- echo "Compile tar4ibd"
2193- cd $top_dir/mysql-$mysql_version/libtar-1.2.11
2194- ./configure
2195- $MAKE_CMD
2196+ --with-extra-charsets=complex"
2197+
2198+ build_all
2199 ;;
2200 "5.5")
2201- mysql_version=5.5.8
2202- reqs="mysql-$mysql_version.tar.gz libtar-1.2.11.tar.gz"
2203- for i in $reqs
2204- do
2205- if ! test -f $i
2206- then
2207- if [ "$AUTO_DOWNLOAD" = "yes" ]
2208- then
2209- wget "$MASTER_SITE"/$i
2210- else
2211- echo "Put $i in $top_dir or set environment variable AUTO_DOWNLOAD to \"yes\""
2212- exit -1
2213- fi
2214- fi
2215- done
2216- test -d mysql-$mysql_version && rm -r mysql-$mysql_version
2217-
2218- echo "Prepare sources"
2219- tar zxf mysql-$mysql_version.tar.gz
2220- cd $top_dir/mysql-$mysql_version
2221- patch -p1 < $top_dir/fix_innodb_for_backup55.patch
2222-
2223- cd $top_dir/mysql-$mysql_version
2224- tar zxf $top_dir/libtar-1.2.11.tar.gz
2225- cd $top_dir/mysql-$mysql_version/libtar-1.2.11
2226- patch -p1 < $top_dir/tar4ibd_libtar-1.2.11.patch
2227-
2228- mkdir $top_dir/mysql-$mysql_version/storage/innobase/xtrabackup
2229- cp $top_dir/Makefile $top_dir/xtrabackup.c $top_dir/innobackupex-1.5.1 $top_dir/mysql-$mysql_version/storage/innobase/xtrabackup
2230-
2231- echo "Compile MySQL"
2232- cd $top_dir/mysql-$mysql_version
2233+ mysql_version=$MYSQL_55_VERSION
2234+ server_patch=fix_innodb_for_backup55.patch
2235+ innodb_name=innobase
2236+ xtrabackup_target=5.5
2237 # We need to build with partitioning due to MySQL bug #58632
2238- cmake . \
2239+ configure_cmd="cmake . \
2240 -DENABLED_LOCAL_INFILE=ON \
2241 -DWITH_INNOBASE_STORAGE_ENGINE=ON \
2242 -DWITH_PARTITION_STORAGE_ENGINE=ON \
2243 -DWITH_ZLIB=bundled \
2244 -DWITH_EXTRA_CHARSETS=complex \
2245- -DENABLE_DTRACE=OFF
2246- $MAKE_CMD all
2247-
2248- echo "Compile XtraBackup"
2249- cd $top_dir/mysql-$mysql_version/storage/innobase/xtrabackup
2250- $MAKE_CMD 5.5
2251-
2252- echo "Compile tar4ibd"
2253- cd $top_dir/mysql-$mysql_version/libtar-1.2.11
2254- ./configure
2255- $MAKE_CMD
2256+ -DENABLE_DTRACE=OFF"
2257+
2258+ build_all
2259 ;;
2260 "plugin")
2261- mysql_version=5.1.53
2262- reqs="mysql-$mysql_version.tar.gz libtar-1.2.11.tar.gz"
2263- for i in $reqs
2264- do
2265- if ! test -f $i
2266- then
2267- if [ "$AUTO_DOWNLOAD" = "yes" ]
2268- then
2269- wget "$MASTER_SITE"/$i
2270- else
2271- echo "Put $i in $top_dir or set environment variable AUTO_DOWNLOAD to \"yes\""
2272- exit -1
2273- fi
2274- fi
2275- done
2276- test -d mysql-$mysql_version && rm -r mysql-$mysql_version
2277-
2278- echo "Prepare sources"
2279- tar zxf mysql-$mysql_version.tar.gz
2280- cd $top_dir/mysql-$mysql_version/
2281- patch -p1 < $top_dir/fix_innodb_for_backup_5.1_plugin.patch
2282-
2283- cd $top_dir/mysql-$mysql_version
2284- tar zxf $top_dir/libtar-1.2.11.tar.gz
2285- cd $top_dir/mysql-$mysql_version/libtar-1.2.11
2286- patch -p1 < $top_dir/tar4ibd_libtar-1.2.11.patch
2287-
2288- mkdir $top_dir/mysql-$mysql_version/storage/innodb_plugin/xtrabackup
2289- cp $top_dir/Makefile $top_dir/xtrabackup.c $top_dir/innobackupex-1.5.1 $top_dir/mysql-$mysql_version/storage/innodb_plugin/xtrabackup
2290-
2291- echo "Compile MySQL"
2292- cd $top_dir/mysql-$mysql_version
2293- ./configure --enable-local-infile \
2294+ mysql_version=$MYSQL_51_VERSION
2295+ server_patch=fix_innodb_for_backup_5.1_plugin.patch
2296+ innodb_name=innodb_plugin
2297+ xtrabackup_target=plugin
2298+ configure_cmd="./configure --enable-local-infile \
2299 --enable-thread-safe-client \
2300 --with-plugins=innodb_plugin \
2301 --with-zlib-dir=bundled \
2302 --enable-shared \
2303- --with-extra-charsets=complex
2304- $MAKE_CMD all
2305-
2306- echo "Compile XtraBackup"
2307- cd $top_dir/mysql-$mysql_version/storage/innodb_plugin/xtrabackup
2308- $MAKE_CMD plugin
2309-
2310- echo "Compile tar4ibd"
2311- cd $top_dir/mysql-$mysql_version/libtar-1.2.11
2312- ./configure
2313- $MAKE_CMD
2314+ --with-extra-charsets=complex"
2315+
2316+ build_all
2317 ;;
2318 "xtradb")
2319- mysql_version=5.1.53
2320- xtradb_version=12
2321+ server_dir=$top_dir/Percona-Server
2322+ branch_dir=percona-server-5.1-xtrabackup
2323+ innodb_dir=$server_dir/storage/innodb_plugin
2324+ build_dir=$innodb_dir/xtrabackup
2325+ configure_cmd="./configure --enable-local-infile \
2326+ --enable-thread-safe-client \
2327+ --with-plugins=innodb_plugin \
2328+ --with-zlib-dir=bundled \
2329+ --enable-shared \
2330+ --with-extra-charsets=complex"
2331+ if [ "`uname -s`" = "Linux" ]
2332+ then
2333+ configure_cmd="LIBS=-lrt $configure_cmd"
2334+ fi
2335+
2336+
2337+ echo "Downloading sources"
2338+
2339+ auto_download libtar-1.2.11.tar.gz
2340
2341 # Get Percona Server
2342- rm -rf release-$mysql_version-$xtradb_version
2343- bzr branch lp:~percona-dev/percona-server/release-$mysql_version-$xtradb_version-for_xtrabackup release-$mysql_version-$xtradb_version
2344- cd release-$mysql_version-$xtradb_version
2345- $MAKE_CMD
2346- rm -rf $top_dir/Percona-Server
2347+ if [ -d $branch_dir ]
2348+ then
2349+ cd $branch_dir
2350+ bzr pull
2351+ else
2352+ bzr branch lp:~percona-dev/percona-server/$branch_dir $branch_dir
2353+ cd $branch_dir
2354+ fi
2355+
2356+ $MAKE_CMD main
2357+ rm -rf $server_dir
2358 mv Percona-Server $top_dir
2359- cd $top_dir
2360
2361 # Patch Percona Server
2362- cd Percona-Server
2363+ cd $server_dir
2364 patch -p1 < $top_dir/fix_innodb_for_backup_percona-server.patch
2365-
2366- # Copy XtraBackup
2367- cd storage/innodb_plugin
2368- mkdir xtrabackup
2369- cd xtrabackup
2370- cp $top_dir/Makefile $top_dir/xtrabackup.c $top_dir/innobackupex-1.5.1 .
2371-
2372- # Copy tar4ibd
2373- cd $top_dir/Percona-Server
2374- test -f $top_dir/libtar-1.2.11.tar.gz ||
2375- (cd $top_dir ;
2376- wget http://www.percona.com/percona-builds/community/libtar-1.2.11.tar.gz ;
2377- cd $top_dir/Percona-Server)
2378- rm -rf libtar-1.2.11
2379- tar zxf $top_dir/libtar-1.2.11.tar.gz
2380- cd libtar-1.2.11
2381- patch -p1 < $top_dir/tar4ibd_libtar-1.2.11.patch
2382-
2383- # Compile MySQL
2384- cd $top_dir/Percona-Server
2385- LIBS=-lrt ./configure --enable-local-infile \
2386- --enable-thread-safe-client \
2387- --with-plugins=innodb_plugin \
2388- --with-zlib-dir=bundled \
2389- --enable-shared \
2390- --with-extra-charsets=complex
2391- $MAKE_CMD all
2392-
2393- # Compile XtraBackup
2394- cd storage/innodb_plugin/xtrabackup
2395- $MAKE_CMD xtradb
2396-
2397- # Compile tar4ibd
2398- cd $top_dir/Percona-Server
2399- cd libtar-1.2.11
2400- ./configure
2401- $MAKE_CMD all
2402+
2403+
2404+ build_server
2405+
2406+ build_xtrabackup
2407+
2408+ build_tar4ibd
2409 ;;
2410 *)
2411 usage
2412
2413=== modified file 'utils/debian/rules'
2414--- utils/debian/rules 2010-12-03 05:53:23 +0000
2415+++ utils/debian/rules 2011-03-13 15:54:09 +0000
2416@@ -67,11 +67,11 @@
2417 dh_installdirs
2418
2419 # Add here commands to install the package into debian/xtrabackup.
2420- install -m 755 mysql-5.1.52/storage/innobase/xtrabackup/xtrabackup_51 $(CURDIR)/debian/xtrabackup/usr/bin
2421- install -m 755 mysql-5.5.7-rc/storage/innobase/xtrabackup/xtrabackup_55 $(CURDIR)/debian/xtrabackup/usr/bin
2422+ install -m 755 mysql-5.1.55/storage/innobase/xtrabackup/xtrabackup_51 $(CURDIR)/debian/xtrabackup/usr/bin
2423+ install -m 755 mysql-5.5.9/storage/innobase/xtrabackup/xtrabackup_55 $(CURDIR)/debian/xtrabackup/usr/bin
2424 install -m 755 Percona-Server/storage/innodb_plugin/xtrabackup/xtrabackup $(CURDIR)/debian/xtrabackup/usr/bin
2425 install -m 755 Percona-Server/storage/innodb_plugin/xtrabackup/innobackupex-1.5.1 $(CURDIR)/debian/xtrabackup/usr/bin
2426- install -m 755 Percona-Server/libtar-1.2.11/libtar/tar4ibd $(CURDIR)/debian/xtrabackup/usr/bin
2427+ install -m 755 libtar-1.2.11/libtar/tar4ibd $(CURDIR)/debian/xtrabackup/usr/bin
2428 cp -R test $(CURDIR)/debian/xtrabackup/usr/share/xtrabackup-test
2429
2430 # Build architecture-independent files here.
2431
2432=== modified file 'utils/xtrabackup.spec'
2433--- utils/xtrabackup.spec 2011-02-22 21:12:44 +0000
2434+++ utils/xtrabackup.spec 2011-03-13 15:54:09 +0000
2435@@ -51,7 +51,7 @@
2436 export CXX=$CC
2437 export CFLAGS="$CFLAGS -DXTRABACKUP_VERSION=\\\"%{xtrabackup_version}\\\" -DXTRABACKUP_REVISION=\\\"%{xtrabackup_revision}\\\""
2438 export CXXFLAGS="$CXXFLAGS -DXTRABACKUP_VERSION=\\\"%{xtrabackup_version}\\\" -DXTRABACKUP_REVISION=\\\"%{xtrabackup_revision}\\\" -fno-exceptions"
2439-cp $RPM_SOURCE_DIR/libtar-1.2.11.tar.gz $RPM_SOURCE_DIR/mysql-5.1.53.tar.gz .
2440+cp $RPM_SOURCE_DIR/libtar-1.2.11.tar.gz $RPM_SOURCE_DIR/mysql-5.1.55.tar.gz .
2441 ./utils/build.sh 5.1
2442 ./utils/build.sh 5.5
2443 ./utils/build.sh xtradb
2444@@ -63,9 +63,9 @@
2445 # install binaries and configs
2446
2447 install -m 755 Percona-Server/storage/innodb_plugin/xtrabackup/{innobackupex-1.5.1,xtrabackup} %{buildroot}%{_bindir}
2448-install -m 755 mysql-5.1.53/storage/innobase/xtrabackup/xtrabackup_51 %{buildroot}%{_bindir}
2449-install -m 755 mysql-5.5.8/storage/innobase/xtrabackup/xtrabackup_55 %{buildroot}%{_bindir}
2450-install -m 755 Percona-Server/libtar-1.2.11/libtar/tar4ibd %{buildroot}%{_bindir}
2451+install -m 755 mysql-5.1.55/storage/innobase/xtrabackup/xtrabackup_51 %{buildroot}%{_bindir}
2452+install -m 755 mysql-5.5.9/storage/innobase/xtrabackup/xtrabackup_55 %{buildroot}%{_bindir}
2453+install -m 755 libtar-1.2.11/libtar/tar4ibd %{buildroot}%{_bindir}
2454 cp -R test %{buildroot}%{_datadir}/xtrabackup-test
2455
2456 %clean
2457
2458=== modified file 'xtrabackup.c'
2459--- xtrabackup.c 2011-02-24 12:55:18 +0000
2460+++ xtrabackup.c 2011-03-13 15:54:09 +0000
2461@@ -661,6 +661,7 @@
2462 long innobase_open_files = 300L;
2463
2464 long innobase_page_size = (1 << 14); /* 16KB */
2465+static ulong innobase_log_block_size = 512;
2466 my_bool innobase_fast_checksum = FALSE;
2467 my_bool innobase_extra_undoslots = FALSE;
2468 char* innobase_doublewrite_file = NULL;
2469@@ -841,6 +842,7 @@
2470 #endif
2471 #ifdef XTRADB_BASED
2472 OPT_INNODB_PAGE_SIZE,
2473+ OPT_INNODB_LOG_BLOCK_SIZE,
2474 OPT_INNODB_FAST_CHECKSUM,
2475 OPT_INNODB_EXTRA_UNDOSLOTS,
2476 OPT_INNODB_DOUBLEWRITE_FILE,
2477@@ -1095,6 +1097,11 @@
2478 "The universal page size of the database.",
2479 (G_PTR*) &innobase_page_size, (G_PTR*) &innobase_page_size, 0,
2480 GET_LONG, REQUIRED_ARG, (1 << 14), (1 << 12), (1 << UNIV_PAGE_SIZE_SHIFT_MAX), 0, 1L, 0},
2481+ {"innodb_log_block_size", OPT_INNODB_LOG_BLOCK_SIZE,
2482+ "###EXPERIMENTAL###: The log block size of the transaction log file. "
2483+ "Changing for created log file is not supported. Use on your own risk!",
2484+ (G_PTR*) &innobase_log_block_size, (G_PTR*) &innobase_log_block_size, 0,
2485+ GET_ULONG, REQUIRED_ARG, 512, 512, 1 << UNIV_PAGE_SIZE_SHIFT_MAX, 0, 1L, 0},
2486 {"innodb_fast_checksum", OPT_INNODB_FAST_CHECKSUM,
2487 "Change the algorithm of checksum for the whole of datapage to 4-bytes word based.",
2488 (G_PTR*) &innobase_fast_checksum,
2489@@ -1734,21 +1741,21 @@
2490 #endif
2491
2492 /***********************************************************************
2493-Computes page shift for a given page size. If the argument is not a power
2494+Computes bit shift for a given value. If the argument is not a power
2495 of 2, returns 0.*/
2496 UNIV_INLINE
2497 ulint
2498-get_page_size_shift(ulint page_size)
2499+get_bit_shift(ulint value)
2500 {
2501 ulint shift;
2502
2503- if (page_size == 0)
2504+ if (value == 0)
2505 return 0;
2506-
2507- for (shift = 0; !(page_size & 1UL); shift++) {
2508- page_size >>= 1;
2509+
2510+ for (shift = 0; !(value & 1UL); shift++) {
2511+ value >>= 1;
2512 }
2513- return (page_size >> 1) ? 0 : shift;
2514+ return (value >> 1) ? 0 : shift;
2515 }
2516
2517 my_bool
2518@@ -1773,7 +1780,7 @@
2519 srv_page_size_shift = 0;
2520
2521 if (innobase_page_size != (1 << 14)) {
2522- int n_shift = get_page_size_shift(innobase_page_size);
2523+ int n_shift = get_bit_shift(innobase_page_size);
2524
2525 if (n_shift >= 12 && n_shift <= UNIV_PAGE_SIZE_SHIFT_MAX) {
2526 fprintf(stderr,
2527@@ -1795,6 +1802,31 @@
2528 srv_page_size = (1 << srv_page_size_shift);
2529 }
2530
2531+ srv_log_block_size = 0;
2532+ if (innobase_log_block_size != 512) {
2533+ uint n_shift = get_bit_shift(innobase_log_block_size);;
2534+
2535+ fprintf(stderr,
2536+ "InnoDB: Warning: innodb_log_block_size has "
2537+ "been changed from its default value. "
2538+ "(###EXPERIMENTAL### operation)\n");
2539+ if (n_shift > 0) {
2540+ srv_log_block_size = (1 << n_shift);
2541+ fprintf(stderr,
2542+ "InnoDB: The log block size is set to %lu.\n",
2543+ srv_log_block_size);
2544+ }
2545+ } else {
2546+ srv_log_block_size = 512;
2547+ }
2548+
2549+ if (!srv_log_block_size) {
2550+ fprintf(stderr,
2551+ "InnoDB: Error: %lu is not valid value for "
2552+ "innodb_log_block_size.\n", innobase_log_block_size);
2553+ goto error;
2554+ }
2555+
2556 srv_fast_checksum = (ibool) innobase_fast_checksum;
2557 #endif
2558
2559@@ -2431,7 +2463,7 @@
2560 goto skip;
2561 } else if (zip_size) {
2562 page_size = zip_size;
2563- page_size_shift = get_page_size_shift(page_size);
2564+ page_size_shift = get_bit_shift(page_size);
2565 fprintf(stderr, "[%02u] %s is compressed with page size = "
2566 "%lu bytes\n", thread_n, node->name, page_size);
2567 if (page_size_shift < 10 || page_size_shift > 14) {
2568@@ -4297,8 +4329,8 @@
2569
2570 if (dict_table_get_first_index(table)) {
2571 #ifdef XTRADB_BASED
2572- dict_update_statistics_low(table, TRUE, FALSE);
2573-#elif MYSQL_VERSION_ID >= 50508
2574+ dict_update_statistics(table, TRUE, FALSE);
2575+#elif defined(INNODB_VERSION_SHORT)
2576 dict_update_statistics(table, TRUE);
2577 #else
2578 dict_update_statistics_low(table, TRUE);
2579@@ -4791,7 +4823,7 @@
2580 }
2581
2582 page_size = info.page_size;
2583- page_size_shift = get_page_size_shift(page_size);
2584+ page_size_shift = get_bit_shift(page_size);
2585 fprintf(stderr, "xtrabackup: page size for %s is %lu bytes\n",
2586 src_path, page_size);
2587 if (page_size_shift < 10 ||
2588@@ -5768,6 +5800,7 @@
2589 /* temporary setting of enough size */
2590 srv_page_size_shift = UNIV_PAGE_SIZE_SHIFT_MAX;
2591 srv_page_size = UNIV_PAGE_SIZE_MAX;
2592+ srv_log_block_size = 512;
2593 #endif
2594 if (xtrabackup_backup && xtrabackup_incremental) {
2595 /* direct specification is only for --backup */

Subscribers

People subscribed via source and target branches