~tsarev/percona-server/bug721176_2

« back to all changes in this revision

Viewing changes to patches/innodb_stats.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/dict/dict0boot.c b/storage/innobase/dict/dict0boot.c
9
 
--- a/storage/innobase/dict/dict0boot.c 2010-12-03 15:48:03.034036843 +0900
10
 
+++ b/storage/innobase/dict/dict0boot.c 2010-12-03 17:19:24.835112632 +0900
 
8
--- a/storage/innobase/dict/dict0boot.c
 
9
+++ b/storage/innobase/dict/dict0boot.c
11
10
@@ -266,6 +266,29 @@
12
11
        /* Get the dictionary header */
13
12
        dict_hdr = dict_hdr_get(&mtr);
101
100
 
102
101
        mutex_exit(&(dict_sys->mutex));
103
102
 }
104
 
diff -ruN a/storage/innobase/dict/dict0crea.c b/storage/innobase/dict/dict0crea.c
105
 
--- a/storage/innobase/dict/dict0crea.c 2010-12-03 15:48:03.036081059 +0900
106
 
+++ b/storage/innobase/dict/dict0crea.c 2010-12-03 17:19:24.836964976 +0900
 
103
--- a/storage/innobase/dict/dict0crea.c
 
104
+++ b/storage/innobase/dict/dict0crea.c
107
105
@@ -508,6 +508,56 @@
108
106
 }
109
107
 
280
278
        }
281
279
 
282
280
        if (node->state == INDEX_CREATE_INDEX_TREE) {
283
 
@@ -1177,6 +1316,66 @@
284
 
                return(NULL);
285
 
        }
 
281
@@ -1183,6 +1322,66 @@
 
282
 }
286
283
 
287
 
+       thr->run_node = que_node_get_parent(node);
288
 
+
289
 
+       return(thr);
290
 
+}
291
 
+
292
 
+/****************************************************************//**
 
284
 /****************************************************************//**
293
285
+*/
294
286
+UNIV_INTERN
295
287
+que_thr_t*
344
336
+               return(NULL);
345
337
+       }
346
338
+
347
 
        thr->run_node = que_node_get_parent(node);
348
 
 
349
 
        return(thr);
350
 
diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c
351
 
--- a/storage/innobase/dict/dict0dict.c 2010-12-03 15:48:03.040222428 +0900
352
 
+++ b/storage/innobase/dict/dict0dict.c 2010-12-03 17:19:24.841947690 +0900
 
339
+       thr->run_node = que_node_get_parent(node);
 
340
+
 
341
+       return(thr);
 
342
+}
 
343
+
 
344
+/****************************************************************//**
 
345
 Creates the foreign key constraints system tables inside InnoDB
 
346
 at database creation or database start if they are not found or are
 
347
 not of the right form.
 
348
--- a/storage/innobase/dict/dict0dict.c
 
349
+++ b/storage/innobase/dict/dict0dict.c
353
350
@@ -755,7 +755,7 @@
354
351
                print an error message and return without doing
355
352
                anything. */
797
794
 
798
795
        dict_table_stats_lock(table, RW_S_LATCH);
799
796
 
800
 
diff -ruN a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.c
801
 
--- a/storage/innobase/dict/dict0load.c 2010-11-03 07:01:13.000000000 +0900
802
 
+++ b/storage/innobase/dict/dict0load.c 2010-12-03 17:19:24.845947460 +0900
 
797
--- a/storage/innobase/dict/dict0load.c
 
798
+++ b/storage/innobase/dict/dict0load.c
803
799
@@ -50,7 +50,8 @@
804
800
        "SYS_COLUMNS",
805
801
        "SYS_FIELDS",
901
897
 Determine the flags of a table described in SYS_TABLES.
902
898
 @return compressed page size in kilobytes; or 0 if the tablespace is
903
899
 uncompressed, ULINT_UNDEFINED on error */
904
 
diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
905
 
--- a/storage/innobase/handler/ha_innodb.cc     2010-12-03 17:17:03.665960357 +0900
906
 
+++ b/storage/innobase/handler/ha_innodb.cc     2010-12-03 17:22:21.586939783 +0900
 
900
--- a/storage/innobase/handler/ha_innodb.cc
 
901
+++ b/storage/innobase/handler/ha_innodb.cc
907
902
@@ -188,6 +188,7 @@
908
903
 static my_bool innobase_create_status_file             = FALSE;
909
904
 static my_bool innobase_stats_on_metadata              = TRUE;
912
907
 
913
908
 
914
909
 static char*   internal_innobase_data_file_path        = NULL;
915
 
@@ -2440,6 +2441,8 @@
 
910
@@ -2439,6 +2440,8 @@
916
911
                goto error;
917
912
        }
918
913
 
921
916
        /* -------------- Log files ---------------------------*/
922
917
 
923
918
        /* The default dir for log files is the datadir of MySQL */
924
 
@@ -5248,6 +5251,10 @@
 
919
@@ -5247,6 +5250,10 @@
925
920
 
926
921
        error = row_insert_for_mysql((byte*) record, prebuilt);
927
922
 
932
927
        /* Handle duplicate key errors */
933
928
        if (auto_inc_used) {
934
929
                ulint           err;
935
 
@@ -5584,6 +5591,10 @@
 
930
@@ -5583,6 +5590,10 @@
936
931
                }
937
932
        }
938
933
 
943
938
        innodb_srv_conc_exit_innodb(trx);
944
939
 
945
940
        error = convert_error_code_to_mysql(error,
946
 
@@ -5637,6 +5648,10 @@
 
941
@@ -5636,6 +5647,10 @@
947
942
 
948
943
        error = row_update_for_mysql((byte*) record, prebuilt);
949
944
 
954
949
        innodb_srv_conc_exit_innodb(trx);
955
950
 
956
951
        error = convert_error_code_to_mysql(
957
 
@@ -5955,6 +5970,11 @@
 
952
@@ -5954,6 +5969,11 @@
958
953
        case DB_SUCCESS:
959
954
                error = 0;
960
955
                table->status = 0;
966
961
                break;
967
962
        case DB_RECORD_NOT_FOUND:
968
963
                error = HA_ERR_KEY_NOT_FOUND;
969
 
@@ -6164,6 +6184,11 @@
 
964
@@ -6163,6 +6183,11 @@
970
965
        case DB_SUCCESS:
971
966
                error = 0;
972
967
                table->status = 0;
978
973
                break;
979
974
        case DB_RECORD_NOT_FOUND:
980
975
                error = HA_ERR_END_OF_FILE;
981
 
@@ -8106,11 +8131,35 @@
 
976
@@ -8105,11 +8130,35 @@
982
977
                        /* In sql_show we call with this flag: update
983
978
                        then statistics so that they are up-to-date */
984
979
 
1015
1010
 
1016
1011
                        prebuilt->trx->op_info = "returning various info to MySQL";
1017
1012
                }
1018
 
@@ -8188,7 +8237,7 @@
 
1013
@@ -8187,7 +8236,7 @@
1019
1014
                are asked by MySQL to avoid locking. Another reason to
1020
1015
                avoid the call is that it uses quite a lot of CPU.
1021
1016
                See Bug#38185. */
1024
1019
                    || !(flag & HA_STATUS_VARIABLE_EXTRA)) {
1025
1020
                        /* We do not update delete_length if no
1026
1021
                        locking is requested so the "old" value can
1027
 
@@ -11402,6 +11451,26 @@
 
1022
@@ -11401,6 +11450,26 @@
1028
1023
   "The number of index pages to sample when calculating statistics (default 8)",
1029
1024
   NULL, NULL, 8, 1, ~0ULL, 0);
1030
1025
 
1051
1046
 static MYSQL_SYSVAR_BOOL(adaptive_hash_index, btr_search_enabled,
1052
1047
   PLUGIN_VAR_OPCMDARG,
1053
1048
   "Enable InnoDB adaptive hash index (enabled by default).  "
1054
 
@@ -11728,6 +11797,9 @@
 
1049
@@ -11727,6 +11796,9 @@
1055
1050
   MYSQL_SYSVAR(recovery_update_relay_log),
1056
1051
   MYSQL_SYSVAR(rollback_on_timeout),
1057
1052
   MYSQL_SYSVAR(stats_on_metadata),
1061
1056
   MYSQL_SYSVAR(stats_sample_pages),
1062
1057
   MYSQL_SYSVAR(adaptive_hash_index),
1063
1058
   MYSQL_SYSVAR(stats_method),
1064
 
@@ -11797,7 +11869,10 @@
 
1059
@@ -11796,7 +11868,10 @@
1065
1060
 i_s_innodb_sys_columns,
1066
1061
 i_s_innodb_sys_fields,
1067
1062
 i_s_innodb_sys_foreign,
1073
1068
 mysql_declare_plugin_end;
1074
1069
 
1075
1070
 /** @brief Initialize the default value of innodb_commit_concurrency.
1076
 
diff -ruN a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc
1077
 
--- a/storage/innobase/handler/i_s.cc   2010-12-03 17:17:03.666956117 +0900
1078
 
+++ b/storage/innobase/handler/i_s.cc   2010-12-03 17:19:24.880964526 +0900
 
1071
--- a/storage/innobase/handler/i_s.cc
 
1072
+++ b/storage/innobase/handler/i_s.cc
1079
1073
@@ -49,6 +49,7 @@
1080
1074
 #include "trx0trx.h" /* for TRX_QUE_STATE_STR_MAX_LEN */
1081
1075
 #include "trx0rseg.h" /* for trx_rseg_struct */
1654
1648
+       STRUCT_FLD(system_vars, NULL),
1655
1649
+       STRUCT_FLD(__reserved1, NULL)
1656
1650
+};
1657
 
diff -ruN a/storage/innobase/handler/i_s.h b/storage/innobase/handler/i_s.h
1658
 
--- a/storage/innobase/handler/i_s.h    2010-12-03 17:17:03.668953884 +0900
1659
 
+++ b/storage/innobase/handler/i_s.h    2010-12-03 17:19:24.882947826 +0900
 
1651
--- a/storage/innobase/handler/i_s.h
 
1652
+++ b/storage/innobase/handler/i_s.h
1660
1653
@@ -43,5 +43,8 @@
1661
1654
 extern struct st_mysql_plugin   i_s_innodb_sys_foreign;
1662
1655
 extern struct st_mysql_plugin   i_s_innodb_sys_foreign_cols;
1666
1659
+extern struct st_mysql_plugin  i_s_innodb_index_stats;
1667
1660
 
1668
1661
 #endif /* i_s_h */
1669
 
diff -ruN a/storage/innobase/include/dict0boot.h b/storage/innobase/include/dict0boot.h
1670
 
--- a/storage/innobase/include/dict0boot.h      2010-11-03 07:01:13.000000000 +0900
1671
 
+++ b/storage/innobase/include/dict0boot.h      2010-12-03 17:19:24.885947372 +0900
 
1662
--- a/storage/innobase/include/dict0boot.h
 
1663
+++ b/storage/innobase/include/dict0boot.h
1672
1664
@@ -104,6 +104,7 @@
1673
1665
 #define DICT_COLUMNS_ID                2
1674
1666
 #define DICT_INDEXES_ID                3
1708
1700
 #ifndef UNIV_NONINL
1709
1701
 #include "dict0boot.ic"
1710
1702
 #endif
1711
 
diff -ruN a/storage/innobase/include/dict0crea.h b/storage/innobase/include/dict0crea.h
1712
 
--- a/storage/innobase/include/dict0crea.h      2010-11-03 07:01:13.000000000 +0900
1713
 
+++ b/storage/innobase/include/dict0crea.h      2010-12-03 17:19:24.886949643 +0900
 
1703
--- a/storage/innobase/include/dict0crea.h
 
1704
+++ b/storage/innobase/include/dict0crea.h
1714
1705
@@ -53,6 +53,14 @@
1715
1706
        dict_index_t*   index,  /*!< in: index to create, built as a memory data
1716
1707
                                structure */
1764
1755
 
1765
1756
 #ifndef UNIV_NONINL
1766
1757
 #include "dict0crea.ic"
1767
 
diff -ruN a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h
1768
 
--- a/storage/innobase/include/dict0dict.h      2010-12-03 15:48:03.073024387 +0900
1769
 
+++ b/storage/innobase/include/dict0dict.h      2010-12-03 17:19:24.888965622 +0900
 
1758
--- a/storage/innobase/include/dict0dict.h
 
1759
+++ b/storage/innobase/include/dict0dict.h
1770
1760
@@ -1109,10 +1109,18 @@
1771
1761
 dict_update_statistics(
1772
1762
 /*===================*/
1795
1785
 };
1796
1786
 #endif /* !UNIV_HOTBACKUP */
1797
1787
 
1798
 
diff -ruN a/storage/innobase/include/dict0load.h b/storage/innobase/include/dict0load.h
1799
 
--- a/storage/innobase/include/dict0load.h      2010-11-03 07:01:13.000000000 +0900
1800
 
+++ b/storage/innobase/include/dict0load.h      2010-12-03 17:19:24.889947481 +0900
 
1788
--- a/storage/innobase/include/dict0load.h
 
1789
+++ b/storage/innobase/include/dict0load.h
1801
1790
@@ -41,6 +41,7 @@
1802
1791
        SYS_FIELDS,
1803
1792
        SYS_FOREIGN,
1827
1816
 #ifndef UNIV_NONINL
1828
1817
 #include "dict0load.ic"
1829
1818
 #endif
1830
 
diff -ruN a/storage/innobase/include/que0que.h b/storage/innobase/include/que0que.h
1831
 
--- a/storage/innobase/include/que0que.h        2010-11-03 07:01:13.000000000 +0900
1832
 
+++ b/storage/innobase/include/que0que.h        2010-12-03 17:19:24.892947946 +0900
 
1819
--- a/storage/innobase/include/que0que.h
 
1820
+++ b/storage/innobase/include/que0que.h
1833
1821
@@ -492,6 +492,8 @@
1834
1822
 #define QUE_NODE_CALL          31
1835
1823
 #define QUE_NODE_EXIT          32
1839
1827
 /* Query thread states */
1840
1828
 #define QUE_THR_RUNNING                1
1841
1829
 #define QUE_THR_PROCEDURE_WAIT 2
1842
 
diff -ruN a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h
1843
 
--- a/storage/innobase/include/row0mysql.h      2010-11-03 07:01:13.000000000 +0900
1844
 
+++ b/storage/innobase/include/row0mysql.h      2010-12-03 17:19:24.904973020 +0900
 
1830
--- a/storage/innobase/include/row0mysql.h
 
1831
+++ b/storage/innobase/include/row0mysql.h
1845
1832
@@ -387,6 +387,22 @@
1846
1833
                                        then checked for not being too
1847
1834
                                        large. */
1865
1852
 Scans a table create SQL string and adds to the data dictionary
1866
1853
 the foreign key constraints declared in the string. This function
1867
1854
 should be called after the indexes for a table have been created.
1868
 
diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
1869
 
--- a/storage/innobase/include/srv0srv.h        2010-12-03 15:53:54.622036720 +0900
1870
 
+++ b/storage/innobase/include/srv0srv.h        2010-12-03 17:19:24.906953188 +0900
 
1855
--- a/storage/innobase/include/srv0srv.h
 
1856
+++ b/storage/innobase/include/srv0srv.h
1871
1857
@@ -211,6 +211,9 @@
1872
1858
 extern ibool   srv_innodb_status;
1873
1859
 
1878
1864
 
1879
1865
 extern ibool   srv_use_doublewrite_buf;
1880
1866
 extern ibool   srv_use_checksums;
1881
 
diff -ruN a/storage/innobase/que/que0que.c b/storage/innobase/que/que0que.c
1882
 
--- a/storage/innobase/que/que0que.c    2010-11-03 07:01:13.000000000 +0900
1883
 
+++ b/storage/innobase/que/que0que.c    2010-12-03 17:19:24.910953422 +0900
 
1867
--- a/storage/innobase/que/que0que.c
 
1868
+++ b/storage/innobase/que/que0que.c
1884
1869
@@ -621,11 +621,21 @@
1885
1870
 
1886
1871
                que_graph_free_recursive(cre_ind->ind_def);
1921
1906
        } else if (type == QUE_NODE_ROW_PRINTF) {
1922
1907
                thr = row_printf_step(thr);
1923
1908
        } else {
1924
 
diff -ruN a/storage/innobase/row/row0ins.c b/storage/innobase/row/row0ins.c
1925
 
--- a/storage/innobase/row/row0ins.c    2011-03-10 00:11:38.000000000 +0900
1926
 
+++ b/storage/innobase/row/row0ins.c    2011-03-30 11:44:58.000000000 +0900
1927
 
@@ -2012,6 +2012,8 @@
 
1909
--- a/storage/innobase/row/row0ins.c
 
1910
+++ b/storage/innobase/row/row0ins.c
 
1911
@@ -2013,6 +2013,8 @@
1928
1912
        }
1929
1913
 
1930
1914
 #ifdef UNIV_DEBUG
1933
1917
        {
1934
1918
                page_t* page = btr_cur_get_page(&cursor);
1935
1919
                rec_t*  first_rec = page_rec_get_next(
1936
 
diff -ruN a/storage/innobase/row/row0merge.c b/storage/innobase/row/row0merge.c
1937
 
--- a/storage/innobase/row/row0merge.c  2010-11-03 07:01:13.000000000 +0900
1938
 
+++ b/storage/innobase/row/row0merge.c  2010-12-03 17:19:24.914955391 +0900
 
1920
--- a/storage/innobase/row/row0merge.c
 
1921
+++ b/storage/innobase/row/row0merge.c
1939
1922
@@ -2019,6 +2019,8 @@
1940
1923
                "UPDATE SYS_INDEXES SET NAME=CONCAT('"
1941
1924
                TEMP_INDEX_PREFIX_STR "', NAME) WHERE ID = :indexid;\n"
1945
1928
                /* Drop the field definitions of the index. */
1946
1929
                "DELETE FROM SYS_FIELDS WHERE INDEX_ID = :indexid;\n"
1947
1930
                /* Drop the index definition and the B-tree. */
1948
 
diff -ruN a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c
1949
 
--- a/storage/innobase/row/row0mysql.c  2010-11-03 07:01:13.000000000 +0900
1950
 
+++ b/storage/innobase/row/row0mysql.c  2010-12-03 17:19:24.918953476 +0900
 
1931
--- a/storage/innobase/row/row0mysql.c
 
1932
+++ b/storage/innobase/row/row0mysql.c
1951
1933
@@ -921,6 +921,9 @@
1952
1934
 
1953
1935
        table->stat_modified_counter = counter + 1;
1967
1949
        }
1968
1950
 }
1969
1951
 
1970
 
@@ -2103,6 +2106,71 @@
 
1952
@@ -2076,6 +2079,71 @@
1971
1953
 }
1972
1954
 
1973
1955
 /*********************************************************************//**
2039
2021
 Scans a table create SQL string and adds to the data dictionary
2040
2022
 the foreign key constraints declared in the string. This function
2041
2023
 should be called after the indexes for a table have been created.
2042
 
@@ -3027,7 +3095,7 @@
 
2024
@@ -3000,7 +3068,7 @@
2043
2025
        dict_table_autoinc_initialize(table, 1);
2044
2026
        dict_table_autoinc_unlock(table);
2045
2027
        dict_update_statistics(table, FALSE /* update even if stats are
2048
2030
 
2049
2031
        trx_commit_for_mysql(trx);
2050
2032
 
2051
 
@@ -3329,6 +3397,8 @@
 
2033
@@ -3302,6 +3370,8 @@
2052
2034
                           "       IF (SQL % NOTFOUND) THEN\n"
2053
2035
                           "               found := 0;\n"
2054
2036
                           "       ELSE\n"
2057
2039
                           "               DELETE FROM SYS_FIELDS\n"
2058
2040
                           "               WHERE INDEX_ID = index_id;\n"
2059
2041
                           "               DELETE FROM SYS_INDEXES\n"
2060
 
diff -ruN a/storage/innobase/row/row0row.c b/storage/innobase/row/row0row.c
2061
 
--- a/storage/innobase/row/row0row.c    2011-03-10 00:11:38.000000000 +0900
2062
 
+++ b/storage/innobase/row/row0row.c    2011-03-30 11:44:58.000000000 +0900
2063
 
@@ -315,6 +315,14 @@
 
2042
--- a/storage/innobase/row/row0row.c
 
2043
+++ b/storage/innobase/row/row0row.c
 
2044
@@ -373,6 +373,14 @@
2064
2045
 
2065
2046
        rec_len = rec_offs_n_fields(offsets);
2066
2047
 
2075
2056
        entry = dtuple_create(heap, rec_len);
2076
2057
 
2077
2058
        dtuple_set_n_fields_cmp(entry,
2078
 
@@ -326,6 +334,14 @@
 
2059
@@ -384,6 +392,14 @@
2079
2060
        for (i = 0; i < rec_len; i++) {
2080
2061
 
2081
2062
                dfield = dtuple_get_nth_field(entry, i);
2090
2071
                field = rec_get_nth_field(rec, offsets, i, &len);
2091
2072
 
2092
2073
                dfield_set_data(dfield, field, len);
2093
 
diff -ruN a/storage/innobase/row/row0upd.c b/storage/innobase/row/row0upd.c
2094
 
--- a/storage/innobase/row/row0upd.c    2011-03-10 00:11:38.000000000 +0900
2095
 
+++ b/storage/innobase/row/row0upd.c    2011-03-30 11:44:58.000000000 +0900
 
2074
--- a/storage/innobase/row/row0upd.c
 
2075
+++ b/storage/innobase/row/row0upd.c
2096
2076
@@ -439,6 +439,12 @@
2097
2077
                                0);
2098
2078
                }
2125
2105
                data = rec_get_nth_field(rec, offsets, i, &len);
2126
2106
 
2127
2107
                dfield = dtuple_get_nth_field(entry, i);
2128
 
diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
2129
 
--- a/storage/innobase/srv/srv0srv.c    2010-12-03 15:53:54.625288512 +0900
2130
 
+++ b/storage/innobase/srv/srv0srv.c    2010-12-03 17:19:24.922953561 +0900
 
2108
--- a/storage/innobase/srv/srv0srv.c
 
2109
+++ b/storage/innobase/srv/srv0srv.c
2131
2110
@@ -398,6 +398,9 @@
2132
2111
 /* When estimating number of different key values in an index, sample
2133
2112
 this many index pages */
2138
2117
 
2139
2118
 UNIV_INTERN ibool      srv_use_doublewrite_buf = TRUE;
2140
2119
 UNIV_INTERN ibool      srv_use_checksums = TRUE;
2141
 
diff -ruN a/storage/innobase/trx/trx0rec.c b/storage/innobase/trx/trx0rec.c
2142
 
--- a/storage/innobase/trx/trx0rec.c    2011-03-10 00:11:38.000000000 +0900
2143
 
+++ b/storage/innobase/trx/trx0rec.c    2011-03-30 11:44:58.000000000 +0900
 
2120
--- a/storage/innobase/trx/trx0rec.c
 
2121
+++ b/storage/innobase/trx/trx0rec.c
2144
2122
@@ -669,15 +669,27 @@
2145
2123
        /* Save to the undo log the old values of the columns to be updated. */
2146
2124
 
2157
2135
+                   && index == UT_LIST_GET_FIRST(dict_sys->sys_stats->indexes)) {
2158
2136
+                       for (i = 0; i < upd_get_n_fields(update); i++) {
2159
2137
+                               ulint   pos = upd_get_nth_field(update, i)->field_no;
2160
 
+
 
2138
 
 
2139
-               for (i = 0; i < upd_get_n_fields(update); i++) {
2161
2140
+                               if (pos >= rec_offs_n_fields(offsets)) {
2162
2141
+                                       extended++;
2163
2142
+                               }
2165
2144
+               }
2166
2145
+
2167
2146
+               ptr += mach_write_compressed(ptr, upd_get_n_fields(update) - extended);
2168
 
 
2169
 
-               for (i = 0; i < upd_get_n_fields(update); i++) {
 
2147
+
2170
2148
+               for (i = 0; i < upd_get_n_fields(update) - extended; i++) {
2171
2149
 
2172
2150
                        ulint   pos = upd_get_nth_field(update, i)->field_no;