1089.1.11
by Brian Aker
Cleanup on enum |
1 |
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
|
2 |
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
|
|
3 |
*
|
|
1999.6.1
by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file |
4 |
* Copyright (C) 2009 Sun Microsystems, Inc.
|
1089.1.11
by Brian Aker
Cleanup on enum |
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or modify
|
|
7 |
* it under the terms of the GNU General Public License as published by
|
|
8 |
* the Free Software Foundation; either version 2 of the License, or
|
|
9 |
* (at your option) any later version.
|
|
10 |
*
|
|
11 |
* This program is distributed in the hope that it will be useful,
|
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14 |
* GNU General Public License for more details.
|
|
15 |
*
|
|
16 |
* You should have received a copy of the GNU General Public License
|
|
17 |
* along with this program; if not, write to the Free Software
|
|
18 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
19 |
*/
|
|
20 |
||
2234
by Brian Aker
Mass removal of ifdef/endif in favor of pragma once. |
21 |
#pragma once
|
1089.1.11
by Brian Aker
Cleanup on enum |
22 |
|
1280.1.10
by Monty Taylor
Put everything in drizzled into drizzled namespace. |
23 |
namespace drizzled |
24 |
{
|
|
25 |
||
1089.1.11
by Brian Aker
Cleanup on enum |
26 |
/**
|
27 |
* @TODO Move to a separate header?
|
|
28 |
*
|
|
29 |
* It's needed by item.h and field.h, which are both inter-dependent
|
|
30 |
* and contain forward declarations of many structs/classes in the
|
|
31 |
* other header file.
|
|
32 |
*
|
|
33 |
* What is needed is a separate header file that is included
|
|
34 |
* by *both* item.h and field.h to resolve inter-dependencies
|
|
35 |
*
|
|
36 |
* But, probably want to hold off on this until Stew finished the UDF cleanup
|
|
37 |
*/
|
|
38 |
enum Derivation |
|
39 |
{
|
|
40 |
DERIVATION_IGNORABLE= 5, |
|
41 |
DERIVATION_COERCIBLE= 4, |
|
42 |
DERIVATION_SYSCONST= 3, |
|
43 |
DERIVATION_IMPLICIT= 2, |
|
44 |
DERIVATION_NONE= 1, |
|
45 |
DERIVATION_EXPLICIT= 0 |
|
46 |
};
|
|
47 |
||
48 |
enum enum_parsing_place |
|
49 |
{
|
|
1240.3.2
by Brian Aker
Cleanup white space. |
50 |
NO_MATTER, |
51 |
IN_HAVING, |
|
52 |
SELECT_LIST, |
|
53 |
IN_WHERE, |
|
54 |
IN_ON
|
|
1100.2.3
by Brian Aker
Remove final bits on SJ |
55 |
};
|
1089.1.11
by Brian Aker
Cleanup on enum |
56 |
|
1240.3.2
by Brian Aker
Cleanup white space. |
57 |
enum enum_mysql_completiontype |
1089.1.11
by Brian Aker
Cleanup on enum |
58 |
{
|
1240.3.2
by Brian Aker
Cleanup white space. |
59 |
ROLLBACK_RELEASE= -2, |
60 |
ROLLBACK= 1, |
|
61 |
ROLLBACK_AND_CHAIN= 7, |
|
62 |
COMMIT_RELEASE= -1, |
|
63 |
COMMIT= 0, |
|
1089.1.11
by Brian Aker
Cleanup on enum |
64 |
COMMIT_AND_CHAIN= 6 |
65 |
};
|
|
66 |
||
67 |
enum enum_check_fields |
|
68 |
{
|
|
1240.3.2
by Brian Aker
Cleanup white space. |
69 |
CHECK_FIELD_IGNORE, |
70 |
CHECK_FIELD_WARN, |
|
1089.1.11
by Brian Aker
Cleanup on enum |
71 |
CHECK_FIELD_ERROR_FOR_NULL
|
72 |
};
|
|
73 |
||
1273.13.24
by Brian Aker
Updating style, simplified code. |
74 |
enum sql_var_t |
1089.1.11
by Brian Aker
Cleanup on enum |
75 |
{
|
1240.3.2
by Brian Aker
Cleanup white space. |
76 |
OPT_DEFAULT= 0, |
77 |
OPT_SESSION, |
|
1089.1.11
by Brian Aker
Cleanup on enum |
78 |
OPT_GLOBAL
|
79 |
};
|
|
80 |
||
1240.3.2
by Brian Aker
Cleanup white space. |
81 |
enum column_format_type |
1089.1.11
by Brian Aker
Cleanup on enum |
82 |
{
|
83 |
COLUMN_FORMAT_TYPE_NOT_USED= -1, |
|
84 |
COLUMN_FORMAT_TYPE_DEFAULT= 0, |
|
85 |
COLUMN_FORMAT_TYPE_FIXED= 1, |
|
1240.3.2
by Brian Aker
Cleanup white space. |
86 |
COLUMN_FORMAT_TYPE_DYNAMIC= 2 |
1089.1.11
by Brian Aker
Cleanup on enum |
87 |
};
|
88 |
||
89 |
||
90 |
/**
|
|
91 |
Category of table found in the table share.
|
|
92 |
*/
|
|
93 |
enum enum_table_category |
|
94 |
{
|
|
95 |
/**
|
|
96 |
Unknown value.
|
|
97 |
*/
|
|
98 |
TABLE_UNKNOWN_CATEGORY=0, |
|
99 |
||
100 |
/**
|
|
101 |
Temporary table.
|
|
102 |
The table is visible only in the session.
|
|
103 |
Therefore,
|
|
104 |
- FLUSH TABLES WITH READ LOCK
|
|
105 |
- SET GLOBAL READ_ONLY = ON
|
|
106 |
do not apply to this table.
|
|
107 |
Note that LOCK Table t FOR READ/WRITE
|
|
108 |
can be used on temporary tables.
|
|
109 |
Temporary tables are not part of the table cache.
|
|
110 |
*/
|
|
111 |
TABLE_CATEGORY_TEMPORARY=1, |
|
112 |
||
113 |
/**
|
|
114 |
User table.
|
|
115 |
These tables do honor:
|
|
116 |
- LOCK Table t FOR READ/WRITE
|
|
117 |
- FLUSH TABLES WITH READ LOCK
|
|
118 |
- SET GLOBAL READ_ONLY = ON
|
|
119 |
User tables are cached in the table cache.
|
|
120 |
*/
|
|
121 |
TABLE_CATEGORY_USER=2, |
|
122 |
||
123 |
/**
|
|
124 |
Information schema tables.
|
|
125 |
These tables are an interface provided by the system
|
|
126 |
to inspect the system metadata.
|
|
127 |
These tables do *not* honor:
|
|
128 |
- LOCK Table t FOR READ/WRITE
|
|
129 |
- FLUSH TABLES WITH READ LOCK
|
|
130 |
- SET GLOBAL READ_ONLY = ON
|
|
131 |
as there is no point in locking explicitely
|
|
132 |
an INFORMATION_SCHEMA table.
|
|
133 |
Nothing is directly written to information schema tables.
|
|
134 |
Note that this value is not used currently,
|
|
135 |
since information schema tables are not shared,
|
|
136 |
but implemented as session specific temporary tables.
|
|
137 |
*/
|
|
138 |
/*
|
|
139 |
TODO: Fixing the performance issues of I_S will lead
|
|
140 |
to I_S tables in the table cache, which should use
|
|
141 |
this table type.
|
|
142 |
*/
|
|
143 |
TABLE_CATEGORY_INFORMATION
|
|
144 |
};
|
|
145 |
||
146 |
enum enum_mark_columns |
|
1240.3.2
by Brian Aker
Cleanup white space. |
147 |
{
|
148 |
MARK_COLUMNS_NONE, |
|
149 |
MARK_COLUMNS_READ, |
|
1089.1.11
by Brian Aker
Cleanup on enum |
150 |
MARK_COLUMNS_WRITE
|
151 |
};
|
|
152 |
||
1240.3.2
by Brian Aker
Cleanup white space. |
153 |
enum enum_filetype |
154 |
{
|
|
155 |
FILETYPE_CSV, |
|
156 |
FILETYPE_XML
|
|
1089.1.11
by Brian Aker
Cleanup on enum |
157 |
};
|
158 |
||
1240.3.2
by Brian Aker
Cleanup white space. |
159 |
enum find_item_error_report_type |
1089.1.11
by Brian Aker
Cleanup on enum |
160 |
{
|
1240.3.2
by Brian Aker
Cleanup white space. |
161 |
REPORT_ALL_ERRORS, |
1089.1.11
by Brian Aker
Cleanup on enum |
162 |
REPORT_EXCEPT_NOT_FOUND, |
1240.3.2
by Brian Aker
Cleanup white space. |
163 |
IGNORE_ERRORS, |
1089.1.11
by Brian Aker
Cleanup on enum |
164 |
REPORT_EXCEPT_NON_UNIQUE, |
165 |
IGNORE_EXCEPT_NON_UNIQUE
|
|
166 |
};
|
|
167 |
||
168 |
/*
|
|
169 |
Values in this enum are used to indicate how a tables TIMESTAMP field
|
|
170 |
should be treated. It can be set to the current timestamp on insert or
|
|
171 |
update or both.
|
|
172 |
WARNING: The values are used for bit operations. If you change the
|
|
173 |
enum, you must keep the bitwise relation of the values. For example:
|
|
174 |
(int) TIMESTAMP_AUTO_SET_ON_BOTH must be equal to
|
|
175 |
(int) TIMESTAMP_AUTO_SET_ON_INSERT | (int) TIMESTAMP_AUTO_SET_ON_UPDATE.
|
|
176 |
We use an enum here so that the debugger can display the value names.
|
|
177 |
*/
|
|
178 |
enum timestamp_auto_set_type |
|
179 |
{
|
|
1240.3.2
by Brian Aker
Cleanup white space. |
180 |
TIMESTAMP_NO_AUTO_SET= 0, |
1089.1.11
by Brian Aker
Cleanup on enum |
181 |
TIMESTAMP_AUTO_SET_ON_INSERT= 1, |
1240.3.2
by Brian Aker
Cleanup white space. |
182 |
TIMESTAMP_AUTO_SET_ON_UPDATE= 2, |
1089.1.11
by Brian Aker
Cleanup on enum |
183 |
TIMESTAMP_AUTO_SET_ON_BOTH= 3 |
184 |
};
|
|
185 |
||
1240.3.2
by Brian Aker
Cleanup white space. |
186 |
enum enum_ha_read_modes |
187 |
{
|
|
188 |
RFIRST, |
|
189 |
RNEXT, |
|
190 |
RPREV, |
|
191 |
RLAST, |
|
192 |
RKEY, |
|
193 |
RNEXT_SAME
|
|
1089.1.11
by Brian Aker
Cleanup on enum |
194 |
};
|
195 |
||
1240.3.2
by Brian Aker
Cleanup white space. |
196 |
enum enum_tx_isolation |
1089.1.11
by Brian Aker
Cleanup on enum |
197 |
{
|
1240.3.2
by Brian Aker
Cleanup white space. |
198 |
ISO_READ_UNCOMMITTED, |
1089.1.11
by Brian Aker
Cleanup on enum |
199 |
ISO_READ_COMMITTED, |
1240.3.2
by Brian Aker
Cleanup white space. |
200 |
ISO_REPEATABLE_READ, |
1089.1.11
by Brian Aker
Cleanup on enum |
201 |
ISO_SERIALIZABLE
|
202 |
};
|
|
203 |
||
204 |
||
1240.3.2
by Brian Aker
Cleanup white space. |
205 |
enum SHOW_COMP_OPTION |
206 |
{
|
|
207 |
SHOW_OPTION_YES, |
|
208 |
SHOW_OPTION_NO, |
|
1089.1.11
by Brian Aker
Cleanup on enum |
209 |
SHOW_OPTION_DISABLED
|
210 |
};
|
|
211 |
||
212 |
/*
|
|
213 |
When a command is added here, be sure it's also added in mysqld.cc
|
|
214 |
in "struct show_var_st status_vars[]= {" ...
|
|
215 |
||
216 |
If the command returns a result set or is not allowed in stored
|
|
217 |
functions or triggers, please also make sure that
|
|
218 |
sp_get_flags_for_command (sp_head.cc) returns proper flags for the
|
|
219 |
added SQLCOM_.
|
|
220 |
*/
|
|
221 |
||
222 |
enum enum_sql_command { |
|
1240.3.2
by Brian Aker
Cleanup white space. |
223 |
SQLCOM_SELECT, |
224 |
SQLCOM_CREATE_TABLE, |
|
225 |
SQLCOM_CREATE_INDEX, |
|
1089.1.11
by Brian Aker
Cleanup on enum |
226 |
SQLCOM_ALTER_TABLE, |
1240.3.2
by Brian Aker
Cleanup white space. |
227 |
SQLCOM_UPDATE, |
228 |
SQLCOM_INSERT, |
|
1089.1.11
by Brian Aker
Cleanup on enum |
229 |
SQLCOM_INSERT_SELECT, |
1240.3.2
by Brian Aker
Cleanup white space. |
230 |
SQLCOM_DELETE, |
231 |
SQLCOM_TRUNCATE, |
|
232 |
SQLCOM_DROP_TABLE, |
|
1089.1.11
by Brian Aker
Cleanup on enum |
233 |
SQLCOM_DROP_INDEX, |
234 |
SQLCOM_SHOW_CREATE, |
|
235 |
SQLCOM_SHOW_CREATE_DB, |
|
236 |
SQLCOM_LOAD, |
|
237 |
SQLCOM_SET_OPTION, |
|
238 |
SQLCOM_UNLOCK_TABLES, |
|
1240.3.2
by Brian Aker
Cleanup white space. |
239 |
SQLCOM_CHANGE_DB, |
240 |
SQLCOM_CREATE_DB, |
|
241 |
SQLCOM_DROP_DB, |
|
1089.1.11
by Brian Aker
Cleanup on enum |
242 |
SQLCOM_ALTER_DB, |
1240.3.2
by Brian Aker
Cleanup white space. |
243 |
SQLCOM_REPLACE, |
1089.1.11
by Brian Aker
Cleanup on enum |
244 |
SQLCOM_REPLACE_SELECT, |
245 |
SQLCOM_CHECK, |
|
1240.3.2
by Brian Aker
Cleanup white space. |
246 |
SQLCOM_FLUSH, |
247 |
SQLCOM_KILL, |
|
1089.1.11
by Brian Aker
Cleanup on enum |
248 |
SQLCOM_ANALYZE, |
1240.3.2
by Brian Aker
Cleanup white space. |
249 |
SQLCOM_ROLLBACK, |
1089.1.11
by Brian Aker
Cleanup on enum |
250 |
SQLCOM_ROLLBACK_TO_SAVEPOINT, |
1240.3.2
by Brian Aker
Cleanup white space. |
251 |
SQLCOM_COMMIT, |
252 |
SQLCOM_SAVEPOINT, |
|
1089.1.11
by Brian Aker
Cleanup on enum |
253 |
SQLCOM_RELEASE_SAVEPOINT, |
254 |
SQLCOM_BEGIN, |
|
255 |
SQLCOM_RENAME_TABLE, |
|
256 |
SQLCOM_SHOW_WARNS, |
|
257 |
SQLCOM_EMPTY_QUERY, |
|
258 |
SQLCOM_SHOW_ERRORS, |
|
259 |
SQLCOM_CHECKSUM, |
|
260 |
/*
|
|
261 |
When a command is added here, be sure it's also added in mysqld.cc
|
|
262 |
in "struct show_var_st status_vars[]= {" ...
|
|
263 |
*/
|
|
264 |
/* This should be the last !!! */
|
|
265 |
SQLCOM_END
|
|
266 |
};
|
|
267 |
||
1240.3.2
by Brian Aker
Cleanup white space. |
268 |
enum enum_duplicates |
269 |
{
|
|
270 |
DUP_ERROR, |
|
271 |
DUP_REPLACE, |
|
272 |
DUP_UPDATE
|
|
1089.1.11
by Brian Aker
Cleanup on enum |
273 |
};
|
274 |
||
2060.2.1
by Brian Aker
Merge in SQL reserved word patch |
275 |
enum drizzle_exit_codes |
276 |
{
|
|
1271.7.7
by Tim Penhey
Move the error enums into the enum header. |
277 |
EXIT_UNSPECIFIED_ERROR = 1, |
278 |
EXIT_UNKNOWN_OPTION, |
|
279 |
EXIT_AMBIGUOUS_OPTION, |
|
280 |
EXIT_NO_ARGUMENT_ALLOWED, |
|
281 |
EXIT_ARGUMENT_REQUIRED, |
|
282 |
EXIT_VAR_PREFIX_NOT_UNIQUE, |
|
283 |
EXIT_UNKNOWN_VARIABLE, |
|
284 |
EXIT_OUT_OF_MEMORY, |
|
285 |
EXIT_UNKNOWN_SUFFIX, |
|
286 |
EXIT_NO_PTR_TO_VARIABLE, |
|
287 |
EXIT_CANNOT_CONNECT_TO_SERVICE, |
|
288 |
EXIT_OPTION_DISABLED, |
|
289 |
EXIT_ARGUMENT_INVALID
|
|
290 |
};
|
|
291 |
||
292 |
||
1280.1.10
by Monty Taylor
Put everything in drizzled into drizzled namespace. |
293 |
} /* namespace drizzled */ |
294 |