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

« back to all changes in this revision

Viewing changes to storage/innodb_plugin/include/btr0btr.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:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (c) 1994, 2010, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
39
39
Gets a buffer page and declares its latching order level. */
40
40
UNIV_INLINE
41
41
buf_block_t*
42
 
btr_block_get(
43
 
/*==========*/
44
 
        ulint   space,          /*!< in: space id */
45
 
        ulint   zip_size,       /*!< in: compressed page size in bytes
46
 
                                or 0 for uncompressed pages */
47
 
        ulint   page_no,        /*!< in: page number */
48
 
        ulint   mode,           /*!< in: latch mode */
49
 
        mtr_t*  mtr)            /*!< in: mtr */
 
42
btr_block_get_func(
 
43
/*===============*/
 
44
        ulint           space,          /*!< in: space id */
 
45
        ulint           zip_size,       /*!< in: compressed page size in bytes
 
46
                                        or 0 for uncompressed pages */
 
47
        ulint           page_no,        /*!< in: page number */
 
48
        ulint           mode,           /*!< in: latch mode */
 
49
        const char*     file,           /*!< in: file name */
 
50
        ulint           line,           /*!< in: line where called */
 
51
#ifdef UNIV_SYNC_DEBUG
 
52
        const dict_index_t*     index,  /*!< in: index tree, may be NULL
 
53
                                        if it is not an insert buffer tree */
 
54
#endif /* UNIV_SYNC_DEBUG */
 
55
        mtr_t*          mtr)            /*!< in/out: mtr */
50
56
{
51
57
        buf_block_t*    block;
52
58
 
53
 
        block = buf_page_get(space, zip_size, page_no, mode, mtr);
 
59
        block = buf_page_get_gen(space, zip_size, page_no, mode,
 
60
                                 NULL, BUF_GET, file, line, mtr);
54
61
 
55
62
        if (mode != RW_NO_LATCH) {
56
63
 
57
 
                buf_block_dbg_add_level(block, SYNC_TREE_NODE);
 
64
                buf_block_dbg_add_level(
 
65
                        block, index != NULL && dict_index_is_ibuf(index)
 
66
                        ? SYNC_IBUF_TREE_NODE : SYNC_TREE_NODE);
58
67
        }
59
68
 
60
69
        return(block);
61
70
}
62
71
 
63
72
/**************************************************************//**
64
 
Gets a buffer page and declares its latching order level. */
65
 
UNIV_INLINE
66
 
page_t*
67
 
btr_page_get(
68
 
/*=========*/
69
 
        ulint   space,          /*!< in: space id */
70
 
        ulint   zip_size,       /*!< in: compressed page size in bytes
71
 
                                or 0 for uncompressed pages */
72
 
        ulint   page_no,        /*!< in: page number */
73
 
        ulint   mode,           /*!< in: latch mode */
74
 
        mtr_t*  mtr)            /*!< in: mtr */
75
 
{
76
 
        return(buf_block_get_frame(btr_block_get(space, zip_size, page_no,
77
 
                                                 mode, mtr)));
78
 
}
79
 
 
80
 
/**************************************************************//**
81
73
Sets the index id field of a page. */
82
74
UNIV_INLINE
83
75
void