~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/buf/buf0buf.c

Tags: innodb-plugin-1.0.2
InnoDB Plugin 1.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
406
406
                }
407
407
 
408
408
                /* InnoDB versions < 4.0.14 and < 4.1.1 stored the space id
409
 
                (always equal to 0), to FIL_PAGE_SPACE_SPACE_OR_CHKSUM */
 
409
                (always equal to 0), to FIL_PAGE_SPACE_OR_CHKSUM */
410
410
 
411
411
                if (checksum_field != 0
412
412
                    && checksum_field != BUF_NO_CHECKSUM_MAGIC
443
443
        fprintf(stderr, "  InnoDB: Page dump in ascii and hex (%lu bytes):\n",
444
444
                (ulong) size);
445
445
        ut_print_buf(stderr, read_buf, size);
446
 
        fputs("InnoDB: End of page dump\n", stderr);
 
446
        fputs("\nInnoDB: End of page dump\n", stderr);
447
447
 
448
448
        if (zip_size) {
449
449
                /* Print compressed page. */
1053
1053
 
1054
1054
        if (UNIV_UNLIKELY(buf_pool->LRU_old == bpage)) {
1055
1055
                buf_pool->LRU_old = dpage;
 
1056
#ifdef UNIV_LRU_DEBUG
 
1057
                /* buf_pool->LRU_old must be the first item in the LRU list
 
1058
                whose "old" flag is set. */
 
1059
                ut_a(!UT_LIST_GET_PREV(LRU, buf_pool->LRU_old)
 
1060
                     || !UT_LIST_GET_PREV(LRU, buf_pool->LRU_old)->old);
 
1061
                ut_a(!UT_LIST_GET_NEXT(LRU, buf_pool->LRU_old)
 
1062
                     || UT_LIST_GET_NEXT(LRU, buf_pool->LRU_old)->old);
 
1063
#endif /* UNIV_LRU_DEBUG */
1056
1064
        }
1057
1065
 
1058
1066
        ut_d(UT_LIST_VALIDATE(LRU, buf_page_t, buf_pool->LRU));
2193
2201
        }
2194
2202
 
2195
2203
        if (UNIV_UNLIKELY(modify_clock != block->modify_clock)) {
2196
 
#ifdef UNIV_SYNC_DEBUG
2197
2204
                buf_block_dbg_add_level(block, SYNC_NO_ORDER_CHECK);
2198
 
#endif /* UNIV_SYNC_DEBUG */
 
2205
 
2199
2206
                if (rw_latch == RW_S_LATCH) {
2200
2207
                        rw_lock_s_unlock(&(block->lock));
2201
2208
                } else {
2395
2402
#ifdef UNIV_DEBUG_FILE_ACCESSES
2396
2403
        ut_a(block->page.file_page_was_freed == FALSE);
2397
2404
#endif /* UNIV_DEBUG_FILE_ACCESSES */
2398
 
#ifdef UNIV_SYNC_DEBUG
2399
2405
        buf_block_dbg_add_level(block, SYNC_NO_ORDER_CHECK);
2400
 
#endif /* UNIV_SYNC_DEBUG */
 
2406
 
2401
2407
        buf_pool->n_page_gets++;
2402
2408
 
2403
2409
        return(block);
3070
3076
                ut_error;
3071
3077
        }
3072
3078
 
3073
 
        mutex_exit(buf_page_get_mutex(bpage));
3074
 
        buf_pool_mutex_exit();
3075
 
 
3076
3079
#ifdef UNIV_DEBUG
3077
3080
        if (buf_debug_prints) {
3078
3081
                fprintf(stderr, "Has %s page space %lu page no %lu\n",
3081
3084
                        (ulong) buf_page_get_page_no(bpage));
3082
3085
        }
3083
3086
#endif /* UNIV_DEBUG */
 
3087
 
 
3088
        mutex_exit(buf_page_get_mutex(bpage));
 
3089
        buf_pool_mutex_exit();
3084
3090
}
3085
3091
 
3086
3092
/*************************************************************************
3446
3452
}
3447
3453
#endif /* UNIV_DEBUG_PRINT || UNIV_DEBUG || UNIV_BUF_DEBUG */
3448
3454
 
 
3455
#ifdef UNIV_DEBUG
3449
3456
/*************************************************************************
3450
3457
Returns the number of latched pages in the buffer pool. */
3451
3458
UNIV_INTERN
3532
3539
 
3533
3540
        return(fixed_pages_number);
3534
3541
}
 
3542
#endif /* UNIV_DEBUG */
3535
3543
 
3536
3544
/*************************************************************************
3537
3545
Returns the number of pending buf pool ios. */