]> git.pld-linux.org Git - packages/mysql.git/blame - innodb_files_extend.patch
- rel 0.7; export client_errors symbol for php mysqli
[packages/mysql.git] / innodb_files_extend.patch
CommitLineData
b4e1fa2c
AM
1# name : innodb_files_extend.patch
2# introduced : 11 or before
3# maintainer : Yasufumi
4#
5#!!! notice !!!
6# Any small change to this file in the main branch
7# should be done or reviewed by the maintainer!
8diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
9--- a/storage/innobase/fil/fil0fil.c 2010-12-04 15:55:21.358513751 +0900
10+++ b/storage/innobase/fil/fil0fil.c 2010-12-04 15:55:58.243481131 +0900
11@@ -4800,9 +4800,9 @@
12 ut_ad(ut_is_2pow(zip_size));
13 ut_ad(buf);
14 ut_ad(len > 0);
15-#if (1 << UNIV_PAGE_SIZE_SHIFT) != UNIV_PAGE_SIZE
16-# error "(1 << UNIV_PAGE_SIZE_SHIFT) != UNIV_PAGE_SIZE"
17-#endif
18+//#if (1 << UNIV_PAGE_SIZE_SHIFT) != UNIV_PAGE_SIZE
19+//# error "(1 << UNIV_PAGE_SIZE_SHIFT) != UNIV_PAGE_SIZE"
20+//#endif
21 ut_ad(fil_validate());
22 #ifndef UNIV_HOTBACKUP
23 # ifndef UNIV_LOG_DEBUG
24diff -ruN a/storage/innobase/fsp/fsp0fsp.c b/storage/innobase/fsp/fsp0fsp.c
25--- a/storage/innobase/fsp/fsp0fsp.c 2010-12-04 15:52:23.411513754 +0900
26+++ b/storage/innobase/fsp/fsp0fsp.c 2010-12-04 15:55:58.244514273 +0900
27@@ -657,15 +657,16 @@
28 ulint offset) /*!< in: page offset */
29 {
30 #ifndef DOXYGEN /* Doxygen gets confused of these */
31-# if UNIV_PAGE_SIZE <= XDES_ARR_OFFSET \
32- + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE
33-# error
34-# endif
35+//# if UNIV_PAGE_SIZE <= XDES_ARR_OFFSET
36+// + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE
37+//# error
38+//# endif
39 # if PAGE_ZIP_MIN_SIZE <= XDES_ARR_OFFSET \
40 + (PAGE_ZIP_MIN_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE
41 # error
42 # endif
43 #endif /* !DOXYGEN */
44+ ut_a(UNIV_PAGE_SIZE > XDES_ARR_OFFSET + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE);
45 ut_ad(ut_is_2pow(zip_size));
46
47 if (!zip_size) {
48@@ -1464,12 +1465,12 @@
49 mtr);
50 xdes_init(descr, mtr);
51
52-#if UNIV_PAGE_SIZE % FSP_EXTENT_SIZE
53-# error "UNIV_PAGE_SIZE % FSP_EXTENT_SIZE != 0"
54-#endif
55-#if PAGE_ZIP_MIN_SIZE % FSP_EXTENT_SIZE
56-# error "PAGE_ZIP_MIN_SIZE % FSP_EXTENT_SIZE != 0"
57-#endif
58+//#if UNIV_PAGE_SIZE % FSP_EXTENT_SIZE
59+//# error "UNIV_PAGE_SIZE % FSP_EXTENT_SIZE != 0"
60+//#endif
61+//#if PAGE_ZIP_MIN_SIZE % FSP_EXTENT_SIZE
62+//# error "PAGE_ZIP_MIN_SIZE % FSP_EXTENT_SIZE != 0"
63+//#endif
64
65 if (UNIV_UNLIKELY(init_xdes)) {
66
67diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
68--- a/storage/innobase/handler/ha_innodb.cc 2010-12-04 15:55:21.367482924 +0900
69+++ b/storage/innobase/handler/ha_innodb.cc 2010-12-04 15:55:58.248549631 +0900
70@@ -148,6 +148,9 @@
71 static ulong innobase_write_io_threads;
72 static long innobase_buffer_pool_instances = 1;
73
74+static ulong innobase_page_size;
75+static ulong innobase_log_block_size;
76+
77 static my_bool innobase_thread_concurrency_timer_based;
78 static long long innobase_buffer_pool_size, innobase_log_file_size;
79
80@@ -2269,6 +2272,62 @@
81 }
82 #endif /* UNIV_DEBUG */
83
84+ srv_page_size = 0;
85+ srv_page_size_shift = 0;
86+
87+ if (innobase_page_size != (1 << 14)) {
88+ uint n_shift;
89+
90+ fprintf(stderr,
91+ "InnoDB: Warning: innodb_page_size has been changed from default value 16384. (###EXPERIMENTAL### operation)\n");
92+ for (n_shift = 12; n_shift <= UNIV_PAGE_SIZE_SHIFT_MAX; n_shift++) {
93+ if (innobase_page_size == ((ulong)1 << n_shift)) {
94+ srv_page_size_shift = n_shift;
95+ srv_page_size = (1 << srv_page_size_shift);
96+ fprintf(stderr,
97+ "InnoDB: The universal page size of the database is set to %lu.\n",
98+ srv_page_size);
99+ break;
100+ }
101+ }
102+ } else {
103+ srv_page_size_shift = 14;
104+ srv_page_size = (1 << srv_page_size_shift);
105+ }
106+
107+ if (!srv_page_size_shift) {
108+ fprintf(stderr,
109+ "InnoDB: Error: %lu is not valid value for innodb_page_size.\n",
110+ innobase_page_size);
111+ goto error;
112+ }
113+
114+ srv_log_block_size = 0;
115+ if (innobase_log_block_size != (1 << 9)) { /*!=512*/
116+ uint n_shift;
117+
118+ fprintf(stderr,
119+ "InnoDB: Warning: innodb_log_block_size has been changed from default value 512. (###EXPERIMENTAL### operation)\n");
120+ for (n_shift = 9; n_shift <= UNIV_PAGE_SIZE_SHIFT_MAX; n_shift++) {
121+ if (innobase_log_block_size == ((ulong)1 << n_shift)) {
122+ srv_log_block_size = (1 << n_shift);
123+ fprintf(stderr,
124+ "InnoDB: The log block size is set to %lu.\n",
125+ srv_log_block_size);
126+ break;
127+ }
128+ }
129+ } else {
130+ srv_log_block_size = 512;
131+ }
132+
133+ if (!srv_log_block_size) {
134+ fprintf(stderr,
135+ "InnoDB: Error: %lu is not valid value for innodb_log_block_size.\n",
136+ innobase_log_block_size);
137+ goto error;
138+ }
139+
140 #ifndef MYSQL_SERVER
141 innodb_overwrite_relay_log_info = FALSE;
142 #endif
143@@ -7212,9 +7271,9 @@
144 | DICT_TF_COMPACT
145 | DICT_TF_FORMAT_ZIP
146 << DICT_TF_FORMAT_SHIFT;
147-#if DICT_TF_ZSSIZE_MAX < 1
148-# error "DICT_TF_ZSSIZE_MAX < 1"
149-#endif
150+//#if DICT_TF_ZSSIZE_MAX < 1
151+//# error "DICT_TF_ZSSIZE_MAX < 1"
152+//#endif
153 }
154 }
155
156@@ -11332,6 +11391,16 @@
157 "#### Attention: The checksum is not compatible for normal or disabled version! ####",
158 NULL, NULL, FALSE);
159
160+static MYSQL_SYSVAR_ULONG(page_size, innobase_page_size,
161+ PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
162+ "###EXPERIMENTAL###: The universal page size of the database. Changing for created database is not supported. Use on your own risk!",
163+ NULL, NULL, (1 << 14), (1 << 12), (1 << UNIV_PAGE_SIZE_SHIFT_MAX), 0);
164+
165+static MYSQL_SYSVAR_ULONG(log_block_size, innobase_log_block_size,
166+ PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
167+ "###EXPERIMENTAL###: The log block size of the transaction log file. Changing for created log file is not supported. Use on your own risk!",
168+ NULL, NULL, (1 << 9)/*512*/, (1 << 9)/*512*/, (1 << UNIV_PAGE_SIZE_SHIFT_MAX), 0);
169+
170 static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir,
171 PLUGIN_VAR_READONLY,
172 "The common part for InnoDB table spaces.",
173@@ -11839,6 +11908,8 @@
174 NULL, NULL, 0, 0, 1, 0);
175
176 static struct st_mysql_sys_var* innobase_system_variables[]= {
177+ MYSQL_SYSVAR(page_size),
178+ MYSQL_SYSVAR(log_block_size),
179 MYSQL_SYSVAR(additional_mem_pool_size),
180 MYSQL_SYSVAR(autoextend_increment),
181 MYSQL_SYSVAR(buffer_pool_size),
182diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
183--- a/storage/innobase/include/buf0buf.h 2010-12-04 15:55:21.375482937 +0900
184+++ b/storage/innobase/include/buf0buf.h 2010-12-04 15:55:58.258469088 +0900
185@@ -1602,7 +1602,7 @@
186 time_t last_printout_time;
187 /*!< when buf_print_io was last time
188 called */
189- buf_buddy_stat_t buddy_stat[BUF_BUDDY_SIZES + 1];
190+ buf_buddy_stat_t buddy_stat[BUF_BUDDY_SIZES_MAX + 1];
191 /*!< Statistics of buddy system,
192 indexed by block size */
193 buf_pool_stat_t stat; /*!< current statistics */
194@@ -1698,7 +1698,7 @@
195 /* @{ */
196 UT_LIST_BASE_NODE_T(buf_page_t) zip_clean;
197 /*!< unmodified compressed pages */
198- UT_LIST_BASE_NODE_T(buf_page_t) zip_free[BUF_BUDDY_SIZES];
199+ UT_LIST_BASE_NODE_T(buf_page_t) zip_free[BUF_BUDDY_SIZES_MAX];
200 /*!< buddy free lists */
201
202 buf_page_t watch[BUF_POOL_WATCH_SIZE];
203@@ -1706,9 +1706,9 @@
204 pool watches. Protected by
205 buf_pool->mutex. */
206
207-#if BUF_BUDDY_HIGH != UNIV_PAGE_SIZE
208-# error "BUF_BUDDY_HIGH != UNIV_PAGE_SIZE"
209-#endif
210+//#if BUF_BUDDY_HIGH != UNIV_PAGE_SIZE
211+//# error "BUF_BUDDY_HIGH != UNIV_PAGE_SIZE"
212+//#endif
213 #if BUF_BUDDY_LOW > PAGE_ZIP_MIN_SIZE
214 # error "BUF_BUDDY_LOW > PAGE_ZIP_MIN_SIZE"
215 #endif
216diff -ruN a/storage/innobase/include/buf0types.h b/storage/innobase/include/buf0types.h
217--- a/storage/innobase/include/buf0types.h 2010-11-03 07:01:13.000000000 +0900
218+++ b/storage/innobase/include/buf0types.h 2010-12-04 15:55:58.259482590 +0900
219@@ -72,6 +72,7 @@
220 buddy system; must be at least
221 sizeof(buf_page_t) */
222 #define BUF_BUDDY_SIZES (UNIV_PAGE_SIZE_SHIFT - BUF_BUDDY_LOW_SHIFT)
223+#define BUF_BUDDY_SIZES_MAX (UNIV_PAGE_SIZE_SHIFT_MAX - BUF_BUDDY_LOW_SHIFT)
224 /*!< number of buddy sizes */
225
226 /** twice the maximum block size of the buddy system;
227diff -ruN a/storage/innobase/include/log0log.h b/storage/innobase/include/log0log.h
228--- a/storage/innobase/include/log0log.h 2010-11-03 07:01:13.000000000 +0900
229+++ b/storage/innobase/include/log0log.h 2010-12-09 18:16:47.737728305 +0900
230@@ -672,6 +672,9 @@
231 when mysqld is first time started
232 on the restored database, it can
233 print helpful info for the user */
234+#define LOG_FILE_OS_FILE_LOG_BLOCK_SIZE 64
235+ /* extend to record log_block_size
236+ of XtraDB. 0 means default 512 */
237 #define LOG_FILE_ARCH_COMPLETED OS_FILE_LOG_BLOCK_SIZE
238 /* this 4-byte field is TRUE when
239 the writing of an archived log file
240diff -ruN a/storage/innobase/include/mtr0log.ic b/storage/innobase/include/mtr0log.ic
241--- a/storage/innobase/include/mtr0log.ic 2010-12-04 15:37:50.590551517 +0900
242+++ b/storage/innobase/include/mtr0log.ic 2010-12-04 15:55:58.260482404 +0900
243@@ -203,7 +203,7 @@
244 system tablespace */
245 if ((space == TRX_SYS_SPACE
246 || (srv_doublewrite_file && space == TRX_DOUBLEWRITE_SPACE))
247- && offset >= FSP_EXTENT_SIZE && offset < 3 * FSP_EXTENT_SIZE) {
248+ && offset >= (ulint)FSP_EXTENT_SIZE && offset < 3 * (ulint)FSP_EXTENT_SIZE) {
249 if (trx_doublewrite_buf_is_being_created) {
250 /* Do nothing: we only come to this branch in an
251 InnoDB database creation. We do not redo log
252diff -ruN a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h
253--- a/storage/innobase/include/os0file.h 2010-12-09 18:16:02.323727427 +0900
254+++ b/storage/innobase/include/os0file.h 2010-12-09 18:16:47.738694194 +0900
255@@ -101,7 +101,7 @@
256 if this fails for a log block, then it is equivalent to a media failure in the
257 log. */
258
259-#define OS_FILE_LOG_BLOCK_SIZE 512
260+#define OS_FILE_LOG_BLOCK_SIZE srv_log_block_size
261
262 /** Options for file_create @{ */
263 #define OS_FILE_OPEN 51
264@@ -190,6 +190,8 @@
265 extern ulint os_n_file_writes;
266 extern ulint os_n_fsyncs;
267
268+extern ulint srv_log_block_size;
269+
270 #ifdef UNIV_PFS_IO
271 /* Keys to register InnoDB I/O with performance schema */
272 extern mysql_pfs_key_t innodb_file_data_key;
273diff -ruN a/storage/innobase/include/page0types.h b/storage/innobase/include/page0types.h
274--- a/storage/innobase/include/page0types.h 2010-11-03 07:01:13.000000000 +0900
275+++ b/storage/innobase/include/page0types.h 2010-12-04 15:55:58.261483930 +0900
276@@ -56,8 +56,9 @@
277
278 /** Number of supported compressed page sizes */
279 #define PAGE_ZIP_NUM_SSIZE (UNIV_PAGE_SIZE_SHIFT - PAGE_ZIP_MIN_SIZE_SHIFT + 2)
280-#if PAGE_ZIP_NUM_SSIZE > (1 << PAGE_ZIP_SSIZE_BITS)
281-# error "PAGE_ZIP_NUM_SSIZE > (1 << PAGE_ZIP_SSIZE_BITS)"
282+#define PAGE_ZIP_NUM_SSIZE_MAX (UNIV_PAGE_SIZE_SHIFT_MAX - PAGE_ZIP_MIN_SIZE_SHIFT + 2)
283+#if PAGE_ZIP_NUM_SSIZE_MAX > (1 << PAGE_ZIP_SSIZE_BITS)
284+# error "PAGE_ZIP_NUM_SSIZE_MAX > (1 << PAGE_ZIP_SSIZE_BITS)"
285 #endif
286
287 /** Compressed page descriptor */
288@@ -98,7 +99,7 @@
289 typedef struct page_zip_stat_struct page_zip_stat_t;
290
291 /** Statistics on compression, indexed by page_zip_des_struct::ssize - 1 */
292-extern page_zip_stat_t page_zip_stat[PAGE_ZIP_NUM_SSIZE - 1];
293+extern page_zip_stat_t page_zip_stat[PAGE_ZIP_NUM_SSIZE_MAX - 1];
294
295 /**********************************************************************//**
296 Write the "deleted" flag of a record on a compressed page. The flag must
297diff -ruN a/storage/innobase/include/trx0sys.h b/storage/innobase/include/trx0sys.h
298--- a/storage/innobase/include/trx0sys.h 2010-12-04 15:37:50.593480594 +0900
299+++ b/storage/innobase/include/trx0sys.h 2010-12-04 15:55:58.262549554 +0900
300@@ -521,9 +521,9 @@
301 /** Contents of TRX_SYS_MYSQL_LOG_MAGIC_N_FLD */
302 #define TRX_SYS_MYSQL_LOG_MAGIC_N 873422344
303
304-#if UNIV_PAGE_SIZE < 4096
305-# error "UNIV_PAGE_SIZE < 4096"
306-#endif
307+//#if UNIV_PAGE_SIZE < 4096
308+//# error "UNIV_PAGE_SIZE < 4096"
309+//#endif
310 /** The offset of the MySQL replication info in the trx system header;
311 this contains the same fields as TRX_SYS_MYSQL_LOG_INFO below */
312 #define TRX_SYS_MYSQL_MASTER_LOG_INFO (UNIV_PAGE_SIZE - 2000)
313diff -ruN a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
314--- a/storage/innobase/include/univ.i 2010-11-03 07:01:13.000000000 +0900
315+++ b/storage/innobase/include/univ.i 2010-12-04 15:55:58.263549721 +0900
316@@ -292,9 +292,13 @@
317 */
318
319 /* The 2-logarithm of UNIV_PAGE_SIZE: */
320-#define UNIV_PAGE_SIZE_SHIFT 14
321+/* #define UNIV_PAGE_SIZE_SHIFT 14 */
322+#define UNIV_PAGE_SIZE_SHIFT_MAX 14
323+#define UNIV_PAGE_SIZE_SHIFT srv_page_size_shift
324 /* The universal page size of the database */
325-#define UNIV_PAGE_SIZE (1 << UNIV_PAGE_SIZE_SHIFT)
326+/* #define UNIV_PAGE_SIZE (1 << UNIV_PAGE_SIZE_SHIFT) */
327+#define UNIV_PAGE_SIZE srv_page_size
328+#define UNIV_PAGE_SIZE_MAX (1 << UNIV_PAGE_SIZE_SHIFT_MAX)
329
330 /* Maximum number of parallel threads in a parallelized operation */
331 #define UNIV_MAX_PARALLELISM 32
332@@ -401,7 +405,7 @@
333 stored part of the field in the tablespace. The length field then
334 contains the sum of the following flag and the locally stored len. */
335
336-#define UNIV_EXTERN_STORAGE_FIELD (UNIV_SQL_NULL - UNIV_PAGE_SIZE)
337+#define UNIV_EXTERN_STORAGE_FIELD (UNIV_SQL_NULL - UNIV_PAGE_SIZE_MAX)
338
339 /* Some macros to improve branch prediction and reduce cache misses */
340 #if defined(__GNUC__) && (__GNUC__ > 2) && ! defined(__INTEL_COMPILER)
341@@ -504,4 +508,6 @@
342 UNIV_MEM_ALLOC(addr, size); \
343 } while (0)
344
345+extern ulint srv_page_size_shift;
346+extern ulint srv_page_size;
347 #endif
348diff -ruN a/storage/innobase/log/log0log.c b/storage/innobase/log/log0log.c
349--- a/storage/innobase/log/log0log.c 2010-12-03 15:18:48.899986203 +0900
350+++ b/storage/innobase/log/log0log.c 2010-12-04 15:55:58.266551567 +0900
351@@ -603,7 +603,9 @@
352
353 offset = (gr_lsn_size_offset + difference) % group_size;
354
355+ if (sizeof(ulint) == 4) {
356 ut_a(offset < (((ib_int64_t) 1) << 32)); /* offset must be < 4 GB */
357+ }
358
359 /* fprintf(stderr,
360 "Offset is %lu gr_lsn_offset is %lu difference is %lu\n",
361@@ -1200,6 +1202,9 @@
362 /* Wipe over possible label of ibbackup --restore */
363 memcpy(buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP, " ", 4);
364
365+ mach_write_to_4(buf + LOG_FILE_OS_FILE_LOG_BLOCK_SIZE,
366+ srv_log_block_size);
367+
368 dest_offset = nth_file * group->file_size;
369
370 #ifdef UNIV_DEBUG
371@@ -1793,9 +1798,7 @@
372 ulint i;
373
374 ut_ad(mutex_own(&(log_sys->mutex)));
375-#if LOG_CHECKPOINT_SIZE > OS_FILE_LOG_BLOCK_SIZE
376-# error "LOG_CHECKPOINT_SIZE > OS_FILE_LOG_BLOCK_SIZE"
377-#endif
378+ ut_a(LOG_CHECKPOINT_SIZE <= OS_FILE_LOG_BLOCK_SIZE);
379
380 buf = group->checkpoint_buf;
381
382@@ -1809,6 +1812,7 @@
383 mach_write_to_4(buf + LOG_CHECKPOINT_LOG_BUF_SIZE, log_sys->buf_size);
384
385 #ifdef UNIV_LOG_ARCHIVE
386+#error "UNIV_LOG_ARCHIVE could not be enabled"
387 if (log_sys->archiving_state == LOG_ARCH_OFF) {
388 archived_lsn = IB_ULONGLONG_MAX;
389 } else {
390@@ -1822,7 +1826,9 @@
391
392 mach_write_to_8(buf + LOG_CHECKPOINT_ARCHIVED_LSN, archived_lsn);
393 #else /* UNIV_LOG_ARCHIVE */
394- mach_write_to_8(buf + LOG_CHECKPOINT_ARCHIVED_LSN, IB_ULONGLONG_MAX);
395+ mach_write_to_8(buf + LOG_CHECKPOINT_ARCHIVED_LSN,
396+ (ib_uint64_t)log_group_calc_lsn_offset(
397+ log_sys->next_checkpoint_lsn, group));
398 #endif /* UNIV_LOG_ARCHIVE */
399
400 for (i = 0; i < LOG_MAX_N_GROUPS; i++) {
401diff -ruN a/storage/innobase/log/log0recv.c b/storage/innobase/log/log0recv.c
402--- a/storage/innobase/log/log0recv.c 2010-12-03 17:32:15.638986405 +0900
403+++ b/storage/innobase/log/log0recv.c 2010-12-04 15:55:58.269550689 +0900
404@@ -712,8 +712,22 @@
405
406 group->lsn = mach_read_from_8(
407 buf + LOG_CHECKPOINT_LSN);
408+
409+#ifdef UNIV_LOG_ARCHIVE
410+#error "UNIV_LOG_ARCHIVE could not be enabled"
411+#endif
412+ {
413+ ib_uint64_t tmp_lsn_offset = mach_read_from_8(
414+ buf + LOG_CHECKPOINT_ARCHIVED_LSN);
415+ if (sizeof(ulint) != 4
416+ && tmp_lsn_offset != IB_ULONGLONG_MAX) {
417+ group->lsn_offset = (ulint) tmp_lsn_offset;
418+ } else {
419 group->lsn_offset = mach_read_from_4(
420 buf + LOG_CHECKPOINT_OFFSET);
421+ }
422+ }
423+
424 checkpoint_no = mach_read_from_8(
425 buf + LOG_CHECKPOINT_NO);
426
427@@ -2955,6 +2969,7 @@
428 log_group_t* max_cp_group;
429 log_group_t* up_to_date_group;
430 ulint max_cp_field;
431+ ulint log_hdr_log_block_size;
432 ib_uint64_t checkpoint_lsn;
433 ib_uint64_t checkpoint_no;
434 ib_uint64_t old_scanned_lsn;
435@@ -3056,6 +3071,20 @@
436 log_hdr_buf, max_cp_group);
437 }
438
439+ log_hdr_log_block_size
440+ = mach_read_from_4(log_hdr_buf + LOG_FILE_OS_FILE_LOG_BLOCK_SIZE);
441+ if (log_hdr_log_block_size == 0) {
442+ /* 0 means default value */
443+ log_hdr_log_block_size = 512;
444+ }
445+ if (log_hdr_log_block_size != srv_log_block_size) {
446+ fprintf(stderr,
447+ "InnoDB: Error: The block size of ib_logfile (%lu) "
448+ "is not equal to innodb_log_block_size.\n",
449+ log_hdr_log_block_size);
450+ return(DB_ERROR);
451+ }
452+
453 #ifdef UNIV_LOG_ARCHIVE
454 group = UT_LIST_GET_FIRST(log_sys->log_groups);
455
456diff -ruN a/storage/innobase/page/page0zip.c b/storage/innobase/page/page0zip.c
457--- a/storage/innobase/page/page0zip.c 2010-12-04 15:52:23.484482786 +0900
458+++ b/storage/innobase/page/page0zip.c 2010-12-04 15:55:58.274551431 +0900
459@@ -49,7 +49,7 @@
460
461 #ifndef UNIV_HOTBACKUP
462 /** Statistics on compression, indexed by page_zip_des_t::ssize - 1 */
463-UNIV_INTERN page_zip_stat_t page_zip_stat[PAGE_ZIP_NUM_SSIZE - 1];
464+UNIV_INTERN page_zip_stat_t page_zip_stat[PAGE_ZIP_NUM_SSIZE_MAX - 1];
465 #endif /* !UNIV_HOTBACKUP */
466
467 /* Please refer to ../include/page0zip.ic for a description of the
468diff -ruN a/storage/innobase/row/row0merge.c b/storage/innobase/row/row0merge.c
469--- a/storage/innobase/row/row0merge.c 2010-12-04 15:52:23.490513562 +0900
470+++ b/storage/innobase/row/row0merge.c 2010-12-04 15:55:58.277550562 +0900
471@@ -97,7 +97,7 @@
472 row_merge_block_t. Thus, it must be able to hold one merge record,
473 whose maximum size is the same as the minimum size of
474 row_merge_block_t. */
475-typedef byte mrec_buf_t[UNIV_PAGE_SIZE];
476+typedef byte mrec_buf_t[UNIV_PAGE_SIZE_MAX];
477
478 /** @brief Merge record in row_merge_block_t.
479
480diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
481--- a/storage/innobase/srv/srv0srv.c 2010-12-04 15:55:21.384486344 +0900
482+++ b/storage/innobase/srv/srv0srv.c 2010-12-04 15:55:58.282550845 +0900
483@@ -239,6 +239,13 @@
484 UNIV_INTERN ulint srv_n_read_io_threads = ULINT_MAX;
485 UNIV_INTERN ulint srv_n_write_io_threads = ULINT_MAX;
486
487+/* The universal page size of the database */
488+UNIV_INTERN ulint srv_page_size_shift = 0;
489+UNIV_INTERN ulint srv_page_size = 0;
490+
491+/* The log block size */
492+UNIV_INTERN ulint srv_log_block_size = 0;
493+
494 /* User settable value of the number of pages that must be present
495 in the buffer cache and accessed sequentially for InnoDB to trigger a
496 readahead request. */
497diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
498--- a/storage/innobase/srv/srv0start.c 2010-12-04 15:52:23.502513556 +0900
499+++ b/storage/innobase/srv/srv0start.c 2010-12-04 15:55:58.285550583 +0900
500@@ -1521,10 +1521,12 @@
501 }
502 #endif /* UNIV_LOG_ARCHIVE */
503
504- if (srv_n_log_files * srv_log_file_size >= 262144) {
505+ if (sizeof(ulint) == 4
506+ && srv_n_log_files * srv_log_file_size
507+ >= ((ulint)1 << (32 - UNIV_PAGE_SIZE_SHIFT))) {
508 fprintf(stderr,
509 "InnoDB: Error: combined size of log files"
510- " must be < 4 GB\n");
511+ " must be < 4 GB on 32-bit systems\n");
512
513 return(DB_ERROR);
514 }
515@@ -1533,7 +1535,7 @@
516
517 for (i = 0; i < srv_n_data_files; i++) {
518 #ifndef __WIN__
519- if (sizeof(off_t) < 5 && srv_data_file_sizes[i] >= 262144) {
520+ if (sizeof(off_t) < 5 && srv_data_file_sizes[i] >= ((ulint)1 << (32 - UNIV_PAGE_SIZE_SHIFT))) {
521 fprintf(stderr,
522 "InnoDB: Error: file size must be < 4 GB"
523 " with this MySQL binary\n"
This page took 0.078795 seconds and 4 git commands to generate.