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
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
27
QT_ORDINARY -- ordinary SQL query.
28
QT_IS -- SQL query to be shown in INFORMATION_SCHEMA (in utf8 and without
29
character set introducers).
33
Move this out of here once Stew's done with UDF breakout. The following headers need it:
35
sql_lex.h --> included by session.h
53
* @TODO Move to a separate header?
55
* It's needed by item.h and field.h, which are both inter-dependent
56
* and contain forward declarations of many structs/classes in the
59
* What is needed is a separate header file that is included
60
* by *both* item.h and field.h to resolve inter-dependencies
62
* But, probably want to hold off on this until Stew finished the UDF cleanup
66
DERIVATION_IGNORABLE= 5,
67
DERIVATION_COERCIBLE= 4,
68
DERIVATION_SYSCONST= 3,
69
DERIVATION_IMPLICIT= 2,
71
DERIVATION_EXPLICIT= 0
75
* Opening modes for open_temporary_table and open_table_from_share
77
* @TODO Put this into an appropriate header. It is only needed in:
89
enum enum_parsing_place
97
enum enum_mysql_completiontype
101
ROLLBACK_AND_CHAIN= 7,
107
enum enum_check_fields
111
CHECK_FIELD_ERROR_FOR_NULL
123
ROW_TYPE_NOT_USED=-1,
133
enum column_format_type
135
COLUMN_FORMAT_TYPE_NOT_USED= -1,
136
COLUMN_FORMAT_TYPE_DEFAULT= 0,
137
COLUMN_FORMAT_TYPE_FIXED= 1,
138
COLUMN_FORMAT_TYPE_DYNAMIC= 2
143
Category of table found in the table share.
145
enum enum_table_category
150
TABLE_UNKNOWN_CATEGORY=0,
154
The table is visible only in the session.
156
- FLUSH TABLES WITH READ LOCK
157
- SET GLOBAL READ_ONLY = ON
158
do not apply to this table.
159
Note that LOCK Table t FOR READ/WRITE
160
can be used on temporary tables.
161
Temporary tables are not part of the table cache.
163
TABLE_CATEGORY_TEMPORARY=1,
167
These tables do honor:
168
- LOCK Table t FOR READ/WRITE
169
- FLUSH TABLES WITH READ LOCK
170
- SET GLOBAL READ_ONLY = ON
171
User tables are cached in the table cache.
173
TABLE_CATEGORY_USER=2,
176
Information schema tables.
177
These tables are an interface provided by the system
178
to inspect the system metadata.
179
These tables do *not* honor:
180
- LOCK Table t FOR READ/WRITE
181
- FLUSH TABLES WITH READ LOCK
182
- SET GLOBAL READ_ONLY = ON
183
as there is no point in locking explicitely
184
an INFORMATION_SCHEMA table.
185
Nothing is directly written to information schema tables.
186
Note that this value is not used currently,
187
since information schema tables are not shared,
188
but implemented as session specific temporary tables.
191
TODO: Fixing the performance issues of I_S will lead
192
to I_S tables in the table cache, which should use
195
TABLE_CATEGORY_INFORMATION
198
enum enum_enable_or_disable
206
enum enum_delay_key_write
208
DELAY_KEY_WRITE_NONE,
214
enum enum_mark_columns
227
enum find_item_error_report_type
230
REPORT_EXCEPT_NOT_FOUND,
232
REPORT_EXCEPT_NON_UNIQUE,
233
IGNORE_EXCEPT_NON_UNIQUE
236
enum enum_schema_table_state
239
PROCESSED_BY_CREATE_SORT_INDEX,
240
PROCESSED_BY_JOIN_EXEC
247
NON_TRANSACTIONAL_TMP_TABLE,
248
TRANSACTIONAL_TMP_TABLE,
251
TMP_TABLE_FRM_FILE_ONLY
255
Values in this enum are used to indicate how a tables TIMESTAMP field
256
should be treated. It can be set to the current timestamp on insert or
258
WARNING: The values are used for bit operations. If you change the
259
enum, you must keep the bitwise relation of the values. For example:
260
(int) TIMESTAMP_AUTO_SET_ON_BOTH must be equal to
261
(int) TIMESTAMP_AUTO_SET_ON_INSERT | (int) TIMESTAMP_AUTO_SET_ON_UPDATE.
262
We use an enum here so that the debugger can display the value names.
264
enum timestamp_auto_set_type
266
TIMESTAMP_NO_AUTO_SET= 0,
267
TIMESTAMP_AUTO_SET_ON_INSERT= 1,
268
TIMESTAMP_AUTO_SET_ON_UPDATE= 2,
269
TIMESTAMP_AUTO_SET_ON_BOTH= 3
279
enum enum_ha_read_modes
289
enum enum_tx_isolation
291
ISO_READ_UNCOMMITTED,
298
enum SHOW_COMP_OPTION
306
When a command is added here, be sure it's also added in mysqld.cc
307
in "struct show_var_st status_vars[]= {" ...
309
If the command returns a result set or is not allowed in stored
310
functions or triggers, please also make sure that
311
sp_get_flags_for_command (sp_head.cc) returns proper flags for the
315
enum enum_sql_command {
322
SQLCOM_INSERT_SELECT,
327
SQLCOM_SHOW_DATABASES,
331
SQLCOM_SHOW_VARIABLES,
333
SQLCOM_SHOW_ENGINE_STATUS,
334
SQLCOM_SHOW_ENGINE_MUTEX,
335
SQLCOM_SHOW_PROCESSLIST,
337
SQLCOM_SHOW_CREATE_DB,
338
SQLCOM_SHOW_TABLE_STATUS,
341
SQLCOM_UNLOCK_TABLES,
347
SQLCOM_REPLACE_SELECT,
350
SQLCOM_ASSIGN_TO_KEYCACHE,
355
SQLCOM_ROLLBACK_TO_SAVEPOINT,
358
SQLCOM_RELEASE_SAVEPOINT,
363
SQLCOM_SHOW_OPEN_TABLES,
372
When a command is added here, be sure it's also added in mysqld.cc
373
in "struct show_var_st status_vars[]= {" ...
375
/* This should be the last !!! */
387
#endif /* DRIZZLED_ENUM_H */