1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2009 Sun Microsystems, Inc.
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.
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.
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
21
#ifndef DRIZZLED_ENUM_H
22
#define DRIZZLED_ENUM_H
30
QT_ORDINARY -- ordinary SQL query.
31
QT_IS -- SQL query to be shown in INFORMATION_SCHEMA (in utf8 and without
32
character set introducers).
36
Move this out of here once Stew's done with UDF breakout. The following headers need it:
38
sql_lex.h --> included by session.h
56
* @TODO Move to a separate header?
58
* It's needed by item.h and field.h, which are both inter-dependent
59
* and contain forward declarations of many structs/classes in the
62
* What is needed is a separate header file that is included
63
* by *both* item.h and field.h to resolve inter-dependencies
65
* But, probably want to hold off on this until Stew finished the UDF cleanup
69
DERIVATION_IGNORABLE= 5,
70
DERIVATION_COERCIBLE= 4,
71
DERIVATION_SYSCONST= 3,
72
DERIVATION_IMPLICIT= 2,
74
DERIVATION_EXPLICIT= 0
77
enum enum_parsing_place
86
enum enum_mysql_completiontype
90
ROLLBACK_AND_CHAIN= 7,
96
enum enum_check_fields
100
CHECK_FIELD_ERROR_FOR_NULL
110
enum column_format_type
112
COLUMN_FORMAT_TYPE_NOT_USED= -1,
113
COLUMN_FORMAT_TYPE_DEFAULT= 0,
114
COLUMN_FORMAT_TYPE_FIXED= 1,
115
COLUMN_FORMAT_TYPE_DYNAMIC= 2
120
Category of table found in the table share.
122
enum enum_table_category
127
TABLE_UNKNOWN_CATEGORY=0,
131
The table is visible only in the session.
133
- FLUSH TABLES WITH READ LOCK
134
- SET GLOBAL READ_ONLY = ON
135
do not apply to this table.
136
Note that LOCK Table t FOR READ/WRITE
137
can be used on temporary tables.
138
Temporary tables are not part of the table cache.
140
TABLE_CATEGORY_TEMPORARY=1,
144
These tables do honor:
145
- LOCK Table t FOR READ/WRITE
146
- FLUSH TABLES WITH READ LOCK
147
- SET GLOBAL READ_ONLY = ON
148
User tables are cached in the table cache.
150
TABLE_CATEGORY_USER=2,
153
Information schema tables.
154
These tables are an interface provided by the system
155
to inspect the system metadata.
156
These tables do *not* honor:
157
- LOCK Table t FOR READ/WRITE
158
- FLUSH TABLES WITH READ LOCK
159
- SET GLOBAL READ_ONLY = ON
160
as there is no point in locking explicitely
161
an INFORMATION_SCHEMA table.
162
Nothing is directly written to information schema tables.
163
Note that this value is not used currently,
164
since information schema tables are not shared,
165
but implemented as session specific temporary tables.
168
TODO: Fixing the performance issues of I_S will lead
169
to I_S tables in the table cache, which should use
172
TABLE_CATEGORY_INFORMATION
175
enum enum_enable_or_disable
183
enum enum_mark_columns
196
enum find_item_error_report_type
199
REPORT_EXCEPT_NOT_FOUND,
201
REPORT_EXCEPT_NON_UNIQUE,
202
IGNORE_EXCEPT_NON_UNIQUE
206
Values in this enum are used to indicate how a tables TIMESTAMP field
207
should be treated. It can be set to the current timestamp on insert or
209
WARNING: The values are used for bit operations. If you change the
210
enum, you must keep the bitwise relation of the values. For example:
211
(int) TIMESTAMP_AUTO_SET_ON_BOTH must be equal to
212
(int) TIMESTAMP_AUTO_SET_ON_INSERT | (int) TIMESTAMP_AUTO_SET_ON_UPDATE.
213
We use an enum here so that the debugger can display the value names.
215
enum timestamp_auto_set_type
217
TIMESTAMP_NO_AUTO_SET= 0,
218
TIMESTAMP_AUTO_SET_ON_INSERT= 1,
219
TIMESTAMP_AUTO_SET_ON_UPDATE= 2,
220
TIMESTAMP_AUTO_SET_ON_BOTH= 3
223
enum enum_ha_read_modes
233
enum enum_tx_isolation
235
ISO_READ_UNCOMMITTED,
242
enum SHOW_COMP_OPTION
250
When a command is added here, be sure it's also added in mysqld.cc
251
in "struct show_var_st status_vars[]= {" ...
253
If the command returns a result set or is not allowed in stored
254
functions or triggers, please also make sure that
255
sp_get_flags_for_command (sp_head.cc) returns proper flags for the
259
enum enum_sql_command {
266
SQLCOM_INSERT_SELECT,
272
SQLCOM_SHOW_CREATE_DB,
275
SQLCOM_UNLOCK_TABLES,
281
SQLCOM_REPLACE_SELECT,
287
SQLCOM_ROLLBACK_TO_SAVEPOINT,
290
SQLCOM_RELEASE_SAVEPOINT,
298
When a command is added here, be sure it's also added in mysqld.cc
299
in "struct show_var_st status_vars[]= {" ...
301
/* This should be the last !!! */
312
enum drizzle_exit_codes
314
EXIT_UNSPECIFIED_ERROR = 1,
316
EXIT_AMBIGUOUS_OPTION,
317
EXIT_NO_ARGUMENT_ALLOWED,
318
EXIT_ARGUMENT_REQUIRED,
319
EXIT_VAR_PREFIX_NOT_UNIQUE,
320
EXIT_UNKNOWN_VARIABLE,
323
EXIT_NO_PTR_TO_VARIABLE,
324
EXIT_CANNOT_CONNECT_TO_SERVICE,
325
EXIT_OPTION_DISABLED,
326
EXIT_ARGUMENT_INVALID
330
} /* namespace drizzled */
332
#endif /* DRIZZLED_ENUM_H */