~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/xtrabackup/xtrabackup.cc

  • Committer: Lee Bieber
  • Date: 2011-04-13 23:47:18 UTC
  • mfrom: (2276.1.2 build)
  • Revision ID: kalebral@gmail.com-20110413234718-uc6emsr6ms1szt4c
Merge Olaf - Refactor Program Options usage
Merge Andrew - 748064: Xtrabackup breaks trunk in GCC 4.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
1678
1678
        ibool           success;
1679
1679
        byte*           page;
1680
1680
        byte*           buf2 = NULL;
1681
 
        LSN64           flush_lsn;
1682
1681
        IB_INT64        file_size;
1683
1682
        IB_INT64        offset;
1684
1683
        ulint           page_in_buffer= 0;
1900
1899
        if (!success) {
1901
1900
                goto error;
1902
1901
        }
1903
 
        flush_lsn = MACH_READ_64(page + FIL_PAGE_FILE_FLUSH_LSN);
1904
 
                /* check current flush lsn newer than checkpoint@start */
1905
 
//      if (ut_dulint_cmp(backup_start_checkpoint, flush_lsn) >= 0) {
1906
 
//              goto error;
1907
 
//      }
1908
1902
 
1909
1903
        file_size = os_file_get_size_as_iblonglong(src_file);
1910
1904
 
2111
2105
{
2112
2106
        /* definition from recv_recovery_from_checkpoint_start() */
2113
2107
        log_group_t*    group;
2114
 
        log_group_t*    up_to_date_group;
2115
 
        LSN64           old_scanned_lsn;
2116
2108
        LSN64           group_scanned_lsn;
2117
2109
        LSN64           contiguous_lsn;
2118
2110
 
2135
2127
                LSN64   end_lsn;
2136
2128
 
2137
2129
 
2138
 
                old_scanned_lsn = from_lsn;
2139
 
 
2140
2130
                /* reference recv_group_scan_log_recs() */
2141
2131
        finished = FALSE;
2142
2132
 
2159
2149
        ulint   no;
2160
2150
        LSN64   scanned_lsn;
2161
2151
        ulint   data_len;
2162
 
        ibool   more_data;
2163
2152
 
2164
2153
        ulint   scanned_checkpoint_no = 0;
2165
2154
 
2167
2156
        
2168
2157
        log_block = log_sys->buf;
2169
2158
        scanned_lsn = start_lsn;
2170
 
        more_data = FALSE;
2171
2159
 
2172
2160
        while (log_block < log_sys->buf + RECV_SCAN_SIZE && !finished) {
2173
2161
 
2325
2313
 
2326
2314
                group->scanned_lsn = group_scanned_lsn;
2327
2315
                
2328
 
                if (ut_dulint_cmp(old_scanned_lsn, group_scanned_lsn) < 0) {
2329
 
                        /* We found a more up-to-date group */
2330
 
 
2331
 
                        up_to_date_group = group;
2332
 
                }
2333
2316
 
2334
2317
                fprintf(stderr, ">> log scanned up to (%"PRIu64")\n",group->scanned_lsn);
2335
2318
 
3232
3215
                                        ulint   space_id;
3233
3216
                                        ulint   page_no;
3234
3217
                                        ulint   offset;
3235
 
                                        ulint   extern_len;
3236
3218
                                        byte*   blob_header;
3237
3219
                                        ulint   part_len;
3238
3220
                                        mtr_t   local_mtr;
3248
3230
                                        space_id = mach_read_from_4(data + local_len + BTR_EXTERN_SPACE_ID);
3249
3231
                                        page_no = mach_read_from_4(data + local_len + BTR_EXTERN_PAGE_NO);
3250
3232
                                        offset = mach_read_from_4(data + local_len + BTR_EXTERN_OFFSET);
3251
 
                                        extern_len = mach_read_from_4(data + local_len + BTR_EXTERN_LEN + 4);
3252
3233
 
3253
3234
                                        if (offset != FIL_PAGE_DATA)
3254
3235
                                                fprintf(stderr, "\nWarning: several record may share same external page.\n");
3605
3586
 
3606
3587
        LSN64   max_no;
3607
3588
        LSN64   max_lsn;
3608
 
        ulint   max_field;
3609
3589
        LSN64   checkpoint_no;
3610
3590
 
3611
3591
        ulint   fold;
3735
3715
                if (ut_dulint_cmp(checkpoint_no, max_no) >= 0) {
3736
3716
                        max_no = checkpoint_no;
3737
3717
                        max_lsn = MACH_READ_64(log_buf + field + LOG_CHECKPOINT_LSN);
3738
 
                        max_field = field;
3739
3718
/*
3740
3719
                        mach_write_to_4(log_buf + field + LOG_CHECKPOINT_OFFSET,
3741
3720
                                        LOG_FILE_HDR_SIZE + ut_dulint_minus(max_lsn,