~percona-core/percona-xtrabackup/2.0

« back to all changes in this revision

Viewing changes to patches/innodb51.patch

  • Committer: Alexey Kopytov
  • Date: 2011-11-28 12:44:18 UTC
  • mfrom: (324.3.5 1.7)
  • Revision ID: akopytov@gmail.com-20111128124418-c6bz3jyg95k3cxim
Merge from the BP tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
--- a/storage/innodb_plugin/btr/btr0btr.c
2
2
+++ b/storage/innodb_plugin/btr/btr0btr.c
3
 
@@ -120,7 +120,7 @@
 
3
@@ -674,7 +674,7 @@
4
4
 /**************************************************************//**
5
5
 Gets the root node of a tree and x-latches it.
6
6
 @return        root page, x-latched */
9
9
 buf_block_t*
10
10
 btr_root_block_get(
11
11
 /*===============*/
12
 
@@ -566,7 +566,7 @@
 
12
@@ -1122,7 +1122,7 @@
13
13
 /************************************************************//**
14
14
 Returns the child page of a node pointer and x-latches it.
15
15
 @return        child page, x-latched */
29
29
        if (recv_lsn_checks_on) {
30
30
                ib_uint64_t     current_lsn;
31
31
 
32
 
@@ -2050,7 +2050,9 @@
 
32
@@ -1690,7 +1690,9 @@
33
33
        ut_ad(zip_size == fil_space_get_zip_size(space));
34
34
        ut_ad(ut_is_2pow(zip_size));
35
35
 #ifndef UNIV_LOG_DEBUG
40
40
 #endif
41
41
        buf_pool->stat.n_page_gets++;
42
42
 loop:
43
 
@@ -3257,7 +3259,7 @@
 
43
@@ -2894,7 +2896,7 @@
44
44
                        recv_recover_page(TRUE, (buf_block_t*) bpage);
45
45
                }
46
46
 
51
51
                                bpage->offset, buf_page_get_zip_size(bpage),
52
52
--- a/storage/innodb_plugin/buf/buf0rea.c
53
53
+++ b/storage/innodb_plugin/buf/buf0rea.c
54
 
@@ -120,6 +120,45 @@
 
54
@@ -128,6 +128,45 @@
55
55
        bpage = buf_page_init_for_read(err, mode, space, zip_size, unzip,
56
56
                                       tablespace_version, offset);
57
57
        if (bpage == NULL) {
97
97
 
98
98
                return(0);
99
99
        }
100
 
@@ -594,6 +633,50 @@
 
100
@@ -764,6 +803,50 @@
101
101
                /* It is a single table tablespace and the .ibd file is
102
102
                missing: do nothing */
103
103
 
656
656
 
657
657
--- a/storage/innodb_plugin/include/srv0srv.h
658
658
+++ b/storage/innodb_plugin/include/srv0srv.h
659
 
@@ -201,6 +201,10 @@
 
659
@@ -202,6 +202,10 @@
660
660
 extern ulong   srv_max_purge_lag;
661
661
 
662
662
 extern ulong   srv_replication_delay;
755
755
 
756
756
        if (log_sys->n_pending_checkpoint_writes > 0) {
757
757
                /* A checkpoint write is running */
758
 
@@ -3089,6 +3091,7 @@
759
 
        for the 'very fast' shutdown, because the InnoDB layer may have
760
 
        committed or prepared transactions and we don't want to lose them. */
 
758
@@ -3090,6 +3092,7 @@
 
759
        shutdown, because the InnoDB layer may have committed or
 
760
        prepared transactions and we don't want to lose them. */
761
761
 
762
762
+       if (!srv_apply_log_only) {
763
763
        if (trx_n_mysql_transactions > 0
764
 
            || UT_LIST_GET_LEN(trx_sys->trx_list) > 0) {
 
764
            || UT_LIST_GET_LEN(trx_sys->trx_list) > trx_n_prepared) {
765
765
 
766
 
@@ -3096,6 +3099,7 @@
 
766
@@ -3097,6 +3100,7 @@
767
767
 
768
768
                goto loop;
769
769
        }
1039
1039
        secondary index entries for merge sort */
1040
1040
--- a/storage/innodb_plugin/srv/srv0srv.c
1041
1041
+++ b/storage/innodb_plugin/srv/srv0srv.c
1042
 
@@ -372,6 +372,9 @@
 
1042
@@ -374,6 +374,9 @@
1043
1043
 
1044
1044
 UNIV_INTERN ulong      srv_replication_delay           = 0;
1045
1045
 
1049
1049
 /*-------------------------------------------*/
1050
1050
 UNIV_INTERN ulong      srv_n_spin_wait_rounds  = 30;
1051
1051
 UNIV_INTERN ulong      srv_n_free_tickets_to_enter = 500;
1052
 
@@ -1000,7 +1003,7 @@
 
1052
@@ -1002,7 +1005,7 @@
1053
1053
        }
1054
1054
 
1055
1055
        /* Initialize some INFORMATION SCHEMA internal structures */
1058
1058
 }
1059
1059
 
1060
1060
 /*********************************************************************//**
1061
 
@@ -1011,6 +1014,7 @@
 
1061
@@ -1013,6 +1016,7 @@
1062
1062
 /*==========*/
1063
1063
 {
1064
1064
        os_fast_mutex_free(&srv_conc_mutex);
1066
1066
        mem_free(srv_conc_slots);
1067
1067
        srv_conc_slots = NULL;
1068
1068
 
1069
 
@@ -1024,6 +1028,7 @@
 
1069
@@ -1026,6 +1030,7 @@
1070
1070
        srv_mysql_table = NULL;
1071
1071
 
1072
1072
        trx_i_s_cache_free(trx_i_s_cache);
1103
1103
 ulint
1104
1104
 open_or_create_data_files(
1105
1105
 /*======================*/
1106
 
@@ -1353,7 +1355,7 @@
 
1106
@@ -1359,7 +1361,7 @@
1107
1107
        }
1108
1108
 #endif /* UNIV_LOG_ARCHIVE */
1109
1109
 
1112
1112
                fprintf(stderr,
1113
1113
                        "InnoDB: Error: combined size of log files"
1114
1114
                        " must be < 4 GB\n");
1115
 
@@ -1595,6 +1597,10 @@
 
1115
@@ -1601,6 +1603,10 @@
1116
1116
                are initialized in trx_sys_init_at_db_start(). */
1117
1117
 
1118
1118
                recv_recovery_from_checkpoint_finish();
1123
1123
                if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {
1124
1124
                        /* The following call is necessary for the insert
1125
1125
                        buffer to work with multiple tablespaces. We must
1126
 
@@ -1741,7 +1747,18 @@
 
1126
@@ -1747,7 +1753,18 @@
1127
1127
 
1128
1128
        if (srv_auto_extend_last_data_file
1129
1129
            && sum_of_data_file_sizes < tablespace_size_in_header) {
1142
1142
                fprintf(stderr,
1143
1143
                        "InnoDB: Error: tablespace size stored in header"
1144
1144
                        " is %lu pages, but\n"
1145
 
@@ -1766,6 +1783,7 @@
 
1145
@@ -1772,6 +1789,7 @@
1146
1146
 
1147
1147
                        return(DB_ERROR);
1148
1148
                }
1150
1150
        }
1151
1151
 
1152
1152
        /* Check that os_fast_mutexes work as expected */
1153
 
@@ -1861,6 +1879,7 @@
 
1153
@@ -1867,6 +1885,7 @@
1154
1154
                ibuf_update_max_tablespace_id();
1155
1155
        }
1156
1156
 
1186
1186
 
1187
1187
--- a/storage/innodb_plugin/trx/trx0sys.c
1188
1188
+++ b/storage/innodb_plugin/trx/trx0sys.c
1189
 
@@ -1607,10 +1607,12 @@
 
1189
@@ -1617,10 +1617,12 @@
1190
1190
                UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view);
1191
1191
        }
1192
1192
 
1201
1201
 
1202
1202
--- a/storage/innodb_plugin/trx/trx0trx.c
1203
1203
+++ b/storage/innodb_plugin/trx/trx0trx.c
1204
 
@@ -461,8 +461,8 @@
 
1204
@@ -518,9 +518,8 @@
1205
1205
                                                TRX_ID_PREP_PRINTF(trx->id));
1206
1206
 
1207
1207
                                        if (srv_force_recovery == 0) {
1208
1208
-
1209
1209
-                                               trx->conc_state = TRX_PREPARED;
 
1210
-                                               trx_n_prepared++;
1210
1211
+                                               /* xtrabackup should rollback it */
1211
1212
+                                               trx->conc_state = TRX_ACTIVE;
1212
1213
                                        } else {
1213
1214
                                                fprintf(stderr,
1214
1215
                                                        "InnoDB: Since"
1215
 
@@ -538,9 +538,9 @@
 
1216
@@ -596,10 +595,9 @@
1216
1217
                                                                trx->id));
1217
1218
 
1218
1219
                                                if (srv_force_recovery == 0) {
1220
1221
+                                                       /* xtrabackup should rollback it */
1221
1222
                                                        trx->conc_state
1222
1223
-                                                               = TRX_PREPARED;
 
1224
-                                                       trx_n_prepared++;
1223
1225
+                                                               = TRX_ACTIVE;
1224
1226
                                                } else {
1225
1227
                                                        fprintf(stderr,