diff options
Diffstat (limited to 'innobase/buf/buf0rea.c')
-rw-r--r-- | innobase/buf/buf0rea.c | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/innobase/buf/buf0rea.c b/innobase/buf/buf0rea.c index 5ba27b8fee8..e0f8291977e 100644 --- a/innobase/buf/buf0rea.c +++ b/innobase/buf/buf0rea.c @@ -97,7 +97,8 @@ buf_read_page_low( log mutex: the read must be handled before other reads which might incur ibuf operations and thus write to the log */ - printf("Log debug: reading replicate page in sync mode\n"); + fputs("Log debug: reading replicate page in sync mode\n", + stderr); sync = TRUE; } @@ -117,7 +118,6 @@ buf_read_page_low( or is being dropped; if we succeed in initing the page in the buffer pool for read, then DISCARD cannot proceed until the read has completed */ - block = buf_page_init_for_read(err, mode, space, tablespace_version, offset); if (block == NULL) { @@ -125,11 +125,14 @@ buf_read_page_low( return(0); } +#ifdef UNIV_DEBUG if (buf_debug_prints) { - printf("Posting read request for page %lu, sync %lu\n", + fprintf(stderr, + "Posting read request for page %lu, sync %lu\n", (ulong) offset, (ulong) sync); } +#endif ut_a(block->state == BUF_BLOCK_FILE_PAGE); @@ -281,12 +284,14 @@ buf_read_ahead_random( os_aio_simulated_wake_handler_threads(); +#ifdef UNIV_DEBUG if (buf_debug_prints && (count > 0)) { - - printf("Random read-ahead space %lu offset %lu pages %lu\n", + fprintf(stderr, + "Random read-ahead space %lu offset %lu pages %lu\n", (ulong) space, (ulong) offset, (ulong) count); } +#endif /* UNIV_DEBUG */ return(count); } @@ -566,11 +571,13 @@ buf_read_ahead_linear( /* Flush pages from the end of the LRU list if necessary */ buf_flush_free_margin(); +#ifdef UNIV_DEBUG if (buf_debug_prints && (count > 0)) { - printf( + fprintf(stderr, "LINEAR read-ahead space %lu offset %lu pages %lu\n", (ulong) space, (ulong) offset, (ulong) count); } +#endif /* UNIV_DEBUG */ return(count); } @@ -629,9 +636,13 @@ buf_read_ibuf_merge_pages( /* Flush pages from the end of the LRU list if necessary */ buf_flush_free_margin(); +#ifdef UNIV_DEBUG if (buf_debug_prints) { - printf("Ibuf merge read-ahead pages %lu\n", (ulong) n_stored); + fprintf(stderr, + "Ibuf merge read-ahead space %lu pages %lu\n", + (ulong) space, (ulong) n_stored); } +#endif /* UNIV_DEBUG */ } /************************************************************************ @@ -695,8 +706,10 @@ buf_read_recv_pages( /* Flush pages from the end of the LRU list if necessary */ buf_flush_free_margin(); +#ifdef UNIV_DEBUG if (buf_debug_prints) { - printf("Recovery applies read-ahead pages %lu\n", - (ulong) n_stored); + fprintf(stderr, + "Recovery applies read-ahead pages %lu\n", (ulong) n_stored); } +#endif /* UNIV_DEBUG */ } |