]> git.pld-linux.org Git - packages/mysql.git/blobdiff - innodb_files_extend.patch
- more mysqld.conf changes: skip-locking, default-character-set
[packages/mysql.git] / innodb_files_extend.patch
index 0833cfa84c1e7b8b0245db72e53c8b648bad7eae..b75018abe4b4f436637fe42117c17e4eec9bb932 100644 (file)
@@ -8,7 +8,43 @@
 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);
@@ -18,34 +54,42 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
 +//#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);
  
@@ -77,9 +121,9 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  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;
@@ -106,7 +150,8 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
 +
 +      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;
 +      }
@@ -132,7 +177,9 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
 +
 +      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;
 +      }
@@ -140,7 +187,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  #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;
@@ -153,7 +200,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
                }
        }
  
-@@ -11332,6 +11391,16 @@
+@@ -11335,6 +11397,16 @@
    "#### Attention: The checksum is not compatible for normal or disabled version! ####",
    NULL, NULL, FALSE);
  
@@ -170,7 +217,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  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[]= {
@@ -182,7 +229,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
 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 */
@@ -191,7 +238,7 @@ diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0bu
                                        /*!< 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 */
@@ -200,7 +247,7 @@ diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0bu
                                        /*!< 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. */
  
@@ -216,7 +263,7 @@ diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0bu
 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)
@@ -224,6 +271,25 @@ diff -ruN a/storage/innobase/include/buf0types.h b/storage/innobase/include/buf0
                                        /*!< 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
@@ -313,7 +379,7 @@ diff -ruN a/storage/innobase/include/trx0sys.h b/storage/innobase/include/trx0sy
 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: */
@@ -329,7 +395,7 @@ diff -ruN a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
  
  /* 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. */
  
@@ -338,7 +404,7 @@ diff -ruN a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
  
  /* 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)
  
@@ -348,7 +414,7 @@ diff -ruN a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
 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;
  
@@ -358,7 +424,7 @@ diff -ruN a/storage/innobase/log/log0log.c b/storage/innobase/log/log0log.c
  
        /* 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);
  
@@ -368,7 +434,7 @@ diff -ruN a/storage/innobase/log/log0log.c b/storage/innobase/log/log0log.c
        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)));
@@ -379,7 +445,7 @@ diff -ruN a/storage/innobase/log/log0log.c b/storage/innobase/log/log0log.c
  
        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
@@ -387,7 +453,7 @@ diff -ruN a/storage/innobase/log/log0log.c b/storage/innobase/log/log0log.c
        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 */
@@ -432,7 +498,7 @@ diff -ruN a/storage/innobase/log/log0recv.c b/storage/innobase/log/log0recv.c
        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);
        }
  
@@ -445,7 +511,8 @@ diff -ruN a/storage/innobase/log/log0recv.c b/storage/innobase/log/log0recv.c
 +      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);
 +      }
@@ -480,7 +547,7 @@ diff -ruN a/storage/innobase/row/row0merge.c b/storage/innobase/row/row0merge.c
 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;
  
@@ -497,7 +564,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 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 */
  
@@ -505,19 +572,20 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
 +      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"
This page took 0.040979 seconds and 4 git commands to generate.