~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to storage/innodb_plugin/buf/buf0flu.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-21 15:31:05 UTC
  • mfrom: (1.1.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20100621153105-pbbz3t6nyrf9t2zq
Tags: upstream-5.1.48
ImportĀ upstreamĀ versionĀ 5.1.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
249
249
        ut_d(block->page.in_flush_list = TRUE);
250
250
        UT_LIST_ADD_FIRST(list, buf_pool->flush_list, &block->page);
251
251
 
 
252
#ifdef UNIV_DEBUG_VALGRIND
 
253
        {
 
254
                ulint   zip_size = buf_block_get_zip_size(block);
 
255
 
 
256
                if (UNIV_UNLIKELY(zip_size)) {
 
257
                        UNIV_MEM_ASSERT_RW(block->page.zip.data, zip_size);
 
258
                } else {
 
259
                        UNIV_MEM_ASSERT_RW(block->frame, UNIV_PAGE_SIZE);
 
260
                }
 
261
        }
 
262
#endif /* UNIV_DEBUG_VALGRIND */
252
263
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
253
264
        ut_a(buf_flush_validate_low());
254
265
#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
276
287
        ut_ad(!block->page.in_flush_list);
277
288
        ut_d(block->page.in_flush_list = TRUE);
278
289
 
 
290
#ifdef UNIV_DEBUG_VALGRIND
 
291
        {
 
292
                ulint   zip_size = buf_block_get_zip_size(block);
 
293
 
 
294
                if (UNIV_UNLIKELY(zip_size)) {
 
295
                        UNIV_MEM_ASSERT_RW(block->page.zip.data, zip_size);
 
296
                } else {
 
297
                        UNIV_MEM_ASSERT_RW(block->frame, UNIV_PAGE_SIZE);
 
298
                }
 
299
        }
 
300
#endif /* UNIV_DEBUG_VALGRIND */
 
301
 
279
302
        prev_b = NULL;
280
303
 
281
304
        /* For the most part when this function is called the flush_rbt
809
832
        zip_size = buf_page_get_zip_size(bpage);
810
833
 
811
834
        if (UNIV_UNLIKELY(zip_size)) {
 
835
                UNIV_MEM_ASSERT_RW(bpage->zip.data, zip_size);
812
836
                /* Copy the compressed page and clear the rest. */
813
837
                memcpy(trx_doublewrite->write_buf
814
838
                       + UNIV_PAGE_SIZE * trx_doublewrite->first_free,
818
842
                       + zip_size, 0, UNIV_PAGE_SIZE - zip_size);
819
843
        } else {
820
844
                ut_a(buf_page_get_state(bpage) == BUF_BLOCK_FILE_PAGE);
 
845
                UNIV_MEM_ASSERT_RW(((buf_block_t*) bpage)->frame,
 
846
                                   UNIV_PAGE_SIZE);
821
847
 
822
848
                memcpy(trx_doublewrite->write_buf
823
849
                       + UNIV_PAGE_SIZE * trx_doublewrite->first_free,