Drizzled Public API Documentation

page0types.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3 Copyright (C) 1994, 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., 51 Franklin
15 St, Fifth Floor, Boston, MA 02110-1301 USA
16 
17 *****************************************************************************/
18 
19 /**************************************************/
26 #pragma once
27 #ifndef page0types_h
28 #define page0types_h
29 
30 #include "univ.i"
31 #include "dict0types.h"
32 #include "mtr0types.h"
33 
35 #define page_t ib_page_t
36 
37 typedef byte page_t;
39 typedef struct page_cur_struct page_cur_t;
40 
42 typedef byte page_zip_t;
45 
46 /* The following definitions would better belong to page0zip.h,
47 but we cannot include page0zip.h from rem0rec.ic, because
48 page0*.h includes rem0rec.h and may include rem0rec.ic. */
49 
51 #define PAGE_ZIP_SSIZE_BITS 3
52 
54 #define PAGE_ZIP_MIN_SIZE_SHIFT 10
55 
56 #define PAGE_ZIP_MIN_SIZE (1 << PAGE_ZIP_MIN_SIZE_SHIFT)
57 
59 #define PAGE_ZIP_NUM_SSIZE (UNIV_PAGE_SIZE_SHIFT - PAGE_ZIP_MIN_SIZE_SHIFT + 2)
60 #define PAGE_ZIP_NUM_SSIZE_MAX (UNIV_PAGE_SIZE_SHIFT_MAX - PAGE_ZIP_MIN_SIZE_SHIFT + 2)
61 #if PAGE_ZIP_NUM_SSIZE_MAX > (1 << PAGE_ZIP_SSIZE_BITS)
62 # error "PAGE_ZIP_NUM_SSIZE_MAX > (1 << PAGE_ZIP_SSIZE_BITS)"
63 #endif
64 
67 {
70 #ifdef UNIV_DEBUG
71  unsigned m_start:16;
72 #endif /* UNIV_DEBUG */
73  unsigned m_end:16;
74  unsigned m_nonempty:1;
76  unsigned n_blobs:12;
83 };
84 
88  ulint compressed;
92  ulint decompressed;
94  ib_uint64_t compressed_usec;
96  ib_uint64_t decompressed_usec;
97 };
98 
101 
103 extern page_zip_stat_t page_zip_stat[PAGE_ZIP_NUM_SSIZE_MAX - 1];
104 
105 /**********************************************************************/
108 UNIV_INTERN
109 void
111 /*=====================*/
112  page_zip_des_t* page_zip,
113  const byte* rec,
114  ulint flag)
115  __attribute__((nonnull));
116 
117 /**********************************************************************/
120 UNIV_INTERN
121 void
123 /*===================*/
124  page_zip_des_t* page_zip,
125  const byte* rec,
126  ulint flag)
127  __attribute__((nonnull));
128 
129 /**********************************************************************/
131 UNIV_INTERN
132 void
134 /*================*/
135  page_zip_des_t* page_zip,
136  byte* rec,
137  dict_index_t* index,
138  const ulint* offsets,
139  const byte* free)
140  __attribute__((nonnull(1,2,3,4)));
141 
142 /**********************************************************************/
144 UNIV_INTERN
145 void
147 /*==================*/
148  page_zip_des_t* page_zip,
149  ulint is_clustered)
151  __attribute__((nonnull));
152 #endif
#define page_t
Definition: page0types.h:35
page_zip_stat_t page_zip_stat[PAGE_ZIP_NUM_SSIZE_MAX-1]
Definition: page0zip.cc:52
UNIV_INTERN void page_zip_rec_set_deleted(page_zip_des_t *page_zip, const byte *rec, ulint flag) __attribute__((nonnull))
Definition: page0zip.cc:4029
UNIV_INTERN void page_zip_dir_delete(page_zip_des_t *page_zip, byte *rec, dict_index_t *index, const ulint *offsets, const byte *free) __attribute__((nonnull(1
ib_uint64_t decompressed_usec
Definition: page0types.h:96
UNIV_INTERN void page_zip_rec_set_owned(page_zip_des_t *page_zip, const byte *rec, ulint flag) __attribute__((nonnull))
Definition: page0zip.cc:4053
unsigned m_nonempty
Definition: page0types.h:74
#define PAGE_ZIP_SSIZE_BITS
Definition: page0types.h:51
ib_uint64_t compressed_usec
Definition: page0types.h:94
page_zip_t * data
Definition: page0types.h:68
byte page_zip_t
Definition: page0types.h:42
UNIV_INTERN void UNIV_INTERN void page_zip_dir_add_slot(page_zip_des_t *page_zip, ulint is_clustered) __attribute__((nonnull))
Definition: page0zip.cc:4249