drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
page0types.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (C) 1994, 2009, Innobase Oy. All Rights Reserved.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License as published by the Free Software
7Foundation; version 2 of the License.
8
9This program is distributed in the hope that it will be useful, but WITHOUT
10ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13You should have received a copy of the GNU General Public License along with
14this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15St, Fifth Floor, Boston, MA 02110-1301 USA
16
17*****************************************************************************/
18
19/**************************************************/
25
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
37typedef byte page_t;
40
42typedef byte page_zip_t;
45
46/* The following definitions would better belong to page0zip.h,
47but we cannot include page0zip.h from rem0rec.ic, because
48page0*.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
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{
69
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
98
101
103extern page_zip_stat_t page_zip_stat[PAGE_ZIP_NUM_SSIZE_MAX - 1];
104
105/**********************************************************************/
108UNIV_INTERN
109void
111/*=====================*/
112 page_zip_des_t* page_zip,
113 const byte* rec,
114 ulint flag)
115 __attribute__((nonnull));
116
117/**********************************************************************/
120UNIV_INTERN
121void
123/*===================*/
124 page_zip_des_t* page_zip,
125 const byte* rec,
126 ulint flag)
127 __attribute__((nonnull));
128
129/**********************************************************************/
131UNIV_INTERN
132void
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/**********************************************************************/
144UNIV_INTERN
145void
147/*==================*/
148 page_zip_des_t* page_zip,
149 ulint is_clustered)
151 __attribute__((nonnull));
152#endif
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
struct page_cur_struct page_cur_t
Definition page0types.h:39
struct page_zip_stat_struct page_zip_stat_t
Definition page0types.h:100
struct page_zip_des_struct page_zip_des_t
Definition page0types.h:44
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
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
byte page_zip_t
Definition page0types.h:42
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
page_zip_stat_t page_zip_stat[PAGE_ZIP_NUM_SSIZE_MAX - 1]
Definition page0zip.cc:52
#define page_t
Definition page0types.h:35
#define PAGE_ZIP_SSIZE_BITS
Definition page0types.h:51
page_zip_t * data
Definition page0types.h:68
ib_uint64_t compressed_usec
Definition page0types.h:94
ib_uint64_t decompressed_usec
Definition page0types.h:96