~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

Merge Monty - Added inter-plugin dependencies for controlling plugin load order

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
27
26
#ifndef buf0rea_h
28
27
#define buf0rea_h
29
28
 
30
29
#include "univ.i"
31
30
#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 */
64
31
 
65
32
/********************************************************************//**
66
33
High-level function which reads a page asynchronously from a file to the
157
124
 
158
125
/** The size in pages of the area which the read-ahead algorithms read if
159
126
invoked */
160
 
#define BUF_READ_AHEAD_AREA(b)          64
 
127
#define BUF_READ_AHEAD_AREA(b)                                  \
 
128
        ut_min(64, ut_2_power_up((b)->curr_size / 32))
161
129
 
162
130
/** @name Modes used in read-ahead @{ */
163
131
/** read only pages belonging to the insert buffer tree */