31
31
#include "buf0types.h"
32
#include "trx0types.h"
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 */
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 */
33
65
/********************************************************************//**
34
66
High-level function which reads a page asynchronously from a file to the