~akopytov/percona-xtrabackup/support-gtid-2.1

« back to all changes in this revision

Viewing changes to src/changed_page_bitmap.h

MergedĀ lp:~laurynas-biveinis/percona-xtrabackup/xb-changed-page-bitmap.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************
 
2
XtraBackup: hot backup tool for InnoDB
 
3
(c) 2009-2012 Percona Inc.
 
4
Originally Created 3/3/2009 Yasufumi Kinoshita
 
5
Written by Alexey Kopytov, Aleksandr Kuzminsky, Stewart Smith, Vadim Tkachenko,
 
6
Yasufumi Kinoshita, Ignacio Nin and Baron Schwartz.
 
7
 
 
8
This program is free software; you can redistribute it and/or modify
 
9
it under the terms of the GNU General Public License as published by
 
10
the Free Software Foundation; version 2 of the License.
 
11
 
 
12
This program is distributed in the hope that it will be useful,
 
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
GNU General Public License for more details.
 
16
 
 
17
You should have received a copy of the GNU General Public License
 
18
along with this program; if not, write to the Free Software
 
19
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
20
 
 
21
*******************************************************/
 
22
 
 
23
/* Changed page bitmap interface */
 
24
 
 
25
#ifndef XB_CHANGED_PAGE_BITMAP_H
 
26
#define XB_CHANGED_PAGE_BITMAP_H
 
27
 
 
28
#include "innodb_int.h"
 
29
 
 
30
/* The changed page bitmap structure */
 
31
typedef ib_rbt_t xb_page_bitmap;
 
32
 
 
33
struct xb_page_bitmap_range_struct;
 
34
 
 
35
/* The bitmap range iterator over one space id */
 
36
typedef struct xb_page_bitmap_range_struct xb_page_bitmap_range;
 
37
 
 
38
/****************************************************************//**
 
39
Read the disk bitmap and build the changed page bitmap tree for the
 
40
LSN interval incremental_lsn to checkpoint_lsn_start.
 
41
 
 
42
@return the built bitmap tree */
 
43
xb_page_bitmap*
 
44
xb_page_bitmap_init(void);
 
45
/*=====================*/
 
46
 
 
47
/****************************************************************//**
 
48
Free the bitmap tree. */
 
49
void
 
50
xb_page_bitmap_deinit(
 
51
/*==================*/
 
52
        xb_page_bitmap* bitmap);        /*!<in/out: bitmap tree */
 
53
 
 
54
 
 
55
/****************************************************************//**
 
56
Set up a new bitmap range iterator over a given space id changed
 
57
pages in a given bitmap.
 
58
 
 
59
@return bitmap range iterator */
 
60
xb_page_bitmap_range*
 
61
xb_page_bitmap_range_init(
 
62
/*======================*/
 
63
        xb_page_bitmap* bitmap,         /*!< in: bitmap to iterate over */
 
64
        ulint           space_id);      /*!< in: space id */
 
65
 
 
66
/****************************************************************//**
 
67
Get the next page id that has its bit set or cleared, i.e. equal to
 
68
bit_value.
 
69
 
 
70
@return page id */
 
71
ulint
 
72
xb_page_bitmap_range_get_next_bit(
 
73
/*==============================*/
 
74
        xb_page_bitmap_range*   bitmap_range,   /*!< in/out: bitmap range */
 
75
        ibool                   bit_value);     /*!< in: bit value */
 
76
 
 
77
/****************************************************************//**
 
78
Free the bitmap range iterator. */
 
79
void
 
80
xb_page_bitmap_range_deinit(
 
81
/*========================*/
 
82
        xb_page_bitmap_range*   bitmap_range);  /*! in/out: bitmap range */
 
83
 
 
84
#endif