~thomir-deactivatedaccount/drizzle/drizzle-fix-bug653747

« back to all changes in this revision

Viewing changes to plugin/innobase/btr/btr0btr.c

  • Committer: Brian Aker
  • Date: 2010-10-10 02:07:52 UTC
  • mfrom: (1827.2.3 staging)
  • Revision ID: brian@tangent.org-20101010020752-ktv73isay5dxtvp3
Merge in switch on table_share_instance inheritance.

Show diffs side-by-side

added added

removed removed

Lines of Context:
790
790
        } else {
791
791
                /* It is a non-ibuf tree: create a file segment for leaf
792
792
                pages */
793
 
                if (!fseg_create(space, page_no,
794
 
                                 PAGE_HEADER + PAGE_BTR_SEG_LEAF, mtr)) {
795
 
                        /* Not enough space for new segment, free root
796
 
                        segment before return. */
797
 
                        btr_free_root(space, zip_size, page_no, mtr);
798
 
 
799
 
                        return(FIL_NULL);
800
 
                }
801
 
 
 
793
                fseg_create(space, page_no,
 
794
                            PAGE_HEADER + PAGE_BTR_SEG_LEAF, mtr);
802
795
                /* The fseg create acquires a second latch on the page,
803
796
                therefore we must declare it: */
804
797
                buf_block_dbg_add_level(block, SYNC_TREE_NODE_NEW);
1018
1011
            (!page_zip_compress(page_zip, page, index, NULL))) {
1019
1012
 
1020
1013
                /* Restore the old page and exit. */
1021
 
 
1022
 
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
1023
 
                /* Check that the bytes that we skip are identical. */
1024
 
                ut_a(!memcmp(page, temp_page, PAGE_HEADER));
1025
 
                ut_a(!memcmp(PAGE_HEADER + PAGE_N_RECS + page,
1026
 
                             PAGE_HEADER + PAGE_N_RECS + temp_page,
1027
 
                             PAGE_DATA - (PAGE_HEADER + PAGE_N_RECS)));
1028
 
                ut_a(!memcmp(UNIV_PAGE_SIZE - FIL_PAGE_DATA_END + page,
1029
 
                             UNIV_PAGE_SIZE - FIL_PAGE_DATA_END + temp_page,
1030
 
                             FIL_PAGE_DATA_END));
1031
 
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
1032
 
 
1033
 
                memcpy(PAGE_HEADER + page, PAGE_HEADER + temp_page,
1034
 
                       PAGE_N_RECS - PAGE_N_DIR_SLOTS);
1035
 
                memcpy(PAGE_DATA + page, PAGE_DATA + temp_page,
1036
 
                       UNIV_PAGE_SIZE - PAGE_DATA - FIL_PAGE_DATA_END);
1037
 
 
1038
 
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
1039
 
                ut_a(!memcmp(page, temp_page, UNIV_PAGE_SIZE));
1040
 
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
 
1014
                buf_frame_copy(page, temp_page);
1041
1015
 
1042
1016
                goto func_exit;
1043
1017
        }