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

« back to all changes in this revision

Viewing changes to storage/innodb_plugin/buf/buf0buddy.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:
442
442
                pool), so there is nothing wrong about this.  The
443
443
                mach_read_from_4() calls here will only trigger bogus
444
444
                Valgrind memcheck warnings in UNIV_DEBUG_VALGRIND builds. */
445
 
                bpage = buf_page_hash_get(
446
 
                        mach_read_from_4((const byte*) src
447
 
                                         + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID),
448
 
                        mach_read_from_4((const byte*) src
449
 
                                         + FIL_PAGE_OFFSET));
 
445
                ulint           space   = mach_read_from_4(
 
446
                        (const byte*) src + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
 
447
                ulint           page_no = mach_read_from_4(
 
448
                        (const byte*) src + FIL_PAGE_OFFSET);
 
449
                /* Suppress Valgrind warnings about conditional jump
 
450
                on uninitialized value. */
 
451
                UNIV_MEM_VALID(&space, sizeof space);
 
452
                UNIV_MEM_VALID(&page_no, sizeof page_no);
 
453
                bpage = buf_page_hash_get(space, page_no);
450
454
 
451
455
                if (!bpage || bpage->zip.data != src) {
452
456
                        /* The block has probably been freshly
495
499
                mutex_exit(mutex);
496
500
        } else if (i == buf_buddy_get_slot(sizeof(buf_page_t))) {
497
501
                /* This must be a buf_page_t object. */
 
502
#if UNIV_WORD_SIZE == 4
 
503
                /* On 32-bit systems, there is no padding in
 
504
                buf_page_t.  On other systems, Valgrind could complain
 
505
                about uninitialized pad bytes. */
498
506
                UNIV_MEM_ASSERT_RW(src, size);
 
507
#endif
499
508
                if (buf_buddy_relocate_block(src, dst)) {
500
509
 
501
510
                        goto success;