~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/include/btr0btr.ic

  • Committer: Brian Aker
  • Date: 2010-10-20 20:26:18 UTC
  • mfrom: (1859.2.13 refactor)
  • Revision ID: brian@tangent.org-20101020202618-9222n39lm329urv5
Merge for Brian 

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, 2009, Innobase Oy. 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_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
 
        mtr_t*          mtr)            /*!< in/out: mtr */
 
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 */
52
50
{
53
51
        buf_block_t*    block;
54
52
 
55
 
        block = buf_page_get_gen(space, zip_size, page_no, mode,
56
 
                                 NULL, BUF_GET, file, line, mtr);
 
53
        block = buf_page_get(space, zip_size, page_no, mode, mtr);
57
54
 
58
55
        if (mode != RW_NO_LATCH) {
59
56
 
64
61
}
65
62
 
66
63
/**************************************************************//**
 
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
/**************************************************************//**
67
81
Sets the index id field of a page. */
68
82
UNIV_INLINE
69
83
void
72
86
        page_t*         page,   /*!< in: page to be created */
73
87
        page_zip_des_t* page_zip,/*!< in: compressed page whose uncompressed
74
88
                                part will be updated, or NULL */
75
 
        index_id_t      id,     /*!< in: index id */
 
89
        dulint          id,     /*!< in: index id */
76
90
        mtr_t*          mtr)    /*!< in: mtr */
77
91
{
78
92
        if (UNIV_LIKELY_NULL(page_zip)) {
81
95
                                      page + (PAGE_HEADER + PAGE_INDEX_ID),
82
96
                                      8, mtr);
83
97
        } else {
84
 
                mlog_write_ull(page + (PAGE_HEADER + PAGE_INDEX_ID), id, mtr);
 
98
                mlog_write_dulint(page + (PAGE_HEADER + PAGE_INDEX_ID),
 
99
                                  id, mtr);
85
100
        }
86
101
}
87
102
#endif /* !UNIV_HOTBACKUP */
90
105
Gets the index id field of a page.
91
106
@return index id */
92
107
UNIV_INLINE
93
 
index_id_t
 
108
dulint
94
109
btr_page_get_index_id(
95
110
/*==================*/
96
111
        const page_t*   page)   /*!< in: index page */
243
258
 
244
259
/**************************************************************//**
245
260
Gets the child node file address in a node pointer.
246
 
NOTE: the offsets array must contain all offsets for the record since
247
 
we read the last field according to offsets and assume that it contains
248
 
the child page number. In other words offsets must have been retrieved
249
 
with rec_get_offsets(n_fields=ULINT_UNDEFINED).
250
261
@return child node address */
251
262
UNIV_INLINE
252
263
ulint