~ubuntu-branches/ubuntu/natty/mysql-5.1/natty-proposed

« back to all changes in this revision

Viewing changes to storage/innodb_plugin/page/page0page.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 08:30:45 UTC
  • mfrom: (1.4.1)
  • Revision ID: package-import@ubuntu.com-20120222083045-2rd53r4bnyx7qus4
Tags: 5.1.61-0ubuntu0.11.04.1
* SECURITY UPDATE: Update to 5.1.61 to fix multiple security issues
  (LP: #937869)
  - http://www.oracle.com/technetwork/topics/security/cpujan2012-366304.html
  - CVE-2011-2262
  - CVE-2012-0075
  - CVE-2012-0112
  - CVE-2012-0113
  - CVE-2012-0114
  - CVE-2012-0115
  - CVE-2012-0116
  - CVE-2012-0117
  - CVE-2012-0118
  - CVE-2012-0119
  - CVE-2012-0120
  - CVE-2012-0484
  - CVE-2012-0485
  - CVE-2012-0486
  - CVE-2012-0487
  - CVE-2012-0488
  - CVE-2012-0489
  - CVE-2012-0490
  - CVE-2012-0491
  - CVE-2012-0492
  - CVE-2012-0493
  - CVE-2012-0494
  - CVE-2012-0495
  - CVE-2012-0496

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (c) 1994, 2010, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
215
215
{
216
216
        page_t*         page            = buf_block_get_frame(block);
217
217
#ifndef UNIV_HOTBACKUP
218
 
        const ibool     is_hashed       = block->is_hashed;
219
 
 
220
 
        if (is_hashed) {
221
 
                rw_lock_x_lock(&btr_search_latch);
222
 
        }
223
 
 
224
218
        ut_ad(!mtr || mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
225
219
#endif /* !UNIV_HOTBACKUP */
226
220
 
241
235
        } else {
242
236
                mach_write_to_8(page + (PAGE_HEADER + PAGE_MAX_TRX_ID), trx_id);
243
237
        }
244
 
 
245
 
#ifndef UNIV_HOTBACKUP
246
 
        if (is_hashed) {
247
 
                rw_lock_x_unlock(&btr_search_latch);
248
 
        }
249
 
#endif /* !UNIV_HOTBACKUP */
250
238
}
251
239
 
252
240
/************************************************************//**
685
673
                        if (UNIV_UNLIKELY
686
674
                            (!page_zip_reorganize(new_block, index, mtr))) {
687
675
 
 
676
                                btr_blob_dbg_remove(new_page, index,
 
677
                                                    "copy_end_reorg_fail");
688
678
                                if (UNIV_UNLIKELY
689
679
                                    (!page_zip_decompress(new_page_zip,
690
680
                                                          new_page, FALSE))) {
691
681
                                        ut_error;
692
682
                                }
693
683
                                ut_ad(page_validate(new_page, index));
 
684
                                btr_blob_dbg_add(new_page, index,
 
685
                                                 "copy_end_reorg_fail");
694
686
                                return(NULL);
695
687
                        } else {
696
688
                                /* The page was reorganized:
803
795
                        if (UNIV_UNLIKELY
804
796
                            (!page_zip_reorganize(new_block, index, mtr))) {
805
797
 
 
798
                                btr_blob_dbg_remove(new_page, index,
 
799
                                                    "copy_start_reorg_fail");
806
800
                                if (UNIV_UNLIKELY
807
801
                                    (!page_zip_decompress(new_page_zip,
808
802
                                                          new_page, FALSE))) {
809
803
                                        ut_error;
810
804
                                }
811
805
                                ut_ad(page_validate(new_page, index));
 
806
                                btr_blob_dbg_add(new_page, index,
 
807
                                                 "copy_start_reorg_fail");
812
808
                                return(NULL);
813
809
                        } else {
814
810
                                /* The page was reorganized:
1080
1076
        /* Remove the record chain segment from the record chain */
1081
1077
        page_rec_set_next(prev_rec, page_get_supremum_rec(page));
1082
1078
 
 
1079
        btr_blob_dbg_op(page, rec, index, "delete_end",
 
1080
                        btr_blob_dbg_remove_rec);
 
1081
 
1083
1082
        /* Catenate the deleted chain segment to the page free list */
1084
1083
 
1085
1084
        page_rec_set_next(last_rec, page_header_get_ptr(page, PAGE_FREE));
1614
1613
                        " n_owned: %lu; heap_no: %lu; next rec: %lu\n",
1615
1614
                        (ulong) rec_get_n_owned_old(rec),
1616
1615
                        (ulong) rec_get_heap_no_old(rec),
1617
 
                        (ulong) rec_get_next_offs(rec, TRUE));
 
1616
                        (ulong) rec_get_next_offs(rec, FALSE));
1618
1617
        }
1619
1618
 
1620
1619
        page_rec_check(rec);
1621
1620
        rec_validate(rec, offsets);
1622
1621
}
1623
1622
 
 
1623
# ifdef UNIV_BTR_PRINT
1624
1624
/***************************************************************//**
1625
1625
This is used to print the contents of the directory for
1626
1626
debugging purposes. */
1781
1781
        page_dir_print(page, dn);
1782
1782
        page_print_list(block, index, rn);
1783
1783
}
 
1784
# endif /* UNIV_BTR_PRINT */
1784
1785
#endif /* !UNIV_HOTBACKUP */
1785
1786
 
1786
1787
/***************************************************************//**