~gl-az/percona-server/5.5.18_19_merge

« back to all changes in this revision

Viewing changes to patches/innodb_expand_import.patch

  • Committer: Stewart Smith
  • Date: 2011-11-17 00:21:45 UTC
  • mfrom: (190.2.9 merge)
  • Revision ID: stewart@flamingspork.com-20111117002145-6180fuj12147yk9i
merge 5.5.17 port

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
# should be done or reviewed by the maintainer!
8
8
--- a/storage/innobase/btr/btr0btr.c
9
9
+++ b/storage/innobase/btr/btr0btr.c
10
 
@@ -837,7 +837,7 @@
 
10
@@ -838,7 +838,7 @@
11
11
 /**************************************************************//**
12
12
 Creates a new index page (not the root, and also not
13
13
 used in page reorganization).  @see btr_page_empty(). */
16
16
 void
17
17
 btr_page_create(
18
18
 /*============*/
19
 
@@ -1707,7 +1707,7 @@
 
19
@@ -1712,7 +1712,7 @@
20
20
 #ifndef UNIV_HOTBACKUP
21
21
 /*************************************************************//**
22
22
 Empties an index page.  @see btr_page_create(). */
25
25
 void
26
26
 btr_page_empty(
27
27
 /*===========*/
28
 
@@ -2269,7 +2269,7 @@
 
28
@@ -2274,7 +2274,7 @@
29
29
 /**************************************************************//**
30
30
 Attaches the halves of an index page on the appropriate level in an
31
31
 index tree. */
865
865
 #endif /* !UNIV_HOTBACKUP */
866
866
--- a/storage/innobase/handler/ha_innodb.cc
867
867
+++ b/storage/innobase/handler/ha_innodb.cc
868
 
@@ -7371,6 +7371,14 @@
 
868
@@ -7423,6 +7423,14 @@
869
869
                err = row_discard_tablespace_for_mysql(dict_table->name, trx);
870
870
        } else {
871
871
                err = row_import_tablespace_for_mysql(dict_table->name, trx);
880
880
        }
881
881
 
882
882
        err = convert_error_code_to_mysql(err, dict_table->flags, NULL);
883
 
@@ -11660,6 +11668,11 @@
 
883
@@ -11772,6 +11780,11 @@
884
884
   "Choose method of innodb_adaptive_flushing. (native, [estimate], keep_average)",
885
885
   NULL, innodb_adaptive_flushing_method_update, 1, &adaptive_flushing_method_typelib);
886
886
 
892
892
 static MYSQL_SYSVAR_ULONG(dict_size_limit, srv_dict_size_limit,
893
893
   PLUGIN_VAR_RQCMDARG,
894
894
   "Limit the allocated memory for dictionary cache. (0: unlimited)",
895
 
@@ -11733,6 +11746,7 @@
 
895
@@ -11846,6 +11859,7 @@
896
896
   MYSQL_SYSVAR(flush_neighbor_pages),
897
897
   MYSQL_SYSVAR(read_ahead),
898
898
   MYSQL_SYSVAR(adaptive_flushing_method),
902
902
   MYSQL_SYSVAR(use_native_aio),
903
903
--- a/storage/innobase/include/btr0btr.h
904
904
+++ b/storage/innobase/include/btr0btr.h
905
 
@@ -219,6 +219,17 @@
 
905
@@ -238,6 +238,17 @@
906
906
 @return the uncompressed page frame */
907
 
 # define btr_page_get(space,zip_size,page_no,mode,mtr) \
908
 
        buf_block_get_frame(btr_block_get(space,zip_size,page_no,mode,mtr))
 
907
 # define btr_page_get(space,zip_size,page_no,mode,idx,mtr)             \
 
908
        buf_block_get_frame(btr_block_get(space,zip_size,page_no,mode,idx,mtr))
909
909
+/**************************************************************//**
910
910
+Sets the index id field of a page. */
911
911
+UNIV_INLINE
920
920
 #endif /* !UNIV_HOTBACKUP */
921
921
 /**************************************************************//**
922
922
 Gets the index id field of a page.
923
 
@@ -256,6 +267,17 @@
 
923
@@ -275,6 +286,17 @@
924
924
        const page_t*   page,   /*!< in: index page */
925
925
        mtr_t*          mtr);   /*!< in: mini-transaction handle */
926
926
 /********************************************************//**
938
938
 Gets the previous index page number.
939
939
 @return        prev page number */
940
940
 UNIV_INLINE
941
 
@@ -264,6 +286,17 @@
 
941
@@ -283,6 +305,17 @@
942
942
 /*==============*/
943
943
        const page_t*   page,   /*!< in: index page */
944
944
        mtr_t*          mtr);   /*!< in: mini-transaction handle */
956
956
 /*************************************************************//**
957
957
 Gets pointer to the previous user record in the tree. It is assumed
958
958
 that the caller has appropriate latches on the page and its neighbor.
959
 
@@ -309,6 +342,18 @@
 
959
@@ -328,6 +361,18 @@
960
960
 /*===========================*/
961
961
        const rec_t*    rec,    /*!< in: node pointer record */
962
962
        const ulint*    offsets);/*!< in: array returned by rec_get_offsets() */
975
975
 /************************************************************//**
976
976
 Creates the root node for a new index tree.
977
977
 @return        page number of the created root, FIL_NULL if did not succeed */
978
 
@@ -379,6 +424,17 @@
 
978
@@ -397,6 +442,17 @@
979
979
        dict_index_t*   index,  /*!< in: record descriptor */
980
980
        mtr_t*          mtr);   /*!< in: mtr */
981
981
 /*************************************************************//**
993
993
 Decides if the page should be split at the convergence point of
994
994
 inserts converging to left.
995
995
 @return        TRUE if split recommended */
996
 
@@ -437,6 +493,20 @@
 
996
@@ -455,6 +511,20 @@
997
997
 # define btr_insert_on_non_leaf_level(i,l,t,m)                         \
998
998
        btr_insert_on_non_leaf_level_func(i,l,t,__FILE__,__LINE__,m)
999
999
 #endif /* !UNIV_HOTBACKUP */
1006
1006
+/*==================*/
1007
1007
+       dict_index_t*   index,          /*!< in: the index tree */
1008
1008
+       buf_block_t*    block,          /*!< in/out: page to be split */
1009
 
+       const rec_t*    split_rec,      /*!< in: first record on upper
 
1009
+       rec_t*          split_rec,      /*!< in: first record on upper
1010
1010
+                                       half page */
1011
1011
+       buf_block_t*    new_block,      /*!< in/out: the new half page */
1012
1012
+       ulint           direction,      /*!< in: FSP_UP or FSP_DOWN */
1016
1016
 UNIV_INTERN
1017
1017
--- a/storage/innobase/include/srv0srv.h
1018
1018
+++ b/storage/innobase/include/srv0srv.h
1019
 
@@ -230,6 +230,8 @@
 
1019
@@ -234,6 +234,8 @@
1020
1020
 extern ulint   srv_read_ahead;
1021
1021
 extern ulint   srv_adaptive_flushing_method;
1022
1022
 
1027
1027
 
1028
1028
--- a/storage/innobase/row/row0mysql.c
1029
1029
+++ b/storage/innobase/row/row0mysql.c
1030
 
@@ -2546,6 +2546,11 @@
 
1030
@@ -2547,6 +2547,11 @@
1031
1031
 
1032
1032
        current_lsn = log_get_lsn();
1033
1033
 
1039
1039
        /* It is possible, though very improbable, that the lsn's in the
1040
1040
        tablespace to be imported have risen above the current system lsn, if
1041
1041
        a lengthy purge, ibuf merge, or rollback was performed on a backup
1042
 
@@ -2657,6 +2662,11 @@
 
1042
@@ -2658,6 +2663,11 @@
1043
1043
 
1044
1044
        trx->op_info = "";
1045
1045