lex.h 28.8 KB
Newer Older
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
1
/* Copyright (C) 2000-2002 MySQL AB
2

bk@work.mysql.com's avatar
bk@work.mysql.com 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

bk@work.mysql.com's avatar
bk@work.mysql.com 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

bk@work.mysql.com's avatar
bk@work.mysql.com 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

/*
monty@mashka.mysql.fi's avatar
monty@mashka.mysql.fi committed
33
  Symbols are broken into separated arrays to allow field names with
34 35
  same name as functions.
  These are kept sorted for human lookup (the symbols are hashed).
bk@work.mysql.com's avatar
bk@work.mysql.com 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},
bell@sanja.is.com.ua's avatar
bell@sanja.is.com.ua committed
59
  { "ANY",              SYM(ANY_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
60 61
  { "AS",		SYM(AS),0,0},
  { "ASC",		SYM(ASC),0,0},
bar@bar.mysql.r18.ru's avatar
bar@bar.mysql.r18.ru committed
62
  { "ASCII",		SYM(ASCII_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com 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},
serg@serg.mysql.com's avatar
serg@serg.mysql.com committed
66
  { "BACKUP",	        SYM(BACKUP_SYM),0,0},
67
  { "BEFORE",	        SYM(BEFORE_SYM),0,0},
serg@serg.mysql.com's avatar
serg@serg.mysql.com committed
68
  { "BEGIN",	        SYM(BEGIN_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com 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},
75
  { "BINLOG",		SYM(BINLOG_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
76 77
  { "BLOB",		SYM(BLOB_SYM),0,0},
  { "BOOL",		SYM(BOOL_SYM),0,0},
78
  { "BOOLEAN",		SYM(BOOLEAN_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
79
  { "BOTH",		SYM(BOTH),0,0},
80
  { "BTREE",		SYM(BTREE_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
81
  { "BY",		SYM(BY),0,0},
82
  { "BYTE",		SYM(BYTE_SYM), 0, 0},
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi committed
83
  { "CACHE",		SYM(CACHE_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com 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},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
89
  { "CHANGE",		SYM(CHANGE),0,0},
90
  { "CHANGED",		SYM(CHANGED),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
91 92
  { "CHECK",		SYM(CHECK_SYM),0,0},
  { "CHECKSUM",		SYM(CHECKSUM_SYM),0,0},
tonu@volk.internalnet's avatar
tonu@volk.internalnet committed
93
  { "CIPHER",		SYM(CIPHER_SYM),0,0},
94
  { "CLIENT",		SYM(CLIENT_SYM),0,0},
95
  { "CLOSE",		SYM(CLOSE_SYM),0,0},
96
  { "COLLATE",		SYM(COLLATE_SYM),0,0},
bar@bar.mysql.r18.ru's avatar
bar@bar.mysql.r18.ru committed
97
  { "COLLATION",	SYM(COLLATION_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com 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},
monty@tik.mysql.fi's avatar
monty@tik.mysql.fi committed
102
  { "COMMITTED",	SYM(COMMITTED_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
103
  { "COMPRESSED",	SYM(COMPRESSED_SYM),0,0},
104
  { "CONCURRENT",	SYM(CONCURRENT),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com 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},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
109 110 111 112 113 114 115 116 117 118
  { "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},
gluh@gluh.mysql.r18.ru's avatar
gluh@gluh.mysql.r18.ru committed
119
  { "DAY_MICROSECOND",	SYM(DAY_MICROSECOND_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
120 121 122 123
  { "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},
124
  { "DES_KEY_FILE",	SYM(DES_KEY_FILE),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
125 126 127 128 129 130
  { "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},
131
  { "DIRECTORY",	SYM(DIRECTORY_SYM),0,0},
132
  { "DISABLE",		SYM(DISABLE_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
133 134
  { "DISTINCT",		SYM(DISTINCT),0,0},
  { "DISTINCTROW",	SYM(DISTINCT),0,0},	/* Access likes this */
135
  { "DIV",		SYM(DIV_SYM),0,0},
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi committed
136
  { "DO",		SYM(DO_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
137
  { "DOUBLE",		SYM(DOUBLE_SYM),0,0},
138
  { "DUAL",		SYM(DUAL_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
139 140 141
  { "DROP",		SYM(DROP),0,0},
  { "DUMPFILE",		SYM(DUMPFILE),0,0},
  { "DYNAMIC",		SYM(DYNAMIC_SYM),0,0},
142
  { "DUPLICATE",	SYM(DUPLICATE_SYM),0,0},
143
  { "ERRORS",		SYM(ERRORS),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
144 145 146 147
  { "END",		SYM(END),0,0},
  { "ELSE",             SYM(ELSE),0,0},
  { "ESCAPE",		SYM(ESCAPE_SYM),0,0},
  { "ESCAPED",		SYM(ESCAPED),0,0},
148
  { "ENABLE",		SYM(ENABLE_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
149 150
  { "ENCLOSED",		SYM(ENCLOSED),0,0},
  { "ENUM",		SYM(ENUM),0,0},
151
  { "EVENTS",		SYM(EVENTS_SYM),0,0},
152
  { "EXECUTE",		SYM(EXECUTE_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
153 154 155
  { "EXPLAIN",		SYM(DESCRIBE),0,0},
  { "EXISTS",		SYM(EXISTS),0,0},
  { "EXTENDED",		SYM(EXTENDED_SYM),0,0},
156
  { "FAST",		SYM(FAST_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
157 158 159 160 161 162 163 164
  { "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},
165
  { "FALSE",		SYM(FALSE_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
166
  { "FOREIGN",		SYM(FOREIGN),0,0},
167
  { "FORCE",		SYM(FORCE_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
168 169 170 171 172 173 174
  { "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},
175
  { "FULLTEXT",		SYM(FULLTEXT_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
176
  { "FUNCTION",		SYM(UDF_SYM),0,0},
177
  { "GEOMETRY",		SYM(GEOMETRY_SYM),0,0},
178
  { "GEOMETRYCOLLECTION",SYM(GEOMETRYCOLLECTION),0,0},
monty@tik.mysql.fi's avatar
monty@tik.mysql.fi committed
179
  { "GLOBAL",		SYM(GLOBAL_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
180 181 182 183
  { "GRANT",		SYM(GRANT),0,0},
  { "GRANTS",	        SYM(GRANTS),0,0},
  { "GROUP",		SYM(GROUP),0,0},
  { "HAVING",		SYM(HAVING),0,0},
184
  { "HANDLER",		SYM(HANDLER_SYM),0,0},
185
  { "HASH",		SYM(HASH_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
186
  { "HEAP",		SYM(HEAP_SYM),0,0},
187
  { "HELP",		SYM(HELP_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
188 189
  { "HIGH_PRIORITY",	SYM(HIGH_PRIORITY),0,0},
  { "HOUR",		SYM(HOUR_SYM),0,0},
gluh@gluh.mysql.r18.ru's avatar
gluh@gluh.mysql.r18.ru committed
190
  { "HOUR_MICROSECOND",	SYM(HOUR_MICROSECOND_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
191 192 193 194 195 196 197
  { "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},
198
  { "INDEXES",		SYM(INDEXES),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
199 200
  { "INFILE",		SYM(INFILE),0,0},
  { "INNER",		SYM(INNER_SYM),0,0},
201
  { "INNOBASE",		SYM(INNOBASE_SYM),0,0},
202
  { "INNODB",		SYM(INNOBASE_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
203
  { "INSERT",		SYM(INSERT),0,0},
204
  { "INSERT_METHOD",    SYM(INSERT_METHOD),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
205 206 207 208 209 210 211 212 213
  { "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},
214
  { "IO_THREAD",        SYM(RELAY_THREAD),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
215 216
  { "IF",		SYM(IF),0,0},
  { "IS",		SYM(IS),0,0},
monty@tik.mysql.fi's avatar
monty@tik.mysql.fi committed
217
  { "ISOLATION",	SYM(ISOLATION),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
218
  { "ISAM",		SYM(ISAM_SYM),0,0},
219
  { "ISSUER",		SYM(ISSUER_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
220 221 222 223
  { "JOIN",		SYM(JOIN_SYM),0,0},
  { "KEY",		SYM(KEY_SYM),0,0},
  { "KEYS",		SYM(KEYS),0,0},
  { "KILL",		SYM(KILL_SYM),0,0},
224
  { "LAST",		SYM(LAST_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
225
  { "LEADING",		SYM(LEADING),0,0},
igor@rurik.mysql.com's avatar
igor@rurik.mysql.com committed
226
  { "LEAVES",		SYM(LEAVES),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
227
  { "LEFT",		SYM(LEFT),0,0},
monty@tik.mysql.fi's avatar
monty@tik.mysql.fi committed
228
  { "LEVEL",		SYM(LEVEL_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
229 230
  { "LIKE",		SYM(LIKE),0,0},
  { "LINES",		SYM(LINES),0,0},
231
  { "LINESTRING",	SYM(LINESTRING),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
232 233 234
  { "LIMIT",		SYM(LIMIT),0,0},
  { "LOAD",		SYM(LOAD),0,0},
  { "LOCAL",		SYM(LOCAL_SYM),0,0},
235 236
  { "LOCALTIME",	SYM(NOW_SYM),0,0},
  { "LOCALTIMESTAMP",	SYM(NOW_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
237
  { "LOCK",		SYM(LOCK_SYM),0,0},
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi committed
238
  { "LOCKS",		SYM(LOCKS_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
239 240 241 242 243
  { "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},
244 245 246 247 248 249 250
  { "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},
251
  { "MASTER_SERVER_ID",           SYM(MASTER_SERVER_ID_SYM),0,0},
252 253 254 255 256 257
  { "MASTER_SSL",       SYM(MASTER_SSL_SYM),0,0},
  { "MASTER_SSL_CA",    SYM(MASTER_SSL_CA_SYM),0,0},
  { "MASTER_SSL_CAPATH",SYM(MASTER_SSL_CAPATH_SYM),0,0},
  { "MASTER_SSL_CERT",  SYM(MASTER_SSL_CERT_SYM),0,0},
  { "MASTER_SSL_CIPHER",SYM(MASTER_SSL_CIPHER_SYM),0,0},
  { "MASTER_SSL_KEY",   SYM(MASTER_SSL_KEY_SYM),0,0},
258
  { "MASTER_USER",           SYM(MASTER_USER_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
259
  { "MAX_ROWS",		SYM(MAX_ROWS),0,0},
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi committed
260
  { "MAX_QUERIES_PER_HOUR", SYM(MAX_QUERIES_PER_HOUR), 0,0},
261 262
  { "MAX_UPDATES_PER_HOUR", SYM(MAX_UPDATES_PER_HOUR), 0,0},
  { "MAX_CONNECTIONS_PER_HOUR", SYM(MAX_CONNECTIONS_PER_HOUR), 0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
263 264 265 266 267
  { "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},
268
  { "MEDIUM",		SYM(MEDIUM_SYM),0,0},
269
  { "MEMORY",		SYM(MEMORY_SYM),0,0},
gluh@gluh.mysql.r18.ru's avatar
gluh@gluh.mysql.r18.ru committed
270
  { "MICROSECOND",	SYM(MICROSECOND_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
271 272 273
  { "MIDDLEINT",	SYM(MEDIUMINT),0,0},	/* For powerbuilder */
  { "MIN_ROWS",		SYM(MIN_ROWS),0,0},
  { "MINUTE",		SYM(MINUTE_SYM),0,0},
gluh@gluh.mysql.r18.ru's avatar
gluh@gluh.mysql.r18.ru committed
274
  { "MINUTE_MICROSECOND", SYM(MINUTE_MICROSECOND_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
275
  { "MINUTE_SECOND",	SYM(MINUTE_SECOND_SYM),0,0},
276
  { "MOD",		SYM(MOD_SYM),0,0},
monty@tik.mysql.fi's avatar
monty@tik.mysql.fi committed
277
  { "MODE",		SYM(MODE_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
278 279
  { "MODIFY",		SYM(MODIFY_SYM),0,0},
  { "MONTH",		SYM(MONTH_SYM),0,0},
280 281 282
  { "MULTILINESTRING",	SYM(MULTILINESTRING),0,0},
  { "MULTIPOINT",	SYM(MULTIPOINT),0,0},
  { "MULTIPOLYGON",	SYM(MULTIPOLYGON),0,0},
283
  { "MRG_MYISAM",	SYM(MERGE_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
284
  { "MYISAM",		SYM(MYISAM_SYM),0,0},
bar@bar.mysql.r18.ru's avatar
bar@bar.mysql.r18.ru committed
285
  { "NAMES",		SYM(NAMES_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
286 287
  { "NATURAL",		SYM(NATURAL),0,0},
  { "NATIONAL",		SYM(NATIONAL_SYM),0,0},
288
  { "NEXT",		SYM(NEXT_SYM),0,0},
289
  { "NEW",              SYM(NEW_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
290 291
  { "NCHAR",		SYM(NCHAR_SYM),0,0},
  { "NO",		SYM(NO_SYM),0,0},
292
  { "NONE",		SYM(NONE_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
293 294
  { "NOT",		SYM(NOT),0,0},
  { "NULL",		SYM(NULL_SYM),0,0},
295
  { "NUMERIC",		SYM(NUMERIC_SYM),0,0},
bar@bar.mysql.r18.ru's avatar
bar@bar.mysql.r18.ru committed
296
  { "NVARCHAR",		SYM(NVARCHAR_SYM),0,0},
297
  { "OFFSET",		SYM(OFFSET_SYM),0,0},
298
  { "OLD_PASSWORD",	SYM(OLD_PASSWORD),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
299
  { "ON",		SYM(ON),0,0},
300
  { "OPEN",		SYM(OPEN_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
301 302 303 304 305 306 307 308 309 310
  { "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},
311
  { "POINT",		SYM(POINT_SYM),0,0},
312
  { "POLYGON",		SYM(POLYGON),0,0},
313
  { "PURGE",		SYM(PURGE),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
314
  { "PRECISION",	SYM(PRECISION),0,0},
315
  { "PREV",		SYM(PREV_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
316 317 318 319 320
  { "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},
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi committed
321
  { "QUERY",		SYM(QUERY_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
322 323 324 325 326
  { "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},
327 328
  { "RELAY_LOG_FILE",   SYM(RELAY_LOG_FILE_SYM),0,0},
  { "RELAY_LOG_POS",    SYM(RELAY_LOG_POS_SYM),0,0},
329
  { "RELAY_THREAD",     SYM(RELAY_THREAD),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
330 331 332 333 334
  { "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},
335
  { "REPLICATION",	SYM(REPLICATION),0,0},
monty@tik.mysql.fi's avatar
monty@tik.mysql.fi committed
336
  { "REPEATABLE",	SYM(REPEATABLE_SYM),0,0},
337
  { "REQUIRE",	        SYM(REQUIRE_SYM),0,0},
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
338
  { "RESET",		SYM(RESET_SYM),0,0},
339
  { "USER_RESOURCES",	SYM(RESOURCES),0,0},
340
  { "RESTORE",		SYM(RESTORE_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
341 342 343
  { "RESTRICT",		SYM(RESTRICT),0,0},
  { "RETURNS",		SYM(UDF_RETURNS_SYM),0,0},
  { "REVOKE",		SYM(REVOKE),0,0},
344
  { "RIGHT",		SYM(RIGHT),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
345 346
  { "RLIKE",		SYM(REGEXP),0,0},	/* Like in mSQL2 */
  { "ROLLBACK",		SYM(ROLLBACK_SYM),0,0},
347
  { "ROLLUP",		SYM(ROLLUP_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
348 349
  { "ROW",		SYM(ROW_SYM),0,0},
  { "ROWS",		SYM(ROWS_SYM),0,0},
350
  { "RTREE",		SYM(RTREE_SYM),0,0},
351
  { "SAVEPOINT",	SYM(SAVEPOINT_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
352
  { "SECOND",		SYM(SECOND_SYM),0,0},
gluh@gluh.mysql.r18.ru's avatar
gluh@gluh.mysql.r18.ru committed
353
  { "SECOND_MICROSECOND", SYM(SECOND_MICROSECOND_SYM),0,0},
354
  { "SEPARATOR",	SYM(SEPARATOR_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
355
  { "SELECT",		SYM(SELECT_SYM),0,0},
356
  { "SERIAL",		SYM(SERIAL_SYM),0,0},
monty@tik.mysql.fi's avatar
monty@tik.mysql.fi committed
357 358
  { "SERIALIZABLE",	SYM(SERIALIZABLE_SYM),0,0},
  { "SESSION",		SYM(SESSION_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
359
  { "SET",		SYM(SET),0,0},
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi committed
360
  { "SIGNED",		SYM(SIGNED_SYM),0,0},
361
  { "SIMPLE",		SYM(SIMPLE_SYM),0,0},
monty@tik.mysql.fi's avatar
monty@tik.mysql.fi committed
362
  { "SHARE",		SYM(SHARE_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
363 364 365 366
  { "SHOW",		SYM(SHOW),0,0},
  { "SHUTDOWN",		SYM(SHUTDOWN),0,0},
  { "SLAVE",            SYM(SLAVE),0,0},
  { "SMALLINT",		SYM(SMALLINT),0,0},
bell@sanja.is.com.ua's avatar
bell@sanja.is.com.ua committed
367
  { "SOME",             SYM(ANY_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
368
  { "SONAME",		SYM(UDF_SONAME_SYM),0,0},
369
  { "SPATIAL",		SYM(SPATIAL_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
370 371
  { "SQL_BIG_RESULT",	SYM(SQL_BIG_RESULT),0,0},
  { "SQL_BUFFER_RESULT", SYM(SQL_BUFFER_RESULT),0,0},
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi committed
372
  { "SQL_CACHE",        SYM(SQL_CACHE_SYM), 0, 0},
373
  { "SQL_CALC_FOUND_ROWS", SYM(SQL_CALC_FOUND_ROWS),0,0},
serg@serg.mysql.com's avatar
serg@serg.mysql.com committed
374
  { "SQL_NO_CACHE",	SYM(SQL_NO_CACHE_SYM), 0, 0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
375
  { "SQL_SMALL_RESULT", SYM(SQL_SMALL_RESULT),0,0},
376
  { "SQL_THREAD",	SYM(SQL_THREAD),0,0},
377
  { "SOUNDS",		SYM(SOUNDS_SYM),0,0},
378
  { "SSL",		SYM(SSL_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
379 380 381 382 383 384 385
  { "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},
386
  { "SUBJECT",		SYM(SUBJECT_SYM),0,0},
387
  { "SUPER",		SYM(SUPER_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
388 389 390 391 392 393 394 395 396 397 398 399
  { "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},
monty@tik.mysql.fi's avatar
monty@tik.mysql.fi committed
400
  { "TRANSACTION",	SYM(TRANSACTION_SYM),0,0},
401
  { "TRUNCATE",		SYM(TRUNCATE_SYM),0,0},
402
  { "TRUE",		SYM(TRUE_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
403 404
  { "TO",		SYM(TO_SYM),0,0},
  { "TYPE",		SYM(TYPE_SYM),0,0},
405
  { "TYPES",		SYM(TYPES_SYM),0,0},
monty@tik.mysql.fi's avatar
monty@tik.mysql.fi committed
406
  { "UNCOMMITTED",	SYM(UNCOMMITTED_SYM),0,0},
407
  { "UNICODE",	        SYM(UNICODE_SYM),0,0},
408
  { "UNION",	        SYM(UNION_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
409 410 411
  { "UNIQUE",		SYM(UNIQUE_SYM),0,0},
  { "UNLOCK",		SYM(UNLOCK_SYM),0,0},
  { "UNSIGNED",		SYM(UNSIGNED),0,0},
412
  { "USE",		SYM(USE_SYM),0,0},
serg@serg.mysql.com's avatar
serg@serg.mysql.com committed
413
  { "USE_FRM",		SYM(USE_FRM),0,0},
414
  { "USER",		SYM(USER),0,0},
415
  { "UNTIL",		SYM(UNTIL_SYM),0,0},
416
  { "USING",		SYM(USING),0,0},
417 418 419
  { "UTC_DATE",         SYM(UTC_DATE_SYM),0,0},
  { "UTC_TIME",         SYM(UTC_TIME_SYM),0,0},
  { "UTC_TIMESTAMP",    SYM(UTC_TIMESTAMP_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
420 421
  { "UPDATE",		SYM(UPDATE_SYM),0,0},
  { "USAGE",		SYM(USAGE),0,0},
422
  { "VALUE",		SYM(VALUE_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
423 424
  { "VALUES",		SYM(VALUES),0,0},
  { "VARCHAR",		SYM(VARCHAR),0,0},
425
  { "VARCHARACTER",	SYM(VARCHAR),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
426 427 428
  { "VARIABLES",	SYM(VARIABLES),0,0},
  { "VARYING",		SYM(VARYING),0,0},
  { "VARBINARY",	SYM(VARBINARY),0,0},
429
  { "WARNINGS",		SYM(WARNINGS),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
430 431 432 433 434
  { "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},
435
  { "NO_WRITE_TO_BINLOG",  SYM(NO_WRITE_TO_BINLOG),0,0},
436
  { "XOR",		SYM(XOR),0,0},
437
  { "X509",		SYM(X509_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
438 439 440 441 442 443 444 445 446 447
  { "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)},
gluh@gluh.mysql.r18.ru's avatar
gluh@gluh.mysql.r18.ru committed
448 449
  { "ADDDATE",		SYM(ADDDATE_SYM),0,0},
  { "ADDTIME",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_addtime)},
450 451
  { "AES_ENCRYPT",      SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_aes_encrypt)},
  { "AES_DECRYPT",      SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_aes_decrypt)},
452
  { "AREA",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_area)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
453
  { "ASIN",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_asin)},
454
  { "ASBINARY",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_as_wkb)},
455
  { "ASTEXT",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_as_wkt)},
456
  { "ASWKB",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_as_wkb)},
457
  { "ASWKT",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_as_wkt)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
458 459 460 461 462 463 464
  { "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},
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi committed
465
  { "CAST",		SYM(CAST_SYM),0,0},
466
  { "CEIL",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ceiling)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
467
  { "CEILING",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ceiling)},
468
  { "CURRENT_USER",	SYM(FUNC_ARG0),0,CREATE_FUNC(create_func_current_user)},
469
  { "BIT_LENGTH",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_bit_length)},
470
  { "CENTROID",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_centroid)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
471 472 473
  { "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},
bar@bar.mysql.r18.ru's avatar
bar@bar.mysql.r18.ru committed
474
  { "COERCIBILITY",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_coercibility)},
475
  { "COMPRESS",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_compress)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
476 477 478
  { "CONCAT",		SYM(CONCAT),0,0},
  { "CONCAT_WS",	SYM(CONCAT_WS),0,0},
  { "CONNECTION_ID",	SYM(FUNC_ARG0),0,CREATE_FUNC(create_func_connection_id)},
479
  { "CONTAINS",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_contains)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
480
  { "CONV",		SYM(FUNC_ARG3),0,CREATE_FUNC(create_func_conv)},
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi committed
481
  { "CONVERT",		SYM(CONVERT_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
482 483 484
  { "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)},
485
  { "CRC32",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_crc32)},
486
  { "CROSSES",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_crosses)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
487 488 489
  { "CURDATE",		SYM(CURDATE),0,0},
  { "CURTIME",		SYM(CURTIME),0,0},
  { "DATE_ADD",		SYM(DATE_ADD_INTERVAL),0,0},
gluh@gluh.mysql.r18.ru's avatar
gluh@gluh.mysql.r18.ru committed
490
  { "DATEDIFF",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_datediff)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
491 492 493 494 495 496 497 498
  { "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)},
499 500
  { "DES_ENCRYPT",	SYM(DES_ENCRYPT_SYM),0,0},
  { "DES_DECRYPT",	SYM(DES_DECRYPT_SYM),0,0},
501 502
  { "DIMENSION",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_dimension)},
  { "DISJOINT",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_disjoint)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
503 504 505
  { "ELT",		SYM(ELT_FUNC),0,0},
  { "ENCODE",		SYM(ENCODE_SYM),0,0},
  { "ENCRYPT",		SYM(ENCRYPT),0,0},
506 507 508 509
  { "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)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
510 511 512 513 514 515 516
  { "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},
517
  { "FOUND_ROWS",	SYM(FUNC_ARG0),0,CREATE_FUNC(create_func_found_rows)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
518 519 520
  { "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)},
521 522
  { "GEOMETRYN",	SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_geometryn)},
  { "GEOMETRYTYPE",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_geometry_type)},
523
  { "GEOMCOLLFROMTEXT",	SYM(GEOMCOLLFROMTEXT),0,0},
524
  { "GEOMCOLLFROMWKB",	SYM(GEOMFROMWKB),0,0},
bar@bar.mysql.r18.ru's avatar
bar@bar.mysql.r18.ru committed
525
  { "GEOMETRYCOLLECTIONFROMTEXT",SYM(GEOMCOLLFROMTEXT),0,0},
526
  { "GEOMETRYCOLLECTIONFROMWKB",SYM(GEOMFROMWKB),0,0},
527
  { "GEOMETRYFROMTEXT", SYM(GEOMFROMTEXT),0,0},
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
528
  { "GEOMETRYFROMWKB",	SYM(GEOMFROMWKB),0,0},
529 530
  { "GEOMFROMTEXT",	SYM(GEOMFROMTEXT),0,0},
  { "GEOMFROMWKB",	SYM(GEOMFROMWKB),0,0},
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
531
    { "GLENGTH",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_glength)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
532
  { "GREATEST",		SYM(GREATEST_SYM),0,0},
533
  { "GROUP_CONCAT",	SYM(GROUP_CONCAT_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
534 535 536 537 538 539
  { "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)},
540 541 542 543
  { "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)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
544
  { "ISNULL",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_isnull)},
545
  { "IS_FREE_LOCK",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_is_free_lock)},
hf@genie.(none)'s avatar
SCRUM  
hf@genie.(none) committed
546
  { "IS_USED_LOCK",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_is_used_lock)},
547
  { "LAST_INSERT_ID",	SYM(LAST_INSERT_ID),0,0},
548
  { "ISSIMPLE",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_issimple)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
549 550 551
  { "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)},
552
  { "LN",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ln)},
553
  { "LINEFROMTEXT",	SYM(LINEFROMTEXT),0,0},
554
  { "LINEFROMWKB",	SYM(GEOMFROMWKB),0,0},
bar@bar.mysql.r18.ru's avatar
bar@bar.mysql.r18.ru committed
555
  { "LINESTRINGFROMTEXT",SYM(LINEFROMTEXT),0,0},
556
  { "LINESTRINGFROMWKB",SYM(GEOMFROMWKB),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
557 558
  { "LOAD_FILE",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_load_file)},
  { "LOCATE",		SYM(LOCATE),0,0},
559 560
  { "LOG",		SYM(LOG_SYM),0,0},
  { "LOG2",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_log2)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
561 562 563 564 565
  { "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},
gluh@gluh.mysql.r18.ru's avatar
gluh@gluh.mysql.r18.ru committed
566 567
  { "MAKEDATE",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_makedate)},
  { "MAKETIME",		SYM(FUNC_ARG3),0,CREATE_FUNC(create_func_maketime)},
568
  { "MASTER_POS_WAIT",	SYM(MASTER_POS_WAIT),0,0},
569
  { "MAX",		SYM(MAX_SYM),0,0},
bar@bar.mysql.r18.ru's avatar
bar@bar.mysql.r18.ru committed
570 571 572 573 574 575 576
  { "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)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
577 578 579
  { "MD5",              SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_md5)},
  { "MID",		SYM(SUBSTRING),0,0},	/* unireg function */
  { "MIN",		SYM(MIN_SYM),0,0},
580
  { "MLINEFROMTEXT",	SYM(MLINEFROMTEXT),0,0},
581
  { "MLINEFROMWKB",	SYM(GEOMFROMWKB),0,0},
582
  { "MPOINTFROMTEXT",	SYM(MPOINTFROMTEXT),0,0},
583
  { "MPOINTFROMWKB",	SYM(GEOMFROMWKB),0,0},
584
  { "MPOLYFROMTEXT",	SYM(MPOLYFROMTEXT),0,0},
585
  { "MPOLYFROMWKB",	SYM(GEOMFROMWKB),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
586
  { "MONTHNAME",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_monthname)},
bar@bar.mysql.r18.ru's avatar
bar@bar.mysql.r18.ru committed
587
  { "MULTILINESTRINGFROMTEXT",SYM(MLINEFROMTEXT),0,0},
588
  { "MULTILINESTRINGFROMWKB",SYM(GEOMFROMWKB),0,0},
589
  { "MULTIPOINTFROMTEXT",SYM(MPOINTFROMTEXT),0,0},
590
  { "MULTIPOINTFROMWKB",SYM(GEOMFROMWKB),0,0},
bar@bar.mysql.r18.ru's avatar
bar@bar.mysql.r18.ru committed
591
  { "MULTIPOLYGONFROMTEXT",SYM(MPOLYFROMTEXT),0,0},
592
  { "MULTIPOLYGONFROMWKB",SYM(GEOMFROMWKB),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
593 594
  { "NOW",		SYM(NOW_SYM),0,0},
  { "NULLIF",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_nullif)},
595
  { "NUMGEOMETRIES",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_numgeometries)},
bar@bar.mysql.r18.ru's avatar
bar@bar.mysql.r18.ru committed
596
  { "NUMINTERIORRINGS",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_numinteriorring)},
597
  { "NUMPOINTS",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_numpoints)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
598 599 600
  { "OCTET_LENGTH",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_length)},
  { "OCT",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_oct)},
  { "ORD",              SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ord)},
601
  { "OVERLAPS",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_overlaps)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
602 603 604
  { "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)},
605
  { "POINTFROMTEXT",	SYM(POINTFROMTEXT),0,0},
606
  { "POINTFROMWKB",	SYM(GEOMFROMWKB),0,0},
607
  { "POINTN",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_pointn)},
608
  { "POLYFROMTEXT",	SYM(POLYFROMTEXT),0,0},
609
  { "POLYFROMWKB",	SYM(GEOMFROMWKB),0,0},
bar@bar.mysql.r18.ru's avatar
bar@bar.mysql.r18.ru committed
610
  { "POLYGONFROMTEXT",	SYM(POLYFROMTEXT),0,0},
611
  { "POLYGONFROMWKB",	SYM(GEOMFROMWKB),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
612 613 614 615
  { "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)},
616
  { "QUOTE",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_quote)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
617 618 619 620 621 622 623 624 625 626
  { "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},
gluh@gluh.mysql.r18.ru's avatar
gluh@gluh.mysql.r18.ru committed
627
  { "SUBDATE",		SYM(SUBDATE_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
628 629
  { "SIGN",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_sign)},
  { "SIN",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_sin)},
630 631
  { "SHA",              SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_sha)},
  { "SHA1",             SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_sha)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
632 633 634
  { "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)},
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
635
  { "SRID",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_srid)},
636
  { "STARTPOINT",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_startpoint)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
637 638 639
  { "STD",		SYM(STD_SYM),0,0},
  { "STDDEV",		SYM(STD_SYM),0,0},
  { "STRCMP",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_strcmp)},
640
  { "SUBSTR",	  	SYM(SUBSTRING),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
641 642
  { "SUBSTRING",	SYM(SUBSTRING),0,0},
  { "SUBSTRING_INDEX",	SYM(SUBSTRING_INDEX),0,0},
gluh@gluh.mysql.r18.ru's avatar
gluh@gluh.mysql.r18.ru committed
643
  { "SUBTIME",          SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_subtime)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
644 645 646 647 648 649
  { "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)},
gluh@gluh.mysql.r18.ru's avatar
gluh@gluh.mysql.r18.ru committed
650
  { "TIMEDIFF",         SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_timediff)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
651
  { "TO_DAYS",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_to_days)},
652
  { "TOUCHES",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_touches)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
653 654
  { "TRIM",		SYM(TRIM),0,0},
  { "UCASE",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ucase)},
655 656
  { "UNCOMPRESS",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_uncompress)},
  { "UNCOMPRESSED_LENGTH", SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_uncompressed_length)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
657 658
  { "UNIQUE_USERS",	SYM(UNIQUE_USERS),0,0},
  { "UNIX_TIMESTAMP",	SYM(UNIX_TIMESTAMP),0,0},
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi committed
659
  { "UPPER",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ucase)},
660
  { "VARIANCE",		SYM(VARIANCE_SYM),0,0},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
661 662 663
  { "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)},
gluh@gluh.mysql.r18.ru's avatar
gluh@gluh.mysql.r18.ru committed
664
  { "WEEKOFYEAR",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_weekofyear)},
665 666 667
  { "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)},
bk@work.mysql.com's avatar
bk@work.mysql.com committed
668 669
  { "YEARWEEK",		SYM(YEARWEEK),0,0}
};