lex.h 24.4 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 59 60 61 62 63
*/

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},
  { "AS",		SYM(AS),0,0},
  { "ASC",		SYM(ASC),0,0},
  { "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
64 65
  { "BACKUP",	        SYM(BACKUP_SYM),0,0},
  { "BEGIN",	        SYM(BEGIN_SYM),0,0},
unknown's avatar
unknown committed
66 67 68 69 70 71
  { "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
72
  { "BINLOG",		SYM(BINLOG_SYM),0,0},
unknown's avatar
unknown committed
73 74
  { "BLOB",		SYM(BLOB_SYM),0,0},
  { "BOOL",		SYM(BOOL_SYM),0,0},
unknown's avatar
unknown committed
75
  { "BOOLEAN",		SYM(BOOLEAN_SYM),0,0},
unknown's avatar
unknown committed
76
  { "BOTH",		SYM(BOTH),0,0},
unknown's avatar
unknown committed
77
  { "BTREE",		SYM(BTREE_SYM),0,0},
unknown's avatar
unknown committed
78
  { "BY",		SYM(BY),0,0},
79
  { "BYTE",		SYM(BYTE_SYM), 0, 0},
unknown's avatar
unknown committed
80
  { "CACHE",		SYM(CACHE_SYM),0,0},
unknown's avatar
unknown committed
81 82 83 84
  { "CASCADE",		SYM(CASCADE),0,0},
  { "CASE",		SYM(CASE_SYM),0,0},
  { "CHAR",		SYM(CHAR_SYM),0,0},
  { "CHARACTER",	SYM(CHAR_SYM),0,0},
85
  { "CHARSET",		SYM(CHARSET),0,0},
unknown's avatar
unknown committed
86
  { "CHANGE",		SYM(CHANGE),0,0},
87
  { "CHANGED",		SYM(CHANGED),0,0},
unknown's avatar
unknown committed
88 89
  { "CHECK",		SYM(CHECK_SYM),0,0},
  { "CHECKSUM",		SYM(CHECKSUM_SYM),0,0},
unknown's avatar
unknown committed
90
  { "CIPHER",		SYM(CIPHER_SYM),0,0},
unknown's avatar
unknown committed
91
  { "CLIENT",		SYM(CLIENT_SYM),0,0},
92
  { "CLOSE",		SYM(CLOSE_SYM),0,0},
unknown's avatar
unknown committed
93
  { "COLLATE",		SYM(COLLATE_SYM),0,0},
unknown's avatar
unknown committed
94 95 96 97
  { "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
98
  { "COMMITTED",	SYM(COMMITTED_SYM),0,0},
unknown's avatar
unknown committed
99
  { "COMPRESSED",	SYM(COMPRESSED_SYM),0,0},
unknown's avatar
unknown committed
100
  { "CONCURRENT",	SYM(CONCURRENT),0,0},
unknown's avatar
unknown committed
101 102 103
  { "CONSTRAINT",	SYM(CONSTRAINT),0,0},
  { "CREATE",		SYM(CREATE),0,0},
  { "CROSS",		SYM(CROSS),0,0},
104
  { "CUBE",		SYM(CUBE_SYM),0,0},
unknown's avatar
unknown committed
105 106 107 108 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},
  { "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
119
  { "DES_KEY_FILE",	SYM(DES_KEY_FILE),0,0},
unknown's avatar
unknown committed
120 121 122 123 124 125
  { "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},
126
  { "DIRECTORY",	SYM(DIRECTORY_SYM),0,0},
127
  { "DISABLE",		SYM(DISABLE_SYM),0,0},
unknown's avatar
unknown committed
128 129
  { "DISTINCT",		SYM(DISTINCT),0,0},
  { "DISTINCTROW",	SYM(DISTINCT),0,0},	/* Access likes this */
130
  { "DIV",		SYM(DIV_SYM),0,0},
unknown's avatar
unknown committed
131
  { "DO",		SYM(DO_SYM),0,0},
unknown's avatar
unknown committed
132
  { "DOUBLE",		SYM(DOUBLE_SYM),0,0},
133
  { "DUAL",		SYM(DUAL_SYM),0,0},
unknown's avatar
unknown committed
134 135 136
  { "DROP",		SYM(DROP),0,0},
  { "DUMPFILE",		SYM(DUMPFILE),0,0},
  { "DYNAMIC",		SYM(DYNAMIC_SYM),0,0},
unknown's avatar
unknown committed
137
  { "ERRORS",		SYM(ERRORS),0,0},
unknown's avatar
unknown committed
138 139 140 141
  { "END",		SYM(END),0,0},
  { "ELSE",             SYM(ELSE),0,0},
  { "ESCAPE",		SYM(ESCAPE_SYM),0,0},
  { "ESCAPED",		SYM(ESCAPED),0,0},
142
  { "ENABLE",		SYM(ENABLE_SYM),0,0},
unknown's avatar
unknown committed
143 144
  { "ENCLOSED",		SYM(ENCLOSED),0,0},
  { "ENUM",		SYM(ENUM),0,0},
unknown's avatar
unknown committed
145
  { "EVENTS",		SYM(EVENTS_SYM),0,0},
unknown's avatar
unknown committed
146
  { "EXECUTE",		SYM(EXECUTE_SYM),0,0},
unknown's avatar
unknown committed
147 148 149
  { "EXPLAIN",		SYM(DESCRIBE),0,0},
  { "EXISTS",		SYM(EXISTS),0,0},
  { "EXTENDED",		SYM(EXTENDED_SYM),0,0},
150
  { "FAST",		SYM(FAST_SYM),0,0},
unknown's avatar
unknown committed
151 152 153 154 155 156 157 158
  { "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},
159
  { "FALSE",		SYM(FALSE_SYM),0,0},
unknown's avatar
unknown committed
160 161 162 163 164 165 166 167
  { "FOREIGN",		SYM(FOREIGN),0,0},
  { "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},
168
  { "FULLTEXT",		SYM(FULLTEXT_SYM),0,0},
unknown's avatar
unknown committed
169
  { "FUNCTION",		SYM(UDF_SYM),0,0},
unknown's avatar
unknown committed
170
  { "GEOMETRY",		SYM(GEOMETRY_SYM),0,0},
unknown's avatar
unknown committed
171
  { "GLOBAL",		SYM(GLOBAL_SYM),0,0},
unknown's avatar
unknown committed
172 173 174 175
  { "GRANT",		SYM(GRANT),0,0},
  { "GRANTS",	        SYM(GRANTS),0,0},
  { "GROUP",		SYM(GROUP),0,0},
  { "HAVING",		SYM(HAVING),0,0},
176
  { "HANDLER",		SYM(HANDLER_SYM),0,0},
unknown's avatar
unknown committed
177
  { "HASH",		SYM(HASH_SYM),0,0},
unknown's avatar
unknown committed
178
  { "HEAP",		SYM(HEAP_SYM),0,0},
unknown's avatar
unknown committed
179
  { "HELP",		SYM(HELP),0,0},
unknown's avatar
unknown committed
180 181 182 183 184 185 186 187 188
  { "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
189
  { "INDEXES",		SYM(INDEXES),0,0},
unknown's avatar
unknown committed
190 191
  { "INFILE",		SYM(INFILE),0,0},
  { "INNER",		SYM(INNER_SYM),0,0},
unknown's avatar
unknown committed
192
  { "INNOBASE",		SYM(INNOBASE_SYM),0,0},
193
  { "INNODB",		SYM(INNOBASE_SYM),0,0},
unknown's avatar
unknown committed
194
  { "INSERT",		SYM(INSERT),0,0},
195
  { "INSERT_METHOD",    SYM(INSERT_METHOD),0,0},
unknown's avatar
unknown committed
196 197 198 199 200 201 202 203 204
  { "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},
205
  { "IO_THREAD",        SYM(IO_THREAD),0,0},
unknown's avatar
unknown committed
206 207
  { "IF",		SYM(IF),0,0},
  { "IS",		SYM(IS),0,0},
unknown's avatar
unknown committed
208
  { "ISOLATION",	SYM(ISOLATION),0,0},
unknown's avatar
unknown committed
209
  { "ISAM",		SYM(ISAM_SYM),0,0},
210
  { "ISSUER",		SYM(ISSUER_SYM),0,0},
unknown's avatar
unknown committed
211 212 213 214
  { "JOIN",		SYM(JOIN_SYM),0,0},
  { "KEY",		SYM(KEY_SYM),0,0},
  { "KEYS",		SYM(KEYS),0,0},
  { "KILL",		SYM(KILL_SYM),0,0},
215
  { "LAST",		SYM(LAST_SYM),0,0},
unknown's avatar
unknown committed
216 217
  { "LEADING",		SYM(LEADING),0,0},
  { "LEFT",		SYM(LEFT),0,0},
unknown's avatar
unknown committed
218
  { "LEVEL",		SYM(LEVEL_SYM),0,0},
unknown's avatar
unknown committed
219 220 221 222 223 224
  { "LIKE",		SYM(LIKE),0,0},
  { "LINES",		SYM(LINES),0,0},
  { "LIMIT",		SYM(LIMIT),0,0},
  { "LOAD",		SYM(LOAD),0,0},
  { "LOCAL",		SYM(LOCAL_SYM),0,0},
  { "LOCK",		SYM(LOCK_SYM),0,0},
unknown's avatar
unknown committed
225
  { "LOCKS",		SYM(LOCKS_SYM),0,0},
unknown's avatar
unknown committed
226 227 228 229 230
  { "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},
231 232 233 234 235 236 237
  { "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
238
  { "MASTER_SERVER_ID",           SYM(MASTER_SERVER_ID_SYM),0,0},
239
  { "MASTER_USER",           SYM(MASTER_USER_SYM),0,0},
unknown's avatar
unknown committed
240
  { "MAX_ROWS",		SYM(MAX_ROWS),0,0},
unknown's avatar
unknown committed
241
  { "MAX_QUERIES_PER_HOUR", SYM(MAX_QUERIES_PER_HOUR), 0,0},
242 243
  { "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
244 245 246 247 248
  { "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},
249
  { "MEDIUM",		SYM(MEDIUM_SYM),0,0},
unknown's avatar
unknown committed
250 251 252 253
  { "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},
254
  { "MOD",		SYM(MOD_SYM),0,0},
unknown's avatar
unknown committed
255
  { "MODE",		SYM(MODE_SYM),0,0},
unknown's avatar
unknown committed
256 257
  { "MODIFY",		SYM(MODIFY_SYM),0,0},
  { "MONTH",		SYM(MONTH_SYM),0,0},
unknown's avatar
unknown committed
258
  { "MRG_MYISAM",	SYM(MERGE_SYM),0,0},
unknown's avatar
unknown committed
259 260 261
  { "MYISAM",		SYM(MYISAM_SYM),0,0},
  { "NATURAL",		SYM(NATURAL),0,0},
  { "NATIONAL",		SYM(NATIONAL_SYM),0,0},
262
  { "NEXT",		SYM(NEXT_SYM),0,0},
unknown's avatar
unknown committed
263
  { "NEW",              SYM(NEW_SYM),0,0},
unknown's avatar
unknown committed
264 265
  { "NCHAR",		SYM(NCHAR_SYM),0,0},
  { "NO",		SYM(NO_SYM),0,0},
266
  { "NONE",		SYM(NONE_SYM),0,0},
unknown's avatar
unknown committed
267 268
  { "NOT",		SYM(NOT),0,0},
  { "NULL",		SYM(NULL_SYM),0,0},
269
  { "NUMERIC",		SYM(NUMERIC_SYM),0,0},
unknown's avatar
unknown committed
270
  { "ON",		SYM(ON),0,0},
271
  { "OPEN",		SYM(OPEN_SYM),0,0},
unknown's avatar
unknown committed
272 273 274 275 276 277 278 279 280 281
  { "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},
unknown's avatar
unknown committed
282
  { "PURGE",		SYM(PURGE),0,0},
unknown's avatar
unknown committed
283
  { "PRECISION",	SYM(PRECISION),0,0},
284
  { "PREV",		SYM(PREV_SYM),0,0},
unknown's avatar
unknown committed
285 286 287 288 289
  { "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
290
  { "QUERY",		SYM(QUERY_SYM),0,0},
unknown's avatar
unknown committed
291 292 293 294 295
  { "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},
296 297
  { "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
298 299 300 301 302
  { "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
303
  { "REPLICATION",	SYM(REPLICATION),0,0},
unknown's avatar
unknown committed
304
  { "REPEATABLE",	SYM(REPEATABLE_SYM),0,0},
305
  { "REQUIRE",	        SYM(REQUIRE_SYM),0,0},
unknown's avatar
unknown committed
306
  { "RESET",		SYM(RESET_SYM),0,0},
307
  { "USER_RESOURCES",	SYM(RESOURCES),0,0},
unknown's avatar
unknown committed
308
  { "RESTORE",		SYM(RESTORE_SYM),0,0},
unknown's avatar
unknown committed
309 310 311
  { "RESTRICT",		SYM(RESTRICT),0,0},
  { "RETURNS",		SYM(UDF_RETURNS_SYM),0,0},
  { "REVOKE",		SYM(REVOKE),0,0},
312
  { "RIGHT",		SYM(RIGHT),0,0},
unknown's avatar
unknown committed
313 314
  { "RLIKE",		SYM(REGEXP),0,0},	/* Like in mSQL2 */
  { "ROLLBACK",		SYM(ROLLBACK_SYM),0,0},
315
  { "ROLLUP",		SYM(ROLLUP_SYM),0,0},
unknown's avatar
unknown committed
316 317
  { "ROW",		SYM(ROW_SYM),0,0},
  { "ROWS",		SYM(ROWS_SYM),0,0},
unknown's avatar
unknown committed
318
  { "RTREE",		SYM(RTREE_SYM),0,0},
unknown's avatar
unknown committed
319 320
  { "SECOND",		SYM(SECOND_SYM),0,0},
  { "SELECT",		SYM(SELECT_SYM),0,0},
321
  { "SERIAL",		SYM(SERIAL_SYM),0,0},
unknown's avatar
unknown committed
322 323
  { "SERIALIZABLE",	SYM(SERIALIZABLE_SYM),0,0},
  { "SESSION",		SYM(SESSION_SYM),0,0},
unknown's avatar
unknown committed
324
  { "SET",		SYM(SET),0,0},
unknown's avatar
unknown committed
325
  { "SIGNED",		SYM(SIGNED_SYM),0,0},
326
  { "SIMPLE",		SYM(SIMPLE_SYM),0,0},
unknown's avatar
unknown committed
327
  { "SHARE",		SYM(SHARE_SYM),0,0},
unknown's avatar
unknown committed
328 329 330 331 332
  { "SHOW",		SYM(SHOW),0,0},
  { "SHUTDOWN",		SYM(SHUTDOWN),0,0},
  { "SLAVE",            SYM(SLAVE),0,0},
  { "SMALLINT",		SYM(SMALLINT),0,0},
  { "SONAME",		SYM(UDF_SONAME_SYM),0,0},
unknown's avatar
unknown committed
333
  { "SPATIAL",		SYM(SPATIAL_SYM),0,0},
unknown's avatar
unknown committed
334 335
  { "SQL_BIG_RESULT",	SYM(SQL_BIG_RESULT),0,0},
  { "SQL_BUFFER_RESULT", SYM(SQL_BUFFER_RESULT),0,0},
unknown's avatar
unknown committed
336
  { "SQL_CACHE",        SYM(SQL_CACHE_SYM), 0, 0},
337
  { "SQL_CALC_FOUND_ROWS", SYM(SQL_CALC_FOUND_ROWS),0,0},
unknown's avatar
unknown committed
338
  { "SQL_NO_CACHE",	SYM(SQL_NO_CACHE_SYM), 0, 0},
unknown's avatar
unknown committed
339
  { "SQL_SMALL_RESULT", SYM(SQL_SMALL_RESULT),0,0},
unknown's avatar
unknown committed
340
  { "SQL_THREAD", 	SYM(SQL_THREAD),0,0},
341
  { "SSL",		SYM(SSL_SYM),0,0},
unknown's avatar
unknown committed
342 343 344 345 346 347 348
  { "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},
349
  { "SUBJECT",		SYM(SUBJECT_SYM),0,0},
unknown's avatar
unknown committed
350
  { "SUPER",		SYM(SUPER_SYM),0,0},
unknown's avatar
unknown committed
351 352 353 354 355 356 357 358 359 360 361 362
  { "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
363
  { "TRANSACTION",	SYM(TRANSACTION_SYM),0,0},
364
  { "TRUNCATE",		SYM(TRUNCATE_SYM),0,0},
365
  { "TRUE",		SYM(TRUE_SYM),0,0},
unknown's avatar
unknown committed
366 367
  { "TO",		SYM(TO_SYM),0,0},
  { "TYPE",		SYM(TYPE_SYM),0,0},
unknown's avatar
unknown committed
368
  { "TYPES",		SYM(TYPES_SYM),0,0},
unknown's avatar
unknown committed
369
  { "UNCOMMITTED",	SYM(UNCOMMITTED_SYM),0,0},
370
  { "UNION",	        SYM(UNION_SYM),0,0},
unknown's avatar
unknown committed
371 372 373
  { "UNIQUE",		SYM(UNIQUE_SYM),0,0},
  { "UNLOCK",		SYM(UNLOCK_SYM),0,0},
  { "UNSIGNED",		SYM(UNSIGNED),0,0},
374
  { "USE",		SYM(USE_SYM),0,0},
unknown's avatar
unknown committed
375
  { "USE_FRM",		SYM(USE_FRM),0,0},
376
  { "USING",		SYM(USING),0,0},
unknown's avatar
unknown committed
377 378
  { "UPDATE",		SYM(UPDATE_SYM),0,0},
  { "USAGE",		SYM(USAGE),0,0},
379
  { "VALUE",		SYM(VALUE_SYM),0,0},
unknown's avatar
unknown committed
380 381
  { "VALUES",		SYM(VALUES),0,0},
  { "VARCHAR",		SYM(VARCHAR),0,0},
382
  { "VARCHARACTER",	SYM(VARCHAR),0,0},
unknown's avatar
unknown committed
383 384 385
  { "VARIABLES",	SYM(VARIABLES),0,0},
  { "VARYING",		SYM(VARYING),0,0},
  { "VARBINARY",	SYM(VARBINARY),0,0},
unknown's avatar
unknown committed
386
  { "WARNINGS",		SYM(WARNINGS),0,0},
unknown's avatar
unknown committed
387 388 389 390 391
  { "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
392
  { "XOR",		SYM(XOR),0,0},
393
  { "X509",		SYM(X509_SYM),0,0},
unknown's avatar
unknown committed
394 395 396 397 398 399 400 401 402 403 404
  { "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},
405 406
  { "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
407
  { "AREA",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_area)},
unknown's avatar
unknown committed
408 409
  { "ASCII",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ascii)},
  { "ASIN",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_asin)},
unknown's avatar
unknown committed
410
  { "ASTEXT",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_as_text)},
unknown's avatar
unknown committed
411 412 413 414 415 416 417
  { "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
418
  { "CAST",		SYM(CAST_SYM),0,0},
unknown's avatar
unknown committed
419
  { "CEILING",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ceiling)},
unknown's avatar
unknown committed
420
  { "BIT_LENGTH",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_bit_length)},
unknown's avatar
unknown committed
421
  { "CENTROID",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_centroid)},
unknown's avatar
unknown committed
422 423 424 425 426 427
  { "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},
  { "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
428
  { "CONTAINS",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_contains)},
unknown's avatar
unknown committed
429
  { "CONV",		SYM(FUNC_ARG3),0,CREATE_FUNC(create_func_conv)},
unknown's avatar
unknown committed
430
  { "CONVERT",		SYM(CONVERT_SYM),0,0},
unknown's avatar
unknown committed
431 432 433
  { "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
434
  { "CRC32",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_crc32)},
unknown's avatar
unknown committed
435
  { "CROSSES",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_crosses)},
unknown's avatar
unknown committed
436 437 438 439 440 441 442 443 444 445 446
  { "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
447 448
  { "DES_ENCRYPT",	SYM(DES_ENCRYPT_SYM),0,0},
  { "DES_DECRYPT",	SYM(DES_DECRYPT_SYM),0,0},
unknown's avatar
unknown committed
449 450
  { "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
451 452 453
  { "ELT",		SYM(ELT_FUNC),0,0},
  { "ENCODE",		SYM(ENCODE_SYM),0,0},
  { "ENCRYPT",		SYM(ENCRYPT),0,0},
unknown's avatar
unknown committed
454 455 456 457
  { "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
458 459 460 461 462 463 464
  { "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},
465
  { "FOUND_ROWS",	SYM(FUNC_ARG0),0,CREATE_FUNC(create_func_found_rows)},
unknown's avatar
unknown committed
466 467 468
  { "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
469 470 471
  { "GEOMETRYCOLLECTION",SYM(GEOMETRYCOLLECTION),0,0},
  { "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
472 473
  { "GEOMCOLLFROMTEXT",	SYM(GEOMCOLLFROMTEXT),0,0},
  { "GEOMFROMTEXT",	SYM(GEOMFROMTEXT),0,0},
unknown's avatar
unknown committed
474
  { "GLENGTH",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_glength)},
unknown's avatar
unknown committed
475 476 477 478 479 480 481
  { "GREATEST",		SYM(GREATEST_SYM),0,0},
  { "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
482 483 484 485
  { "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
486
  { "ISNULL",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_isnull)},
487
  { "IS_FREE_LOCK",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_is_free_lock)},
unknown's avatar
unknown committed
488
  { "LAST_INSERT_ID",	SYM(LAST_INSERT_ID),0,0},
unknown's avatar
unknown committed
489
  { "ISSIMPLE",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_issimple)},
unknown's avatar
unknown committed
490 491 492
  { "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)},
493
  { "LN",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ln)},
unknown's avatar
unknown committed
494
  { "LINEFROMTEXT",	SYM(LINEFROMTEXT),0,0},
unknown's avatar
unknown committed
495
  { "LINESTRING",	SYM(LINESTRING),0,0},
unknown's avatar
unknown committed
496 497
  { "LOAD_FILE",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_load_file)},
  { "LOCATE",		SYM(LOCATE),0,0},
498 499
  { "LOG",		SYM(LOG_SYM),0,0},
  { "LOG2",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_log2)},
unknown's avatar
unknown committed
500 501 502 503
  { "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)},
unknown's avatar
unknown committed
504 505
  { "MASTER_POS_WAIT", SYM(FUNC_ARG2),0,
      CREATE_FUNC(create_wait_for_master_pos)},
unknown's avatar
unknown committed
506
  { "MAKE_SET",		SYM(MAKE_SET_SYM),0,0},
507
  { "MAX",		SYM(MAX_SYM),0,0},
unknown's avatar
unknown committed
508 509 510
  { "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
511 512 513
  { "MLINEFROMTEXT",	SYM(MLINEFROMTEXT),0,0},
  { "MPOINTFROMTEXT",	SYM(MPOINTFROMTEXT),0,0},
  { "MPOLYFROMTEXT",	SYM(MPOLYFROMTEXT),0,0},
unknown's avatar
unknown committed
514 515 516
  { "MULTILINESTRING",	SYM(MULTILINESTRING),0,0},
  { "MULTIPOINT",	SYM(MULTIPOINT),0,0},
  { "MULTIPOLYGON",	SYM(MULTIPOLYGON),0,0},
unknown's avatar
unknown committed
517 518 519
  { "MONTHNAME",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_monthname)},
  { "NOW",		SYM(NOW_SYM),0,0},
  { "NULLIF",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_nullif)},
unknown's avatar
unknown committed
520 521 522
  { "NUMGEOMETRIES",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_numgeometries)},
  { "NUMINTERIORRING",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_numinteriorring)},
  { "NUMPOINTS",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_numpoints)},
unknown's avatar
unknown committed
523 524 525
  { "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)},
unknown's avatar
unknown committed
526
  { "OVERLAPS",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_overlaps)},
unknown's avatar
unknown committed
527 528 529
  { "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
530
  { "POINT",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_point)},
unknown's avatar
unknown committed
531
  { "POINTFROMTEXT",	SYM(POINTFROMTEXT),0,0},
unknown's avatar
unknown committed
532
  { "POINTN",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_pointn)},
unknown's avatar
unknown committed
533
  { "POLYFROMTEXT",	SYM(POLYFROMTEXT),0,0},
unknown's avatar
unknown committed
534
  { "POLYGON",		SYM(POLYGON),0,0},
unknown's avatar
unknown committed
535 536 537 538
  { "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
539
  { "QUOTE",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_quote)},
unknown's avatar
unknown committed
540 541 542 543 544 545 546 547 548 549 550 551 552
  { "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)},
553 554
  { "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
555 556 557
  { "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
558
  { "STARTPOINT",	SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_startpoint)},
unknown's avatar
unknown committed
559 560 561 562 563 564 565 566 567 568 569 570
  { "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
571
  { "TOUCHES",		SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_touches)},
unknown's avatar
unknown committed
572 573 574 575
  { "TRIM",		SYM(TRIM),0,0},
  { "UCASE",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ucase)},
  { "UNIQUE_USERS",	SYM(UNIQUE_USERS),0,0},
  { "UNIX_TIMESTAMP",	SYM(UNIX_TIMESTAMP),0,0},
unknown's avatar
unknown committed
576
  { "UPPER",		SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ucase)},
unknown's avatar
unknown committed
577 578 579 580
  { "USER",		SYM(USER),0,0},
  { "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
581 582 583
  { "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
584 585
  { "YEARWEEK",		SYM(YEARWEEK),0,0}
};