My Project
lex.h
00001 #ifndef LEX_INCLUDED
00002 #define LEX_INCLUDED
00003 
00004 /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; version 2 of the License.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013    GNU General Public License for more details.
00014 
00015    You should have received a copy of the GNU General Public License
00016    along with this program; if not, write to the Free Software Foundation,
00017    51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
00018 
00019 
00020 /* This file includes all reserved words and functions */
00021 
00022 #include "lex_symbol.h"
00023 
00024 SYM_GROUP sym_group_common= {"", ""};
00025 SYM_GROUP sym_group_geom= {"Spatial extentions", "HAVE_SPATIAL"};
00026 SYM_GROUP sym_group_rtree= {"RTree keys", "HAVE_RTREE_KEYS"};
00027 
00028 /* We don't want to include sql_yacc.h into gen_lex_hash */
00029 #ifdef NO_YACC_SYMBOLS
00030 #define SYM_OR_NULL(A) 0
00031 #else
00032 #define SYM_OR_NULL(A) A
00033 #endif
00034 
00035 #define SYM(A) SYM_OR_NULL(A),0,&sym_group_common
00036 
00037 /*
00038   Symbols are broken into separated arrays to allow field names with
00039   same name as functions.
00040   These are kept sorted for human lookup (the symbols are hashed).
00041 
00042   NOTE! The symbol tables should be the same regardless of what features
00043   are compiled into the server. Don't add ifdef'ed symbols to the
00044   lists
00045 */
00046 
00047 static SYMBOL symbols[] = {
00048   { "&&",               SYM(AND_AND_SYM)},
00049   { "<",                SYM(LT)},
00050   { "<=",               SYM(LE)},
00051   { "<>",               SYM(NE)},
00052   { "!=",               SYM(NE)},
00053   { "=",                SYM(EQ)},
00054   { ">",                SYM(GT_SYM)},
00055   { ">=",               SYM(GE)},
00056   { "<<",               SYM(SHIFT_LEFT)},
00057   { ">>",               SYM(SHIFT_RIGHT)},
00058   { "<=>",              SYM(EQUAL_SYM)},
00059   { "ACCESSIBLE",       SYM(ACCESSIBLE_SYM)},
00060   { "ACTION",           SYM(ACTION)},
00061   { "ADD",              SYM(ADD)},
00062   { "AFTER",            SYM(AFTER_SYM)},
00063   { "AGAINST",          SYM(AGAINST)},
00064   { "AGGREGATE",        SYM(AGGREGATE_SYM)},
00065   { "ALL",              SYM(ALL)},
00066   { "ALGORITHM",        SYM(ALGORITHM_SYM)},
00067   { "ALTER",            SYM(ALTER)},
00068   { "ANALYSE",          SYM(ANALYSE_SYM)}, // this one is for PROCEDURE ANALYSE
00069   { "ANALYZE",          SYM(ANALYZE_SYM)}, // this one is for ANALYZE TABLE etc
00070   { "AND",              SYM(AND_SYM)},
00071   { "ANY",              SYM(ANY_SYM)},
00072   { "AS",               SYM(AS)},
00073   { "ASC",              SYM(ASC)},
00074   { "ASCII",            SYM(ASCII_SYM)},
00075   { "ASENSITIVE",       SYM(ASENSITIVE_SYM)},
00076   { "AT",               SYM(AT_SYM)},
00077   { "AUTO_INCREMENT",   SYM(AUTO_INC)},
00078   { "AUTOEXTEND_SIZE",  SYM(AUTOEXTEND_SIZE_SYM)},
00079   { "AVG",              SYM(AVG_SYM)},
00080   { "AVG_ROW_LENGTH",   SYM(AVG_ROW_LENGTH)},
00081   { "BACKUP",           SYM(BACKUP_SYM)},
00082   { "BEFORE",           SYM(BEFORE_SYM)},
00083   { "BEGIN",            SYM(BEGIN_SYM)},
00084   { "BETWEEN",          SYM(BETWEEN_SYM)},
00085   { "BIGINT",           SYM(BIGINT)},
00086   { "BINARY",           SYM(BINARY)},
00087   { "BINLOG",           SYM(BINLOG_SYM)},
00088   { "BIT",              SYM(BIT_SYM)},
00089   { "BLOB",             SYM(BLOB_SYM)},
00090   { "BLOCK",  SYM(BLOCK_SYM)},
00091   { "BOOL",             SYM(BOOL_SYM)},
00092   { "BOOLEAN",          SYM(BOOLEAN_SYM)},
00093   { "BOTH",             SYM(BOTH)},
00094   { "BTREE",            SYM(BTREE_SYM)},
00095   { "BY",               SYM(BY)},
00096   { "BYTE",             SYM(BYTE_SYM)},
00097   { "CACHE",            SYM(CACHE_SYM)},
00098   { "CALL",             SYM(CALL_SYM)},
00099   { "CASCADE",          SYM(CASCADE)},
00100   { "CASCADED",         SYM(CASCADED)},
00101   { "CASE",             SYM(CASE_SYM)},
00102   { "CATALOG_NAME",     SYM(CATALOG_NAME_SYM)},
00103   { "CHAIN",            SYM(CHAIN_SYM)},
00104   { "CHANGE",           SYM(CHANGE)},
00105   { "CHANGED",          SYM(CHANGED)},
00106   { "CHAR",             SYM(CHAR_SYM)},
00107   { "CHARACTER",        SYM(CHAR_SYM)},
00108   { "CHARSET",          SYM(CHARSET)},
00109   { "CHECK",            SYM(CHECK_SYM)},
00110   { "CHECKSUM",         SYM(CHECKSUM_SYM)},
00111   { "CIPHER",           SYM(CIPHER_SYM)},
00112   { "CLASS_ORIGIN",     SYM(CLASS_ORIGIN_SYM)},
00113   { "CLIENT",           SYM(CLIENT_SYM)},
00114   { "CLOSE",            SYM(CLOSE_SYM)},
00115   { "COALESCE",         SYM(COALESCE)},
00116   { "CODE",             SYM(CODE_SYM)},
00117   { "COLLATE",          SYM(COLLATE_SYM)},
00118   { "COLLATION",        SYM(COLLATION_SYM)},
00119   { "COLUMN",           SYM(COLUMN_SYM)},
00120   { "COLUMN_FORMAT",    SYM(COLUMN_FORMAT_SYM)},
00121   { "COLUMN_NAME",      SYM(COLUMN_NAME_SYM)},
00122   { "COLUMNS",          SYM(COLUMNS)},
00123   { "COMMENT",          SYM(COMMENT_SYM)},
00124   { "COMMIT",           SYM(COMMIT_SYM)},
00125   { "COMMITTED",        SYM(COMMITTED_SYM)},
00126   { "COMPACT",          SYM(COMPACT_SYM)},
00127   { "COMPLETION",       SYM(COMPLETION_SYM)},
00128   { "COMPRESSED",       SYM(COMPRESSED_SYM)},
00129   { "CONCURRENT",       SYM(CONCURRENT)},
00130   { "CONDITION",        SYM(CONDITION_SYM)},
00131   { "CONNECTION",       SYM(CONNECTION_SYM)},
00132   { "CONSISTENT",       SYM(CONSISTENT_SYM)},
00133   { "CONSTRAINT",       SYM(CONSTRAINT)},
00134   { "CONSTRAINT_CATALOG", SYM(CONSTRAINT_CATALOG_SYM)},
00135   { "CONSTRAINT_NAME",  SYM(CONSTRAINT_NAME_SYM)},
00136   { "CONSTRAINT_SCHEMA", SYM(CONSTRAINT_SCHEMA_SYM)},
00137   { "CONTAINS",         SYM(CONTAINS_SYM)},
00138   { "CONTEXT",    SYM(CONTEXT_SYM)},
00139   { "CONTINUE",         SYM(CONTINUE_SYM)},
00140   { "CONVERT",          SYM(CONVERT_SYM)},
00141   { "CPU",        SYM(CPU_SYM)},
00142   { "CREATE",           SYM(CREATE)},
00143   { "CROSS",            SYM(CROSS)},
00144   { "CUBE",             SYM(CUBE_SYM)},
00145   { "CURRENT",          SYM(CURRENT_SYM)},
00146   { "CURRENT_DATE",     SYM(CURDATE)},
00147   { "CURRENT_TIME",     SYM(CURTIME)},
00148   { "CURRENT_TIMESTAMP", SYM(NOW_SYM)},
00149   { "CURRENT_USER",     SYM(CURRENT_USER)},
00150   { "CURSOR",           SYM(CURSOR_SYM)},
00151   { "CURSOR_NAME",      SYM(CURSOR_NAME_SYM)},
00152   { "DATA",             SYM(DATA_SYM)},
00153   { "DATABASE",         SYM(DATABASE)},
00154   { "DATABASES",        SYM(DATABASES)},
00155   { "DATAFILE",         SYM(DATAFILE_SYM)},
00156   { "DATE",             SYM(DATE_SYM)},
00157   { "DATETIME",         SYM(DATETIME)},
00158   { "DAY",              SYM(DAY_SYM)},
00159   { "DAY_HOUR",         SYM(DAY_HOUR_SYM)},
00160   { "DAY_MICROSECOND",  SYM(DAY_MICROSECOND_SYM)},
00161   { "DAY_MINUTE",       SYM(DAY_MINUTE_SYM)},
00162   { "DAY_SECOND",       SYM(DAY_SECOND_SYM)},
00163   { "DEALLOCATE",       SYM(DEALLOCATE_SYM)},     
00164   { "DEC",              SYM(DECIMAL_SYM)},
00165   { "DECIMAL",          SYM(DECIMAL_SYM)},
00166   { "DECLARE",          SYM(DECLARE_SYM)},
00167   { "DEFAULT",          SYM(DEFAULT)},
00168   { "DEFAULT_AUTH",     SYM(DEFAULT_AUTH_SYM)},
00169   { "DEFINER",          SYM(DEFINER_SYM)},
00170   { "DELAYED",          SYM(DELAYED_SYM)},
00171   { "DELAY_KEY_WRITE",  SYM(DELAY_KEY_WRITE_SYM)},
00172   { "DELETE",           SYM(DELETE_SYM)},
00173   { "DESC",             SYM(DESC)},
00174   { "DESCRIBE",         SYM(DESCRIBE)},
00175   { "DES_KEY_FILE",     SYM(DES_KEY_FILE)},
00176   { "DETERMINISTIC",    SYM(DETERMINISTIC_SYM)},
00177   { "DIAGNOSTICS",      SYM(DIAGNOSTICS_SYM)},
00178   { "DIRECTORY",        SYM(DIRECTORY_SYM)},
00179   { "DISABLE",          SYM(DISABLE_SYM)},
00180   { "DISCARD",          SYM(DISCARD)},
00181   { "DISK",             SYM(DISK_SYM)},
00182   { "DISTINCT",         SYM(DISTINCT)},
00183   { "DISTINCTROW",      SYM(DISTINCT)}, /* Access likes this */
00184   { "DIV",              SYM(DIV_SYM)},
00185   { "DO",               SYM(DO_SYM)},
00186   { "DOUBLE",           SYM(DOUBLE_SYM)},
00187   { "DROP",             SYM(DROP)},
00188   { "DUAL",             SYM(DUAL_SYM)},
00189   { "DUMPFILE",         SYM(DUMPFILE)},
00190   { "DUPLICATE",        SYM(DUPLICATE_SYM)},
00191   { "DYNAMIC",          SYM(DYNAMIC_SYM)},
00192   { "EACH",             SYM(EACH_SYM)},
00193   { "ELSE",             SYM(ELSE)},
00194   { "ELSEIF",           SYM(ELSEIF_SYM)},
00195   { "ENABLE",           SYM(ENABLE_SYM)},
00196   { "ENCLOSED",         SYM(ENCLOSED)},
00197   { "END",              SYM(END)},
00198   { "ENDS",             SYM(ENDS_SYM)},
00199   { "ENGINE",           SYM(ENGINE_SYM)},
00200   { "ENGINES",          SYM(ENGINES_SYM)},
00201   { "ENUM",             SYM(ENUM)},
00202   { "ERROR",            SYM(ERROR_SYM)},
00203   { "ERRORS",           SYM(ERRORS)},
00204   { "ESCAPE",           SYM(ESCAPE_SYM)},
00205   { "ESCAPED",          SYM(ESCAPED)},
00206   { "EVENT",            SYM(EVENT_SYM)},
00207   { "EVENTS",           SYM(EVENTS_SYM)},
00208   { "EVERY",            SYM(EVERY_SYM)},
00209   { "EXCHANGE",         SYM(EXCHANGE_SYM)},
00210   { "EXECUTE",          SYM(EXECUTE_SYM)},
00211   { "EXISTS",           SYM(EXISTS)},
00212   { "EXIT",             SYM(EXIT_SYM)},
00213   { "EXPANSION",        SYM(EXPANSION_SYM)},
00214   { "EXPORT",           SYM(EXPORT_SYM)},
00215   { "EXPIRE",           SYM(EXPIRE_SYM)},
00216   { "EXPLAIN",          SYM(DESCRIBE)},
00217   { "EXTENDED",         SYM(EXTENDED_SYM)},
00218   { "EXTENT_SIZE",      SYM(EXTENT_SIZE_SYM)},
00219   { "FALSE",            SYM(FALSE_SYM)},
00220   { "FAST",             SYM(FAST_SYM)},
00221   { "FAULTS",  SYM(FAULTS_SYM)},
00222   { "FETCH",            SYM(FETCH_SYM)},
00223   { "FIELDS",           SYM(COLUMNS)},
00224   { "FILE",             SYM(FILE_SYM)},
00225   { "FIRST",            SYM(FIRST_SYM)},
00226   { "FIXED",            SYM(FIXED_SYM)},
00227   { "FLOAT",            SYM(FLOAT_SYM)},
00228   { "FLOAT4",           SYM(FLOAT_SYM)},
00229   { "FLOAT8",           SYM(DOUBLE_SYM)},
00230   { "FLUSH",            SYM(FLUSH_SYM)},
00231   { "FOR",              SYM(FOR_SYM)},
00232   { "FORCE",            SYM(FORCE_SYM)},
00233   { "FOREIGN",          SYM(FOREIGN)},
00234   { "FORMAT",           SYM(FORMAT_SYM)},
00235   { "FOUND",            SYM(FOUND_SYM)},
00236   { "FROM",             SYM(FROM)},
00237   { "FULL",             SYM(FULL)},
00238   { "FULLTEXT",         SYM(FULLTEXT_SYM)},
00239   { "FUNCTION",         SYM(FUNCTION_SYM)},
00240   { "GENERAL",          SYM(GENERAL)},
00241   { "GEOMETRY",         SYM(GEOMETRY_SYM)},
00242   { "GEOMETRYCOLLECTION",SYM(GEOMETRYCOLLECTION)},
00243   { "GET_FORMAT",       SYM(GET_FORMAT)},
00244   { "GET",              SYM(GET_SYM)},
00245   { "GLOBAL",           SYM(GLOBAL_SYM)},
00246   { "GRANT",            SYM(GRANT)},
00247   { "GRANTS",           SYM(GRANTS)},
00248   { "GROUP",            SYM(GROUP_SYM)},
00249   { "HANDLER",          SYM(HANDLER_SYM)},
00250   { "HASH",             SYM(HASH_SYM)},
00251   { "HAVING",           SYM(HAVING)},
00252   { "HELP",             SYM(HELP_SYM)},
00253   { "HIGH_PRIORITY",    SYM(HIGH_PRIORITY)},
00254   { "HOST",             SYM(HOST_SYM)},
00255   { "HOSTS",            SYM(HOSTS_SYM)},
00256   { "HOUR",             SYM(HOUR_SYM)},
00257   { "HOUR_MICROSECOND", SYM(HOUR_MICROSECOND_SYM)},
00258   { "HOUR_MINUTE",      SYM(HOUR_MINUTE_SYM)},
00259   { "HOUR_SECOND",      SYM(HOUR_SECOND_SYM)},
00260   { "IDENTIFIED",       SYM(IDENTIFIED_SYM)},
00261   { "IF",               SYM(IF)},
00262   { "IGNORE",           SYM(IGNORE_SYM)},
00263   { "IGNORE_SERVER_IDS", SYM(IGNORE_SERVER_IDS_SYM)},
00264   { "IMPORT",           SYM(IMPORT)},
00265   { "IN",               SYM(IN_SYM)},
00266   { "INDEX",            SYM(INDEX_SYM)},
00267   { "INDEXES",          SYM(INDEXES)},
00268   { "INFILE",           SYM(INFILE)},
00269   { "INITIAL_SIZE",     SYM(INITIAL_SIZE_SYM)},
00270   { "INNER",            SYM(INNER_SYM)},
00271   { "INOUT",            SYM(INOUT_SYM)},
00272   { "INSENSITIVE",      SYM(INSENSITIVE_SYM)},
00273   { "INSERT",           SYM(INSERT)},
00274   { "INSERT_METHOD",    SYM(INSERT_METHOD)},
00275   { "INSTALL",          SYM(INSTALL_SYM)},
00276   { "INT",              SYM(INT_SYM)},
00277   { "INT1",             SYM(TINYINT)},
00278   { "INT2",             SYM(SMALLINT)},
00279   { "INT3",             SYM(MEDIUMINT)},
00280   { "INT4",             SYM(INT_SYM)},
00281   { "INT8",             SYM(BIGINT)},
00282   { "INTEGER",          SYM(INT_SYM)},
00283   { "INTERVAL",         SYM(INTERVAL_SYM)},
00284   { "INTO",             SYM(INTO)},
00285   { "IO",     SYM(IO_SYM)},
00286   { "IO_AFTER_GTIDS",   SYM(IO_AFTER_GTIDS)},
00287   { "IO_BEFORE_GTIDS",  SYM(IO_BEFORE_GTIDS)},
00288   { "IO_THREAD",        SYM(RELAY_THREAD)},
00289   { "IPC",    SYM(IPC_SYM)},
00290   { "IS",               SYM(IS)},
00291   { "ISOLATION",        SYM(ISOLATION)},
00292   { "ISSUER",           SYM(ISSUER_SYM)},
00293   { "ITERATE",          SYM(ITERATE_SYM)},
00294   { "INVOKER",          SYM(INVOKER_SYM)},
00295   { "JOIN",             SYM(JOIN_SYM)},
00296   { "KEY",              SYM(KEY_SYM)},
00297   { "KEYS",             SYM(KEYS)},
00298   { "KEY_BLOCK_SIZE",   SYM(KEY_BLOCK_SIZE)},
00299   { "KILL",             SYM(KILL_SYM)},
00300   { "LANGUAGE",         SYM(LANGUAGE_SYM)},
00301   { "LAST",             SYM(LAST_SYM)},
00302   { "LEADING",          SYM(LEADING)},
00303   { "LEAVE",            SYM(LEAVE_SYM)},
00304   { "LEAVES",           SYM(LEAVES)},
00305   { "LEFT",             SYM(LEFT)},
00306   { "LESS",             SYM(LESS_SYM)},
00307   { "LEVEL",            SYM(LEVEL_SYM)},
00308   { "LIKE",             SYM(LIKE)},
00309   { "LIMIT",            SYM(LIMIT)},
00310   { "LINEAR",           SYM(LINEAR_SYM)},
00311   { "LINES",            SYM(LINES)},
00312   { "LINESTRING",       SYM(LINESTRING)},
00313   { "LIST",             SYM(LIST_SYM)},
00314   { "LOAD",             SYM(LOAD)},
00315   { "LOCAL",            SYM(LOCAL_SYM)},
00316   { "LOCALTIME",        SYM(NOW_SYM)},
00317   { "LOCALTIMESTAMP",   SYM(NOW_SYM)},
00318   { "LOCK",             SYM(LOCK_SYM)},
00319   { "LOCKS",            SYM(LOCKS_SYM)},
00320   { "LOGFILE",          SYM(LOGFILE_SYM)},
00321   { "LOGS",             SYM(LOGS_SYM)},
00322   { "LONG",             SYM(LONG_SYM)},
00323   { "LONGBLOB",         SYM(LONGBLOB)},
00324   { "LONGTEXT",         SYM(LONGTEXT)},
00325   { "LOOP",             SYM(LOOP_SYM)},
00326   { "LOW_PRIORITY",     SYM(LOW_PRIORITY)},
00327   { "MASTER",           SYM(MASTER_SYM)},
00328   { "MASTER_AUTO_POSITION",      SYM(MASTER_AUTO_POSITION_SYM)},
00329   { "MASTER_BIND",      SYM(MASTER_BIND_SYM)},
00330   { "MASTER_CONNECT_RETRY",           SYM(MASTER_CONNECT_RETRY_SYM)},
00331   { "MASTER_DELAY",     SYM(MASTER_DELAY_SYM)},
00332   { "MASTER_HOST",           SYM(MASTER_HOST_SYM)},
00333   { "MASTER_LOG_FILE",           SYM(MASTER_LOG_FILE_SYM)},
00334   { "MASTER_LOG_POS",           SYM(MASTER_LOG_POS_SYM)},
00335   { "MASTER_PASSWORD",           SYM(MASTER_PASSWORD_SYM)},
00336   { "MASTER_PORT",           SYM(MASTER_PORT_SYM)},
00337   { "MASTER_RETRY_COUNT",           SYM(MASTER_RETRY_COUNT_SYM)},
00338   { "MASTER_SERVER_ID",           SYM(MASTER_SERVER_ID_SYM)},
00339   { "MASTER_SSL",       SYM(MASTER_SSL_SYM)},
00340   { "MASTER_SSL_CA",    SYM(MASTER_SSL_CA_SYM)},
00341   { "MASTER_SSL_CAPATH",SYM(MASTER_SSL_CAPATH_SYM)},
00342   { "MASTER_SSL_CERT",  SYM(MASTER_SSL_CERT_SYM)},
00343   { "MASTER_SSL_CIPHER",SYM(MASTER_SSL_CIPHER_SYM)},
00344   { "MASTER_SSL_CRL",   SYM(MASTER_SSL_CRL_SYM)},
00345   { "MASTER_SSL_CRLPATH",SYM(MASTER_SSL_CRLPATH_SYM)},
00346   { "MASTER_SSL_KEY",   SYM(MASTER_SSL_KEY_SYM)},
00347   { "MASTER_SSL_VERIFY_SERVER_CERT", SYM(MASTER_SSL_VERIFY_SERVER_CERT_SYM)},
00348   { "MASTER_USER",           SYM(MASTER_USER_SYM)},
00349   { "MASTER_HEARTBEAT_PERIOD", SYM(MASTER_HEARTBEAT_PERIOD_SYM)},
00350   { "MATCH",            SYM(MATCH)},
00351   { "MAX_CONNECTIONS_PER_HOUR", SYM(MAX_CONNECTIONS_PER_HOUR)},
00352   { "MAX_QUERIES_PER_HOUR", SYM(MAX_QUERIES_PER_HOUR)},
00353   { "MAX_ROWS",         SYM(MAX_ROWS)},
00354   { "MAX_SIZE",         SYM(MAX_SIZE_SYM)},
00355   { "MAX_UPDATES_PER_HOUR", SYM(MAX_UPDATES_PER_HOUR)},
00356   { "MAX_USER_CONNECTIONS", SYM(MAX_USER_CONNECTIONS_SYM)},
00357   { "MAXVALUE",         SYM(MAX_VALUE_SYM)},
00358   { "MEDIUM",           SYM(MEDIUM_SYM)},
00359   { "MEDIUMBLOB",       SYM(MEDIUMBLOB)},
00360   { "MEDIUMINT",        SYM(MEDIUMINT)},
00361   { "MEDIUMTEXT",       SYM(MEDIUMTEXT)},
00362   { "MEMORY",           SYM(MEMORY_SYM)},
00363   { "MERGE",            SYM(MERGE_SYM)},
00364   { "MESSAGE_TEXT",     SYM(MESSAGE_TEXT_SYM)},
00365   { "MICROSECOND",      SYM(MICROSECOND_SYM)},
00366   { "MIDDLEINT",        SYM(MEDIUMINT)},        /* For powerbuilder */
00367   { "MIGRATE",          SYM(MIGRATE_SYM)},
00368   { "MINUTE",           SYM(MINUTE_SYM)},
00369   { "MINUTE_MICROSECOND", SYM(MINUTE_MICROSECOND_SYM)},
00370   { "MINUTE_SECOND",    SYM(MINUTE_SECOND_SYM)},
00371   { "MIN_ROWS",         SYM(MIN_ROWS)},
00372   { "MOD",              SYM(MOD_SYM)},
00373   { "MODE",             SYM(MODE_SYM)},
00374   { "MODIFIES",         SYM(MODIFIES_SYM)},
00375   { "MODIFY",           SYM(MODIFY_SYM)},
00376   { "MONTH",            SYM(MONTH_SYM)},
00377   { "MULTILINESTRING",  SYM(MULTILINESTRING)},
00378   { "MULTIPOINT",       SYM(MULTIPOINT)},
00379   { "MULTIPOLYGON",     SYM(MULTIPOLYGON)},
00380   { "MUTEX",  SYM(MUTEX_SYM)},
00381   { "MYSQL_ERRNO",      SYM(MYSQL_ERRNO_SYM)},
00382   { "NAME",             SYM(NAME_SYM)},
00383   { "NAMES",            SYM(NAMES_SYM)},
00384   { "NATIONAL",         SYM(NATIONAL_SYM)},
00385   { "NATURAL",          SYM(NATURAL)},
00386   { "NDB",              SYM(NDBCLUSTER_SYM)},
00387   { "NDBCLUSTER",       SYM(NDBCLUSTER_SYM)},
00388   { "NCHAR",            SYM(NCHAR_SYM)},
00389   { "NEW",              SYM(NEW_SYM)},
00390   { "NEXT",             SYM(NEXT_SYM)},
00391   { "NO",               SYM(NO_SYM)},
00392   { "NO_WAIT",          SYM(NO_WAIT_SYM)},
00393   { "NODEGROUP",        SYM(NODEGROUP_SYM)},
00394   { "NONE",             SYM(NONE_SYM)},
00395   { "NOT",              SYM(NOT_SYM)},
00396   { "NO_WRITE_TO_BINLOG",  SYM(NO_WRITE_TO_BINLOG)},
00397   { "NULL",             SYM(NULL_SYM)},
00398   { "NUMBER",           SYM(NUMBER_SYM)},
00399   { "NUMERIC",          SYM(NUMERIC_SYM)},
00400   { "NVARCHAR",         SYM(NVARCHAR_SYM)},
00401   { "OFFSET",           SYM(OFFSET_SYM)},
00402   { "OLD_PASSWORD",     SYM(OLD_PASSWORD)},
00403   { "ON",               SYM(ON)},
00404   { "ONE",              SYM(ONE_SYM)},
00405   { "ONLY",             SYM(ONLY_SYM)},
00406   { "OPEN",             SYM(OPEN_SYM)},
00407   { "OPTIMIZE",         SYM(OPTIMIZE)},
00408   { "OPTIONS",          SYM(OPTIONS_SYM)},
00409   { "OPTION",           SYM(OPTION)},
00410   { "OPTIONALLY",       SYM(OPTIONALLY)},
00411   { "OR",               SYM(OR_SYM)},
00412   { "ORDER",            SYM(ORDER_SYM)},
00413   { "OUT",              SYM(OUT_SYM)},
00414   { "OUTER",            SYM(OUTER)},
00415   { "OUTFILE",          SYM(OUTFILE)},
00416   { "OWNER",            SYM(OWNER_SYM)},
00417   { "PACK_KEYS",        SYM(PACK_KEYS_SYM)},
00418   { "PARSER",           SYM(PARSER_SYM)},
00419   { "PAGE",             SYM(PAGE_SYM)},
00420   { "PARTIAL",          SYM(PARTIAL)},
00421   { "PARTITION",        SYM(PARTITION_SYM)},
00422   { "PARTITIONING",     SYM(PARTITIONING_SYM)},
00423   { "PARTITIONS",       SYM(PARTITIONS_SYM)},
00424   { "PASSWORD",         SYM(PASSWORD)},
00425   { "PHASE",            SYM(PHASE_SYM)},
00426   { "PLUGIN",           SYM(PLUGIN_SYM)},
00427   { "PLUGINS",          SYM(PLUGINS_SYM)},
00428   { "PLUGIN_DIR",       SYM(PLUGIN_DIR_SYM)},
00429   { "POINT",            SYM(POINT_SYM)},
00430   { "POLYGON",          SYM(POLYGON)},
00431   { "PORT",             SYM(PORT_SYM)},
00432   { "PRECISION",        SYM(PRECISION)},
00433   { "PREPARE",          SYM(PREPARE_SYM)},
00434   { "PRESERVE",         SYM(PRESERVE_SYM)},
00435   { "PREV",             SYM(PREV_SYM)},
00436   { "PRIMARY",          SYM(PRIMARY_SYM)},
00437   { "PRIVILEGES",       SYM(PRIVILEGES)},
00438   { "PROCEDURE",        SYM(PROCEDURE_SYM)},
00439   { "PROCESS"   ,       SYM(PROCESS)},
00440   { "PROCESSLIST",      SYM(PROCESSLIST_SYM)},
00441   { "PROFILE",          SYM(PROFILE_SYM)},
00442   { "PROFILES",         SYM(PROFILES_SYM)},
00443   { "PROXY",            SYM(PROXY_SYM)},
00444   { "PURGE",            SYM(PURGE)},
00445   { "QUARTER",          SYM(QUARTER_SYM)},
00446   { "QUERY",            SYM(QUERY_SYM)},
00447   { "QUICK",            SYM(QUICK)},
00448   { "RANGE",            SYM(RANGE_SYM)},
00449   { "READ",             SYM(READ_SYM)},
00450   { "READ_ONLY",        SYM(READ_ONLY_SYM)},
00451   { "READ_WRITE",       SYM(READ_WRITE_SYM)},
00452   { "READS",            SYM(READS_SYM)},
00453   { "REAL",             SYM(REAL)},
00454   { "REBUILD",          SYM(REBUILD_SYM)},
00455   { "RECOVER",          SYM(RECOVER_SYM)},
00456   { "REDO_BUFFER_SIZE", SYM(REDO_BUFFER_SIZE_SYM)},
00457   { "REDOFILE",         SYM(REDOFILE_SYM)},
00458   { "REDUNDANT",        SYM(REDUNDANT_SYM)},
00459   { "REFERENCES",       SYM(REFERENCES)},
00460   { "REGEXP",           SYM(REGEXP)},
00461   { "RELAY",            SYM(RELAY)},
00462   { "RELAYLOG",         SYM(RELAYLOG_SYM)},
00463   { "RELAY_LOG_FILE",   SYM(RELAY_LOG_FILE_SYM)},
00464   { "RELAY_LOG_POS",    SYM(RELAY_LOG_POS_SYM)},
00465   { "RELAY_THREAD",     SYM(RELAY_THREAD)},
00466   { "RELEASE",          SYM(RELEASE_SYM)},
00467   { "RELOAD",           SYM(RELOAD)},
00468   { "REMOVE",           SYM(REMOVE_SYM)},
00469   { "RENAME",           SYM(RENAME)},
00470   { "REORGANIZE",       SYM(REORGANIZE_SYM)},
00471   { "REPAIR",           SYM(REPAIR)},
00472   { "REPEATABLE",       SYM(REPEATABLE_SYM)},
00473   { "REPLACE",          SYM(REPLACE)},
00474   { "REPLICATION",      SYM(REPLICATION)},
00475   { "REPEAT",           SYM(REPEAT_SYM)},
00476   { "REQUIRE",          SYM(REQUIRE_SYM)},
00477   { "RESET",            SYM(RESET_SYM)},
00478   { "RESIGNAL",         SYM(RESIGNAL_SYM)},
00479   { "RESTORE",          SYM(RESTORE_SYM)},
00480   { "RESTRICT",         SYM(RESTRICT)},
00481   { "RESUME",           SYM(RESUME_SYM)},
00482   { "RETURNED_SQLSTATE",SYM(RETURNED_SQLSTATE_SYM)},
00483   { "RETURN",           SYM(RETURN_SYM)},
00484   { "RETURNS",          SYM(RETURNS_SYM)},
00485   { "REVERSE",          SYM(REVERSE_SYM)},
00486   { "REVOKE",           SYM(REVOKE)},
00487   { "RIGHT",            SYM(RIGHT)},
00488   { "RLIKE",            SYM(REGEXP)},   /* Like in mSQL2 */
00489   { "ROLLBACK",         SYM(ROLLBACK_SYM)},
00490   { "ROLLUP",           SYM(ROLLUP_SYM)},
00491   { "ROUTINE",          SYM(ROUTINE_SYM)},
00492   { "ROW",              SYM(ROW_SYM)},
00493   { "ROW_COUNT",        SYM(ROW_COUNT_SYM)},
00494   { "ROWS",             SYM(ROWS_SYM)},
00495   { "ROW_FORMAT",       SYM(ROW_FORMAT_SYM)},
00496   { "RTREE",            SYM(RTREE_SYM)},
00497   { "SAVEPOINT",        SYM(SAVEPOINT_SYM)},
00498   { "SCHEDULE",         SYM(SCHEDULE_SYM)},
00499   { "SCHEMA",           SYM(DATABASE)},
00500   { "SCHEMA_NAME",      SYM(SCHEMA_NAME_SYM)},
00501   { "SCHEMAS",          SYM(DATABASES)},
00502   { "SECOND",           SYM(SECOND_SYM)},
00503   { "SECOND_MICROSECOND", SYM(SECOND_MICROSECOND_SYM)},
00504   { "SECURITY",         SYM(SECURITY_SYM)},
00505   { "SELECT",           SYM(SELECT_SYM)},
00506   { "SENSITIVE",        SYM(SENSITIVE_SYM)},
00507   { "SEPARATOR",        SYM(SEPARATOR_SYM)},
00508   { "SERIAL",           SYM(SERIAL_SYM)},
00509   { "SERIALIZABLE",     SYM(SERIALIZABLE_SYM)},
00510   { "SESSION",          SYM(SESSION_SYM)},
00511   { "SERVER",           SYM(SERVER_SYM)},
00512   { "SET",              SYM(SET)},
00513   { "SHARE",            SYM(SHARE_SYM)},
00514   { "SHOW",             SYM(SHOW)},
00515   { "SHUTDOWN",         SYM(SHUTDOWN)},
00516   { "SIGNAL",           SYM(SIGNAL_SYM)},
00517   { "SIGNED",           SYM(SIGNED_SYM)},
00518   { "SIMPLE",           SYM(SIMPLE_SYM)},
00519   { "SLAVE",            SYM(SLAVE)},
00520   { "SLOW",             SYM(SLOW)},
00521   { "SNAPSHOT",         SYM(SNAPSHOT_SYM)},
00522   { "SMALLINT",         SYM(SMALLINT)},
00523   { "SOCKET",           SYM(SOCKET_SYM)},
00524   { "SOME",             SYM(ANY_SYM)},
00525   { "SONAME",           SYM(SONAME_SYM)},
00526   { "SOUNDS",           SYM(SOUNDS_SYM)},
00527   { "SOURCE",   SYM(SOURCE_SYM)},
00528   { "SPATIAL",          SYM(SPATIAL_SYM)},
00529   { "SPECIFIC",         SYM(SPECIFIC_SYM)},
00530   { "SQL",              SYM(SQL_SYM)},
00531   { "SQLEXCEPTION",     SYM(SQLEXCEPTION_SYM)},
00532   { "SQLSTATE",         SYM(SQLSTATE_SYM)},
00533   { "SQLWARNING",       SYM(SQLWARNING_SYM)},
00534   { "SQL_AFTER_GTIDS",  SYM(SQL_AFTER_GTIDS)},
00535   { "SQL_AFTER_MTS_GAPS", SYM(SQL_AFTER_MTS_GAPS)},
00536   { "SQL_BEFORE_GTIDS", SYM(SQL_BEFORE_GTIDS)},
00537   { "SQL_BIG_RESULT",   SYM(SQL_BIG_RESULT)},
00538   { "SQL_BUFFER_RESULT", SYM(SQL_BUFFER_RESULT)},
00539   { "SQL_CACHE",        SYM(SQL_CACHE_SYM)},
00540   { "SQL_CALC_FOUND_ROWS", SYM(SQL_CALC_FOUND_ROWS)},
00541   { "SQL_NO_CACHE",     SYM(SQL_NO_CACHE_SYM)},
00542   { "SQL_SMALL_RESULT", SYM(SQL_SMALL_RESULT)},
00543   { "SQL_THREAD",       SYM(SQL_THREAD)},
00544   { "SQL_TSI_SECOND",   SYM(SECOND_SYM)},
00545   { "SQL_TSI_MINUTE",   SYM(MINUTE_SYM)},
00546   { "SQL_TSI_HOUR",     SYM(HOUR_SYM)},
00547   { "SQL_TSI_DAY",      SYM(DAY_SYM)},
00548   { "SQL_TSI_WEEK",     SYM(WEEK_SYM)},
00549   { "SQL_TSI_MONTH",    SYM(MONTH_SYM)},
00550   { "SQL_TSI_QUARTER",  SYM(QUARTER_SYM)},
00551   { "SQL_TSI_YEAR",     SYM(YEAR_SYM)},
00552   { "SSL",              SYM(SSL_SYM)},
00553   { "START",            SYM(START_SYM)},
00554   { "STARTING",         SYM(STARTING)},
00555   { "STARTS",           SYM(STARTS_SYM)},
00556   { "STATS_AUTO_RECALC",SYM(STATS_AUTO_RECALC_SYM)},
00557   { "STATS_PERSISTENT", SYM(STATS_PERSISTENT_SYM)},
00558   { "STATS_SAMPLE_PAGES",SYM(STATS_SAMPLE_PAGES_SYM)},
00559   { "STATUS",           SYM(STATUS_SYM)},
00560   { "STOP",             SYM(STOP_SYM)},
00561   { "STORAGE",          SYM(STORAGE_SYM)},
00562   { "STRAIGHT_JOIN",    SYM(STRAIGHT_JOIN)},
00563   { "STRING",           SYM(STRING_SYM)},
00564   { "SUBCLASS_ORIGIN",  SYM(SUBCLASS_ORIGIN_SYM)},
00565   { "SUBJECT",          SYM(SUBJECT_SYM)},
00566   { "SUBPARTITION",     SYM(SUBPARTITION_SYM)},
00567   { "SUBPARTITIONS",    SYM(SUBPARTITIONS_SYM)},
00568   { "SUPER",            SYM(SUPER_SYM)},
00569   { "SUSPEND",          SYM(SUSPEND_SYM)},
00570   { "SWAPS",      SYM(SWAPS_SYM)},
00571   { "SWITCHES",   SYM(SWITCHES_SYM)},
00572   { "TABLE",            SYM(TABLE_SYM)},
00573   { "TABLE_NAME",       SYM(TABLE_NAME_SYM)},
00574   { "TABLES",           SYM(TABLES)},
00575   { "TABLESPACE",               SYM(TABLESPACE)},
00576   { "TABLE_CHECKSUM",   SYM(TABLE_CHECKSUM_SYM)},
00577   { "TEMPORARY",        SYM(TEMPORARY)},
00578   { "TEMPTABLE",        SYM(TEMPTABLE_SYM)},
00579   { "TERMINATED",       SYM(TERMINATED)},
00580   { "TEXT",             SYM(TEXT_SYM)},
00581   { "THAN",             SYM(THAN_SYM)},
00582   { "THEN",             SYM(THEN_SYM)},
00583   { "TIME",             SYM(TIME_SYM)},
00584   { "TIMESTAMP",        SYM(TIMESTAMP)},
00585   { "TIMESTAMPADD",     SYM(TIMESTAMP_ADD)},
00586   { "TIMESTAMPDIFF",    SYM(TIMESTAMP_DIFF)},
00587   { "TINYBLOB",         SYM(TINYBLOB)},
00588   { "TINYINT",          SYM(TINYINT)},
00589   { "TINYTEXT",         SYM(TINYTEXT)},
00590   { "TO",               SYM(TO_SYM)},
00591   { "TRAILING",         SYM(TRAILING)},
00592   { "TRANSACTION",      SYM(TRANSACTION_SYM)},
00593   { "TRIGGER",          SYM(TRIGGER_SYM)},
00594   { "TRIGGERS",         SYM(TRIGGERS_SYM)},
00595   { "TRUE",             SYM(TRUE_SYM)},
00596   { "TRUNCATE",         SYM(TRUNCATE_SYM)},
00597   { "TYPE",             SYM(TYPE_SYM)},
00598   { "TYPES",            SYM(TYPES_SYM)},
00599   { "UNCOMMITTED",      SYM(UNCOMMITTED_SYM)},
00600   { "UNDEFINED",        SYM(UNDEFINED_SYM)},
00601   { "UNDO_BUFFER_SIZE", SYM(UNDO_BUFFER_SIZE_SYM)},
00602   { "UNDOFILE",         SYM(UNDOFILE_SYM)},
00603   { "UNDO",             SYM(UNDO_SYM)},
00604   { "UNICODE",          SYM(UNICODE_SYM)},
00605   { "UNION",            SYM(UNION_SYM)},
00606   { "UNIQUE",           SYM(UNIQUE_SYM)},
00607   { "UNKNOWN",          SYM(UNKNOWN_SYM)},
00608   { "UNLOCK",           SYM(UNLOCK_SYM)},
00609   { "UNINSTALL",        SYM(UNINSTALL_SYM)},
00610   { "UNSIGNED",         SYM(UNSIGNED)},
00611   { "UNTIL",            SYM(UNTIL_SYM)},
00612   { "UPDATE",           SYM(UPDATE_SYM)},
00613   { "UPGRADE",          SYM(UPGRADE_SYM)},
00614   { "USAGE",            SYM(USAGE)},
00615   { "USE",              SYM(USE_SYM)},
00616   { "USER",             SYM(USER)},
00617   { "USER_RESOURCES",   SYM(RESOURCES)},
00618   { "USE_FRM",          SYM(USE_FRM)},
00619   { "USING",            SYM(USING)},
00620   { "UTC_DATE",         SYM(UTC_DATE_SYM)},
00621   { "UTC_TIME",         SYM(UTC_TIME_SYM)},
00622   { "UTC_TIMESTAMP",    SYM(UTC_TIMESTAMP_SYM)},
00623   { "VALUE",            SYM(VALUE_SYM)},
00624   { "VALUES",           SYM(VALUES)},
00625   { "VARBINARY",        SYM(VARBINARY)},
00626   { "VARCHAR",          SYM(VARCHAR)},
00627   { "VARCHARACTER",     SYM(VARCHAR)},
00628   { "VARIABLES",        SYM(VARIABLES)},
00629   { "VARYING",          SYM(VARYING)},
00630   { "WAIT",             SYM(WAIT_SYM)},
00631   { "WARNINGS",         SYM(WARNINGS)},
00632   { "WEEK",             SYM(WEEK_SYM)},
00633   { "WEIGHT_STRING",    SYM(WEIGHT_STRING_SYM)},
00634   { "WHEN",             SYM(WHEN_SYM)},
00635   { "WHERE",            SYM(WHERE)},
00636   { "WHILE",            SYM(WHILE_SYM)},
00637   { "VIEW",             SYM(VIEW_SYM)},
00638   { "WITH",             SYM(WITH)},
00639   { "WORK",             SYM(WORK_SYM)},
00640   { "WRAPPER",          SYM(WRAPPER_SYM)},
00641   { "WRITE",            SYM(WRITE_SYM)},
00642   { "X509",             SYM(X509_SYM)},
00643   { "XOR",              SYM(XOR)},
00644   { "XA",               SYM(XA_SYM)},
00645   { "XML",              SYM(XML_SYM)}, /* LOAD XML Arnold/Erik */
00646   { "YEAR",             SYM(YEAR_SYM)},
00647   { "YEAR_MONTH",       SYM(YEAR_MONTH_SYM)},
00648   { "ZEROFILL",         SYM(ZEROFILL)},
00649   { "||",               SYM(OR_OR_SYM)}
00650 };
00651 
00652 
00653 static SYMBOL sql_functions[] = {
00654   { "ADDDATE",          SYM(ADDDATE_SYM)},
00655   { "BIT_AND",          SYM(BIT_AND)},
00656   { "BIT_OR",           SYM(BIT_OR)},
00657   { "BIT_XOR",          SYM(BIT_XOR)},
00658   { "CAST",             SYM(CAST_SYM)},
00659   { "COUNT",            SYM(COUNT_SYM)},
00660   { "CURDATE",          SYM(CURDATE)},
00661   { "CURTIME",          SYM(CURTIME)},
00662   { "DATE_ADD",         SYM(DATE_ADD_INTERVAL)},
00663   { "DATE_SUB",         SYM(DATE_SUB_INTERVAL)},
00664   { "EXTRACT",          SYM(EXTRACT_SYM)},
00665   { "GROUP_CONCAT",     SYM(GROUP_CONCAT_SYM)},
00666   { "MAX",              SYM(MAX_SYM)},
00667   { "MID",              SYM(SUBSTRING)},        /* unireg function */
00668   { "MIN",              SYM(MIN_SYM)},
00669   { "NOW",              SYM(NOW_SYM)},
00670   { "POSITION",         SYM(POSITION_SYM)},
00671   { "SESSION_USER",     SYM(USER)},
00672   { "STD",              SYM(STD_SYM)},
00673   { "STDDEV",           SYM(STD_SYM)},
00674   { "STDDEV_POP",       SYM(STD_SYM)},
00675   { "STDDEV_SAMP",      SYM(STDDEV_SAMP_SYM)},
00676   { "SUBDATE",          SYM(SUBDATE_SYM)},
00677   { "SUBSTR",           SYM(SUBSTRING)},
00678   { "SUBSTRING",        SYM(SUBSTRING)},
00679   { "SUM",              SYM(SUM_SYM)},
00680   { "SYSDATE",          SYM(SYSDATE)},
00681   { "SYSTEM_USER",      SYM(USER)},
00682   { "TRIM",             SYM(TRIM)},
00683   { "VARIANCE",         SYM(VARIANCE_SYM)},
00684   { "VAR_POP",          SYM(VARIANCE_SYM)},
00685   { "VAR_SAMP",         SYM(VAR_SAMP_SYM)},
00686 };
00687 
00688 #endif /* LEX_INCLUDED */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines