~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Jay Pipes
  • Date: 2009-02-04 15:44:25 UTC
  • mfrom: (829 drizzle)
  • mto: This revision was merged to the branch mainline in revision 830.
  • Revision ID: jpipes@serialcoder-20090204154425-th8xfk2ujz2y8xwg
Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*****************************************************************************
2
 
 
3
 
Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
4
 
 
5
 
This program is free software; you can redistribute it and/or modify it under
6
 
the terms of the GNU General Public License as published by the Free Software
7
 
Foundation; version 2 of the License.
8
 
 
9
 
This program is distributed in the hope that it will be useful, but WITHOUT
10
 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
 
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
 
 
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
16
 
 
17
 
*****************************************************************************/
18
 
 
19
1
/******************************************************
20
2
The database buffer pool flush algorithm
21
3
 
 
4
(c) 1995 Innobase Oy
 
5
 
22
6
Created 11/5/1995 Heikki Tuuri
23
7
*******************************************************/
24
8
 
27
11
#include "srv0srv.h"
28
12
 
29
13
/************************************************************************
30
 
Inserts a modified block into the flush list. */
31
 
UNIV_INTERN
32
 
void
33
 
buf_flush_insert_into_flush_list(
34
 
/*=============================*/
35
 
        buf_block_t*    block); /* in/out: block which is modified */
36
 
/************************************************************************
37
14
Inserts a modified block into the flush list in the right sorted position.
38
15
This function is used by recovery, because there the modifications do not
39
16
necessarily come in the order of lsn's. */
41
18
void
42
19
buf_flush_insert_sorted_into_flush_list(
43
20
/*====================================*/
44
 
        buf_block_t*    block); /* in/out: block which is modified */
 
21
        buf_page_t*     bpage); /* in: block which is modified */
45
22
 
46
23
/************************************************************************
47
24
This function should be called at a mini-transaction commit, if a page was
73
50
                block->page.oldest_modification = mtr->start_lsn;
74
51
                ut_ad(block->page.oldest_modification != 0);
75
52
 
76
 
                buf_flush_insert_into_flush_list(block);
 
53
                buf_flush_insert_into_flush_list(&block->page);
77
54
        } else {
78
55
                ut_ad(block->page.oldest_modification <= mtr->start_lsn);
79
56
        }
112
89
 
113
90
                ut_ad(block->page.oldest_modification != 0);
114
91
 
115
 
                buf_flush_insert_sorted_into_flush_list(block);
 
92
                buf_flush_insert_sorted_into_flush_list(&block->page);
116
93
        } else {
117
94
                ut_ad(block->page.oldest_modification <= start_lsn);
118
95
        }