~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to storage/innobase/include/buf0buf.ic

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
218
218
                        "InnoDB: corruption. If this happens in an"
219
219
                        " InnoDB database recovery, see\n"
220
220
                        "InnoDB: http://dev.mysql.com/doc/refman/5.1/en/"
221
 
                        "forcing-recovery.html\n"
 
221
                        "forcing-innodb-recovery.html\n"
222
222
                        "InnoDB: how to force recovery.\n",
223
223
                        ptr, frame_zero,
224
224
                        buf_pool->high_end);
257
257
                        "InnoDB: corruption. If this happens in an"
258
258
                        " InnoDB database recovery, see\n"
259
259
                        "InnoDB: http://dev.mysql.com/doc/refman/5.1/en/"
260
 
                        "forcing-recovery.html\n"
 
260
                        "forcing-innodb-recovery.html\n"
261
261
                        "InnoDB: how to force recovery.\n",
262
262
                        ptr, buf_pool->frame_zero,
263
263
                        buf_pool->high_end);
561
561
}
562
562
 
563
563
/************************************************************************
564
 
Tries to get the page, but if file io is required, releases all latches
565
 
in mtr down to the given savepoint. If io is required, this function
566
 
retrieves the page to buffer buf_pool, but does not bufferfix it or latch
567
 
it. */
568
 
UNIV_INLINE
569
 
buf_frame_t*
570
 
buf_page_get_release_on_io(
571
 
/*=======================*/
572
 
                                /* out: pointer to the frame, or NULL
573
 
                                if not in buffer buf_pool */
574
 
        ulint   space,          /* in: space id */
575
 
        ulint   offset,         /* in: offset of the page within space
576
 
                                in units of a page */
577
 
        buf_frame_t* guess,     /* in: guessed frame or NULL */
578
 
        ulint   rw_latch,       /* in: RW_X_LATCH, RW_S_LATCH,
579
 
                                or RW_NO_LATCH */
580
 
        ulint   savepoint,      /* in: mtr savepoint */
581
 
        mtr_t*  mtr)            /* in: mtr */
582
 
{
583
 
        buf_frame_t*    frame;
584
 
 
585
 
        frame = buf_page_get_gen(space, offset, rw_latch, guess,
586
 
                                 BUF_GET_IF_IN_POOL,
587
 
                                 __FILE__, __LINE__,
588
 
                                 mtr);
589
 
        if (frame != NULL) {
590
 
 
591
 
                return(frame);
592
 
        }
593
 
 
594
 
        /* The page was not in the buffer buf_pool: release the latches
595
 
        down to the savepoint */
596
 
 
597
 
        mtr_rollback_to_savepoint(mtr, savepoint);
598
 
 
599
 
        buf_page_get(space, offset, RW_S_LATCH, mtr);
600
 
 
601
 
        /* When we get here, the page is in buffer, but we release
602
 
        the latches again down to the savepoint, before returning */
603
 
 
604
 
        mtr_rollback_to_savepoint(mtr, savepoint);
605
 
 
606
 
        return(NULL);
607
 
}
608
 
 
609
 
/************************************************************************
610
564
Decrements the bufferfix count of a buffer control block and releases
611
565
a latch, if specified. */
612
566
UNIV_INLINE
660
614
        ulint           level __attribute__((unused))) /* in: latching order
661
615
                                level */
662
616
{
663
 
        sync_thread_add_level(&(buf_block_align(frame)->lock), level);
 
617
        sync_thread_add_level(&(buf_block_align(frame)->lock), level, FALSE);
664
618
}
665
619
#endif /* UNIV_SYNC_DEBUG */