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.
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.
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.
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
21
*******************************************************/
23
/* Changed page bitmap interface */
25
#ifndef XB_CHANGED_PAGE_BITMAP_H
26
#define XB_CHANGED_PAGE_BITMAP_H
28
#include "innodb_int.h"
30
/* The changed page bitmap structure */
31
typedef ib_rbt_t xb_page_bitmap;
33
struct xb_page_bitmap_range_struct;
35
/* The bitmap range iterator over one space id */
36
typedef struct xb_page_bitmap_range_struct xb_page_bitmap_range;
38
/****************************************************************//**
39
Read the disk bitmap and build the changed page bitmap tree for the
40
LSN interval incremental_lsn to checkpoint_lsn_start.
42
@return the built bitmap tree */
44
xb_page_bitmap_init(void);
45
/*=====================*/
47
/****************************************************************//**
48
Free the bitmap tree. */
50
xb_page_bitmap_deinit(
51
/*==================*/
52
xb_page_bitmap* bitmap); /*!<in/out: bitmap tree */
55
/****************************************************************//**
56
Set up a new bitmap range iterator over a given space id changed
57
pages in a given bitmap.
59
@return bitmap range iterator */
61
xb_page_bitmap_range_init(
62
/*======================*/
63
xb_page_bitmap* bitmap, /*!< in: bitmap to iterate over */
64
ulint space_id); /*!< in: space id */
66
/****************************************************************//**
67
Get the next page id that has its bit set or cleared, i.e. equal to
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 */
77
/****************************************************************//**
78
Free the bitmap range iterator. */
80
xb_page_bitmap_range_deinit(
81
/*========================*/
82
xb_page_bitmap_range* bitmap_range); /*! in/out: bitmap range */