]> git.pld-linux.org Git - packages/mysql.git/blobdiff - innodb_separate_doublewrite.patch
- %_lib==lib handling bugfix
[packages/mysql.git] / innodb_separate_doublewrite.patch
index 434c649dfcc2649e01c6ed7699fa641d80830600..c7d098fa2a8ea97029dff099dc4d25d169dd150d 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-03 17:49:11.574962867 +0900
-+++ b/storage/innobase/buf/buf0buf.c   2010-12-04 15:35:58.624514033 +0900
-@@ -4251,7 +4251,8 @@
+--- a/storage/innobase/buf/buf0buf.c
++++ b/storage/innobase/buf/buf0buf.c
+@@ -3807,7 +3807,8 @@
                read_space_id = mach_read_from_4(
                        frame + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
  
@@ -18,10 +17,9 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
                    && trx_doublewrite_page_inside(bpage->offset)) {
  
                        ut_print_timestamp(stderr);
-diff -ruN a/storage/innobase/buf/buf0flu.c b/storage/innobase/buf/buf0flu.c
---- a/storage/innobase/buf/buf0flu.c   2010-12-03 15:49:59.179956111 +0900
-+++ b/storage/innobase/buf/buf0flu.c   2010-12-04 15:35:58.624514033 +0900
-@@ -791,7 +791,8 @@
+--- a/storage/innobase/buf/buf0flu.c
++++ b/storage/innobase/buf/buf0flu.c
+@@ -793,7 +793,8 @@
        write_buf = trx_doublewrite->write_buf;
        i = 0;
  
@@ -31,7 +29,7 @@ diff -ruN a/storage/innobase/buf/buf0flu.c b/storage/innobase/buf/buf0flu.c
               trx_doublewrite->block1, 0, len,
               (void*) write_buf, NULL);
  
-@@ -828,7 +829,8 @@
+@@ -830,7 +831,8 @@
                + TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * UNIV_PAGE_SIZE;
        ut_ad(i == TRX_SYS_DOUBLEWRITE_BLOCK_SIZE);
  
@@ -41,19 +39,18 @@ diff -ruN a/storage/innobase/buf/buf0flu.c b/storage/innobase/buf/buf0flu.c
               trx_doublewrite->block2, 0, len,
               (void*) write_buf, NULL);
  
-@@ -858,7 +860,7 @@
+@@ -860,7 +862,7 @@
  flush:
        /* Now flush the doublewrite buffer data to disk */
  
--      fil_flush(TRX_SYS_SPACE);
-+      fil_flush(srv_doublewrite_file ? TRX_DOUBLEWRITE_SPACE : TRX_SYS_SPACE);
+-      fil_flush(TRX_SYS_SPACE, FALSE);
++      fil_flush(srv_doublewrite_file ? TRX_DOUBLEWRITE_SPACE : TRX_SYS_SPACE, FALSE);
  
        /* We know that the writes have been flushed to disk now
        and in recovery we will find them in the doublewrite buffer
-diff -ruN a/storage/innobase/buf/buf0rea.c b/storage/innobase/buf/buf0rea.c
---- a/storage/innobase/buf/buf0rea.c   2010-12-04 15:35:29.138514157 +0900
-+++ b/storage/innobase/buf/buf0rea.c   2010-12-04 15:35:58.626486771 +0900
-@@ -88,7 +88,9 @@
+--- a/storage/innobase/buf/buf0rea.c
++++ b/storage/innobase/buf/buf0rea.c
+@@ -90,7 +90,9 @@
        wake_later = mode & OS_AIO_SIMULATED_WAKE_LATER;
        mode = mode & ~OS_AIO_SIMULATED_WAKE_LATER;
  
@@ -64,9 +61,8 @@ diff -ruN a/storage/innobase/buf/buf0rea.c b/storage/innobase/buf/buf0rea.c
            && (   (offset >= trx_doublewrite->block1
                    && offset < trx_doublewrite->block1
                    + TRX_SYS_DOUBLEWRITE_BLOCK_SIZE)
-diff -ruN a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.c
---- a/storage/innobase/dict/dict0load.c        2010-12-03 17:30:16.252956569 +0900
-+++ b/storage/innobase/dict/dict0load.c        2010-12-04 15:35:58.627482825 +0900
+--- a/storage/innobase/dict/dict0load.c
++++ b/storage/innobase/dict/dict0load.c
 @@ -41,6 +41,7 @@
  #include "srv0start.h"
  #include "srv0srv.h"
@@ -75,7 +71,7 @@ diff -ruN a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.
  
  
  /** Following are six InnoDB system tables */
-@@ -811,7 +812,7 @@
+@@ -816,7 +817,7 @@
  
                mtr_commit(&mtr);
  
@@ -84,7 +80,7 @@ diff -ruN a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.
                        /* The system tablespace always exists. */
                } else if (in_crash_recovery) {
                        /* Check that the tablespace (the .ibd file) really
-@@ -1623,7 +1624,7 @@
+@@ -1727,7 +1728,7 @@
        space = mach_read_from_4(field);
  
        /* Check if the tablespace exists and has the right name */
@@ -93,7 +89,7 @@ diff -ruN a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.
                flags = dict_sys_tables_get_flags(rec);
  
                if (UNIV_UNLIKELY(flags == ULINT_UNDEFINED)) {
-@@ -1776,7 +1777,7 @@
+@@ -1880,7 +1881,7 @@
                goto err_exit;
        }
  
@@ -102,10 +98,9 @@ diff -ruN a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.
                /* The system tablespace is always available. */
        } else if (!fil_space_for_table_exists_in_mem(
                           table->space, name,
-diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
---- a/storage/innobase/fil/fil0fil.c   2010-12-04 15:35:29.143813775 +0900
-+++ b/storage/innobase/fil/fil0fil.c   2010-12-04 15:35:58.628498870 +0900
-@@ -655,7 +655,7 @@
+--- a/storage/innobase/fil/fil0fil.c
++++ b/storage/innobase/fil/fil0fil.c
+@@ -657,7 +657,7 @@
  
        UT_LIST_ADD_LAST(chain, space->chain, node);
  
@@ -114,7 +109,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
  
                fil_system->max_assigned_id = id;
        }
-@@ -719,14 +719,14 @@
+@@ -721,14 +721,14 @@
                size_bytes = (((ib_int64_t)size_high) << 32)
                        + (ib_int64_t)size_low;
  #ifdef UNIV_HOTBACKUP
@@ -131,7 +126,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
  
                if (size_bytes < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) {
                        fprintf(stderr,
-@@ -772,7 +772,7 @@
+@@ -774,7 +774,7 @@
                }
  
                if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED
@@ -140,7 +135,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
                        fprintf(stderr,
                                "InnoDB: Error: tablespace id %lu"
                                " in file %s is not sensible\n",
-@@ -840,7 +840,7 @@
+@@ -842,7 +842,7 @@
  
        system->n_open++;
  
@@ -149,7 +144,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
                /* Put the node to the LRU list */
                UT_LIST_ADD_FIRST(LRU, system->LRU, node);
        }
-@@ -873,7 +873,7 @@
+@@ -876,7 +876,7 @@
        ut_a(system->n_open > 0);
        system->n_open--;
  
@@ -158,7 +153,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
                ut_a(UT_LIST_GET_LEN(system->LRU) > 0);
  
                /* The node is in the LRU list, remove it */
-@@ -959,7 +959,7 @@
+@@ -962,7 +962,7 @@
  retry:
        mutex_enter(&fil_system->mutex);
  
@@ -167,7 +162,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
                /* We keep log files and system tablespace files always open;
                this is important in preventing deadlocks in this module, as
                a page read completion often performs another read from the
-@@ -1190,7 +1190,7 @@
+@@ -1193,7 +1193,7 @@
                        " tablespace memory cache!\n",
                        (ulong) space->id);
  
@@ -176,7 +171,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
  
                        mutex_exit(&fil_system->mutex);
  
-@@ -1252,6 +1252,7 @@
+@@ -1255,6 +1255,7 @@
        space->mark = FALSE;
  
        if (UNIV_LIKELY(purpose == FIL_TABLESPACE && !recv_recovery_on)
@@ -184,7 +179,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
            && UNIV_UNLIKELY(id > fil_system->max_assigned_id)) {
                if (!fil_system->space_id_reuse_warned) {
                        fil_system->space_id_reuse_warned = TRUE;
-@@ -1335,7 +1336,7 @@
+@@ -1338,7 +1339,7 @@
                        (ulong) SRV_LOG_SPACE_FIRST_ID);
        }
  
@@ -193,7 +188,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
  
        if (success) {
                *space_id = fil_system->max_assigned_id = id;
-@@ -1598,6 +1599,8 @@
+@@ -1601,6 +1602,8 @@
        UT_LIST_INIT(fil_system->LRU);
  
        fil_system->max_n_open = max_n_open;
@@ -202,7 +197,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
  }
  
  /*******************************************************************//**
-@@ -1619,7 +1622,7 @@
+@@ -1622,7 +1625,7 @@
        space = UT_LIST_GET_FIRST(fil_system->space_list);
  
        while (space != NULL) {
@@ -211,7 +206,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
                        node = UT_LIST_GET_FIRST(space->chain);
  
                        while (node != NULL) {
-@@ -1709,6 +1712,10 @@
+@@ -1712,6 +1715,10 @@
                ut_error;
        }
  
@@ -222,7 +217,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
        mutex_enter(&fil_system->mutex);
  
        if (fil_system->max_assigned_id < max_id) {
-@@ -1727,6 +1734,7 @@
+@@ -1730,6 +1737,7 @@
  ulint
  fil_write_lsn_and_arch_no_to_file(
  /*==============================*/
@@ -230,7 +225,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
        ulint           sum_of_sizes,   /*!< in: combined size of previous files
                                        in space, in database pages */
        ib_uint64_t     lsn,            /*!< in: lsn to write */
-@@ -1736,14 +1744,16 @@
+@@ -1739,14 +1747,16 @@
        byte*   buf1;
        byte*   buf;
  
@@ -249,7 +244,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
  
        mem_free(buf1);
  
-@@ -1779,7 +1789,7 @@
+@@ -1782,7 +1792,7 @@
                always open. */
  
                if (space->purpose == FIL_TABLESPACE
@@ -258,7 +253,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
                        sum_of_sizes = 0;
  
                        node = UT_LIST_GET_FIRST(space->chain);
-@@ -1787,7 +1797,7 @@
+@@ -1790,7 +1800,7 @@
                                mutex_exit(&fil_system->mutex);
  
                                err = fil_write_lsn_and_arch_no_to_file(
@@ -267,7 +262,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
                                if (err != DB_SUCCESS) {
  
                                        return(err);
-@@ -3834,7 +3844,7 @@
+@@ -4176,7 +4186,7 @@
        }
  
  #ifndef UNIV_HOTBACKUP
@@ -276,7 +271,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
                fprintf(stderr,
                        "InnoDB: Error: tablespace id %lu in file %s"
                        " is not sensible\n",
-@@ -3843,7 +3853,7 @@
+@@ -4185,7 +4195,7 @@
                goto func_exit;
        }
  #else
@@ -285,7 +280,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
                char*   new_path;
  
                fprintf(stderr,
-@@ -4664,7 +4674,7 @@
+@@ -5006,7 +5016,7 @@
        }
  
        if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE
@@ -294,7 +289,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
                /* The node is in the LRU list, remove it */
  
                ut_a(UT_LIST_GET_LEN(system->LRU) > 0);
-@@ -4710,7 +4720,7 @@
+@@ -5052,7 +5062,7 @@
        }
  
        if (node->n_pending == 0 && node->space->purpose == FIL_TABLESPACE
@@ -303,7 +298,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
                /* The node must be put back to the LRU list */
                UT_LIST_ADD_FIRST(LRU, system->LRU, node);
        }
-@@ -5318,7 +5328,7 @@
+@@ -5663,7 +5673,7 @@
                ut_a(fil_node->n_pending == 0);
                ut_a(fil_node->open);
                ut_a(fil_node->space->purpose == FIL_TABLESPACE);
@@ -312,9 +307,8 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
  
                fil_node = UT_LIST_GET_NEXT(LRU, fil_node);
        }
-diff -ruN a/storage/innobase/fsp/fsp0fsp.c b/storage/innobase/fsp/fsp0fsp.c
---- a/storage/innobase/fsp/fsp0fsp.c   2010-11-03 07:01:13.000000000 +0900
-+++ b/storage/innobase/fsp/fsp0fsp.c   2010-12-04 15:35:58.632513243 +0900
+--- a/storage/innobase/fsp/fsp0fsp.c
++++ b/storage/innobase/fsp/fsp0fsp.c
 @@ -48,7 +48,7 @@
  # include "log0log.h"
  #endif /* UNIV_HOTBACKUP */
@@ -322,9 +316,9 @@ diff -ruN a/storage/innobase/fsp/fsp0fsp.c b/storage/innobase/fsp/fsp0fsp.c
 -
 +#include "trx0sys.h"
  
- #define FSP_HEADER_OFFSET     FIL_PAGE_DATA   /* Offset of the space header
-                                               within a file page */
-@@ -999,10 +999,10 @@
+ /*                    FILE SEGMENT INODE
+                       ==================
+@@ -938,10 +938,10 @@
        flst_init(header + FSP_SEG_INODES_FREE, mtr);
  
        mlog_write_ull(header + FSP_SEG_ID, 1, mtr);
@@ -337,9 +331,8 @@ diff -ruN a/storage/innobase/fsp/fsp0fsp.c b/storage/innobase/fsp/fsp0fsp.c
                           dict_ind_redundant, mtr);
        } else {
                fsp_fill_free_list(TRUE, space, header, mtr);
-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:35:29.153514047 +0900
-+++ b/storage/innobase/handler/ha_innodb.cc    2010-12-04 15:35:58.636549909 +0900
+--- a/storage/innobase/handler/ha_innodb.cc
++++ b/storage/innobase/handler/ha_innodb.cc
 @@ -163,6 +163,7 @@
  static char*  innobase_log_group_home_dir             = NULL;
  static char*  innobase_file_format_name               = NULL;
@@ -348,7 +341,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  
  /* The highest file format being used in the database. The value can be
  set by user, however, it will be adjusted to the newer file format if
-@@ -2445,6 +2446,8 @@
+@@ -2508,6 +2509,8 @@
                goto error;
        }
  
@@ -357,7 +350,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        srv_use_sys_stats_table = (ibool) innobase_use_sys_stats_table;
  
        /* -------------- Log files ---------------------------*/
-@@ -11621,6 +11624,11 @@
+@@ -11771,6 +11774,11 @@
    "Path to individual files and their sizes.",
    NULL, NULL, NULL);
  
@@ -369,7 +362,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static MYSQL_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode,
    PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
    "The AUTOINC lock modes supported by InnoDB:               "
-@@ -11788,6 +11796,7 @@
+@@ -11990,6 +11998,7 @@
    MYSQL_SYSVAR(commit_concurrency),
    MYSQL_SYSVAR(concurrency_tickets),
    MYSQL_SYSVAR(data_file_path),
@@ -377,9 +370,8 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
    MYSQL_SYSVAR(data_home_dir),
    MYSQL_SYSVAR(doublewrite),
    MYSQL_SYSVAR(recovery_stats),
-diff -ruN a/storage/innobase/include/mtr0log.ic b/storage/innobase/include/mtr0log.ic
---- a/storage/innobase/include/mtr0log.ic      2010-11-03 07:01:13.000000000 +0900
-+++ b/storage/innobase/include/mtr0log.ic      2010-12-04 15:35:58.644607059 +0900
+--- a/storage/innobase/include/mtr0log.ic
++++ b/storage/innobase/include/mtr0log.ic
 @@ -27,8 +27,8 @@
  #include "ut0lst.h"
  #include "buf0buf.h"
@@ -400,10 +392,9 @@ diff -ruN a/storage/innobase/include/mtr0log.ic b/storage/innobase/include/mtr0l
            && offset >= FSP_EXTENT_SIZE && offset < 3 * FSP_EXTENT_SIZE) {
                if (trx_doublewrite_buf_is_being_created) {
                        /* Do nothing: we only come to this branch in an
-diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
---- a/storage/innobase/include/srv0srv.h       2010-12-04 15:35:29.177480351 +0900
-+++ b/storage/innobase/include/srv0srv.h       2010-12-04 15:35:58.646556250 +0900
-@@ -132,6 +132,8 @@
+--- a/storage/innobase/include/srv0srv.h
++++ b/storage/innobase/include/srv0srv.h
+@@ -129,6 +129,8 @@
  extern ulint* srv_data_file_sizes;
  extern ulint* srv_data_file_is_raw_partition;
  
@@ -412,9 +403,8 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
  extern ibool  srv_recovery_stats;
  
  extern ibool  srv_auto_extend_last_data_file;
-diff -ruN a/storage/innobase/include/srv0start.h b/storage/innobase/include/srv0start.h
---- a/storage/innobase/include/srv0start.h     2010-11-03 07:01:13.000000000 +0900
-+++ b/storage/innobase/include/srv0start.h     2010-12-08 17:15:07.602605797 +0900
+--- a/storage/innobase/include/srv0start.h
++++ b/storage/innobase/include/srv0start.h
 @@ -127,4 +127,7 @@
  /** Log 'spaces' have id's >= this */
  #define SRV_LOG_SPACE_FIRST_ID                0xFFFFFFF0UL
@@ -423,9 +413,8 @@ diff -ruN a/storage/innobase/include/srv0start.h b/storage/innobase/include/srv0
 +#define SRV_EXTRA_SYS_SPACE_FIRST_ID  0xFFFFFFE0UL
 +
  #endif
-diff -ruN a/storage/innobase/include/trx0sys.h b/storage/innobase/include/trx0sys.h
---- a/storage/innobase/include/trx0sys.h       2010-12-03 15:41:52.047049291 +0900
-+++ b/storage/innobase/include/trx0sys.h       2010-12-04 15:35:58.647551222 +0900
+--- a/storage/innobase/include/trx0sys.h
++++ b/storage/innobase/include/trx0sys.h
 @@ -125,6 +125,22 @@
  /*=============*/
        ulint   space,  /*!< in: space */
@@ -463,7 +452,7 @@ diff -ruN a/storage/innobase/include/trx0sys.h b/storage/innobase/include/trx0sy
  /****************************************************************//**
  Looks for a free slot for a rollback segment in the trx system file copy.
  @return       slot index or ULINT_UNDEFINED if not found */
-@@ -442,6 +465,8 @@
+@@ -453,6 +476,8 @@
  
  /* Space id and page no where the trx system file copy resides */
  #define       TRX_SYS_SPACE   0       /* the SYSTEM tablespace */
@@ -472,9 +461,8 @@ diff -ruN a/storage/innobase/include/trx0sys.h b/storage/innobase/include/trx0sy
  #include "fsp0fsp.h"
  #define       TRX_SYS_PAGE_NO FSP_TRX_SYS_PAGE_NO
  
-diff -ruN a/storage/innobase/include/trx0sys.ic b/storage/innobase/include/trx0sys.ic
---- a/storage/innobase/include/trx0sys.ic      2010-11-03 07:01:13.000000000 +0900
-+++ b/storage/innobase/include/trx0sys.ic      2010-12-04 15:35:58.649473284 +0900
+--- a/storage/innobase/include/trx0sys.ic
++++ b/storage/innobase/include/trx0sys.ic
 @@ -71,6 +71,40 @@
  }
  
@@ -516,10 +504,9 @@ diff -ruN a/storage/innobase/include/trx0sys.ic b/storage/innobase/include/trx0s
  Gets the pointer in the nth slot of the rseg array.
  @return       pointer to rseg object, NULL if slot not in use */
  UNIV_INLINE
-diff -ruN a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c
---- a/storage/innobase/row/row0mysql.c 2010-12-03 17:30:16.334989510 +0900
-+++ b/storage/innobase/row/row0mysql.c 2010-12-04 15:35:58.652496484 +0900
-@@ -3449,7 +3449,7 @@
+--- a/storage/innobase/row/row0mysql.c
++++ b/storage/innobase/row/row0mysql.c
+@@ -3436,7 +3436,7 @@
                /* Do not drop possible .ibd tablespace if something went
                wrong: we do not want to delete valuable data of the user */
  
@@ -528,10 +515,9 @@ diff -ruN a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c
                        if (!fil_space_for_table_exists_in_mem(space_id,
                                                               name_or_path,
                                                               is_temp, FALSE,
-diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
---- a/storage/innobase/srv/srv0srv.c   2010-12-04 15:35:29.180483212 +0900
-+++ b/storage/innobase/srv/srv0srv.c   2010-12-04 15:35:58.656550107 +0900
-@@ -170,6 +170,8 @@
+--- a/storage/innobase/srv/srv0srv.c
++++ b/storage/innobase/srv/srv0srv.c
+@@ -163,6 +163,8 @@
  /* size in database pages */
  UNIV_INTERN ulint*    srv_data_file_sizes = NULL;
  
@@ -540,9 +526,8 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  UNIV_INTERN ibool     srv_recovery_stats = FALSE;
  
  /* if TRUE, then we auto-extend the last data file */
-diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
---- a/storage/innobase/srv/srv0start.c 2010-12-04 15:35:29.183481330 +0900
-+++ b/storage/innobase/srv/srv0start.c 2010-12-04 15:35:58.661550545 +0900
+--- a/storage/innobase/srv/srv0start.c
++++ b/storage/innobase/srv/srv0start.c
 @@ -715,6 +715,7 @@
  /*======================*/
        ibool*          create_new_db,  /*!< out: TRUE if new database should be
@@ -551,7 +536,7 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
  #ifdef UNIV_LOG_ARCHIVE
        ulint*          min_arch_log_no,/*!< out: min of archived log
                                        numbers in data files */
-@@ -747,6 +748,7 @@
+@@ -748,6 +749,7 @@
        *sum_of_new_sizes = 0;
  
        *create_new_db = FALSE;
@@ -559,7 +544,7 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
  
        srv_normalize_path_for_win(srv_data_home);
  
-@@ -984,6 +986,142 @@
+@@ -1004,6 +1006,142 @@
                                srv_data_file_is_raw_partition[i] != 0);
        }
  
@@ -637,8 +622,8 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
 +                                      (ulong) TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * 9);
 +                      }
 +
-+                      fil_read_flushed_lsn_and_arch_log_no(
-+                              files[i], one_opened,
++                      fil_read_first_page(
++                              files[i], one_opened, &flags,
 +#ifdef UNIV_LOG_ARCHIVE
 +                              min_arch_log_no, max_arch_log_no,
 +#endif /* UNIV_LOG_ARCHIVE */
@@ -702,7 +687,7 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
        return(DB_SUCCESS);
  }
  
-@@ -997,6 +1135,7 @@
+@@ -1017,6 +1155,7 @@
  /*====================================*/
  {
        ibool           create_new_db;
@@ -710,7 +695,7 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
        ibool           log_file_created;
        ibool           log_created     = FALSE;
        ibool           log_opened      = FALSE;
-@@ -1462,6 +1601,7 @@
+@@ -1482,6 +1621,7 @@
        }
  
        err = open_or_create_data_files(&create_new_db,
@@ -718,7 +703,7 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
  #ifdef UNIV_LOG_ARCHIVE
                                        &min_arch_log_no, &max_arch_log_no,
  #endif /* UNIV_LOG_ARCHIVE */
-@@ -1629,6 +1769,14 @@
+@@ -1649,6 +1789,14 @@
                after the double write buffer has been created. */
                trx_sys_create();
  
@@ -733,7 +718,7 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
                dict_create();
  
                srv_startup_is_before_trx_rollback_phase = FALSE;
-@@ -1662,6 +1810,13 @@
+@@ -1682,6 +1830,13 @@
                recv_recovery_from_archive_finish();
  #endif /* UNIV_LOG_ARCHIVE */
        } else {
@@ -747,7 +732,7 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
  
                /* Check if we support the max format that is stamped
                on the system tablespace. 
-@@ -1748,6 +1903,17 @@
+@@ -1768,6 +1923,17 @@
                we have finished the recovery process so that the
                image of TRX_SYS_PAGE_NO is not stale. */
                trx_sys_file_format_tag_init();
@@ -765,10 +750,9 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
        }
  
        if (!create_new_db && sum_of_new_sizes > 0) {
-diff -ruN a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c
---- a/storage/innobase/trx/trx0sys.c   2010-12-03 17:32:15.651024019 +0900
-+++ b/storage/innobase/trx/trx0sys.c   2010-12-04 15:35:58.664550291 +0900
-@@ -414,6 +414,152 @@
+--- a/storage/innobase/trx/trx0sys.c
++++ b/storage/innobase/trx/trx0sys.c
+@@ -415,6 +415,152 @@
  
                goto start_again;
        }
@@ -921,7 +905,7 @@ diff -ruN a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c
  }
  
  /****************************************************************//**
-@@ -437,10 +583,19 @@
+@@ -438,10 +584,19 @@
        ulint   source_page_no;
        byte*   page;
        byte*   doublewrite;
@@ -941,7 +925,7 @@ diff -ruN a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c
        /* We do the file i/o past the buffer pool */
  
        unaligned_read_buf = ut_malloc(2 * UNIV_PAGE_SIZE);
-@@ -449,7 +604,7 @@
+@@ -450,7 +605,7 @@
        /* Read the trx sys header to check if we are using the doublewrite
        buffer */
  
@@ -950,7 +934,7 @@ diff -ruN a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c
               UNIV_PAGE_SIZE, read_buf, NULL);
        doublewrite = read_buf + TRX_SYS_DOUBLEWRITE;
  
-@@ -487,10 +642,10 @@
+@@ -488,10 +643,10 @@
  
        /* Read the pages from the doublewrite buffer to memory */
  
@@ -963,7 +947,7 @@ diff -ruN a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c
               TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * UNIV_PAGE_SIZE,
               buf + TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * UNIV_PAGE_SIZE,
               NULL);
-@@ -546,7 +701,8 @@
+@@ -547,7 +702,8 @@
                                " doublewrite buf.\n",
                                (ulong) space_id, (ulong) page_no, (ulong) i);
  
@@ -973,7 +957,7 @@ diff -ruN a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c
                           && ((page_no >= block1
                                && page_no
                                < block1 + TRX_SYS_DOUBLEWRITE_BLOCK_SIZE)
-@@ -1015,6 +1171,83 @@
+@@ -1016,6 +1172,83 @@
  }
  
  /*****************************************************************//**
@@ -1057,7 +1041,7 @@ diff -ruN a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c
  Creates and initializes the central memory structures for the transaction
  system. This is called when the database is started. */
  UNIV_INTERN
-@@ -1386,6 +1619,26 @@
+@@ -1387,6 +1620,26 @@
        /* Does nothing at the moment */
  }
  
@@ -1084,3 +1068,19 @@ diff -ruN a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c
  /*********************************************************************
  Creates the rollback segments */
  UNIV_INTERN
+--- /dev/null
++++ b/mysql-test/r/percona_innodb_doublewrite_file.result
+@@ -0,0 +1,4 @@
++show variables like 'innodb_doublewrite%';
++Variable_name Value
++innodb_doublewrite    ON
++innodb_doublewrite_file       ib_doublewrite
+--- /dev/null
++++ b/mysql-test/t/percona_innodb_doublewrite_file-master.opt
+@@ -0,0 +1 @@
++--innodb_doublewrite_file=ib_doublewrite
+--- /dev/null
++++ b/mysql-test/t/percona_innodb_doublewrite_file.test
+@@ -0,0 +1,2 @@
++--source include/have_innodb.inc
++show variables like 'innodb_doublewrite%';
This page took 0.053867 seconds and 4 git commands to generate.