~tsarev/percona-server/bug721176

« back to all changes in this revision

Viewing changes to patches/innodb_expand_import.patch

  • Committer: Stewart Smith
  • Date: 2011-08-16 02:52:57 UTC
  • mfrom: (148.1.5 5.5.15-porting)
  • Revision ID: stewart@flamingspork.com-20110816025257-0e7elba7i8tlrf50
merge 5.5.15 rebase

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
#!!! notice !!!
6
6
# Any small change to this file in the main branch
7
7
# should be done or reviewed by the maintainer!
8
 
diff -ruN a/storage/innobase/btr/btr0btr.c b/storage/innobase/btr/btr0btr.c
9
 
--- a/storage/innobase/btr/btr0btr.c    2011-04-11 19:44:03.000000000 +0900
10
 
+++ b/storage/innobase/btr/btr0btr.c    2011-05-24 20:30:12.455852287 +0900
 
8
--- a/storage/innobase/btr/btr0btr.c
 
9
+++ b/storage/innobase/btr/btr0btr.c
11
10
@@ -837,7 +837,7 @@
12
11
 /**************************************************************//**
13
12
 Creates a new index page (not the root, and also not
35
34
 void
36
35
 btr_attach_half_pages(
37
36
 /*==================*/
38
 
diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
39
 
--- a/storage/innobase/fil/fil0fil.c    2010-12-03 15:09:51.274957577 +0900
40
 
+++ b/storage/innobase/fil/fil0fil.c    2010-12-03 15:52:23.553986552 +0900
 
37
--- a/storage/innobase/fil/fil0fil.c
 
38
+++ b/storage/innobase/fil/fil0fil.c
41
39
@@ -40,6 +40,14 @@
42
40
 #include "dict0dict.h"
43
41
 #include "page0page.h"
447
445
+                                                                               ULINT_UNDEFINED, &heap);
448
446
+                                                               n_fields = rec_offs_n_fields(offsets);
449
447
+                                                               if (!offset) {
450
 
+                                                                       offset = row_get_trx_id_offset(rec, index, offsets);
 
448
+                                                                       offset = row_get_trx_id_offset(index, offsets);
451
449
+                                                               }
452
450
+                                                               trx_write_trx_id(rec + offset, 1);
453
451
+
698
696
+                                               ULINT_UNDEFINED, &heap);
699
697
+                               n_fields = rec_offs_n_fields(offsets);
700
698
+                               if (!offset) {
701
 
+                                       offset = row_get_trx_id_offset(rec, index, offsets);
 
699
+                                       offset = row_get_trx_id_offset(index, offsets);
702
700
+                               }
703
701
+                               trx_write_trx_id(rec + offset, 1);
704
702
+
865
863
        return(success);
866
864
 }
867
865
 #endif /* !UNIV_HOTBACKUP */
868
 
diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
869
 
--- a/storage/innobase/handler/ha_innodb.cc     2010-12-03 15:49:59.195023983 +0900
870
 
+++ b/storage/innobase/handler/ha_innodb.cc     2010-12-03 15:52:23.555957062 +0900
871
 
@@ -7389,6 +7389,14 @@
 
866
--- a/storage/innobase/handler/ha_innodb.cc
 
867
+++ b/storage/innobase/handler/ha_innodb.cc
 
868
@@ -7388,6 +7388,14 @@
872
869
                err = row_discard_tablespace_for_mysql(dict_table->name, trx);
873
870
        } else {
874
871
                err = row_import_tablespace_for_mysql(dict_table->name, trx);
883
880
        }
884
881
 
885
882
        err = convert_error_code_to_mysql(err, dict_table->flags, NULL);
886
 
@@ -11666,6 +11674,11 @@
 
883
@@ -11665,6 +11673,11 @@
887
884
   "Choose method of innodb_adaptive_flushing. (native, [estimate], keep_average)",
888
885
   NULL, innodb_adaptive_flushing_method_update, 1, &adaptive_flushing_method_typelib);
889
886
 
895
892
 static MYSQL_SYSVAR_ULONG(dict_size_limit, srv_dict_size_limit,
896
893
   PLUGIN_VAR_RQCMDARG,
897
894
   "Limit the allocated memory for dictionary cache. (0: unlimited)",
898
 
@@ -11739,6 +11752,7 @@
 
895
@@ -11738,6 +11751,7 @@
899
896
   MYSQL_SYSVAR(flush_neighbor_pages),
900
897
   MYSQL_SYSVAR(read_ahead),
901
898
   MYSQL_SYSVAR(adaptive_flushing_method),
903
900
   MYSQL_SYSVAR(dict_size_limit),
904
901
   MYSQL_SYSVAR(use_sys_malloc),
905
902
   MYSQL_SYSVAR(use_native_aio),
906
 
diff -ruN a/storage/innobase/include/btr0btr.h b/storage/innobase/include/btr0btr.h
907
 
--- a/storage/innobase/include/btr0btr.h        2011-04-11 19:44:03.000000000 +0900
908
 
+++ b/storage/innobase/include/btr0btr.h        2011-05-24 20:30:12.459853343 +0900
 
903
--- a/storage/innobase/include/btr0btr.h
 
904
+++ b/storage/innobase/include/btr0btr.h
909
905
@@ -219,6 +219,17 @@
910
906
 @return the uncompressed page frame */
911
907
 # define btr_page_get(space,zip_size,page_no,mode,mtr) \
1010
1006
+/*==================*/
1011
1007
+       dict_index_t*   index,          /*!< in: the index tree */
1012
1008
+       buf_block_t*    block,          /*!< in/out: page to be split */
1013
 
+       rec_t*          split_rec,      /*!< in: first record on upper
 
1009
+       const rec_t*    split_rec,      /*!< in: first record on upper
1014
1010
+                                       half page */
1015
1011
+       buf_block_t*    new_block,      /*!< in/out: the new half page */
1016
1012
+       ulint           direction,      /*!< in: FSP_UP or FSP_DOWN */
1018
1014
 /****************************************************************//**
1019
1015
 Sets a record as the predefined minimum record. */
1020
1016
 UNIV_INTERN
1021
 
diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
1022
 
--- a/storage/innobase/include/srv0srv.h        2010-12-03 15:48:03.077954270 +0900
1023
 
+++ b/storage/innobase/include/srv0srv.h        2010-12-03 15:52:23.561986996 +0900
 
1017
--- a/storage/innobase/include/srv0srv.h
 
1018
+++ b/storage/innobase/include/srv0srv.h
1024
1019
@@ -229,6 +229,8 @@
1025
1020
 extern ulint   srv_read_ahead;
1026
1021
 extern ulint   srv_adaptive_flushing_method;
1030
1025
 extern ulint   srv_dict_size_limit;
1031
1026
 /*-------------------------------------------*/
1032
1027
 
1033
 
diff -ruN a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c
1034
 
--- a/storage/innobase/row/row0mysql.c  2011-04-11 19:44:03.000000000 +0900
1035
 
+++ b/storage/innobase/row/row0mysql.c  2011-06-06 11:53:18.395764565 +0900
1036
 
@@ -2573,6 +2573,11 @@
 
1028
--- a/storage/innobase/row/row0mysql.c
 
1029
+++ b/storage/innobase/row/row0mysql.c
 
1030
@@ -2546,6 +2546,11 @@
1037
1031
 
1038
1032
        current_lsn = log_get_lsn();
1039
1033
 
1045
1039
        /* It is possible, though very improbable, that the lsn's in the
1046
1040
        tablespace to be imported have risen above the current system lsn, if
1047
1041
        a lengthy purge, ibuf merge, or rollback was performed on a backup
1048
 
@@ -2684,6 +2689,11 @@
 
1042
@@ -2657,6 +2662,11 @@
1049
1043
 
1050
1044
        trx->op_info = "";
1051
1045
 
1057
1051
        return((int) err);
1058
1052
 }
1059
1053
 
1060
 
diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
1061
 
--- a/storage/innobase/srv/srv0srv.c    2010-12-03 15:49:59.230956118 +0900
1062
 
+++ b/storage/innobase/srv/srv0srv.c    2010-12-03 15:52:23.562954411 +0900
 
1054
--- a/storage/innobase/srv/srv0srv.c
 
1055
+++ b/storage/innobase/srv/srv0srv.c
1063
1056
@@ -416,6 +416,8 @@
1064
1057
 UNIV_INTERN ulint      srv_read_ahead = 3; /* 1: random  2: linear  3: Both */
1065
1058
 UNIV_INTERN ulint      srv_adaptive_flushing_method = 0; /* 0: native  1: estimate  2: keep_average */