1
1
/*****************************************************************************
3
Copyright (C) 1994, 2010, Innobase Oy. All Rights Reserved.
3
Copyright (c) 1994, 2009, Innobase Oy. All Rights Reserved.
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
11
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
13
You should have received a copy of the GNU General Public License along with
14
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15
St, Fifth Floor, Boston, MA 02110-1301 USA
14
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15
Place, Suite 330, Boston, MA 02111-1307 USA
17
17
*****************************************************************************/
39
39
Gets a buffer page and declares its latching order level. */
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 */
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 */
53
51
buf_block_t* block;
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);
58
55
if (mode != RW_NO_LATCH) {
66
63
/**************************************************************//**
64
Gets a buffer page and declares its latching order level. */
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 */
76
return(buf_block_get_frame(btr_block_get(space, zip_size, page_no,
80
/**************************************************************//**
67
81
Sets the index id field of a page. */
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 */
78
92
if (UNIV_LIKELY_NULL(page_zip)) {
81
95
page + (PAGE_HEADER + PAGE_INDEX_ID),
84
mlog_write_ull(page + (PAGE_HEADER + PAGE_INDEX_ID), id, mtr);
98
mlog_write_dulint(page + (PAGE_HEADER + PAGE_INDEX_ID),
87
102
#endif /* !UNIV_HOTBACKUP */
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 */