]> git.pld-linux.org Git - packages/mysql.git/blobdiff - innodb_fast_checksum.patch
remove id expansion
[packages/mysql.git] / innodb_fast_checksum.patch
index 8374d46ee6857f159aa6584fc73dc67ef9361b76..0a733db006f9d18e09fba52ef7455a19a0d2717c 100644 (file)
@@ -5,10 +5,9 @@
 #!!! notice !!!
 # Any small change to this file in the main branch
 # should be done or reviewed by the maintainer!
-diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
---- a/storage/innobase/buf/buf0buf.c   2010-12-04 15:52:23.391514910 +0900
-+++ b/storage/innobase/buf/buf0buf.c   2010-12-04 15:53:45.013513772 +0900
-@@ -511,6 +511,27 @@
+--- a/storage/innobase/buf/buf0buf.c
++++ b/storage/innobase/buf/buf0buf.c
+@@ -512,6 +512,27 @@
        return(checksum);
  }
  
@@ -36,7 +35,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  /********************************************************************//**
  In versions < 4.0.14 and < 4.1.1 there was a bug that the checksum only
  looked at the first few bytes of the page. This calculates that old
-@@ -627,9 +648,21 @@
+@@ -628,9 +649,21 @@
                /* InnoDB versions < 4.0.14 and < 4.1.1 stored the space id
                (always equal to 0), to FIL_PAGE_SPACE_OR_CHKSUM */
  
@@ -59,7 +58,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
                    != buf_calc_page_new_checksum(read_buf)) {
  
                        return(TRUE);
-@@ -653,6 +686,7 @@
+@@ -654,6 +687,7 @@
        dict_index_t*   index;
  #endif /* !UNIV_HOTBACKUP */
        ulint           checksum;
@@ -67,7 +66,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
        ulint           old_checksum;
        ulint           size    = zip_size;
  
-@@ -739,12 +773,14 @@
+@@ -740,12 +774,14 @@
  
        checksum = srv_use_checksums
                ? buf_calc_page_new_checksum(read_buf) : BUF_NO_CHECKSUM_MAGIC;
@@ -83,7 +82,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
                " checksum %lu\n"
                "InnoDB: stored checksum %lu, prior-to-4.0.14-form"
                " stored checksum %lu\n"
-@@ -753,7 +789,7 @@
+@@ -754,7 +790,7 @@
                "InnoDB: Page number (if stored to page already) %lu,\n"
                "InnoDB: space id (if created with >= MySQL-4.1.1"
                " and stored already) %lu\n",
@@ -92,10 +91,9 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
                (ulong) mach_read_from_4(read_buf + FIL_PAGE_SPACE_OR_CHKSUM),
                (ulong) mach_read_from_4(read_buf + UNIV_PAGE_SIZE
                                         - FIL_PAGE_END_LSN_OLD_CHKSUM),
-diff -ruN a/storage/innobase/buf/buf0flu.c b/storage/innobase/buf/buf0flu.c
---- a/storage/innobase/buf/buf0flu.c   2010-12-04 15:37:50.555568346 +0900
-+++ b/storage/innobase/buf/buf0flu.c   2010-12-04 15:53:45.015513917 +0900
-@@ -1055,7 +1055,9 @@
+--- a/storage/innobase/buf/buf0flu.c
++++ b/storage/innobase/buf/buf0flu.c
+@@ -1057,7 +1057,9 @@
  
        mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM,
                        srv_use_checksums
@@ -106,10 +104,9 @@ diff -ruN a/storage/innobase/buf/buf0flu.c b/storage/innobase/buf/buf0flu.c
                        : BUF_NO_CHECKSUM_MAGIC);
  
        /* We overwrite the first 4 bytes of the end lsn field to store
-diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
---- a/storage/innobase/fil/fil0fil.c   2010-12-04 15:52:23.406513743 +0900
-+++ b/storage/innobase/fil/fil0fil.c   2010-12-04 15:53:45.020513800 +0900
-@@ -3094,13 +3094,24 @@
+--- a/storage/innobase/fil/fil0fil.c
++++ b/storage/innobase/fil/fil0fil.c
+@@ -3103,13 +3103,24 @@
                return(TRUE);
        }
  
@@ -135,7 +132,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
        return(FALSE);
  }
  
-@@ -3116,7 +3127,9 @@
+@@ -3125,7 +3136,9 @@
        if (!zip_size) {
                mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM,
                                srv_use_checksums
@@ -146,9 +143,8 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
                                                : BUF_NO_CHECKSUM_MAGIC);
                mach_write_to_4(page + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM,
                                srv_use_checksums
-diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
---- a/storage/innobase/handler/ha_innodb.cc    2010-12-04 15:52:23.420480329 +0900
-+++ b/storage/innobase/handler/ha_innodb.cc    2010-12-04 15:53:45.029551892 +0900
+--- a/storage/innobase/handler/ha_innodb.cc
++++ b/storage/innobase/handler/ha_innodb.cc
 @@ -183,6 +183,7 @@
  #endif /* UNIV_LOG_ARCHIVE */
  static my_bool        innobase_use_doublewrite                = TRUE;
@@ -157,15 +153,15 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static my_bool        innobase_recovery_stats                 = TRUE;
  static my_bool        innobase_locks_unsafe_for_binlog        = FALSE;
  static my_bool        innobase_overwrite_relay_log_info       = FALSE;
-@@ -2620,6 +2621,7 @@
+@@ -2656,6 +2657,7 @@
  
        srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite;
        srv_use_checksums = (ibool) innobase_use_checksums;
 +      srv_fast_checksum = (ibool) innobase_fast_checksum;
  
- #ifdef HAVE_LARGE_PAGES
-         if ((os_use_large_pages = (ibool) my_use_large_pages))
-@@ -11421,6 +11423,15 @@
+       srv_blocking_lru_restore = (ibool) innobase_blocking_lru_restore;
+@@ -11541,6 +11543,15 @@
    "Disable with --skip-innodb-checksums.",
    NULL, NULL, TRUE);
  
@@ -181,7 +177,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.",
-@@ -11930,6 +11941,7 @@
+@@ -12112,6 +12123,7 @@
    MYSQL_SYSVAR(buffer_pool_size),
    MYSQL_SYSVAR(buffer_pool_instances),
    MYSQL_SYSVAR(checksums),
@@ -189,10 +185,9 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
    MYSQL_SYSVAR(commit_concurrency),
    MYSQL_SYSVAR(concurrency_tickets),
    MYSQL_SYSVAR(data_file_path),
-diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
---- a/storage/innobase/include/buf0buf.h       2010-12-04 15:52:23.458514045 +0900
-+++ b/storage/innobase/include/buf0buf.h       2010-12-04 15:53:45.044514150 +0900
-@@ -604,6 +604,11 @@
+--- a/storage/innobase/include/buf0buf.h
++++ b/storage/innobase/include/buf0buf.h
+@@ -621,6 +621,11 @@
  buf_calc_page_new_checksum(
  /*=======================*/
        const byte*     page);  /*!< in: buffer page */
@@ -204,10 +199,9 @@ diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0bu
  /********************************************************************//**
  In versions < 4.0.14 and < 4.1.1 there was a bug that the checksum only
  looked at the first few bytes of the page. This calculates that old
-diff -ruN a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h
---- a/storage/innobase/include/fil0fil.h       2010-12-04 15:52:23.466513796 +0900
-+++ b/storage/innobase/include/fil0fil.h       2010-12-04 15:53:45.046513558 +0900
-@@ -118,6 +118,7 @@
+--- a/storage/innobase/include/fil0fil.h
++++ b/storage/innobase/include/fil0fil.h
+@@ -119,6 +119,7 @@
  #define FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID  34 /*!< starting from 4.1.x this
                                        contains the space id of the page */
  #define FIL_PAGE_DATA         38      /*!< start of the data on the page */
@@ -215,10 +209,9 @@ diff -ruN a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fi
  /* @} */
  /** File page trailer @{ */
  #define FIL_PAGE_END_LSN_OLD_CHKSUM 8 /*!< the low 4 bytes of this are used
-diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
---- a/storage/innobase/include/srv0srv.h       2010-12-04 15:52:23.474482590 +0900
-+++ b/storage/innobase/include/srv0srv.h       2010-12-04 15:53:45.048512100 +0900
-@@ -224,6 +224,7 @@
+--- a/storage/innobase/include/srv0srv.h
++++ b/storage/innobase/include/srv0srv.h
+@@ -229,6 +229,7 @@
  
  extern ibool  srv_use_doublewrite_buf;
  extern ibool  srv_use_checksums;
@@ -226,9 +219,8 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
  
  extern ulong  srv_max_buf_pool_modified_pct;
  extern ulong  srv_max_purge_lag;
-diff -ruN a/storage/innobase/include/ut0rnd.h b/storage/innobase/include/ut0rnd.h
---- a/storage/innobase/include/ut0rnd.h        2010-11-03 07:01:13.000000000 +0900
-+++ b/storage/innobase/include/ut0rnd.h        2010-12-04 15:53:45.049510146 +0900
+--- a/storage/innobase/include/ut0rnd.h
++++ b/storage/innobase/include/ut0rnd.h
 @@ -124,6 +124,13 @@
        const byte*     str,    /*!< in: string of bytes */
        ulint           len)    /*!< in: length */
@@ -243,9 +235,8 @@ diff -ruN a/storage/innobase/include/ut0rnd.h b/storage/innobase/include/ut0rnd.
  /***********************************************************//**
  Looks for a prime number slightly greater than the given argument.
  The prime is chosen so that it is not near any power of 2.
-diff -ruN a/storage/innobase/include/ut0rnd.ic b/storage/innobase/include/ut0rnd.ic
---- a/storage/innobase/include/ut0rnd.ic       2010-11-03 07:01:13.000000000 +0900
-+++ b/storage/innobase/include/ut0rnd.ic       2010-12-04 15:53:45.050565975 +0900
+--- a/storage/innobase/include/ut0rnd.ic
++++ b/storage/innobase/include/ut0rnd.ic
 @@ -226,3 +226,28 @@
  
        return(fold);
@@ -275,10 +266,9 @@ diff -ruN a/storage/innobase/include/ut0rnd.ic b/storage/innobase/include/ut0rnd
 +
 +      return(fold);
 +}
-diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
---- a/storage/innobase/srv/srv0srv.c   2010-12-04 15:52:23.498513634 +0900
-+++ b/storage/innobase/srv/srv0srv.c   2010-12-04 15:53:45.053550283 +0900
-@@ -414,6 +414,7 @@
+--- a/storage/innobase/srv/srv0srv.c
++++ b/storage/innobase/srv/srv0srv.c
+@@ -419,6 +419,7 @@
  
  UNIV_INTERN ibool     srv_use_doublewrite_buf = TRUE;
  UNIV_INTERN ibool     srv_use_checksums = TRUE;
@@ -286,3 +276,13 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
  UNIV_INTERN ulong     srv_replication_delay           = 0;
  
+--- /dev/null
++++ b/mysql-test/suite/sys_vars/r/innodb_fast_checksum_basic.result
+@@ -0,0 +1,3 @@
++SELECT @@global.innodb_fast_checksum;
++@@global.innodb_fast_checksum
++0
+--- /dev/null
++++ b/mysql-test/suite/sys_vars/t/innodb_fast_checksum_basic.test
+@@ -0,0 +1 @@
++SELECT @@global.innodb_fast_checksum;
This page took 0.08661 seconds and 4 git commands to generate.