]> git.pld-linux.org Git - packages/mysql.git/blobdiff - innodb_expand_import.patch
- up to 5.5.9
[packages/mysql.git] / innodb_expand_import.patch
index f3f77e7a5deb616cdd64ca125d2c79e751dcc8ac..f380182b9ac260b747b957b356943fad4a5adb58 100644 (file)
@@ -21,7 +21,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
  #ifndef UNIV_HOTBACKUP
  # include "buf0lru.h"
  # include "ibuf0ibuf.h"
-@@ -3050,7 +3056,7 @@
+@@ -3078,7 +3084,7 @@
  
        file = os_file_create_simple_no_error_handling(
                innodb_file_data_key, filepath, OS_FILE_OPEN,
@@ -30,12 +30,12 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
        if (!success) {
                /* The following call prints an error message */
                os_file_get_last_error(TRUE);
-@@ -3097,6 +3103,466 @@
+@@ -3125,6 +3131,466 @@
        space_id = fsp_header_get_space_id(page);
        space_flags = fsp_header_get_flags(page);
  
-+      if (srv_expand_import
-+          && (space_id != id || space_flags != (flags & ~(~0 << DICT_TF_BITS)))) {
++      if (srv_expand_import) {
++
 +              ibool           file_is_corrupt = FALSE;
 +              byte*           buf3;
 +              byte*           descr_page;
@@ -130,27 +130,27 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
 +              info_file = os_file_create_simple_no_error_handling(innodb_file_data_key,
 +                              info_file_path, OS_FILE_OPEN, OS_FILE_READ_ONLY, &success);
 +              if (!success) {
-+                      fprintf(stderr, "InnoDB: cannot open %s\n", info_file_path);
++                      fprintf(stderr, "InnoDB: Cannot open the file: %s\n", info_file_path);
 +                      file_is_corrupt = TRUE;
 +                      goto skip_info;
 +              }
 +              success = os_file_read(info_file, page, 0, 0, UNIV_PAGE_SIZE);
 +              if (!success) {
-+                      fprintf(stderr, "InnoDB: cannot read %s\n", info_file_path);
++                      fprintf(stderr, "InnoDB: Cannot read the file: %s\n", info_file_path);
 +                      file_is_corrupt = TRUE;
 +                      goto skip_info;
 +              }
 +              if (mach_read_from_4(page) != 0x78706f72UL
 +                  || mach_read_from_4(page + 4) != 0x74696e66UL) {
-+                      fprintf(stderr, "InnoDB: %s seems not to be a correct .exp file\n", info_file_path);
++                      fprintf(stderr, "InnoDB: %s seems to be an incorrect .exp file.\n", info_file_path);
 +                      file_is_corrupt = TRUE;
 +                      goto skip_info;
 +              }
 +
-+              fprintf(stderr, "InnoDB: import: extended import of %s is started.\n", name);
++              fprintf(stderr, "InnoDB: Import: The extended import of %s is being started.\n", name);
 +
 +              n_index = mach_read_from_4(page + 8);
-+              fprintf(stderr, "InnoDB: import: %lu indexes are detected.\n", (ulong)n_index);
++              fprintf(stderr, "InnoDB: Import: %lu indexes have been detected.\n", (ulong)n_index);
 +              for (i = 0; i < n_index; i++) {
 +                      new_id[i] =
 +                              dict_table_get_index_on_name(table,
@@ -452,8 +452,8 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
 +                      size = (ulint)
 +                      (size_bytes
 +                                      / dict_table_flags_to_zip_size(flags));
-+                      fprintf(stderr, "InnoDB: import: table %s seems to be in newer format."
-+                                      " It may not be able to treated for now.\n", name);
++                      fprintf(stderr, "InnoDB: Import: The table %s seems to be in a newer format."
++                                      " It may not be possible to process it.\n", name);
 +              }
 +              /* .exp file should be removed */
 +              success = os_file_delete(info_file_path);
@@ -481,10 +481,10 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
 +                            stderr);
 +                      ut_print_filename(stderr, filepath);
 +                      fprintf(stderr, " seems to be corrupt.\n"
-+                              "InnoDB: anyway, all not corrupt pages were tried to be converted to salvage.\n"
++                              "InnoDB: An attempt to convert and salvage all corrupt pages was not made.\n"
 +                              "InnoDB: ##### CAUTION #####\n"
-+                              "InnoDB: ## The .ibd must cause to crash InnoDB, though re-import would seem to be succeeded.\n"
-+                              "InnoDB: ## If you don't have knowledge about salvaging data from .ibd, you should not use the file.\n"
++                              "InnoDB: ## The .ibd file may cause InnoDB to crash, even though its re-import seems to have succeeded.\n"
++                              "InnoDB: ## If you don't know how to salvage data from a .ibd, you should not use the file.\n"
 +                              "InnoDB: ###################\n");
 +                      success = FALSE;
 +
@@ -500,7 +500,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
 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-03 15:49:59.195023983 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2010-12-03 15:52:23.555957062 +0900
-@@ -7330,6 +7330,14 @@
+@@ -7337,6 +7337,14 @@
                err = row_discard_tablespace_for_mysql(dict_table->name, trx);
        } else {
                err = row_import_tablespace_for_mysql(dict_table->name, trx);
@@ -515,9 +515,9 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        }
  
        err = convert_error_code_to_mysql(err, dict_table->flags, NULL);
-@@ -11545,6 +11553,11 @@
-   "Enable/Disable unsafe group commit when support_xa=OFF and use with binlog or other XA storage engine.",
-   NULL, NULL, 0, 0, 1, 0);
+@@ -11538,6 +11546,11 @@
+   "Choose method of innodb_adaptive_flushing. (native, [estimate], keep_average)",
+   NULL, innodb_adaptive_flushing_method_update, 1, &adaptive_flushing_method_typelib);
  
 +static MYSQL_SYSVAR_ULONG(expand_import, srv_expand_import,
 +  PLUGIN_VAR_RQCMDARG,
@@ -527,10 +527,10 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static MYSQL_SYSVAR_ULONG(extra_rsegments, srv_extra_rsegments,
    PLUGIN_VAR_RQCMDARG,
    "Number of extra user rollback segments which are used in a round-robin fashion.",
-@@ -11622,6 +11635,7 @@
+@@ -11614,6 +11627,7 @@
+   MYSQL_SYSVAR(flush_neighbor_pages),
    MYSQL_SYSVAR(read_ahead),
    MYSQL_SYSVAR(adaptive_flushing_method),
-   MYSQL_SYSVAR(enable_unsafe_group_commit),
 +  MYSQL_SYSVAR(expand_import),
    MYSQL_SYSVAR(extra_rsegments),
    MYSQL_SYSVAR(dict_size_limit),
@@ -550,7 +550,7 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
 diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 --- a/storage/innobase/srv/srv0srv.c   2010-12-03 15:49:59.230956118 +0900
 +++ b/storage/innobase/srv/srv0srv.c   2010-12-03 15:52:23.562954411 +0900
-@@ -413,6 +413,8 @@
+@@ -415,6 +415,8 @@
  UNIV_INTERN ulint     srv_read_ahead = 3; /* 1: random  2: linear  3: Both */
  UNIV_INTERN ulint     srv_adaptive_flushing_method = 0; /* 0: native  1: estimate  2: keep_average */
  
This page took 0.048186 seconds and 4 git commands to generate.