| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
#ifndef _lot0types_h_ |
| 28 |
#define _lot0types_h_ |
| 29 |
|
| 30 |
#include <stdint.h> |
| 31 |
#include <cassert> |
| 32 |
#include <iostream> |
| 33 |
#include <limits> |
| 34 |
|
| 35 |
#ifdef _WIN64 |
| 36 |
using ulint = unsigned __int64; |
| 37 |
using lobid_t = unsigned __int64; |
| 38 |
#else |
| 39 |
using ulint = unsigned long int; |
| 40 |
using lobid_t = unsigned long int; |
| 41 |
#endif |
| 42 |
using byte = unsigned char; |
| 43 |
using frag_id_t = ulint; |
| 44 |
typedef uint32_t space_id_t; |
| 45 |
typedef uint64_t ib_uint64_t; |
| 46 |
typedef ib_uint64_t ib_id_t; |
| 47 |
using page_no_t = uint32_t; |
| 48 |
typedef byte page_t; |
| 49 |
typedef ib_id_t trx_id_t; |
| 50 |
|
| 51 |
const ulint FRAG_ID_NULL = std::numeric_limits<uint16_t>::max(); |
| 52 |
const ulint KB1 = 1024; |
| 53 |
const ulint KB2 = 2 * 1024; |
| 54 |
const ulint KB5 = 5 * 1024; |
| 55 |
const ulint KB16 = 16 * 1024; |
| 56 |
const ulint KB64 = 64 * 1024; |
| 57 |
const ulint KB128 = 128 * 1024; |
| 58 |
const ulint KB300 = 300 * 1024; |
| 59 |
const ulint KB500 = 500 * 1024; |
| 60 |
const ulint MB16 = 16 * 1024 * 1024; |
| 61 |
const ulint MB10 = 10 * 1024 * 1024; |
| 62 |
const ulint MB1 = 1024 * 1024; |
| 63 |
const ulint MB2 = 2 * MB1; |
| 64 |
const ulint MB3 = 3 * MB1; |
| 65 |
const ulint MB4 = 2 * MB2; |
| 66 |
const ulint MB5 = 5 * 1024 * 1024; |
| 67 |
const ulint MB7 = 7 * 1024 * 1024; |
| 68 |
const ulint MB100 = 100 * 1024 * 1024; |
| 69 |
const ulint GB1 = 1024 * 1024 * 1024 * 1UL; |
| 70 |
const uint64_t GB4 = 1024 * 1024 * 1024 * 4UL; |
| 71 |
const ulint FIL_PAGE_DATA = 38U; |
| 72 |
const unsigned int UNIV_PAGE_SIZE = 16384; |
| 73 |
constexpr page_no_t FIL_NULL = std::numeric_limits<page_no_t>::max(); |
| 74 |
|
| 75 |
|
| 76 |
#define FIL_PAGE_OFFSET 4 |
| 77 |
|
| 78 |
|
| 79 |
#define FIL_PAGE_NEXT 12 |
| 80 |
#define FIL_PAGE_TYPE 24 |
| 81 |
|
| 82 |
|
| 83 |
#define FIL_PAGE_DATA 38U |
| 84 |
|
| 85 |
|
| 86 |
#define ULINT32_MASK 0xFFFFFFFF |
| 87 |
|
| 88 |
#define FIL_ADDR_SIZE 6 |
| 89 |
|
| 90 |
|
| 91 |
#define FLST_BASE_NODE_SIZE (4 + 2 * FIL_ADDR_SIZE) |
| 92 |
|
| 93 |
|
| 94 |
#define FLST_NODE_SIZE (2 * FIL_ADDR_SIZE) |
| 95 |
|
| 96 |
#endif |