~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/include/dict0boot.h

  • Committer: Patrick Crews
  • Date: 2011-01-29 14:17:35 UTC
  • mto: (2126.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2127.
  • Revision ID: gleebix@gmail.com-20110129141735-3y2658vt5ur0a33o
Fixes to make test-dbqp

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved.
 
3
Copyright (C) 1996, 2010, Innobase Oy. All Rights Reserved.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
11
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
12
 
13
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., 59 Temple
15
 
Place, Suite 330, Boston, MA 02111-1307 USA
 
14
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
 
15
St, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
*****************************************************************************/
18
18
 
46
46
/*=========*/
47
47
        mtr_t*  mtr);   /*!< in: mtr */
48
48
/**********************************************************************//**
49
 
Returns a new row, table, index, or tree id.
50
 
@return the new id */
 
49
Returns a new table, index, or space id. */
51
50
UNIV_INTERN
52
 
dulint
 
51
void
53
52
dict_hdr_get_new_id(
54
53
/*================*/
55
 
        ulint   type);  /*!< in: DICT_HDR_ROW_ID, ... */
 
54
        table_id_t*     table_id,       /*!< out: table id
 
55
                                        (not assigned if NULL) */
 
56
        index_id_t*     index_id,       /*!< out: index id
 
57
                                        (not assigned if NULL) */
 
58
        ulint*          space_id);      /*!< out: space id
 
59
                                        (not assigned if NULL) */
56
60
/**********************************************************************//**
57
61
Returns a new row id.
58
62
@return the new id */
59
63
UNIV_INLINE
60
 
dulint
 
64
row_id_t
61
65
dict_sys_get_new_row_id(void);
62
66
/*=========================*/
63
67
/**********************************************************************//**
64
68
Reads a row id from a record or other 6-byte stored form.
65
69
@return row id */
66
70
UNIV_INLINE
67
 
dulint
 
71
row_id_t
68
72
dict_sys_read_row_id(
69
73
/*=================*/
70
 
        byte*   field); /*!< in: record field */
 
74
        const byte*     field); /*!< in: record field */
71
75
/**********************************************************************//**
72
76
Writes a row id to a record or other 6-byte stored form. */
73
77
UNIV_INLINE
74
78
void
75
79
dict_sys_write_row_id(
76
80
/*==================*/
77
 
        byte*   field,  /*!< in: record field */
78
 
        dulint  row_id);/*!< in: row id */
 
81
        byte*           field,  /*!< in: record field */
 
82
        row_id_t        row_id);/*!< in: row id */
79
83
/*****************************************************************//**
80
84
Initializes the data dictionary memory structures when the database is
81
85
started. This function is also called when the data dictionary is created. */
96
100
#define DICT_HDR_PAGE_NO        FSP_DICT_HDR_PAGE_NO
97
101
 
98
102
/* The ids for the basic system tables and their indexes */
99
 
#define DICT_TABLES_ID          ut_dulint_create(0, 1)
100
 
#define DICT_COLUMNS_ID         ut_dulint_create(0, 2)
101
 
#define DICT_INDEXES_ID         ut_dulint_create(0, 3)
102
 
#define DICT_FIELDS_ID          ut_dulint_create(0, 4)
 
103
#define DICT_TABLES_ID          1
 
104
#define DICT_COLUMNS_ID         2
 
105
#define DICT_INDEXES_ID         3
 
106
#define DICT_FIELDS_ID          4
103
107
/* The following is a secondary index on SYS_TABLES */
104
 
#define DICT_TABLE_IDS_ID       ut_dulint_create(0, 5)
 
108
#define DICT_TABLE_IDS_ID       5
105
109
 
106
110
#define DICT_HDR_FIRST_ID       10      /* the ids for tables etc. start
107
111
                                        from this number, except for basic
109
113
                                        indexes; ibuf tables and indexes are
110
114
                                        assigned as the id the number
111
115
                                        DICT_IBUF_ID_MIN plus the space id */
112
 
#define DICT_IBUF_ID_MIN        ut_dulint_create(0xFFFFFFFFUL, 0)
 
116
#define DICT_IBUF_ID_MIN        0xFFFFFFFF00000000ULL
113
117
 
114
118
/* The offset of the dictionary header on the page */
115
119
#define DICT_HDR                FSEG_PAGE_DATA
119
123
#define DICT_HDR_ROW_ID         0       /* The latest assigned row id */
120
124
#define DICT_HDR_TABLE_ID       8       /* The latest assigned table id */
121
125
#define DICT_HDR_INDEX_ID       16      /* The latest assigned index id */
122
 
#define DICT_HDR_MIX_ID         24      /* Obsolete, always 0. */
 
126
#define DICT_HDR_MAX_SPACE_ID   24      /* The latest assigned space id, or 0*/
 
127
#define DICT_HDR_MIX_ID_LOW     28      /* Obsolete,always DICT_HDR_FIRST_ID */
123
128
#define DICT_HDR_TABLES         32      /* Root of the table index tree */
124
129
#define DICT_HDR_TABLE_IDS      36      /* Root of the table index tree */
125
130
#define DICT_HDR_COLUMNS        40      /* Root of the column index tree */
137
142
#define DICT_SYS_INDEXES_PAGE_NO_FIELD   8
138
143
#define DICT_SYS_INDEXES_SPACE_NO_FIELD  7
139
144
#define DICT_SYS_INDEXES_TYPE_FIELD      6
 
145
#define DICT_SYS_INDEXES_NAME_FIELD      4
140
146
 
141
147
/* When a row id which is zero modulo this number (which must be a power of
142
148
two) is assigned, the field DICT_HDR_ROW_ID on the dictionary header page is