lex.h 27.3 KB
Newer Older
unknown's avatar
unknown committed
1
/* Copyright (C) 2000-2002 MySQL AB
2

unknown's avatar
unknown committed
3 4 5 6
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
7

unknown's avatar
unknown committed
8 9 10 11
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
12

unknown's avatar
unknown committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */


/* This file includes all reserved words and functions */

#include "lex_symbol.h"

/* We don't want to include sql_yacc.h into gen_lex_hash */

#ifdef NO_YACC_SYMBOLS
#define SYM(A) 0
#define CREATE_FUNC(A) 0
#else
#define SYM(A) A
#define CREATE_FUNC(A) (void*) (A)
#endif

/*
unknown's avatar
unknown committed
33
  Symbols are broken into separated arrays to allow field names with
unknown's avatar
unknown committed
34 35
  same name as functions.
  These are kept sorted for human lookup (the symbols are hashed).
unknown's avatar
unknown committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
*/

static SYMBOL symbols[] = {
  { "&&",		SYM(AND),0,0},
  { "<",		SYM(LT),0,0},
  { "<=",		SYM(LE),0,0},
  { "<>",		SYM(NE),0,0},
  { "!=",		SYM(NE),0,0},
  { "=",		SYM(EQ),0,0},
  { ">",		SYM(GT_SYM),0,0},
  { ">=",		SYM(GE),0,0},
  { "<<",		SYM(SHIFT_LEFT),0,0},
  { ">>",		SYM(SHIFT_RIGHT),0,0},
  { "<=>",		SYM(EQUAL_SYM),0,0},
  { "ACTION",		SYM(ACTION),0,0},
  { "ADD",		SYM(ADD),0,0},
  { "AGGREGATE",	SYM(AGGREGATE_SYM),0,0},
  { "ALL",		SYM(ALL),0,0},
  { "ALTER",		SYM(ALTER),0,0},
  { "AFTER",		SYM(AFTER_SYM),0,0},
  { "AGAINST",          SYM(AGAINST),0,0},
  { "ANALYZE",		SYM(ANALYZE_SYM),0,0},
  { "AND",		SYM(AND),0,0},
unknown's avatar
unknown committed
59
  { "ANY",              SYM(ANY_SYM),0,0},
unknown's avatar
unknown committed
60 61
  { "AS",		SYM(AS),0,0},
  { "ASC",		SYM(ASC),0,0},
unknown's avatar
unknown committed
62
  { "ASCII",		SYM(ASCII_SYM),0,0},
unknown's avatar
unknown committed
63 64 65
  { "AVG",		SYM(AVG_SYM),0,0},
  { "AVG_ROW_LENGTH",	SYM(AVG_ROW_LENGTH),0,0},
  { "AUTO_INCREMENT",	SYM(AUTO_INC),0,0},
unknown's avatar
unknown committed
66
  { "BACKUP",	        SYM(BACKUP_SYM),0,0},
67
  { "BEFORE",	        SYM(BEFORE_SYM),0,0},
unknown's avatar
unknown committed
68
  { "BEGIN",	        SYM(BEGIN_SYM),0,0},
unknown's avatar
unknown committed
69 70 71 72 73 74
  { "BERKELEYDB",       SYM(BERKELEY_DB_SYM),0,0},
  { "BDB",              SYM(BERKELEY_DB_SYM),0,0},
  { "BETWEEN",		SYM(BETWEEN_SYM),0,0},
  { "BIGINT",		SYM(BIGINT),0,0},
  { "BIT",		SYM(BIT_SYM),0,0},
  { "BINARY",		SYM(BINARY),0,0},
unknown's avatar
unknown committed
75
  { "BINLOG",		SYM(BINLOG_SYM),0,0},
unknown's avatar
unknown committed
76 77
  { "BLOB",		SYM(BLOB_SYM),0,0},
  { "BOOL",		SYM(BOOL_SYM),0,0},
unknown's avatar
unknown committed
78
  { "BOOLEAN",		SYM(BOOLEAN_SYM),0,0},
unknown's avatar
unknown committed
79
  { "BOTH",		SYM(BOTH),0,0},
unknown's avatar
unknown committed
80
  { "BTREE",		SYM(BTREE_SYM),0,0},
unknown's avatar
unknown committed
81
  { "BY",		SYM(BY),0,0},
82
  { "BYTE",		SYM(BYTE_SYM), 0, 0},
unknown's avatar
unknown committed
83
  { "CACHE",		SYM(CACHE_SYM),0,0},
unknown's avatar
unknown committed
84 85 86 87
  { "CASCADE",		SYM(CASCADE),0,0},
  { "CASE",		SYM(CASE_SYM),0,0},
  { "CHAR",		SYM(CHAR_SYM),0,0},
  { "CHARACTER",	SYM(CHAR_SYM),0,0},
88
  { "CHARSET",		SYM(CHARSET),0,0},
unknown's avatar
unknown committed
89
  { "CHANGE",		SYM(CHANGE),0,0},
90
  { "CHANGED",		SYM(CHANGED),0,0},
unknown's avatar
unknown committed
91 92
  { "CHECK",		SYM(CHECK_SYM),0,0},
  { "CHECKSUM",		SYM(CHECKSUM_SYM),0,0},
unknown's avatar
unknown committed
93
  { "CIPHER",		SYM(CIPHER_SYM),0,0},
unknown's avatar
unknown committed
94
  { "CLIENT",		SYM(CLIENT_SYM),0,0},
95
  { "CLOSE",		SYM(CLOSE_SYM),0,0},
unknown's avatar
unknown committed
96
  { "COLLATE",		SYM(COLLATE_SYM),0,0},
unknown's avatar
unknown committed
97
  { "COLLATION",	SYM(COLLATION_SYM),0,0},
unknown's avatar
unknown committed
98 99 100 101
  { "COLUMN",		SYM(COLUMN_SYM),0,0},
  { "COLUMNS",		SYM(COLUMNS),0,0},
  { "COMMENT",		SYM(COMMENT_SYM),0,0},
  { "COMMIT",		SYM(COMMIT_SYM),0,0},
unknown's avatar
unknown committed
102
  { "COMMITTED",	SYM(COMMITTED_SYM),0,0},
unknown's avatar
unknown committed
103
  { "COMPRESSED",	SYM(COMPRESSED_SYM),0,0},
unknown's avatar
unknown committed
104
  { "CONCURRENT",	SYM(CONCURRENT),0,0},
unknown's avatar
unknown committed
105 106 107
  { "CONSTRAINT",	SYM(CONSTRAINT),0,0},
  { "CREATE",		SYM(CREATE),0,0},
  { "CROSS",		SYM(CROSS),0,0},
108
  { "CUBE",		SYM(CUBE_SYM),0,0},
unknown's avatar
unknown committed
109 110 111 112 113 114 115 116 117 118 119 120 121 122
  { "CURRENT_DATE",	SYM(CURDATE),0,0},
  { "CURRENT_TIME",	SYM(CURTIME),0,0},
  { "CURRENT_TIMESTAMP", SYM(NOW_SYM),0,0},
  { "DATA",		SYM(DATA_SYM),0,0},
  { "DATABASE",		SYM(DATABASE),0,0},
  { "DATABASES",	SYM(DATABASES),0,0},
  { "DATE",		SYM(DATE_SYM),0,0},
  { "DATETIME",		SYM(DATETIME),0,0},
  { "DAY",		SYM(DAY_SYM),0,0},
  { "DAY_HOUR",		SYM(DAY_HOUR_SYM),0,0},
  { "DAY_MINUTE",	SYM(DAY_MINUTE_SYM),0,0},
  { "DAY_SECOND",	SYM(DAY_SECOND_SYM),0,0},
  { "DEC",		SYM(DECIMAL_SYM),0,0},
  { "DECIMAL",		SYM(DECIMAL_SYM),0,0},
unknown's avatar
unknown committed
123
  { "DES_KEY_FILE",	SYM(DES_KEY_FILE),0,0},
unknown's avatar
unknown committed
124 125 126 127 128 129
  { "DEFAULT",		SYM(DEFAULT),0,0},
  { "DELAYED",		SYM(DELAYED_SYM),0,0},
  { "DELAY_KEY_WRITE",	SYM(DELAY_KEY_WRITE_SYM),0,0},
  { "DELETE",		SYM(DELETE_SYM),0,0},
  { "DESC",		SYM(DESC),0,0},
  { "DESCRIBE",		SYM(DESCRIBE),0,0},
130
  { "DIRECTORY",	SYM(DIRECTORY_SYM),0,0},
131
  { "DISABLE",		SYM(DISABLE_SYM),0,0},
unknown's avatar
unknown committed
132 133
  { "DISTINCT",		SYM(DISTINCT),0,0},
  { "DISTINCTROW",	SYM(DISTINCT),0,0},	/* Access likes this */
134
  { "DIV",		SYM(DIV_SYM),0,0},
unknown's avatar
unknown committed
135
  { "DO",		SYM(DO_SYM),0,0},
unknown's avatar
unknown committed
136
  { "DOUBLE",		SYM(DOUBLE_SYM),0,0},
137
  { "DUAL",		SYM(DUAL_SYM),0,0},
unknown's avatar
unknown committed
138 139 140
  { "DROP",		SYM(DROP),0,0},
  { "DUMPFILE",		SYM(DUMPFILE),0,0},
  { "DYNAMIC",		SYM(DYNAMIC_SYM),0,0},
unknown's avatar
unknown committed
141
  { "DUPLICATE",	SYM(DUPLICATE_SYM),0,0},
unknown's avatar
unknown committed
142
  { "ERRORS",		SYM(ERRORS),0,0},
unknown's avatar
unknown committed
143 144 145 146
  { "END",		SYM(END),0,0},
  { "ELSE",             SYM(ELSE),0,0},
  { "ESCAPE",		SYM(ESCAPE_SYM),0,0},
  { "ESCAPED",		SYM(ESCAPED),0,0},
147
  { "ENABLE",		SYM(ENABLE_SYM),0,0},
unknown's avatar
unknown committed
148 149
  { "ENCLOSED",		SYM(ENCLOSED),0,0},
  { "ENUM",		SYM(ENUM),0,0},
unknown's avatar
unknown committed
150
  { "EVENTS",		SYM(EVENTS_SYM),0,0},
unknown's avatar
unknown committed
151
  { "EXECUTE",		SYM(EXECUTE_SYM),0,0},
unknown's avatar
unknown committed
152 153 154
  { "EXPLAIN",		SYM(DESCRIBE),0,0},
  { "EXISTS",		SYM(EXISTS),0,0},
  { "EXTENDED",		SYM(EXTENDED_SYM),0,0},
155
  { "FAST",		SYM(FAST_SYM),0,0},
unknown's avatar
unknown committed
156 157 158 159 160 161 162 163
  { "FIELDS",		SYM(COLUMNS),0,0},
  { "FILE",		SYM(FILE_SYM),0,0},
  { "FIRST",		SYM(FIRST_SYM),0,0},
  { "FIXED",		SYM(FIXED_SYM),0,0},
  { "FLOAT",		SYM(FLOAT_SYM),0,0},
  { "FLOAT4",		SYM(FLOAT_SYM),0,0},
  { "FLOAT8",		SYM(DOUBLE_SYM),0,0},
  { "FLUSH",		SYM(FLUSH_SYM),0,0},
164
  { "FALSE",		SYM(FALSE_SYM),0,0},
unknown's avatar
unknown committed
165
  { "FOREIGN",		SYM(FOREIGN),0,0},
166
  { "FORCE",		SYM(FORCE_SYM),0,0},
unknown's avatar
unknown committed
167 168 169 170 171 172 173
  { "RAID_TYPE",	SYM(RAID_TYPE),0,0},
  { "RAID_CHUNKS",	SYM(RAID_CHUNKS),0,0},
  { "RAID_CHUNKSIZE",	SYM(RAID_CHUNKSIZE),0,0},
  { "ROW_FORMAT",	SYM(ROW_FORMAT_SYM),0,0},
  { "FROM",		SYM(FROM),0,0},
  { "FOR",		SYM(FOR_SYM),0,0},
  { "FULL",		SYM(FULL),0,0},
174
  { "FULLTEXT",		SYM(FULLTEXT_SYM),0,0},
unknown's avatar
unknown committed
175
  { "FUNCTION",		SYM(UDF_SYM),0,0},
unknown's avatar
unknown committed
176
  { "GEOMETRY",		SYM(GEOMETRY_SYM),0,0},
177
  { "GEOMETRYCOLLECTION",SYM(GEOMETRYCOLLECTION),0,0},
unknown's avatar
unknown committed
178
  { "GLOBAL",		SYM(GLOBAL_SYM),0,0},
unknown's avatar
unknown committed
179 180 181 182
  { "GRANT",		SYM(GRANT),0,0},
  { "GRANTS",	        SYM(GRANTS),0,0},
  { "GROUP",		SYM(GROUP),0,0},
  { "HAVING",		SYM(HAVING),0,0},
183
  { "HANDLER",		SYM(HANDLER_SYM),0,0},
unknown's avatar
unknown committed
184
  { "HASH",		SYM(HASH_SYM),0,0},
unknown's avatar
unknown committed
185
  { "HEAP",		SYM(HEAP_SYM),0,0},
186
  { "HELP",		SYM(HELP_SYM),0,0},
unknown's avatar
unknown committed
187 188 189 190 191 192 193 194 195
  { "HIGH_PRIORITY",	SYM(HIGH_PRIORITY),0,0},
  { "HOUR",		SYM(HOUR_SYM),0,0},
  { "HOUR_MINUTE",	SYM(HOUR_MINUTE_SYM),0,0},
  { "HOUR_SECOND",	SYM(HOUR_SECOND_SYM),0,0},
  { "HOSTS",		SYM(HOSTS_SYM),0,0},
  { "IDENTIFIED",	SYM(IDENTIFIED_SYM),0,0},
  { "IGNORE",		SYM(IGNORE_SYM),0,0},
  { "IN",		SYM(IN_SYM),0,0},
  { "INDEX",		SYM(INDEX),0,0},
unknown's avatar
unknown committed
196
  { "INDEXES",		SYM(INDEXES),0,0},
unknown's avatar
unknown committed
197 198
  { "INFILE",		SYM(INFILE),0,0},
  { "INNER",		SYM(INNER_SYM),0,0},
unknown's avatar
unknown committed
199
  { "INNOBASE",		SYM(INNOBASE_SYM),0,0},
200
  { "INNODB",		SYM(INNOBASE_SYM),0,0},
unknown's avatar
unknown committed
201
  { "INSERT",		SYM(INSERT),0,0},
202
  { "INSERT_METHOD",    SYM(INSERT_METHOD),0,0},
unknown's avatar
unknown committed
203 204 205 206 207 208 209 210 211
  { "INT",		SYM(INT_SYM),0,0},
  { "INTEGER",		SYM(INT_SYM),0,0},
  { "INTERVAL",		SYM(INTERVAL_SYM),0,0},
  { "INT1",		SYM(TINYINT),0,0},
  { "INT2",		SYM(SMALLINT),0,0},
  { "INT3",		SYM(MEDIUMINT),0,0},
  { "INT4",		SYM(INT_SYM),0,0},
  { "INT8",		SYM(BIGINT),0,0},
  { "INTO",		SYM(INTO),0,0},
unknown's avatar
unknown committed
212
  { "IO_THREAD",        SYM(RELAY_THREAD),0,0},
unknown's avatar
unknown committed
213 214
  { "IF",		SYM(IF),0,0},
  { "IS",		SYM(IS),0,0},
unknown's avatar
unknown committed
215
  { "ISOLATION",	SYM(ISOLATION),0,0},
unknown's avatar
unknown committed
216
  { "ISAM",		SYM(ISAM_SYM),0,0},
217
  { "ISSUER",		SYM(ISSUER_SYM),0,0},
unknown's avatar
unknown committed
218 219 220 221
  { "JOIN",		SYM(JOIN_SYM),0,0},
  { "KEY",		SYM(KEY_SYM),0,0},
  { "KEYS",		SYM(KEYS),0,0},
  { "KILL",		SYM(KILL_SYM),0,0},
222
  { "LAST",		SYM(LAST_SYM),0,0},
unknown's avatar
unknown committed
223 224
  { "LEADING",		SYM(LEADING),0,0},
  { "LEFT",		SYM(LEFT),0,0},
unknown's avatar
unknown committed
225
  { "LEVEL",		SYM(LEVEL_SYM),0,0},
unknown's avatar
unknown committed
226 227
  { "LIKE",		SYM(LIKE),0,0},
  { "LINES",		SYM(LINES),0,0},
228
  { "LINESTRING",	SYM(LINESTRING),0,0},
unknown's avatar
unknown committed
229 230 231
  { "LIMIT",		SYM(LIMIT),0,0},
  { "LOAD",		SYM(LOAD),0,0},
  { "LOCAL",		SYM(LOCAL_SYM),0,0},
232 233
  { "LOCALTIME",	SYM(NOW_SYM),0,0},
  { "LOCALTIMESTAMP",	SYM(NOW_SYM),0,0},
unknown's avatar
unknown committed
234
  { "LOCK",		SYM(LOCK_SYM),0,0},
unknown's avatar
unknown committed
235
  { "LOCKS",		SYM(LOCKS_SYM),0,0},
unknown's avatar
unknown committed
236 237 238 239 240
  { "LOGS",		SYM(LOGS_SYM),0,0},
  { "LONG",		SYM(LONG_SYM),0,0},
  { "LONGBLOB",		SYM(LONGBLOB),0,0},
  { "LONGTEXT",		SYM(LONGTEXT),0,0},
  { "LOW_PRIORITY",	SYM(LOW_PRIORITY),0,0},
241 242 243 244 245 246 247
  { "MASTER",           SYM(MASTER_SYM),0,0},
  { "MASTER_CONNECT_RETRY",           SYM(MASTER_CONNECT_RETRY_SYM),0,0},
  { "MASTER_HOST",           SYM(MASTER_HOST_SYM),0,0},
  { "MASTER_LOG_FILE",           SYM(MASTER_LOG_FILE_SYM),0,0},
  { "MASTER_LOG_POS",           SYM(MASTER_LOG_POS_SYM),0,0},
  { "MASTER_PASSWORD",           SYM(MASTER_PASSWORD_SYM),0,0},
  { "MASTER_PORT",           SYM(MASTER_PORT_SYM),0,0},
unknown's avatar
unknown committed
248
  { "MASTER_SERVER_ID",           SYM(MASTER_SERVER_ID_SYM),0,0},
249
  { "MASTER_USER",           SYM(MASTER_USER_SYM),0,0},
unknown's avatar
unknown committed
250
  { "MAX_ROWS",		SYM(MAX_ROWS),0,0},
unknown's avatar
unknown committed
251
  { "MAX_QUERIES_PER_HOUR", SYM(MAX_QUERIES_PER_HOUR), 0,0},
252 253
  { "MAX_UPDATES_PER_HOUR", SYM(MAX_UPDATES_PER_HOUR), 0,0},
  { "MAX_CONNECTIONS_PER_HOUR", SYM(MAX_CONNECTIONS_PER_HOUR), 0,0},
unknown's avatar
unknown committed
254 255 256 257 258
  { "MATCH",		SYM(MATCH),0,0},
  { "MEDIUMBLOB",	SYM(MEDIUMBLOB),0,0},
  { "MEDIUMTEXT",	SYM(MEDIUMTEXT),0,0},
  { "MEDIUMINT",	SYM(MEDIUMINT),0,0},
  { "MERGE",		SYM(MERGE_SYM),0,0},
259
  { "MEDIUM",		SYM(MEDIUM_SYM),0,0},
260
  { "MEMORY",		SYM(MEMORY_SYM),0,0},
unknown's avatar
unknown committed
261 262 263 264
  { "MIDDLEINT",	SYM(MEDIUMINT),0,0},	/* For powerbuilder */
  { "MIN_ROWS",		SYM(MIN_ROWS),0,0},
  { "MINUTE",		SYM(MINUTE_SYM),0,0},
  { "MINUTE_SECOND",	SYM(MINUTE_SECOND_SYM),0,0},
265
  { "MOD",		SYM(MOD_SYM),0,0},
unknown's avatar
unknown committed
266
  { "MODE",		SYM(MODE_SYM),0,0},
unknown's avatar
unknown committed
267 268
  { "MODIFY",		SYM(MODIFY_SYM),0,0},
  { "MONTH",		SYM(MONTH_SYM),0,0},
269 270 271
  { "MULTILINESTRING",	SYM(MULTILINESTRING),0,0},
  { "MULTIPOINT",	SYM(MULTIPOINT),0,0},
  { "MULTIPOLYGON",	SYM(MULTIPOLYGON),0,0},
unknown's avatar
unknown committed
272
  { "MRG_MYISAM",	SYM(MERGE_SYM),0,0},
unknown's avatar
unknown committed
273
  { "MYISAM",		SYM(MYISAM_SYM),0,0},
unknown's avatar
unknown committed
274
  { "NAMES",		SYM(NAMES_SYM),0,0},
unknown's avatar
unknown committed
275 276
  { "NATURAL",		SYM(NATURAL),0,0},
  { "NATIONAL",		SYM(NATIONAL_SYM),0,0},
277
  { "NEXT",		SYM(NEXT_SYM),0,0},
unknown's avatar
unknown committed
278
  { "NEW",              SYM(NEW_SYM),0,0},
unknown's avatar
unknown committed
279 280
  { "NCHAR",		SYM(NCHAR_SYM),0,0},
  { "NO",		SYM(NO_SYM),0,0},
281
  { "NONE",		SYM(NONE_SYM),0,0},
unknown's avatar
unknown committed
282 283
  { "NOT",		SYM(NOT),0,0},
  { "NULL",		SYM(NULL_SYM),0,0},
284
  { "NUMERIC",		SYM(NUMERIC_SYM),0,0},
unknown's avatar
unknown committed
285
  { "OFFSET",		SYM(OFFSET_SYM),0,0},
unknown's avatar
unknown committed
286
  { "ON",		SYM(ON),0,0},
287
  { "OPEN",		SYM(OPEN_SYM),0,0},
unknown's avatar
unknown committed
288 289 290 291 292 293 294 295 296 297
  { "OPTIMIZE",		SYM(OPTIMIZE),0,0},
  { "OPTION",		SYM(OPTION),0,0},
  { "OPTIONALLY",	SYM(OPTIONALLY),0,0},
  { "OR",		SYM(OR),0,0},
  { "ORDER",		SYM(ORDER_SYM),0,0},
  { "OUTER",		SYM(OUTER),0,0},
  { "OUTFILE",		SYM(OUTFILE),0,0},
  { "PACK_KEYS",	SYM(PACK_KEYS_SYM),0,0},
  { "PARTIAL",		SYM(PARTIAL),0,0},
  { "PASSWORD",		SYM(PASSWORD),0,0},
298
  { "POINT",		SYM(POINT_SYM),0,0},
299
  { "POLYGON",		SYM(POLYGON),0,0},
unknown's avatar
unknown committed
300
  { "PURGE",		SYM(PURGE),0,0},
unknown's avatar
unknown committed
301
  { "PRECISION",	SYM(PRECISION),0,0},
302
  { "PREV",		SYM(PREV_SYM),0,0},
unknown's avatar
unknown committed
303 304 305 306 307
  { "PRIMARY",		SYM(PRIMARY_SYM),0,0},
  { "PROCEDURE",	SYM(PROCEDURE),0,0},
  { "PROCESS"	,	SYM(PROCESS),0,0},
  { "PROCESSLIST",	SYM(PROCESSLIST_SYM),0,0},
  { "PRIVILEGES",	SYM(PRIVILEGES),0,0},
unknown's avatar
unknown committed
308
  { "QUERY",		SYM(QUERY_SYM),0,0},
unknown's avatar
unknown committed
309 310 311 312 313
  { "QUICK",	        SYM(QUICK),0,0},
  { "RAID0",		SYM(RAID_0_SYM),0,0},
  { "READ",		SYM(READ_SYM),0,0},
  { "REAL",		SYM(REAL),0,0},
  { "REFERENCES",	SYM(REFERENCES),0,0},
314 315
  { "RELAY_LOG_FILE",   SYM(RELAY_LOG_FILE_SYM),0,0},
  { "RELAY_LOG_POS",    SYM(RELAY_LOG_POS_SYM),0,0},
unknown's avatar
unknown committed
316
  { "RELAY_THREAD",     SYM(RELAY_THREAD),0,0},
unknown's avatar
unknown committed
317 318 319 320 321
  { "RELOAD",		SYM(RELOAD),0,0},
  { "REGEXP",		SYM(REGEXP),0,0},
  { "RENAME",		SYM(RENAME),0,0},
  { "REPAIR",		SYM(REPAIR),0,0},
  { "REPLACE",		SYM(REPLACE),0,0},
unknown's avatar
unknown committed
322
  { "REPLICATION",	SYM(REPLICATION),0,0},
unknown's avatar
unknown committed
323
  { "REPEATABLE",	SYM(REPEATABLE_SYM),0,0},
324
  { "REQUIRE",	        SYM(REQUIRE_SYM),0,0},
unknown's avatar
unknown committed
325
  { "RESET",		SYM(RESET_SYM),0,0},
326
  { "USER_RESOURCES",	SYM(RESOURCES),0,0},
unknown's avatar
unknown committed
327
  { "RESTORE",		SYM(RESTORE_SYM),0,0},
unknown's avatar
unknown committed
328 329 330
  { "RESTRICT",		SYM(RESTRICT),0,0},
  { "RETURNS",		SYM(UDF_RETURNS_SYM),0,0},
  { "REVOKE",		SYM(REVOKE),0,0},
331
  { "RIGHT",		SYM(RIGHT),0,0},
unknown's avatar
unknown committed
332 333
  { "RLIKE",		SYM(REGEXP),0,0},	/* Like in mSQL2 */
  { "ROLLBACK",		SYM(ROLLBACK_SYM),0,0},
334
  { "ROLLUP",		SYM(ROLLUP_SYM),0,0},
unknown's avatar
unknown committed
335 336
  { "ROW",		SYM(ROW_SYM),0,0},
  { "ROWS",		SYM(ROWS_SYM),0,0},
unknown's avatar
unknown committed
337
  { "RTREE",		SYM(RTREE_SYM),0,0},
unknown's avatar
unknown committed
338
  { "SECOND",		SYM(SECOND_SYM),0,0},
339
  { "SEPARATOR",	SYM(SEPARATOR_SYM),0,0},
unknown's avatar
unknown committed
340
  { "SELECT",		SYM(SELECT_SYM),0,0},
341
  { "SERIAL",		SYM(SERIAL_SYM),0,0},
unknown's avatar
unknown committed
342 343
  { "SERIALIZABLE",	SYM(SERIALIZABLE_SYM),0,0},
  { "SESSION",		SYM(SESSION_SYM),0,0},
unknown's avatar
unknown committed
344
  { "SET",		SYM(SET),0,0},
unknown's avatar
unknown committed
345
  { "SIGNED",		SYM(SIGNED_SYM),0,0},
346
  { "SIMPLE",		SYM(SIMPLE_SYM),0,0},
unknown's avatar
unknown committed
347
  { "SHARE",		SYM(SHARE_SYM),0,0},
unknown's avatar
unknown committed
348 349 350 351
  { "SHOW",		SYM(SHOW),0,0},
  { "SHUTDOWN",		SYM(SHUTDOWN),0,0},
  { "SLAVE",            SYM(SLAVE),0,0},
  { "SMALLINT",		SYM(SMALLINT),0,0},
unknown's avatar
unknown committed
352
  { "SOME",             SYM(ANY_SYM),0,0},
unknown's avatar
unknown committed
353
  { "SONAME",		SYM(UDF_SONAME_SYM),0,0},
unknown's avatar
unknown committed
354
  { "SPATIAL",		SYM(SPATIAL_SYM),0,0},
unknown's avatar
unknown committed
355 356
  { "SQL_BIG_RESULT",	SYM(SQL_BIG_RESULT),0,0},
  { "SQL_BUFFER_RESULT", SYM(SQL_BUFFER_RESULT),0,0},
unknown's avatar
unknown committed
357
  { "SQL_CACHE",        SYM(SQL_CACHE_SYM), 0, 0},
358
  { "SQL_CALC_FOUND_ROWS", SYM(SQL_CALC_FOUND_ROWS),0,0},
unknown's avatar
unknown committed
359
  { "SQL_NO_CACHE",	SYM(SQL_NO_CACHE_SYM), 0, 0},
unknown's avatar
unknown committed
360
  { "SQL_SMALL_RESULT", SYM(SQL_SMALL_RESULT),0,0},
361
  { "SQL_THREAD",	SYM(SQL_THREAD),0,0},
unknown's avatar
unknown committed
362
  { "SOUNDS",		SYM(SOUNDS_SYM),0,0},
363
  { "SSL",		SYM(SSL_SYM),0,0},
unknown's avatar
unknown committed
364 365 366 367 368 369 370
  { "STRAIGHT_JOIN",	SYM(STRAIGHT_JOIN),0,0},
  { "START",		SYM(START_SYM),0,0},
  { "STARTING",		SYM(STARTING),0,0},
  { "STATUS",		SYM(STATUS_SYM),0,0},
  { "STRING",		SYM(STRING_SYM),0,0},
  { "STOP",		SYM(STOP_SYM),0,0},
  { "STRIPED",		SYM(RAID_STRIPED_SYM),0,0},
371
  { "SUBJECT",		SYM(SUBJECT_SYM),0,0},
unknown's avatar
unknown committed
372
  { "SUPER",		SYM(SUPER_SYM),0,0},
unknown's avatar
unknown committed
373 374 375 376 377 378 379 380 381 382 383 384
  { "TABLE",		SYM(TABLE_SYM),0,0},
  { "TABLES",		SYM(TABLES),0,0},
  { "TEMPORARY",	SYM(TEMPORARY),0,0},
  { "TERMINATED",	SYM(TERMINATED),0,0},
  { "TEXT",		SYM(TEXT_SYM),0,0},
  { "THEN",		SYM(THEN_SYM),0,0},
  { "TIME",		SYM(TIME_SYM),0,0},
  { "TIMESTAMP",	SYM(TIMESTAMP),0,0},
  { "TINYBLOB",		SYM(TINYBLOB),0,0},
  { "TINYTEXT",		SYM(TINYTEXT),0,0},
  { "TINYINT",		SYM(TINYINT),0,0},
  { "TRAILING",		SYM(TRAILING),0,0},
unknown's avatar
unknown committed
385
  { "TRANSACTION",	SYM(TRANSACTION_SYM),0,0},
386
  { "TRUNCATE",		SYM(TRUNCATE_SYM),0,0},
387
  { "TRUE",		SYM(TRUE_SYM),0,0},
unknown's avatar
unknown committed
388 389
  { "TO",		SYM(TO_SYM),0,0},
  { "TYPE",		SYM(TYPE_SYM),0,0},
unknown's avatar
unknown committed
390
  { "TYPES",		SYM(TYPES_SYM),0,0},
unknown's avatar
unknown committed
391
  { "UNCOMMITTED",	SYM(UNCOMMITTED_SYM),0,0},
unknown's avatar
unknown committed
392
  { "UNICODE",	        SYM(UNICODE_SYM),0,0},
393
  { "UNION",	        SYM(UNION_SYM),0,0},
unknown's avatar
unknown committed
394 395 396
  { "UNIQUE",		SYM(UNIQUE_SYM),0,0},
  { "UNLOCK",		SYM(UNLOCK_SYM),0,0},
  { "UNSIGNED",		SYM(UNSIGNED),0,0},
397
  { "USE",		SYM(USE_SYM),0,0},
unknown's avatar
unknown committed
398
  { "USE_FRM",		SYM(USE_FRM),0,0},
399
  { "USING",		SYM(USING),0,0},
unknown's avatar
unknown committed
400 401
  { "UPDATE",		SYM(UPDATE_SYM),0,0},
  { "USAGE",		SYM(USAGE),0,0},
402
  { "VALUE",		SYM(VALUE_SYM),0,0},
unknown's avatar
unknown committed
403 404
  { "VALUES",		SYM(VALUES),0,0},
  { "VARCHAR",		SYM(VARCHAR),0,0},
405
  { "VARCHARACTER",	SYM(VARCHAR),0,0},
unknown's avatar
unknown committed
406 407 408
  { "VARIABLES",	SYM(VARIABLES),0,0},
  { "VARYING",		SYM(VARYING),0,0},
  { "VARBINARY",	SYM(VARBINARY),0,0},
unknown's avatar
unknown committed
409
  { "WARNINGS",		SYM(WARNINGS),0,0},
unknown's avatar
unknown committed
410 411 412 413 414
  { "WITH",		SYM(WITH),0,0},
  { "WORK",		SYM(WORK_SYM),0,0},
  { "WRITE",		SYM(WRITE_SYM),0,0},
  { "WHEN",		SYM(WHEN_SYM),0,0},
  { "WHERE",		SYM(WHERE),0,0},
unknown's avatar
unknown committed
415
  { "XOR",		SYM(XOR),0,0},
416
  { "X509",		SYM(X509_SYM),0,0},
unknown's avatar
unknown committed
417 418 419 420 421 422 423 424 425 426 427
  { "YEAR",		SYM(YEAR_SYM),0,0},
  { "YEAR_MONTH",	SYM(YEAR_MONTH_SYM),0,0},
  { "ZEROFILL",		SYM(ZEROFILL),0,0},
  { "||",		SYM(OR_OR_CONCAT),0,0}
};


static SYMBOL sql_functions[] = {
  { "ABS",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_abs)},
  { "ACOS",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_acos)},
  { "ADDDATE",		SYM(DATE_ADD_INTERVAL),0,0},
428 429
  { "AES_ENCRYPT",      SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_aes_encrypt)},
  { "AES_DECRYPT",      SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_aes_decrypt)},
unknown's avatar
unknown committed
430
  { "AREA",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_area)},
unknown's avatar
unknown committed
431
  { "ASIN",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_asin)},
unknown's avatar
unknown committed
432
  { "ASTEXT",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_as_text)},
unknown's avatar
unknown committed
433
  { "ASWKB",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_as_wkb)},
unknown's avatar
unknown committed
434 435 436 437 438 439 440
  { "ATAN",		SYM(ATAN),0,0},
  { "ATAN2",		SYM(ATAN),0,0},
  { "BENCHMARK",	SYM(BENCHMARK_SYM),0,0},
  { "BIN",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_bin)},
  { "BIT_COUNT",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_bit_count)},
  { "BIT_OR",		SYM(BIT_OR),0,0},
  { "BIT_AND",		SYM(BIT_AND),0,0},
unknown's avatar
unknown committed
441
  { "CAST",		SYM(CAST_SYM),0,0},
442
  { "CEIL",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ceiling)},
unknown's avatar
unknown committed
443
  { "CEILING",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ceiling)},
unknown's avatar
unknown committed
444
  { "CURRENT_USER",	SYM(FUNC_ARG0),0,CREATE_FUNC(create_func_current_user)},
unknown's avatar
unknown committed
445
  { "BIT_LENGTH",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_bit_length)},
unknown's avatar
unknown committed
446
  { "CENTROID",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_centroid)},
unknown's avatar
unknown committed
447 448 449
  { "CHAR_LENGTH",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_char_length)},
  { "CHARACTER_LENGTH", SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_char_length)},
  { "COALESCE",		SYM(COALESCE),0,0},
unknown's avatar
unknown committed
450
  { "COERCIBILITY",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_coercibility)},
unknown's avatar
unknown committed
451
  { "COMPRESS",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_compress)},
unknown's avatar
unknown committed
452 453 454
  { "CONCAT",		SYM(CONCAT),0,0},
  { "CONCAT_WS",	SYM(CONCAT_WS),0,0},
  { "CONNECTION_ID",	SYM(FUNC_ARG0),0,CREATE_FUNC(create_func_connection_id)},
unknown's avatar
unknown committed
455
  { "CONTAINS",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_contains)},
unknown's avatar
unknown committed
456
  { "CONV",		SYM(FUNC_ARG3),0,CREATE_FUNC(create_func_conv)},
unknown's avatar
unknown committed
457
  { "CONVERT",		SYM(CONVERT_SYM),0,0},
unknown's avatar
unknown committed
458 459 460
  { "COUNT",		SYM(COUNT_SYM),0,0},
  { "COS",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_cos)},
  { "COT",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_cot)},
unknown's avatar
unknown committed
461
#ifdef HAVE_COMPRESS
unknown's avatar
unknown committed
462
  { "CRC32",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_crc32)},
unknown's avatar
unknown committed
463
#endif
unknown's avatar
unknown committed
464
  { "CROSSES",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_crosses)},
unknown's avatar
unknown committed
465 466 467 468 469 470 471 472 473 474 475
  { "CURDATE",		SYM(CURDATE),0,0},
  { "CURTIME",		SYM(CURTIME),0,0},
  { "DATE_ADD",		SYM(DATE_ADD_INTERVAL),0,0},
  { "DATE_FORMAT",	SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_date_format)},
  { "DATE_SUB",		SYM(DATE_SUB_INTERVAL),0,0},
  { "DAYNAME",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_dayname)},
  { "DAYOFMONTH",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_dayofmonth)},
  { "DAYOFWEEK",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_dayofweek)},
  { "DAYOFYEAR",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_dayofyear)},
  { "DECODE",		SYM(DECODE_SYM),0,0},
  { "DEGREES",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_degrees)},
unknown's avatar
unknown committed
476 477
  { "DES_ENCRYPT",	SYM(DES_ENCRYPT_SYM),0,0},
  { "DES_DECRYPT",	SYM(DES_DECRYPT_SYM),0,0},
unknown's avatar
unknown committed
478 479
  { "DIMENSION",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_dimension)},
  { "DISJOINT",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_disjoint)},
unknown's avatar
unknown committed
480 481 482
  { "ELT",		SYM(ELT_FUNC),0,0},
  { "ENCODE",		SYM(ENCODE_SYM),0,0},
  { "ENCRYPT",		SYM(ENCRYPT),0,0},
unknown's avatar
unknown committed
483 484 485 486
  { "ENDPOINT",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_endpoint)},
  { "ENVELOPE",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_envelope)},
  { "EQUALS",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_equals)},
  { "EXTERIORRING",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_exteriorring)},
unknown's avatar
unknown committed
487 488 489 490 491 492 493
  { "EXTRACT",		SYM(EXTRACT_SYM),0,0},
  { "EXP",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_exp)},
  { "EXPORT_SET",	SYM(EXPORT_SET),0,0},
  { "FIELD",		SYM(FIELD_FUNC),0,0},	/* For compability */
  { "FIND_IN_SET",	SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_find_in_set)},
  { "FLOOR",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_floor)},
  { "FORMAT",		SYM(FORMAT_SYM),0,0},
494
  { "FOUND_ROWS",	SYM(FUNC_ARG0),0,CREATE_FUNC(create_func_found_rows)},
unknown's avatar
unknown committed
495 496 497
  { "FROM_DAYS",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_from_days)},
  { "FROM_UNIXTIME",	SYM(FROM_UNIXTIME),0,0},
  { "GET_LOCK",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_get_lock)},
unknown's avatar
unknown committed
498 499
  { "GEOMETRYN",	SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_geometryn)},
  { "GEOMETRYTYPE",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_geometry_type)},
unknown's avatar
unknown committed
500
  { "GEOMCOLLFROMTEXT",	SYM(GEOMCOLLFROMTEXT),0,0},
501
  { "GEOMCOLLFROMWKB",	SYM(GEOMFROMWKB),0,0},
unknown's avatar
unknown committed
502
  { "GEOMETRYCOLLECTIONFROMTEXT",SYM(GEOMCOLLFROMTEXT),0,0},
503
  { "GEOMETRYCOLLECTIONFROMWKB",SYM(GEOMFROMWKB),0,0},
504
  { "GEOMETRYFROMTEXT", SYM(GEOMFROMTEXT),0,0},
unknown's avatar
unknown committed
505
  { "GEOMETRYFROMWKB",	SYM(GEOMFROMWKB),0,0},
506 507
  { "GEOMFROMTEXT",	SYM(GEOMFROMTEXT),0,0},
  { "GEOMFROMWKB",	SYM(GEOMFROMWKB),0,0},
unknown's avatar
unknown committed
508
    { "GLENGTH",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_glength)},
unknown's avatar
unknown committed
509
  { "GREATEST",		SYM(GREATEST_SYM),0,0},
510
  { "GROUP_CONCAT",	SYM(GROUP_CONCAT_SYM),0,0},
unknown's avatar
unknown committed
511 512 513 514 515 516
  { "GROUP_UNIQUE_USERS",	SYM(GROUP_UNIQUE_USERS),0,0},
  { "HEX",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_hex)},
  { "IFNULL",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_ifnull)},
  { "INET_ATON",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_inet_aton)},
  { "INET_NTOA",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_inet_ntoa)},
  { "INSTR",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_instr)},
unknown's avatar
unknown committed
517 518 519 520
  { "INTERIORRINGN",	SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_interiorringn)},
  { "INTERSECTS",	SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_intersects)},
  { "ISCLOSED",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_isclosed)},
  { "ISEMPTY",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_isempty)},
unknown's avatar
unknown committed
521
  { "ISNULL",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_isnull)},
522
  { "IS_FREE_LOCK",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_is_free_lock)},
unknown's avatar
SCRUM  
unknown committed
523
  { "IS_USED_LOCK",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_is_used_lock)},
unknown's avatar
unknown committed
524
  { "LAST_INSERT_ID",	SYM(LAST_INSERT_ID),0,0},
unknown's avatar
unknown committed
525
  { "ISSIMPLE",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_issimple)},
unknown's avatar
unknown committed
526 527 528
  { "LCASE",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_lcase)},
  { "LEAST",		SYM(LEAST_SYM),0,0},
  { "LENGTH",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_length)},
529
  { "LN",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ln)},
unknown's avatar
unknown committed
530
  { "LINEFROMTEXT",	SYM(LINEFROMTEXT),0,0},
531
  { "LINEFROMWKB",	SYM(GEOMFROMWKB),0,0},
unknown's avatar
unknown committed
532
  { "LINESTRINGFROMTEXT",SYM(LINEFROMTEXT),0,0},
533
  { "LINESTRINGFROMWKB",SYM(GEOMFROMWKB),0,0},
unknown's avatar
unknown committed
534 535
  { "LOAD_FILE",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_load_file)},
  { "LOCATE",		SYM(LOCATE),0,0},
536 537
  { "LOG",		SYM(LOG_SYM),0,0},
  { "LOG2",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_log2)},
unknown's avatar
unknown committed
538 539 540 541 542
  { "LOG10",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_log10)},
  { "LOWER",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_lcase)},
  { "LPAD",		SYM(FUNC_ARG3),0,CREATE_FUNC(create_func_lpad)},
  { "LTRIM",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ltrim)},
  { "MAKE_SET",		SYM(MAKE_SET_SYM),0,0},
543
  { "MASTER_POS_WAIT",	SYM(MASTER_POS_WAIT),0,0},
544
  { "MAX",		SYM(MAX_SYM),0,0},
unknown's avatar
unknown committed
545 546 547 548 549 550 551
  { "MBRCONTAINS",	SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_contains)},
  { "MBRDISJOINT",	SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_disjoint)},
  { "MBREQUAL",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_equals)},
  { "MBRINTERSECTS",	SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_intersects)},
  { "MBROVERLAPS",	SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_overlaps)},
  { "MBRTOUCHES",	SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_touches)},
  { "MBRWITHIN",	SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_within)},
unknown's avatar
unknown committed
552 553 554
  { "MD5",              SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_md5)},
  { "MID",		SYM(SUBSTRING),0,0},	/* unireg function */
  { "MIN",		SYM(MIN_SYM),0,0},
unknown's avatar
unknown committed
555
  { "MLINEFROMTEXT",	SYM(MLINEFROMTEXT),0,0},
556
  { "MLINEFROMWKB",	SYM(GEOMFROMWKB),0,0},
unknown's avatar
unknown committed
557
  { "MPOINTFROMTEXT",	SYM(MPOINTFROMTEXT),0,0},
558
  { "MPOINTFROMWKB",	SYM(GEOMFROMWKB),0,0},
unknown's avatar
unknown committed
559
  { "MPOLYFROMTEXT",	SYM(MPOLYFROMTEXT),0,0},
560
  { "MPOLYFROMWKB",	SYM(GEOMFROMWKB),0,0},
unknown's avatar
unknown committed
561
  { "MONTHNAME",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_monthname)},
unknown's avatar
unknown committed
562
  { "MULTILINESTRINGFROMTEXT",SYM(MLINEFROMTEXT),0,0},
563
  { "MULTILINESTRINGFROMWKB",SYM(GEOMFROMWKB),0,0},
564
  { "MULTIPOINTFROMTEXT",SYM(MPOINTFROMTEXT),0,0},
565
  { "MULTIPOINTFROMWKB",SYM(GEOMFROMWKB),0,0},
unknown's avatar
unknown committed
566
  { "MULTIPOLYGONFROMTEXT",SYM(MPOLYFROMTEXT),0,0},
567
  { "MULTIPOLYGONFROMWKB",SYM(GEOMFROMWKB),0,0},
unknown's avatar
unknown committed
568 569
  { "NOW",		SYM(NOW_SYM),0,0},
  { "NULLIF",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_nullif)},
unknown's avatar
unknown committed
570
  { "NUMGEOMETRIES",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_numgeometries)},
unknown's avatar
unknown committed
571
  { "NUMINTERIORRINGS",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_numinteriorring)},
unknown's avatar
unknown committed
572
  { "NUMPOINTS",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_numpoints)},
unknown's avatar
unknown committed
573 574
  { "OCTET_LENGTH",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_length)},
  { "OCT",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_oct)},
575
  { "OLD_PASSWORD",     SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_old_password)},
unknown's avatar
unknown committed
576
  { "ORD",              SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ord)},
unknown's avatar
unknown committed
577
  { "OVERLAPS",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_overlaps)},
unknown's avatar
unknown committed
578 579 580
  { "PERIOD_ADD",	SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_period_add)},
  { "PERIOD_DIFF",	SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_period_diff)},
  { "PI",		SYM(FUNC_ARG0),0,CREATE_FUNC(create_func_pi)},
unknown's avatar
unknown committed
581
  { "POINTFROMTEXT",	SYM(POINTFROMTEXT),0,0},
582
  { "POINTFROMWKB",	SYM(GEOMFROMWKB),0,0},
unknown's avatar
unknown committed
583
  { "POINTN",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_pointn)},
unknown's avatar
unknown committed
584
  { "POLYFROMTEXT",	SYM(POLYFROMTEXT),0,0},
585
  { "POLYFROMWKB",	SYM(GEOMFROMWKB),0,0},
unknown's avatar
unknown committed
586
  { "POLYGONFROMTEXT",	SYM(POLYFROMTEXT),0,0},
587
  { "POLYGONFROMWKB",	SYM(GEOMFROMWKB),0,0},
unknown's avatar
unknown committed
588 589 590 591
  { "POSITION",		SYM(POSITION_SYM),0,0},
  { "POW",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_pow)},
  { "POWER",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_pow)},
  { "QUARTER",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_quarter)},
unknown's avatar
unknown committed
592
  { "QUOTE",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_quote)},
unknown's avatar
unknown committed
593 594 595 596 597 598 599 600 601 602 603 604 605
  { "RADIANS",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_radians)},
  { "RAND",		SYM(RAND),0,0},
  { "RELEASE_LOCK",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_release_lock)},
  { "REPEAT",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_repeat)},
  { "REVERSE",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_reverse)},
  { "ROUND",		SYM(ROUND),0,0},
  { "RPAD",		SYM(FUNC_ARG3),0,CREATE_FUNC(create_func_rpad)},
  { "RTRIM",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_rtrim)},
  { "SEC_TO_TIME",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_sec_to_time)},
  { "SESSION_USER",	SYM(USER),0,0},
  { "SUBDATE",		SYM(DATE_SUB_INTERVAL),0,0},
  { "SIGN",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_sign)},
  { "SIN",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_sin)},
606 607
  { "SHA",              SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_sha)},
  { "SHA1",             SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_sha)},
unknown's avatar
unknown committed
608 609 610
  { "SOUNDEX",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_soundex)},
  { "SPACE",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_space)},
  { "SQRT",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_sqrt)},
unknown's avatar
unknown committed
611
  { "SRID",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_srid)},
unknown's avatar
unknown committed
612
  { "STARTPOINT",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_startpoint)},
unknown's avatar
unknown committed
613 614 615 616 617 618 619 620 621 622 623 624
  { "STD",		SYM(STD_SYM),0,0},
  { "STDDEV",		SYM(STD_SYM),0,0},
  { "STRCMP",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_strcmp)},
  { "SUBSTRING",	SYM(SUBSTRING),0,0},
  { "SUBSTRING_INDEX",	SYM(SUBSTRING_INDEX),0,0},
  { "SUM",		SYM(SUM_SYM),0,0},
  { "SYSDATE",		SYM(NOW_SYM),0,0},
  { "SYSTEM_USER",	SYM(USER),0,0},
  { "TAN",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_tan)},
  { "TIME_FORMAT",	SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_time_format)},
  { "TIME_TO_SEC",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_time_to_sec)},
  { "TO_DAYS",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_to_days)},
unknown's avatar
unknown committed
625
  { "TOUCHES",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_touches)},
unknown's avatar
unknown committed
626 627
  { "TRIM",		SYM(TRIM),0,0},
  { "UCASE",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ucase)},
unknown's avatar
unknown committed
628 629
  { "UNCOMPRESS",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_uncompress)},
  { "UNCOMPRESSED_LENGTH", SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_uncompressed_length)},
unknown's avatar
unknown committed
630 631
  { "UNIQUE_USERS",	SYM(UNIQUE_USERS),0,0},
  { "UNIX_TIMESTAMP",	SYM(UNIX_TIMESTAMP),0,0},
unknown's avatar
unknown committed
632
  { "UPPER",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ucase)},
unknown's avatar
unknown committed
633
  { "USER",		SYM(USER),0,0},
unknown's avatar
unknown committed
634
  { "VARIANCE",		SYM(VARIANCE_SYM),0,0},
unknown's avatar
unknown committed
635 636 637
  { "VERSION",		SYM(FUNC_ARG0),0,CREATE_FUNC(create_func_version)},
  { "WEEK",		SYM(WEEK_SYM),0,0},
  { "WEEKDAY",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_weekday)},
unknown's avatar
unknown committed
638 639 640
  { "WITHIN",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_within)},
  { "X",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_x)},
  { "Y",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_y)},
unknown's avatar
unknown committed
641 642
  { "YEARWEEK",		SYM(YEARWEEK),0,0}
};