~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/include/buf0rea.h

  • Committer: Olaf van der Spek
  • Date: 2011-02-12 18:24:24 UTC
  • mto: (2167.1.2 build) (2172.1.4 build)
  • mto: This revision was merged to the branch mainline in revision 2168.
  • Revision ID: olafvdspek@gmail.com-20110212182424-kgnm9osi7qo97at2
casts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
 
3
Copyright (C) 1995, 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
11
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
12
 
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., 59 Temple
15
 
Place, Suite 330, Boston, MA 02111-1307 USA
 
14
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
 
15
St, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
*****************************************************************************/
18
18
 
33
33
High-level function which reads a page asynchronously from a file to the
34
34
buffer buf_pool if it is not already there. Sets the io_fix flag and sets
35
35
an exclusive lock on the buffer frame. The flag is cleared and the x-lock
36
 
released by the i/o-handler thread. Does a random read-ahead if it seems
37
 
sensible.
38
 
@return number of page read requests issued: this can be greater than
39
 
1 if read-ahead occurred */
 
36
released by the i/o-handler thread.
 
37
@return TRUE if page has been read in, FALSE in case of failure */
40
38
UNIV_INTERN
41
 
ulint
 
39
ibool
42
40
buf_read_page(
43
41
/*==========*/
44
42
        ulint   space,  /*!< in: space id */
126
124
 
127
125
/** The size in pages of the area which the read-ahead algorithms read if
128
126
invoked */
129
 
#define BUF_READ_AHEAD_AREA                                     \
130
 
        ut_min(64, ut_2_power_up(buf_pool->curr_size / 32))
 
127
#define BUF_READ_AHEAD_AREA(b)                                  \
 
128
        ut_min(64, ut_2_power_up((b)->curr_size / 32))
131
129
 
132
130
/** @name Modes used in read-ahead @{ */
133
131
/** read only pages belonging to the insert buffer tree */