diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
--- a/storage/innobase/fil/fil0fil.c 2010-12-04 15:55:21.358513751 +0900
+++ b/storage/innobase/fil/fil0fil.c 2010-12-04 15:55:58.243481131 +0900
-@@ -4800,9 +4800,9 @@
+@@ -729,7 +729,7 @@
+ ut_a(space->purpose != FIL_LOG);
+ ut_a(!trx_sys_sys_space(space->id));
+
+- if (size_bytes < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) {
++ if (size_bytes < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) {
+ fprintf(stderr,
+ "InnoDB: Error: the size of single-table"
+ " tablespace file %s\n"
+@@ -3216,7 +3216,7 @@
+
+ if (size_bytes < free_limit_bytes) {
+ free_limit_bytes = size_bytes;
+- if (size_bytes >= FSP_EXTENT_SIZE * UNIV_PAGE_SIZE) {
++ if (size_bytes >= (lint)FSP_EXTENT_SIZE * (lint)UNIV_PAGE_SIZE) {
+ fprintf(stderr, "InnoDB: free limit of %s is larger than its real size.\n", filepath);
+ file_is_corrupt = TRUE;
+ }
+@@ -3830,7 +3830,7 @@
+
+ size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low;
+ #ifndef UNIV_HOTBACKUP
+- if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) {
++ if (size < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) {
+ fprintf(stderr,
+ "InnoDB: Error: the size of single-table tablespace"
+ " file %s\n"
+@@ -3850,7 +3850,7 @@
+ /* Align the memory for file i/o if we might have O_DIRECT set */
+ page = ut_align(buf2, UNIV_PAGE_SIZE);
+
+- if (size >= FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) {
++ if (size >= FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) {
+ success = os_file_read(file, page, 0, 0, UNIV_PAGE_SIZE);
+
+ /* We have to read the tablespace id from the file */
+@@ -4828,9 +4828,9 @@
ut_ad(ut_is_2pow(zip_size));
ut_ad(buf);
ut_ad(len > 0);
+//#if (1 << UNIV_PAGE_SIZE_SHIFT) != UNIV_PAGE_SIZE
+//# error "(1 << UNIV_PAGE_SIZE_SHIFT) != UNIV_PAGE_SIZE"
+//#endif
- ut_ad(fil_validate());
+ ut_ad(fil_validate_skip());
#ifndef UNIV_HOTBACKUP
# ifndef UNIV_LOG_DEBUG
diff -ruN a/storage/innobase/fsp/fsp0fsp.c b/storage/innobase/fsp/fsp0fsp.c
--- a/storage/innobase/fsp/fsp0fsp.c 2010-12-04 15:52:23.411513754 +0900
+++ b/storage/innobase/fsp/fsp0fsp.c 2010-12-04 15:55:58.244514273 +0900
-@@ -657,15 +657,16 @@
+@@ -656,16 +656,18 @@
+ 0 for uncompressed pages */
ulint offset) /*!< in: page offset */
{
- #ifndef DOXYGEN /* Doxygen gets confused of these */
+-#ifndef DOXYGEN /* Doxygen gets confused of these */
-# if UNIV_PAGE_SIZE <= XDES_ARR_OFFSET \
- + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE
-# error
-# endif
+-# if PAGE_ZIP_MIN_SIZE <= XDES_ARR_OFFSET \
+- + (PAGE_ZIP_MIN_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE
+-# error
+-# endif
+-#endif /* !DOXYGEN */
++//#ifndef DOXYGEN /* Doxygen gets confused of these */
+//# if UNIV_PAGE_SIZE <= XDES_ARR_OFFSET
+// + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE
+//# error
+//# endif
- # if PAGE_ZIP_MIN_SIZE <= XDES_ARR_OFFSET \
- + (PAGE_ZIP_MIN_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE
- # error
- # endif
- #endif /* !DOXYGEN */
++//# if PAGE_ZIP_MIN_SIZE <= XDES_ARR_OFFSET
++// + (PAGE_ZIP_MIN_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE
++//# error
++//# endif
++//#endif /* !DOXYGEN */
+ ut_a(UNIV_PAGE_SIZE > XDES_ARR_OFFSET + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE);
++ ut_a(PAGE_ZIP_MIN_SIZE > XDES_ARR_OFFSET + (PAGE_ZIP_MIN_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE);
ut_ad(ut_is_2pow(zip_size));
if (!zip_size) {
-@@ -1464,12 +1465,12 @@
+@@ -1464,12 +1466,12 @@
mtr);
xdes_init(descr, mtr);
static my_bool innobase_thread_concurrency_timer_based;
static long long innobase_buffer_pool_size, innobase_log_file_size;
-@@ -2269,6 +2272,62 @@
+@@ -2270,6 +2273,65 @@
}
- #endif /* UNIV_DEBUG */
+ #endif /* DBUG_OFF */
+ srv_page_size = 0;
+ srv_page_size_shift = 0;
+
+ if (!srv_page_size_shift) {
+ fprintf(stderr,
-+ "InnoDB: Error: %lu is not valid value for innodb_page_size.\n",
++ "InnoDB: Error: %lu is not a valid value for innodb_page_size.\n"
++ "InnoDB: Error: Valid values are 4096, 8192, and 16384 (default=16384).\n",
+ innobase_page_size);
+ goto error;
+ }
+
+ if (!srv_log_block_size) {
+ fprintf(stderr,
-+ "InnoDB: Error: %lu is not valid value for innodb_log_block_size.\n",
++ "InnoDB: Error: %lu is not a valid value for innodb_log_block_size.\n"
++ "InnoDB: Error: A valid value for innodb_log_block_size is\n"
++ "InnoDB: Error: a power of 2 from 512 to 16384.\n",
+ innobase_log_block_size);
+ goto error;
+ }
#ifndef MYSQL_SERVER
innodb_overwrite_relay_log_info = FALSE;
#endif
-@@ -7212,9 +7271,9 @@
+@@ -7222,9 +7284,9 @@
| DICT_TF_COMPACT
| DICT_TF_FORMAT_ZIP
<< DICT_TF_FORMAT_SHIFT;
}
}
-@@ -11332,6 +11391,16 @@
+@@ -11335,6 +11397,16 @@
"#### Attention: The checksum is not compatible for normal or disabled version! ####",
NULL, NULL, FALSE);
static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir,
PLUGIN_VAR_READONLY,
"The common part for InnoDB table spaces.",
-@@ -11839,6 +11908,8 @@
+@@ -11837,6 +11909,8 @@
NULL, NULL, 0, 0, 1, 0);
static struct st_mysql_sys_var* innobase_system_variables[]= {
diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
--- a/storage/innobase/include/buf0buf.h 2010-12-04 15:55:21.375482937 +0900
+++ b/storage/innobase/include/buf0buf.h 2010-12-04 15:55:58.258469088 +0900
-@@ -1602,7 +1602,7 @@
+@@ -1682,7 +1682,7 @@
time_t last_printout_time;
/*!< when buf_print_io was last time
called */
/*!< Statistics of buddy system,
indexed by block size */
buf_pool_stat_t stat; /*!< current statistics */
-@@ -1698,7 +1698,7 @@
+@@ -1778,7 +1778,7 @@
/* @{ */
UT_LIST_BASE_NODE_T(buf_page_t) zip_clean;
/*!< unmodified compressed pages */
/*!< buddy free lists */
buf_page_t watch[BUF_POOL_WATCH_SIZE];
-@@ -1706,9 +1706,9 @@
+@@ -1786,9 +1786,9 @@
pool watches. Protected by
buf_pool->mutex. */
diff -ruN a/storage/innobase/include/buf0types.h b/storage/innobase/include/buf0types.h
--- a/storage/innobase/include/buf0types.h 2010-11-03 07:01:13.000000000 +0900
+++ b/storage/innobase/include/buf0types.h 2010-12-04 15:55:58.259482590 +0900
-@@ -72,6 +72,7 @@
+@@ -72,12 +72,13 @@
buddy system; must be at least
sizeof(buf_page_t) */
#define BUF_BUDDY_SIZES (UNIV_PAGE_SIZE_SHIFT - BUF_BUDDY_LOW_SHIFT)
/*!< number of buddy sizes */
/** twice the maximum block size of the buddy system;
+ the underlying memory is aligned by this amount:
+ this must be equal to UNIV_PAGE_SIZE */
+-#define BUF_BUDDY_HIGH (BUF_BUDDY_LOW << BUF_BUDDY_SIZES)
++#define BUF_BUDDY_HIGH ((ulint)BUF_BUDDY_LOW << BUF_BUDDY_SIZES)
+ /* @} */
+
+ #endif
+diff -ruN a/storage/innobase/include/fsp0types.h b/storage/innobase/include/fsp0types.h
+--- a/storage/innobase/include/fsp0types.h 2010-12-04 02:58:26.000000000 +0900
++++ b/storage/innobase/include/fsp0types.h 2011-02-03 15:14:21.000000000 +0900
+@@ -42,7 +42,7 @@
+ /* @} */
+
+ /** File space extent size (one megabyte) in pages */
+-#define FSP_EXTENT_SIZE (1 << (20 - UNIV_PAGE_SIZE_SHIFT))
++#define FSP_EXTENT_SIZE ((ulint)1 << (20 - UNIV_PAGE_SIZE_SHIFT))
+
+ /** On a page of any file segment, data may be put starting from this
+ offset */
diff -ruN a/storage/innobase/include/log0log.h b/storage/innobase/include/log0log.h
--- a/storage/innobase/include/log0log.h 2010-11-03 07:01:13.000000000 +0900
+++ b/storage/innobase/include/log0log.h 2010-12-09 18:16:47.737728305 +0900
diff -ruN a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
--- a/storage/innobase/include/univ.i 2010-11-03 07:01:13.000000000 +0900
+++ b/storage/innobase/include/univ.i 2010-12-04 15:55:58.263549721 +0900
-@@ -292,9 +292,13 @@
+@@ -295,9 +295,13 @@
*/
/* The 2-logarithm of UNIV_PAGE_SIZE: */
/* Maximum number of parallel threads in a parallelized operation */
#define UNIV_MAX_PARALLELISM 32
-@@ -401,7 +405,7 @@
+@@ -416,7 +420,7 @@
stored part of the field in the tablespace. The length field then
contains the sum of the following flag and the locally stored len. */
/* Some macros to improve branch prediction and reduce cache misses */
#if defined(__GNUC__) && (__GNUC__ > 2) && ! defined(__INTEL_COMPILER)
-@@ -504,4 +508,6 @@
+@@ -519,4 +523,6 @@
UNIV_MEM_ALLOC(addr, size); \
} while (0)
diff -ruN a/storage/innobase/log/log0log.c b/storage/innobase/log/log0log.c
--- a/storage/innobase/log/log0log.c 2010-12-03 15:18:48.899986203 +0900
+++ b/storage/innobase/log/log0log.c 2010-12-04 15:55:58.266551567 +0900
-@@ -603,7 +603,9 @@
+@@ -604,7 +604,9 @@
offset = (gr_lsn_size_offset + difference) % group_size;
/* fprintf(stderr,
"Offset is %lu gr_lsn_offset is %lu difference is %lu\n",
-@@ -1200,6 +1202,9 @@
+@@ -1201,6 +1203,9 @@
/* Wipe over possible label of ibbackup --restore */
memcpy(buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP, " ", 4);
dest_offset = nth_file * group->file_size;
#ifdef UNIV_DEBUG
-@@ -1793,9 +1798,7 @@
+@@ -1794,9 +1799,7 @@
ulint i;
ut_ad(mutex_own(&(log_sys->mutex)));
buf = group->checkpoint_buf;
-@@ -1809,6 +1812,7 @@
+@@ -1810,6 +1813,7 @@
mach_write_to_4(buf + LOG_CHECKPOINT_LOG_BUF_SIZE, log_sys->buf_size);
#ifdef UNIV_LOG_ARCHIVE
if (log_sys->archiving_state == LOG_ARCH_OFF) {
archived_lsn = IB_ULONGLONG_MAX;
} else {
-@@ -1822,7 +1826,9 @@
+@@ -1823,7 +1827,9 @@
mach_write_to_8(buf + LOG_CHECKPOINT_ARCHIVED_LSN, archived_lsn);
#else /* UNIV_LOG_ARCHIVE */
ib_uint64_t checkpoint_lsn;
ib_uint64_t checkpoint_no;
ib_uint64_t old_scanned_lsn;
-@@ -3056,6 +3071,20 @@
+@@ -3056,6 +3071,21 @@
log_hdr_buf, max_cp_group);
}
+ if (log_hdr_log_block_size != srv_log_block_size) {
+ fprintf(stderr,
+ "InnoDB: Error: The block size of ib_logfile (%lu) "
-+ "is not equal to innodb_log_block_size.\n",
++ "is not equal to innodb_log_block_size.\n"
++ "InnoDB: Error: Suggestion - Recreate log files.\n",
+ log_hdr_log_block_size);
+ return(DB_ERROR);
+ }
diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
--- a/storage/innobase/srv/srv0srv.c 2010-12-04 15:55:21.384486344 +0900
+++ b/storage/innobase/srv/srv0srv.c 2010-12-04 15:55:58.282550845 +0900
-@@ -239,6 +239,13 @@
+@@ -241,6 +241,13 @@
UNIV_INTERN ulint srv_n_read_io_threads = ULINT_MAX;
UNIV_INTERN ulint srv_n_write_io_threads = ULINT_MAX;
diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
--- a/storage/innobase/srv/srv0start.c 2010-12-04 15:52:23.502513556 +0900
+++ b/storage/innobase/srv/srv0start.c 2010-12-04 15:55:58.285550583 +0900
-@@ -1521,10 +1521,12 @@
+@@ -1553,11 +1553,13 @@
}
#endif /* UNIV_LOG_ARCHIVE */
+ if (sizeof(ulint) == 4
+ && srv_n_log_files * srv_log_file_size
+ >= ((ulint)1 << (32 - UNIV_PAGE_SIZE_SHIFT))) {
+ ut_print_timestamp(stderr);
fprintf(stderr,
- "InnoDB: Error: combined size of log files"
+ " InnoDB: Error: combined size of log files"
- " must be < 4 GB\n");
+ " must be < 4 GB on 32-bit systems\n");
return(DB_ERROR);
}
-@@ -1533,7 +1535,7 @@
+@@ -1566,7 +1568,7 @@
for (i = 0; i < srv_n_data_files; i++) {
#ifndef __WIN__
- if (sizeof(off_t) < 5 && srv_data_file_sizes[i] >= 262144) {
+ if (sizeof(off_t) < 5 && srv_data_file_sizes[i] >= ((ulint)1 << (32 - UNIV_PAGE_SIZE_SHIFT))) {
+ ut_print_timestamp(stderr);
fprintf(stderr,
- "InnoDB: Error: file size must be < 4 GB"
- " with this MySQL binary\n"
+ " InnoDB: Error: file size must be < 4 GB"