~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/include/buf0flu.ic

  • Committer: Monty Taylor
  • Date: 2009-04-14 19:16:51 UTC
  • mto: (997.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 994.
  • Revision ID: mordred@inaugust.com-20090414191651-ltbww6hpqks8k7qk
Clarified instructions in README.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
*****************************************************************************/
18
18
 
19
 
/**************************************************//**
20
 
@file include/buf0flu.ic
 
19
/******************************************************
21
20
The database buffer pool flush algorithm
22
21
 
23
22
Created 11/5/1995 Heikki Tuuri
24
23
*******************************************************/
25
24
 
26
 
#ifndef UNIV_HOTBACKUP
27
25
#include "buf0buf.h"
28
26
#include "mtr0mtr.h"
29
27
#include "srv0srv.h"
30
28
 
31
 
/********************************************************************//**
 
29
/************************************************************************
32
30
Inserts a modified block into the flush list. */
33
31
UNIV_INTERN
34
32
void
35
33
buf_flush_insert_into_flush_list(
36
34
/*=============================*/
37
 
        buf_block_t*    block); /*!< in/out: block which is modified */
38
 
/********************************************************************//**
 
35
        buf_block_t*    block); /* in/out: block which is modified */
 
36
/************************************************************************
39
37
Inserts a modified block into the flush list in the right sorted position.
40
38
This function is used by recovery, because there the modifications do not
41
39
necessarily come in the order of lsn's. */
43
41
void
44
42
buf_flush_insert_sorted_into_flush_list(
45
43
/*====================================*/
46
 
        buf_block_t*    block); /*!< in/out: block which is modified */
 
44
        buf_block_t*    block); /* in/out: block which is modified */
47
45
 
48
 
/********************************************************************//**
 
46
/************************************************************************
49
47
This function should be called at a mini-transaction commit, if a page was
50
48
modified in it. Puts the block to the list of modified blocks, if it is not
51
49
already in it. */
53
51
void
54
52
buf_flush_note_modification(
55
53
/*========================*/
56
 
        buf_block_t*    block,  /*!< in: block which is modified */
57
 
        mtr_t*          mtr)    /*!< in: mtr */
 
54
        buf_block_t*    block,  /* in: block which is modified */
 
55
        mtr_t*          mtr)    /* in: mtr */
58
56
{
59
57
        ut_ad(block);
60
58
        ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
83
81
        ++srv_buf_pool_write_requests;
84
82
}
85
83
 
86
 
/********************************************************************//**
 
84
/************************************************************************
87
85
This function should be called when recovery has modified a buffer page. */
88
86
UNIV_INLINE
89
87
void
90
88
buf_flush_recv_note_modification(
91
89
/*=============================*/
92
 
        buf_block_t*    block,          /*!< in: block which is modified */
93
 
        ib_uint64_t     start_lsn,      /*!< in: start lsn of the first mtr in a
 
90
        buf_block_t*    block,          /* in: block which is modified */
 
91
        ib_uint64_t     start_lsn,      /* in: start lsn of the first mtr in a
94
92
                                        set of mtr's */
95
 
        ib_uint64_t     end_lsn)        /*!< in: end lsn of the last mtr in the
 
93
        ib_uint64_t     end_lsn)        /* in: end lsn of the last mtr in the
96
94
                                        set of mtr's */
97
95
{
98
96
        ut_ad(block);
121
119
 
122
120
        buf_pool_mutex_exit();
123
121
}
124
 
#endif /* !UNIV_HOTBACKUP */