~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Mark Atwood
  • Date: 2011-10-27 05:08:12 UTC
  • mfrom: (2445.1.11 rf)
  • Revision ID: me@mark.atwood.name-20111027050812-1icvs72lb0u4xdc4
mergeĀ lp:~olafvdspek/drizzle/refactor8

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
Created 11/5/1995 Heikki Tuuri
24
24
*******************************************************/
25
25
 
 
26
#pragma once
26
27
#ifndef buf0rea_h
27
28
#define buf0rea_h
28
29
 
29
30
#include "univ.i"
30
31
#include "buf0types.h"
 
32
#include "trx0types.h"
 
33
 
 
34
/********************************************************************//**
 
35
Low-level function which reads a page asynchronously from a file to the
 
36
buffer buf_pool if it is not already there, in which case does nothing.
 
37
Sets the io_fix flag and sets an exclusive lock on the buffer frame. The
 
38
flag is cleared and the x-lock released by an i/o-handler thread.
 
39
@return 1 if a read request was queued, 0 if the page already resided
 
40
in buf_pool, or if the page is in the doublewrite buffer blocks in
 
41
which case it is never read into the pool, or if the tablespace does
 
42
not exist or is being dropped TODO update
 
43
@return 1 if read request is issued. 0 if it is not */
 
44
UNIV_INTERN
 
45
ulint
 
46
buf_read_page_low(
 
47
/*==============*/
 
48
        ulint*  err,    /*!< out: DB_SUCCESS or DB_TABLESPACE_DELETED if we are
 
49
                        trying to read from a non-existent tablespace, or a
 
50
                        tablespace which is just now being dropped */
 
51
        ibool   sync,   /*!< in: true if synchronous aio is desired */
 
52
        ulint   mode,   /*!< in: BUF_READ_IBUF_PAGES_ONLY, ...,
 
53
                        ORed to OS_AIO_SIMULATED_WAKE_LATER (see below
 
54
                        at read-ahead functions) */
 
55
        ulint   space,  /*!< in: space id */
 
56
        ulint   zip_size,/*!< in: compressed page size, or 0 */
 
57
        ibool   unzip,  /*!< in: true=request uncompressed page */
 
58
        ib_int64_t tablespace_version, /*!< in: if the space memory object has
 
59
                                       this timestamp different from what we are giving here,
 
60
                                       treat the tablespace as dropped; this is a timestamp we
 
61
                                       use to stop dangling page reads from a tablespace
 
62
                                       which we have DISCARDed + IMPORTed back */
 
63
        ulint   offset);/*!< in: page number */
31
64
 
32
65
/********************************************************************//**
33
66
High-level function which reads a page asynchronously from a file to the
124
157
 
125
158
/** The size in pages of the area which the read-ahead algorithms read if
126
159
invoked */
127
 
#define BUF_READ_AHEAD_AREA(b)                                  \
128
 
        ut_min(64, ut_2_power_up((b)->curr_size / 32))
 
160
#define BUF_READ_AHEAD_AREA(b)          64
129
161
 
130
162
/** @name Modes used in read-ahead @{ */
131
163
/** read only pages belonging to the insert buffer tree */