Merge branch 'master' of ssh://repo.or.cz/srv/git/phpmyadmin/madhuracj into OpenGIS
[phpmyadmin/madhuracj.git] / libraries / sqlparser.data.php
blob0a86784713645b37a7df1a8395a7452a25135531
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * SQL Parser Matching Data
6 * Copyright 2002 Robin Johnson <robbat2@users.sourceforge.net>
7 * http://www.orbis-terrarum.net/?l=people.robbat2
9 * This data is used by the SQL Parser to recognize keywords
11 * It has been extracted from the lex.h file in the MySQL BK tree
12 * (around 4.0.2) as well as the MySQL documentation.
14 * It's easier to use only uppercase for proper sorting. In case of
15 * doubt, use the test case to verify.
17 * @package PhpMyAdmin
19 if (! defined('PHPMYADMIN')) {
20 exit;
23 if (! isset($GLOBALS['sql_delimiter'])) {
24 $GLOBALS['sql_delimiter'] = ';';
27 /**
28 * @global array MySQL function names
30 $PMA_SQPdata_function_name = array (
31 'ABS',
32 'ACOS',
33 'ADDDATE',
34 'ADDTIME',
35 'AES_DECRYPT',
36 'AES_ENCRYPT',
37 'AREA', // Area() polygon-property-functions.html
38 'ASBINARY', // AsBinary()
39 'ASCII',
40 'ASIN',
41 'ASTEXT', // AsText()
42 'ATAN',
43 'ATAN2',
44 'AVG',
45 'BDMPOLYFROMTEXT', // BdMPolyFromText()
46 'BDMPOLYFROMWKB', // BdMPolyFromWKB()
47 'BDPOLYFROMTEXT', // BdPolyFromText()
48 'BDPOLYFROMWKB', // BdPolyFromWKB()
49 'BENCHMARK',
50 'BIN',
51 'BIT_AND',
52 'BIT_COUNT',
53 'BIT_LENGTH',
54 'BIT_OR',
55 'BIT_XOR', // group-by-functions.html
56 'BOUNDARY', // Boundary() general-geometry-property-functions.html
57 'BUFFER', // Buffer()
58 'CAST',
59 'CEIL',
60 'CEILING',
61 'CENTROID', // Centroid() multipolygon-property-functions.html
62 'CHAR', // string-functions.html
63 'CHARACTER_LENGTH',
64 'CHARSET', // information-functions.html
65 'CHAR_LENGTH',
66 'COALESCE',
67 'COERCIBILITY', // information-functions.html
68 'COLLATION', // information-functions.html
69 'COMPRESS', // string-functions.html
70 'CONCAT',
71 'CONCAT_WS',
72 'CONNECTION_ID',
73 'CONTAINS', // Contains()
74 'CONV',
75 'CONVERT',
76 'CONVERT_TZ',
77 'CONVEXHULL', // ConvexHull()
78 'COS',
79 'COT',
80 'COUNT',
81 'CRC32', // mathematical-functions.html
82 'CROSSES', // Crosses()
83 'CURDATE',
84 'CURRENT_DATE',
85 'CURRENT_TIME',
86 'CURRENT_TIMESTAMP',
87 'CURRENT_USER',
88 'CURTIME',
89 'DATABASE',
90 'DATE', // date-and-time-functions.html
91 'DATEDIFF', // date-and-time-functions.html
92 'DATE_ADD',
93 'DATE_DIFF',
94 'DATE_FORMAT',
95 'DATE_SUB',
96 'DAY',
97 'DAYNAME',
98 'DAYOFMONTH',
99 'DAYOFWEEK',
100 'DAYOFYEAR',
101 'DECODE',
102 'DEFAULT', // miscellaneous-functions.html
103 'DEGREES',
104 'DES_DECRYPT',
105 'DES_ENCRYPT',
106 'DIFFERENCE', // Difference()
107 'DIMENSION', // Dimension() general-geometry-property-functions.html
108 'DISJOINT', // Disjoint()
109 'DISTANCE', // Distance()
110 'ELT',
111 'ENCODE',
112 'ENCRYPT',
113 'ENDPOINT', // EndPoint() linestring-property-functions.html
114 'ENVELOPE', // Envelope() general-geometry-property-functions.html
115 'EQUALS', // Equals()
116 'EXP',
117 'EXPORT_SET',
118 'EXTERIORRING', // ExteriorRing() polygon-property-functions.html
119 'EXTRACT',
120 'EXTRACTVALUE', // ExtractValue() xml-functions.html
121 'FIELD',
122 'FIND_IN_SET',
123 'FLOOR',
124 'FORMAT',
125 'FOUND_ROWS',
126 'FROM_DAYS',
127 'FROM_UNIXTIME',
128 'GEOMCOLLFROMTEXT', // GeomCollFromText()
129 'GEOMCOLLFROMWKB', // GeomCollFromWKB()
130 'GEOMETRYCOLLECTION', // GeometryCollection()
131 'GEOMETRYCOLLECTIONFROMTEXT', // GeometryCollectionFromText()
132 'GEOMETRYCOLLECTIONFROMWKB', // GeometryCollectionFromWKB()
133 'GEOMETRYFROMTEXT', // GeometryFromText()
134 'GEOMETRYFROMWKB', // GeometryFromWKB()
135 'GEOMETRYN', // GeometryN() geometrycollection-property-functions.html
136 'GEOMETRYTYPE', // GeometryType() general-geometry-property-functions.html
137 'GEOMFROMTEXT', // GeomFromText()
138 'GEOMFROMWKB', // GeomFromWKB()
139 'GET_FORMAT',
140 'GET_LOCK',
141 'GLENGTH', // GLength() linestring-property-functions.html
142 'GREATEST',
143 'GROUP_CONCAT',
144 'GROUP_UNIQUE_USERS',
145 'HEX',
146 'HOUR',
147 'IF', //control-flow-functions.html
148 'IFNULL',
149 'INET_ATON',
150 'INET_NTOA',
151 'INSERT', // string-functions.html
152 'INSTR',
153 'INTERIORRINGN', // InteriorRingN() polygon-property-functions.html
154 'INTERSECTION', // Intersection()
155 'INTERSECTS', // Intersects()
156 'INTERVAL',
157 'ISCLOSED', // IsClosed() multilinestring-property-functions.html
158 'ISEMPTY', // IsEmpty() general-geometry-property-functions.html
159 'ISNULL',
160 'ISRING', // IsRing() linestring-property-functions.html
161 'ISSIMPLE', // IsSimple() general-geometry-property-functions.html
162 'IS_FREE_LOCK',
163 'IS_USED_LOCK', // miscellaneous-functions.html
164 'LAST_DAY',
165 'LAST_INSERT_ID',
166 'LCASE',
167 'LEAST',
168 'LEFT',
169 'LENGTH',
170 'LINEFROMTEXT', // LineFromText()
171 'LINEFROMWKB', // LineFromWKB()
172 'LINESTRING', // LineString()
173 'LINESTRINGFROMTEXT', // LineStringFromText()
174 'LINESTRINGFROMWKB', // LineStringFromWKB()
175 'LN',
176 'LOAD_FILE',
177 'LOCALTIME',
178 'LOCALTIMESTAMP',
179 'LOCATE',
180 'LOG',
181 'LOG10',
182 'LOG2',
183 'LOWER',
184 'LPAD',
185 'LTRIM',
186 'MAKEDATE',
187 'MAKETIME',
188 'MAKE_SET',
189 'MASTER_POS_WAIT',
190 'MAX',
191 'MBRCONTAINS', // MBRContains()
192 'MBRDISJOINT', // MBRDisjoint()
193 'MBREQUAL', // MBREqual()
194 'MBRINTERSECTS', // MBRIntersects()
195 'MBROVERLAPS', // MBROverlaps()
196 'MBRTOUCHES', // MBRTouches()
197 'MBRWITHIN', // MBRWithin()
198 'MD5',
199 'MICROSECOND',
200 'MID',
201 'MIN',
202 'MINUTE',
203 'MLINEFROMTEXT', // MLineFromText()
204 'MLINEFROMWKB', // MLineFromWKB()
205 'MOD',
206 'MONTH',
207 'MONTHNAME',
208 'MPOINTFROMTEXT', // MPointFromText()
209 'MPOINTFROMWKB', // MPointFromWKB()
210 'MPOLYFROMTEXT', // MPolyFromText()
211 'MPOLYFROMWKB', // MPolyFromWKB()
212 'MULTILINESTRING', // MultiLineString()
213 'MULTILINESTRINGFROMTEXT', // MultiLineStringFromText()
214 'MULTILINESTRINGFROMWKB', // MultiLineStringFromWKB()
215 'MULTIPOINT', // MultiPoint()
216 'MULTIPOINTFROMTEXT', // MultiPointFromText()
217 'MULTIPOINTFROMWKB', // MultiPointFromWKB()
218 'MULTIPOLYGON', // MultiPolygon()
219 'MULTIPOLYGONFROMTEXT', // MultiPolygonFromText()
220 'MULTIPOLYGONFROMWKB', // MultiPolygonFromWKB()
221 'NAME_CONST', // NAME_CONST()
222 'NOW', // NOW()
223 'NULLIF',
224 'NUMGEOMETRIES', // NumGeometries() geometrycollection-property-functions.html
225 'NUMINTERIORRINGS', // NumInteriorRings() polygon-property-functions.html
226 'NUMPOINTS', // NumPoints() linestring-property-functions.html
227 'OCT',
228 'OCTET_LENGTH',
229 'OLD_PASSWORD',
230 'ORD',
231 'OVERLAPS', // Overlaps()
232 'PASSWORD',
233 'PERIOD_ADD',
234 'PERIOD_DIFF',
235 'PI',
236 'POINT', // Point()
237 'POINTFROMTEXT', // PointFromText()
238 'POINTFROMWKB', // PointFromWKB()
239 'POINTN', // PointN() inestring-property-functions.html
240 'POINTONSURFACE', // PointOnSurface() multipolygon-property-functions.html
241 'POLYFROMTEXT', // PolyFromText()
242 'POLYFROMWKB', // PolyFromWKB()
243 'POLYGON', // Polygon()
244 'POLYGONFROMTEXT', // PolygonFromText()
245 'POLYGONFROMWKB', // PolygonFromWKB()
246 'POSITION',
247 'POW',
248 'POWER',
249 'QUARTER',
250 'QUOTE',
251 'RADIANS',
252 'RAND',
253 'RELATED', // Related()
254 'RELEASE_LOCK',
255 'REPEAT',
256 'REPLACE', // string-functions.html
257 'REVERSE',
258 'RIGHT',
259 'ROUND',
260 'ROW_COUNT', // information-functions.html
261 'RPAD',
262 'RTRIM',
263 'SCHEMA', // information-functions.html
264 'SECOND',
265 'SEC_TO_TIME',
266 'SESSION_USER',
267 'SHA',
268 'SHA1',
269 'SIGN',
270 'SIN',
271 'SLEEP', // miscellaneous-functions.html
272 'SOUNDEX',
273 'SPACE',
274 'SQRT',
275 'SRID', // general-geometry-property-functions.html
276 'STARTPOINT', // StartPoint() linestring-property-functions.html
277 'STD',
278 'STDDEV',
279 'STDDEV_POP', // group-by-functions.html
280 'STDDEV_SAMP', // group-by-functions.html
281 'STRCMP',
282 'STR_TO_DATE',
283 'SUBDATE',
284 'SUBSTR',
285 'SUBSTRING',
286 'SUBSTRING_INDEX',
287 'SUBTIME',
288 'SUM',
289 'SYMDIFFERENCE', // SymDifference()
290 'SYSDATE',
291 'SYSTEM_USER',
292 'TAN',
293 'TIME',
294 'TIMEDIFF',
295 'TIMESTAMP',
296 'TIMESTAMPADD',
297 'TIMESTAMPDIFF',
298 'TIME_FORMAT',
299 'TIME_TO_SEC',
300 'TOUCHES', // Touches()
301 'TO_DAYS',
302 'TRIM',
303 'TRUNCATE', // mathematical-functions.html
304 'UCASE',
305 'UNCOMPRESS', // string-functions.html
306 'UNCOMPRESSED_LENGTH', // string-functions.html
307 'UNHEX', // string-functions.html
308 'UNIQUE_USERS',
309 'UNIX_TIMESTAMP',
310 'UPDATEXML', // UpdateXML() xml-functions.html
311 'UPPER',
312 'USER',
313 'UTC_DATE',
314 'UTC_TIME',
315 'UTC_TIMESTAMP',
316 'UUID', // miscellaneous-functions.html
317 'VARIANCE', // group-by-functions.html
318 'VAR_POP', // group-by-functions.html
319 'VAR_SAMP', // group-by-functions.html
320 'VERSION',
321 'WEEK',
322 'WEEKDAY',
323 'WEEKOFYEAR',
324 'WITHIN', // Within()
325 'X', // point-property-functions.html
326 'Y', // point-property-functions.html
327 'YEAR',
328 'YEARWEEK'
332 * @global array MySQL attributes
334 $PMA_SQPdata_column_attrib = array (
335 'ARCHIVE', // Engine
336 'ASCII',
337 'AUTO_INCREMENT',
338 'BDB', // Engine
339 'BERKELEYDB', // Engine alias BDB
340 'BINARY',
341 'BLACKHOLE', // Engine
342 'CSV', // Engine
343 'DEFAULT',
344 'EXAMPLE', // Engine
345 'FEDERATED', // Engine
346 'HEAP', // Engine
347 'INNOBASE', // Engine alias InnoDB
348 'INNODB', // Engine InnoDB
349 'ISAM', // Engine
350 'MARIA', // Engine
351 'MEMORY', // Engine alias HEAP, but preferred
352 'MERGE', // Engine
353 'MRG_ISAM', // Engine
354 'MRG_MYISAM', // Engine alias MERGE
355 'MYISAM', // Engine MyISAM
356 'NATIONAL',
357 'NDB', // Engine alias NDBCLUSTER
358 'NDBCLUSTER', // Engine
359 'PRECISION',
360 'UNDEFINED',
361 'UNICODE',
362 'UNSIGNED',
363 'VARYING',
364 'ZEROFILL'
368 * words that are reserved by MySQL and may not be used as identifiers without quotes
370 * @see http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html
372 * @global array MySQL reserved words
374 $PMA_SQPdata_reserved_word = array (
375 'ACCESSIBLE', // 5.1
376 'ACTION',
377 'ADD',
378 'AFTER',
379 'AGAINST',
380 'AGGREGATE',
381 'ALGORITHM',
382 'ALL',
383 'ALTER',
384 'ANALYSE',
385 'ANALYZE',
386 'AND',
387 'AS',
388 'ASC',
389 'AUTOCOMMIT',
390 'AUTO_INCREMENT',
391 'AVG_ROW_LENGTH',
392 'BACKUP',
393 'BEGIN',
394 'BETWEEN',
395 'BINLOG',
396 'BOTH',
397 'BY',
398 'CASCADE',
399 'CASE',
400 'CHANGE',
401 'CHANGED',
402 'CHARSET',
403 'CHECK',
404 'CHECKSUM',
405 'COLLATE',
406 'COLLATION',
407 'COLUMN',
408 'COLUMNS',
409 'COMMENT',
410 'COMMIT',
411 'COMMITTED',
412 'COMPRESSED',
413 'CONCURRENT',
414 'CONSTRAINT',
415 'CONTAINS',
416 'CONVERT',
417 'CREATE',
418 'CROSS',
419 'CURRENT_TIMESTAMP',
420 'DATABASE',
421 'DATABASES',
422 'DAY',
423 'DAY_HOUR',
424 'DAY_MINUTE',
425 'DAY_SECOND',
426 'DECLARE',
427 'DEFINER',
428 'DELAYED',
429 'DELAY_KEY_WRITE',
430 'DELETE',
431 'DESC',
432 'DESCRIBE',
433 'DETERMINISTIC',
434 'DISTINCT',
435 'DISTINCTROW',
436 'DIV',
437 'DO',
438 'DROP',
439 'DUMPFILE',
440 'DUPLICATE',
441 'DYNAMIC',
442 'ELSE',
443 'ENCLOSED',
444 'END',
445 'ENGINE',
446 'ENGINES',
447 'ESCAPE',
448 'ESCAPED',
449 'EVENTS',
450 'EXECUTE',
451 'EXISTS',
452 'EXPLAIN',
453 'EXTENDED',
454 'FAST',
455 'FIELDS',
456 'FILE',
457 'FIRST',
458 'FIXED',
459 'FLUSH',
460 'FOR',
461 'FORCE',
462 'FOREIGN',
463 'FROM',
464 'FULL',
465 'FULLTEXT',
466 'FUNCTION',
467 'GEMINI',
468 'GEMINI_SPIN_RETRIES',
469 'GLOBAL',
470 'GRANT',
471 'GRANTS',
472 'GROUP',
473 'HAVING',
474 'HEAP',
475 'HIGH_PRIORITY',
476 'HOSTS',
477 'HOUR',
478 'HOUR_MINUTE',
479 'HOUR_SECOND',
480 'IDENTIFIED',
481 'IF',
482 'IGNORE',
483 'IN',
484 'INDEX',
485 'INDEXES',
486 'INFILE',
487 'INNER',
488 'INSERT',
489 'INSERT_ID',
490 'INSERT_METHOD',
491 'INTERVAL',
492 'INTO',
493 'INVOKER',
494 'IS',
495 'ISOLATION',
496 'JOIN',
497 'KEY',
498 'KEYS',
499 'KILL',
500 'LAST_INSERT_ID',
501 'LEADING',
502 'LEFT',
503 'LIKE',
504 'LIMIT',
505 'LINEAR', // 5.1
506 'LINES',
507 'LOAD',
508 'LOCAL',
509 'LOCK',
510 'LOCKS',
511 'LOGS',
512 'LOW_PRIORITY',
513 'MARIA', // 5.1 ?
514 'MASTER_CONNECT_RETRY',
515 'MASTER_HOST',
516 'MASTER_LOG_FILE',
517 'MASTER_LOG_POS',
518 'MASTER_PASSWORD',
519 'MASTER_PORT',
520 'MASTER_USER',
521 'MATCH',
522 'MAX_CONNECTIONS_PER_HOUR',
523 'MAX_QUERIES_PER_HOUR',
524 'MAX_ROWS',
525 'MAX_UPDATES_PER_HOUR',
526 'MAX_USER_CONNECTIONS',
527 'MEDIUM',
528 'MERGE',
529 'MINUTE',
530 'MINUTE_SECOND',
531 'MIN_ROWS',
532 'MODE',
533 'MODIFY',
534 'MONTH',
535 'MRG_MYISAM',
536 'MYISAM',
537 'NAMES',
538 'NATURAL',
539 // 'NO' is not allowed in SQL-99 but is allowed in MySQL
540 //'NO',
541 'NOT',
542 'NULL',
543 'OFFSET',
544 'ON',
545 'OPEN',
546 'OPTIMIZE',
547 'OPTION',
548 'OPTIONALLY',
549 'OR',
550 'ORDER',
551 'OUTER',
552 'OUTFILE',
553 'PACK_KEYS',
554 'PAGE', // 5.1-maria ?
555 'PAGE_CHECKSUM', // 5.1
556 'PARTIAL',
557 'PARTITION', // 5.1
558 'PARTITIONS', // 5.1
559 'PASSWORD',
560 'PRIMARY',
561 'PRIVILEGES',
562 'PROCEDURE',
563 'PROCESS',
564 'PROCESSLIST',
565 'PURGE',
566 'QUICK',
567 'RAID0',
568 'RAID_CHUNKS',
569 'RAID_CHUNKSIZE',
570 'RAID_TYPE',
571 'RANGE', // 5.1
572 'READ',
573 'READ_ONLY', // 5.1
574 'READ_WRITE', // 5.1
575 'REFERENCES',
576 'REGEXP',
577 'RELOAD',
578 'RENAME',
579 'REPAIR',
580 'REPEATABLE',
581 'REPLACE',
582 'REPLICATION',
583 'RESET',
584 'RESTORE',
585 'RESTRICT',
586 'RETURN',
587 'RETURNS',
588 'REVOKE',
589 'RIGHT',
590 'RLIKE',
591 'ROLLBACK',
592 'ROW',
593 'ROWS',
594 'ROW_FORMAT',
595 'SECOND',
596 'SECURITY',
597 'SELECT',
598 'SEPARATOR',
599 'SERIALIZABLE',
600 'SESSION',
601 'SHARE',
602 'SHOW',
603 'SHUTDOWN',
604 'SLAVE',
605 'SONAME',
606 'SOUNDS', // string-functions.html
607 'SQL',
608 'SQL_AUTO_IS_NULL',
609 'SQL_BIG_RESULT',
610 'SQL_BIG_SELECTS',
611 'SQL_BIG_TABLES',
612 'SQL_BUFFER_RESULT',
613 'SQL_CACHE',
614 'SQL_CALC_FOUND_ROWS',
615 'SQL_LOG_BIN',
616 'SQL_LOG_OFF',
617 'SQL_LOG_UPDATE',
618 'SQL_LOW_PRIORITY_UPDATES',
619 'SQL_MAX_JOIN_SIZE',
620 'SQL_NO_CACHE',
621 'SQL_QUOTE_SHOW_CREATE',
622 'SQL_SAFE_UPDATES',
623 'SQL_SELECT_LIMIT',
624 'SQL_SLAVE_SKIP_COUNTER',
625 'SQL_SMALL_RESULT',
626 'SQL_WARNINGS',
627 'START',
628 'STARTING',
629 'STATUS',
630 'STOP',
631 'STORAGE',
632 'STRAIGHT_JOIN',
633 'STRING',
634 'STRIPED',
635 'SUPER',
636 'TABLE',
637 'TABLES',
638 'TEMPORARY',
639 'TERMINATED',
640 'THEN',
641 'TO',
642 'TRAILING',
643 'TRANSACTIONAL', // 5.1 ?
644 'TRUE',
645 'TRUNCATE',
646 'TYPE',
647 'TYPES',
648 'UNCOMMITTED',
649 'UNION',
650 'UNIQUE',
651 'UNLOCK',
652 'UPDATE',
653 'USAGE',
654 'USE',
655 'USING',
656 'VALUES',
657 'VARIABLES',
658 'VIEW',
659 'WHEN',
660 'WHERE',
661 'WITH',
662 'WORK',
663 'WRITE',
664 'XOR',
665 'YEAR_MONTH'
669 * words forbidden to be used as column or table name wihtout quotes
670 * as seen in http://dev.mysql.com/doc/mysql/en/reserved-words.html
672 * @global array MySQL forbidden words
674 $PMA_SQPdata_forbidden_word = array (
675 'ACCESSIBLE', // 5.1
676 'ACTION',
677 'ADD',
678 'AFTER',
679 'AGAINST',
680 'AGGREGATE',
681 'ALGORITHM',
682 'ALL',
683 'ALTER',
684 'ANALYZE',
685 'AND',
686 'ANY',
687 'AS',
688 'ASC',
689 'ASCII',
690 'ASENSITIVE',
691 'AUTO_INCREMENT',
692 'AVG',
693 'AVG_ROW_LENGTH',
694 'BACKUP',
695 'BDB',
696 'BEFORE',
697 'BEGIN',
698 'BERKELEYDB',
699 'BETWEEN',
700 'BIGINT',
701 'BINARY',
702 'BINLOG',
703 'BIT',
704 'BLOB',
705 'BOOL',
706 'BOOLEAN',
707 'BOTH',
708 'BTREE',
709 'BY',
710 'BYTE',
711 'CACHE',
712 'CALL',
713 'CASCADE',
714 'CASCADED',
715 'CASE',
716 'CHAIN',
717 'CHANGE',
718 'CHANGED',
719 'CHAR',
720 'CHARACTER',
721 'CHARSET',
722 'CHECK',
723 'CHECKSUM',
724 'CIPHER',
725 'CLOSE',
726 'COLLATE',
727 'COLLATION',
728 'COLUMN',
729 'COLUMNS',
730 'COMMENT',
731 'COMMIT',
732 'COMMITTED',
733 'COMPACT',
734 'COMPRESSED',
735 'CONCURRENT',
736 'CONDITION',
737 'CONNECTION',
738 'CONSISTENT',
739 'CONSTRAINT',
740 'CONTAINS',
741 'CONTINUE',
742 'CONVERT',
743 'CREATE',
744 'CROSS',
745 'CUBE',
746 'CURRENT_DATE',
747 'CURRENT_TIME',
748 'CURRENT_TIMESTAMP',
749 'CURRENT_USER',
750 'CURSOR',
751 'DATA',
752 'DATABASE',
753 'DATABASES',
754 'DATE',
755 'DATETIME',
756 'DAY',
757 'DAY_HOUR',
758 'DAY_MICROSECOND',
759 'DAY_MINUTE',
760 'DAY_SECOND',
761 'DEALLOCATE',
762 'DEC',
763 'DECIMAL',
764 'DECLARE',
765 'DEFAULT',
766 'DEFINER',
767 'DELAYED',
768 'DELAY_KEY_WRITE',
769 'DELETE',
770 'DESC',
771 'DESCRIBE',
772 'DES_KEY_FILE',
773 'DETERMINISTIC',
774 'DIRECTORY',
775 'DISABLE',
776 'DISCARD',
777 'DISTINCT',
778 'DISTINCTROW',
779 'DIV',
780 'DO',
781 'DOUBLE',
782 'DROP',
783 'DUAL',
784 'DUMPFILE',
785 'DUPLICATE',
786 'DYNAMIC',
787 'EACH',
788 'ELSE',
789 'ELSEIF',
790 'ENABLE',
791 'ENCLOSED',
792 'END',
793 'ENGINE',
794 'ENGINES',
795 'ENUM',
796 'ERRORS',
797 'ESCAPE',
798 'ESCAPED',
799 'EVENTS',
800 'EXECUTE',
801 'EXISTS',
802 'EXIT',
803 'EXPANSION',
804 'EXPLAIN',
805 'EXTENDED',
806 'FALSE',
807 'FAST',
808 'FETCH',
809 'FIELDS',
810 'FILE',
811 'FIRST',
812 'FIXED',
813 'FLOAT',
814 'FLOAT4',
815 'FLOAT8',
816 'FLUSH',
817 'FOR',
818 'FORCE',
819 'FOREIGN',
820 'FOUND',
821 'FRAC_SECOND',
822 'FROM',
823 'FULL',
824 'FULLTEXT',
825 'FUNCTION',
826 'GEOMETRY',
827 'GEOMETRYCOLLECTION',
828 'GET_FORMAT',
829 'GLOBAL',
830 'GOTO',
831 'GRANT',
832 'GRANTS',
833 'GROUP',
834 'HANDLER',
835 'HASH',
836 'HAVING',
837 'HELP',
838 'HIGH_PRIORITY',
839 'HOSTS',
840 'HOUR',
841 'HOUR_MICROSECOND',
842 'HOUR_MINUTE',
843 'HOUR_SECOND',
844 'IDENTIFIED',
845 'IF',
846 'IGNORE',
847 'IMPORT',
848 'IN',
849 'INDEX',
850 'INDEXES',
851 'INFILE',
852 'INNER',
853 'INNOBASE',
854 'INNODB',
855 'INOUT',
856 'INSENSITIVE',
857 'INSERT',
858 'INSERT_METHOD',
859 'INT',
860 'INT1',
861 'INT2',
862 'INT3',
863 'INT4',
864 'INT8',
865 'INTEGER',
866 'INTERVAL',
867 'INTO',
868 'INVOKER',
869 'IO_THREAD',
870 'IS',
871 'ISOLATION',
872 'ISSUER',
873 'ITERATE',
874 'JOIN',
875 'KEY',
876 'KEYS',
877 'KILL',
878 'LABEL',
879 'LANGUAGE',
880 'LAST',
881 'LEADING',
882 'LEAVE',
883 'LEAVES',
884 'LEFT',
885 'LIKE',
886 'LIMIT',
887 'LINEAR', // 5.1
888 'LINES',
889 'LINESTRING',
890 'LOAD',
891 'LOCAL',
892 'LOCALTIME',
893 'LOCALTIMESTAMP',
894 'LOCK',
895 'LOCKS',
896 'LOGS',
897 'LONG',
898 'LONGBLOB',
899 'LONGTEXT',
900 'LOOP',
901 'LOW_PRIORITY',
902 'MASTER',
903 'MASTER_CONNECT_RETRY',
904 'MASTER_HOST',
905 'MASTER_LOG_FILE',
906 'MASTER_LOG_POS',
907 'MASTER_PASSWORD',
908 'MASTER_PORT',
909 'MASTER_SERVER_ID',
910 'MASTER_SSL',
911 'MASTER_SSL_CA',
912 'MASTER_SSL_CAPATH',
913 'MASTER_SSL_CERT',
914 'MASTER_SSL_CIPHER',
915 'MASTER_SSL_KEY',
916 'MASTER_USER',
917 'MATCH',
918 'MAX_CONNECTIONS_PER_HOUR',
919 'MAX_QUERIES_PER_HOUR',
920 'MAX_ROWS',
921 'MAX_UPDATES_PER_HOUR',
922 'MAX_USER_CONNECTIONS',
923 'MEDIUM',
924 'MEDIUMBLOB',
925 'MEDIUMINT',
926 'MEDIUMTEXT',
927 'MERGE',
928 'MICROSECOND',
929 'MIDDLEINT',
930 'MIGRATE',
931 'MINUTE',
932 'MINUTE_MICROSECOND',
933 'MINUTE_SECOND',
934 'MIN_ROWS',
935 'MOD',
936 'MODE',
937 'MODIFIES',
938 'MODIFY',
939 'MONTH',
940 'MULTILINESTRING',
941 'MULTIPOINT',
942 'MULTIPOLYGON',
943 'MUTEX',
944 'NAME',
945 'NAMES',
946 'NATIONAL',
947 'NATURAL',
948 'NCHAR',
949 'NDB',
950 'NDBCLUSTER',
951 'NEW',
952 'NEXT',
953 'NO',
954 'NONE',
955 'NOT',
956 'NO_WRITE_TO_BINLOG',
957 'NULL',
958 'NUMERIC',
959 'NVARCHAR',
960 'OFFSET',
961 'OLD_PASSWORD',
962 'ON',
963 'ONE',
964 'ONE_SHOT',
965 'OPEN',
966 'OPTIMIZE',
967 'OPTION',
968 'OPTIONALLY',
969 'OR',
970 'ORDER',
971 'OUT',
972 'OUTER',
973 'OUTFILE',
974 'PACK_KEYS',
975 'PARTIAL',
976 'PASSWORD',
977 'PHASE',
978 'POINT',
979 'POLYGON',
980 'PRECISION',
981 'PREPARE',
982 'PREV',
983 'PRIMARY',
984 'PRIVILEGES',
985 'PROCEDURE',
986 'PROCESSLIST',
987 'PURGE',
988 'QUARTER',
989 'QUERY',
990 'QUICK',
991 'RAID0',
992 'RAID_CHUNKS',
993 'RAID_CHUNKSIZE',
994 'RAID_TYPE',
995 'RANGE', // 5.1
996 'READ',
997 'READS',
998 'READ_ONLY', // 5.1
999 'READ_WRITE', // 5.1
1000 'REAL',
1001 'RECOVER',
1002 'REDUNDANT',
1003 'REFERENCES',
1004 'REGEXP',
1005 'RELAY_LOG_FILE',
1006 'RELAY_LOG_POS',
1007 'RELAY_THREAD',
1008 'RELEASE',
1009 'RELOAD',
1010 'RENAME',
1011 'REPAIR',
1012 'REPEAT',
1013 'REPEATABLE',
1014 'REPLACE',
1015 'REPLICATION',
1016 'REQUIRE',
1017 'RESET',
1018 'RESTORE',
1019 'RESTRICT',
1020 'RESUME',
1021 'RETURN',
1022 'RETURNS',
1023 'REVOKE',
1024 'RIGHT',
1025 'RLIKE',
1026 'ROLLBACK',
1027 'ROLLUP',
1028 'ROUTINE',
1029 'ROW',
1030 'ROWS',
1031 'ROW_FORMAT',
1032 'RTREE',
1033 'SAVEPOINT',
1034 'SCHEMA',
1035 'SCHEMAS',
1036 'SECOND',
1037 'SECOND_MICROSECOND',
1038 'SECURITY',
1039 'SELECT',
1040 'SENSITIVE',
1041 'SEPARATOR',
1042 'SERIAL',
1043 'SERIALIZABLE',
1044 'SESSION',
1045 'SET',
1046 'SHARE',
1047 'SHOW',
1048 'SHUTDOWN',
1049 'SIGNED',
1050 'SIMPLE',
1051 'SLAVE',
1052 'SMALLINT',
1053 'SNAPSHOT',
1054 'SOME',
1055 'SONAME',
1056 'SOUNDS',
1057 'SPATIAL',
1058 'SPECIFIC',
1059 'SQL',
1060 'SQLEXCEPTION',
1061 'SQLSTATE',
1062 'SQLWARNING',
1063 'SQL_BIG_RESULT',
1064 'SQL_BUFFER_RESULT',
1065 'SQL_CACHE',
1066 'SQL_CALC_FOUND_ROWS',
1067 'SQL_NO_CACHE',
1068 'SQL_SMALL_RESULT',
1069 'SQL_THREAD',
1070 'SQL_TSI_DAY',
1071 'SQL_TSI_FRAC_SECOND',
1072 'SQL_TSI_HOUR',
1073 'SQL_TSI_MINUTE',
1074 'SQL_TSI_MONTH',
1075 'SQL_TSI_QUARTER',
1076 'SQL_TSI_SECOND',
1077 'SQL_TSI_WEEK',
1078 'SQL_TSI_YEAR',
1079 'SSL',
1080 'START',
1081 'STARTING',
1082 'STATUS',
1083 'STOP',
1084 'STORAGE',
1085 'STRAIGHT_JOIN',
1086 'STRING',
1087 'STRIPED',
1088 'SUBJECT',
1089 'SUPER',
1090 'SUSPEND',
1091 'TABLE',
1092 'TABLES',
1093 'TABLESPACE',
1094 'TEMPORARY',
1095 'TEMPTABLE',
1096 'TERMINATED',
1097 'TEXT',
1098 'THEN',
1099 'TIME',
1100 'TIMESTAMP',
1101 'TIMESTAMPADD',
1102 'TIMESTAMPDIFF',
1103 'TINYBLOB',
1104 'TINYINT',
1105 'TINYTEXT',
1106 'TO',
1107 'TRAILING',
1108 'TRANSACTION',
1109 'TRIGGER',
1110 'TRIGGERS',
1111 'TRUE',
1112 'TRUNCATE',
1113 'TYPE',
1114 'TYPES',
1115 'UNCOMMITTED',
1116 'UNDEFINED',
1117 'UNDO',
1118 'UNICODE',
1119 'UNION',
1120 'UNIQUE',
1121 'UNKNOWN',
1122 'UNLOCK',
1123 'UNSIGNED',
1124 'UNTIL',
1125 'UPDATE',
1126 'USAGE',
1127 'USE',
1128 'USER',
1129 'USER_RESOURCES',
1130 'USE_FRM',
1131 'USING',
1132 'UTC_DATE',
1133 'UTC_TIME',
1134 'UTC_TIMESTAMP',
1135 'VALUE',
1136 'VALUES',
1137 'VARBINARY',
1138 'VARCHAR',
1139 'VARCHARACTER',
1140 'VARIABLES',
1141 'VARYING',
1142 'VIEW',
1143 'WARNINGS',
1144 'WEEK',
1145 'WHEN',
1146 'WHERE',
1147 'WHILE',
1148 'WITH',
1149 'WORK',
1150 'WRITE',
1151 'X509',
1152 'XA',
1153 'XOR',
1154 'YEAR',
1155 'YEAR_MONTH',
1156 'ZEROFILL'
1160 * the MySQL column/data types
1162 * @see http://dev.mysql.com/doc/refman/5.1/en/data-types.html
1163 * @see http://dev.mysql.com/doc/refman/5.1/en/mysql-spatial-datatypes.html
1165 * @global array MySQL column types
1167 $PMA_SQPdata_column_type = array (
1168 'BIGINT',
1169 'BINARY',
1170 'BIT',
1171 'BLOB',
1172 'BOOL',
1173 'BOOLEAN', // numeric-type-overview.html
1174 'CHAR',
1175 'CHARACTER',
1176 'DATE',
1177 'DATETIME',
1178 'DEC',
1179 'DECIMAL',
1180 'DOUBLE',
1181 'ENUM',
1182 'FLOAT',
1183 'FLOAT4',
1184 'FLOAT8',
1185 'GEOMETRY', // spatial
1186 'GEOMETRYCOLLECTION', // spatial
1187 'INT',
1188 'INT1',
1189 'INT2',
1190 'INT3',
1191 'INT4',
1192 'INT8',
1193 'INTEGER',
1194 'LINESTRING', // spatial
1195 'LONG',
1196 'LONGBLOB',
1197 'LONGTEXT',
1198 'MEDIUMBLOB',
1199 'MEDIUMINT',
1200 'MEDIUMTEXT',
1201 'MIDDLEINT',
1202 'MULTILINESTRING', // spatial
1203 'MULTIPOINT', // spatial
1204 'MULTIPOLYGON', // spatial
1205 'NCHAR',
1206 'NUMERIC',
1207 'POINT', // spatial
1208 'POLYGON', // spatial
1209 'REAL',
1210 'SERIAL', // alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
1211 'SET',
1212 'SMALLINT',
1213 'TEXT',
1214 'TIME',
1215 'TIMESTAMP',
1216 'TINYBLOB',
1217 'TINYINT',
1218 'TINYTEXT',
1219 'VARBINARY',
1220 'VARCHAR',
1221 'YEAR'
1225 * Documentation links for operators.
1227 $PMA_SQPdata_operators_docs = array(
1228 '!=' => array('link' => 'comparison-operators','anchor' => 'operator_not-equal'),
1229 '<>' => array('link' => 'comparison-operators','anchor' => 'operator_not-equal'),
1230 '!' => array('link' => 'logical-operators','anchor' => 'operator_not'),
1231 '||' => array('link' => 'logical-operators','anchor' => 'operator_or'),
1232 '+' => array('link' => 'arithmetic-functions','anchor' => 'operator_plus'),
1233 '>>' => array('link' => 'bit-functions','anchor' => 'operator_right-shift'),
1234 '-' => array('link' => 'arithmetic-functions','anchor' => 'operator_minus'),
1235 '*' => array('link' => 'arithmetic-functions','anchor' => 'operator_times'),
1236 '&&' => array('link' => 'logical-operators','anchor' => 'operator_and'),
1237 '&' => array('link' => 'bit-functions','anchor' => 'operator_bitwise-and'),
1238 '~' => array('link' => 'bit-functions','anchor' => 'operator_bitwise-invert'),
1239 '|' => array('link' => 'bit-functions','anchor' => 'operator_bitwise-or'),
1240 '^' => array('link' => 'bit-functions','anchor' => 'operator_bitwise-xor'),
1241 '=' => array('link' => 'assignment-operators','anchor' => 'operator_assign-equal'),
1242 ':=' => array('link' => 'assignment-operators','anchor' => 'operator_assign-value'),
1243 '/' => array('link' => 'arithmetic-functions','anchor' => 'operator_divide'),
1244 '<=>' => array('link' => 'comparison-operators','anchor' => 'operator_equal-to'),
1245 '=' => array('link' => 'comparison-operators','anchor' => 'operator_equal'),
1246 '>=' => array('link' => 'comparison-operators','anchor' => 'operator_greater-than-or-equal'),
1247 '>' => array('link' => 'comparison-operators','anchor' => 'operator_greater-than'),
1248 '<<' => array('link' => 'bit-functions','anchor' => 'operator_left-shift'),
1249 '<=' => array('link' => 'comparison-operators','anchor' => 'operator_less-than-or-equal'),
1250 '<' => array('link' => 'comparison-operators','anchor' => 'operator_less-than'),
1251 '%' => array('link' => 'arithmetic-functions','anchor' => 'operator_mod')
1255 * Documentation links for functions.
1257 $PMA_SQPdata_functions_docs = array(
1258 'ABS' => array('link' => 'mathematical-functions','anchor' => 'function_abs'),
1259 'ACOS' => array('link' => 'mathematical-functions','anchor' => 'function_acos'),
1260 'ADDDATE' => array('link' => 'date-and-time-functions','anchor' => 'function_adddate'),
1261 'ADDTIME' => array('link' => 'date-and-time-functions','anchor' => 'function_addtime'),
1262 'AES_DECRYPT' => array('link' => 'encryption-functions','anchor' => 'function_aes_decrypt'),
1263 'AES_ENCRYPT' => array('link' => 'encryption-functions','anchor' => 'function_aes_encrypt'),
1264 'AND' => array('link' => 'logical-operators','anchor' => 'operator_and'),
1265 'ASCII' => array('link' => 'string-functions','anchor' => 'function_ascii'),
1266 'ASIN' => array('link' => 'mathematical-functions','anchor' => 'function_asin'),
1267 'ATAN2' => array('link' => 'mathematical-functions','anchor' => 'function_atan2'),
1268 'ATAN' => array('link' => 'mathematical-functions','anchor' => 'function_atan2'),
1269 'ATAN' => array('link' => 'mathematical-functions','anchor' => 'function_atan'),
1270 'AVG' => array('link' => 'group-by-functions','anchor' => 'function_avg'),
1271 'BENCHMARK' => array('link' => 'information-functions','anchor' => 'function_benchmark'),
1272 'BIN' => array('link' => 'string-functions','anchor' => 'function_bin'),
1273 'BINARY' => array('link' => 'cast-functions','anchor' => 'operator_binary'),
1274 'BIT_AND' => array('link' => 'group-by-functions','anchor' => 'function_bit_and'),
1275 'BIT_COUNT' => array('link' => 'bit-functions','anchor' => 'function_bit_count'),
1276 'BIT_LENGTH' => array('link' => 'string-functions','anchor' => 'function_bit_length'),
1277 'BIT_OR' => array('link' => 'group-by-functions','anchor' => 'function_bit_or'),
1278 'BIT_XOR' => array('link' => 'group-by-functions','anchor' => 'function_bit_xor'),
1279 'CASE' => array('link' => 'control-flow-functions','anchor' => 'operator_case'),
1280 'CAST' => array('link' => 'cast-functions','anchor' => 'function_cast'),
1281 'CEIL' => array('link' => 'mathematical-functions','anchor' => 'function_ceil'),
1282 'CEILING' => array('link' => 'mathematical-functions','anchor' => 'function_ceiling'),
1283 'CHAR_LENGTH' => array('link' => 'string-functions','anchor' => 'function_char_length'),
1284 'CHAR' => array('link' => 'string-functions','anchor' => 'function_char'),
1285 'CHARACTER_LENGTH' => array('link' => 'string-functions','anchor' => 'function_character_length'),
1286 'CHARSET' => array('link' => 'information-functions','anchor' => 'function_charset'),
1287 'COALESCE' => array('link' => 'comparison-operators','anchor' => 'function_coalesce'),
1288 'COERCIBILITY' => array('link' => 'information-functions','anchor' => 'function_coercibility'),
1289 'COLLATION' => array('link' => 'information-functions','anchor' => 'function_collation'),
1290 'COMPRESS' => array('link' => 'encryption-functions','anchor' => 'function_compress'),
1291 'CONCAT_WS' => array('link' => 'string-functions','anchor' => 'function_concat_ws'),
1292 'CONCAT' => array('link' => 'string-functions','anchor' => 'function_concat'),
1293 'CONNECTION_ID' => array('link' => 'information-functions','anchor' => 'function_connection_id'),
1294 'CONV' => array('link' => 'mathematical-functions','anchor' => 'function_conv'),
1295 'CONVERT_TZ' => array('link' => 'date-and-time-functions','anchor' => 'function_convert_tz'),
1296 'Convert' => array('link' => 'cast-functions','anchor' => 'function_convert'),
1297 'COS' => array('link' => 'mathematical-functions','anchor' => 'function_cos'),
1298 'COT' => array('link' => 'mathematical-functions','anchor' => 'function_cot'),
1299 'COUNT' => array('link' => 'group-by-functions','anchor' => 'function_count'),
1300 'CRC32' => array('link' => 'mathematical-functions','anchor' => 'function_crc32'),
1301 'CURDATE' => array('link' => 'date-and-time-functions','anchor' => 'function_curdate'),
1302 'CURRENT_DATE' => array('link' => 'date-and-time-functions','anchor' => 'function_current_date'),
1303 'CURRENT_TIME' => array('link' => 'date-and-time-functions','anchor' => 'function_current_time'),
1304 'CURRENT_TIMESTAMP' => array('link' => 'date-and-time-functions','anchor' => 'function_current_timestamp'),
1305 'CURRENT_USER' => array('link' => 'information-functions','anchor' => 'function_current_user'),
1306 'CURTIME' => array('link' => 'date-and-time-functions','anchor' => 'function_curtime'),
1307 'DATABASE' => array('link' => 'information-functions','anchor' => 'function_database'),
1308 'DATE_ADD' => array('link' => 'date-and-time-functions','anchor' => 'function_date_add'),
1309 'DATE_FORMAT' => array('link' => 'date-and-time-functions','anchor' => 'function_date_format'),
1310 'DATE_SUB' => array('link' => 'date-and-time-functions','anchor' => 'function_date_sub'),
1311 'DATE' => array('link' => 'date-and-time-functions','anchor' => 'function_date'),
1312 'DATEDIFF' => array('link' => 'date-and-time-functions','anchor' => 'function_datediff'),
1313 'DAY' => array('link' => 'date-and-time-functions','anchor' => 'function_day'),
1314 'DAYNAME' => array('link' => 'date-and-time-functions','anchor' => 'function_dayname'),
1315 'DAYOFMONTH' => array('link' => 'date-and-time-functions','anchor' => 'function_dayofmonth'),
1316 'DAYOFWEEK' => array('link' => 'date-and-time-functions','anchor' => 'function_dayofweek'),
1317 'DAYOFYEAR' => array('link' => 'date-and-time-functions','anchor' => 'function_dayofyear'),
1318 'DECLARE' => array('link' => 'declare', 'anchor' => 'declare'),
1319 'DECODE' => array('link' => 'encryption-functions','anchor' => 'function_decode'),
1320 'DEFAULT' => array('link' => 'miscellaneous-functions','anchor' => 'function_default'),
1321 'DEGREES' => array('link' => 'mathematical-functions','anchor' => 'function_degrees'),
1322 'DES_DECRYPT' => array('link' => 'encryption-functions','anchor' => 'function_des_decrypt'),
1323 'DES_ENCRYPT' => array('link' => 'encryption-functions','anchor' => 'function_des_encrypt'),
1324 'DIV' => array('link' => 'arithmetic-functions','anchor' => 'operator_div'),
1325 'ELT' => array('link' => 'string-functions','anchor' => 'function_elt'),
1326 'ENCODE' => array('link' => 'encryption-functions','anchor' => 'function_encode'),
1327 'ENCRYPT' => array('link' => 'encryption-functions','anchor' => 'function_encrypt'),
1328 'EXP' => array('link' => 'mathematical-functions','anchor' => 'function_exp'),
1329 'EXPORT_SET' => array('link' => 'string-functions','anchor' => 'function_export_set'),
1330 'EXTRACT' => array('link' => 'date-and-time-functions','anchor' => 'function_extract'),
1331 'ExtractValue' => array('link' => 'xml-functions','anchor' => 'function_extractvalue'),
1332 'FIELD' => array('link' => 'string-functions','anchor' => 'function_field'),
1333 'FIND_IN_SET' => array('link' => 'string-functions','anchor' => 'function_find_in_set'),
1334 'FLOOR' => array('link' => 'mathematical-functions','anchor' => 'function_floor'),
1335 'FORMAT' => array('link' => 'string-functions','anchor' => 'function_format'),
1336 'FOUND_ROWS' => array('link' => 'information-functions','anchor' => 'function_found_rows'),
1337 'FROM_DAYS' => array('link' => 'date-and-time-functions','anchor' => 'function_from_days'),
1338 'FROM_UNIXTIME' => array('link' => 'date-and-time-functions','anchor' => 'function_from_unixtime'),
1339 'GET_FORMAT' => array('link' => 'date-and-time-functions','anchor' => 'function_get_format'),
1340 'GET_LOCK' => array('link' => 'miscellaneous-functions','anchor' => 'function_get_lock'),
1341 'GREATEST' => array('link' => 'comparison-operators','anchor' => 'function_greatest'),
1342 'GROUP_CONCAT' => array('link' => 'group-by-functions','anchor' => 'function_group_concat'),
1343 'HEX' => array('link' => 'string-functions','anchor' => 'function_hex'),
1344 'HOUR' => array('link' => 'date-and-time-functions','anchor' => 'function_hour'),
1345 'IF' => array('link' => 'control-flow-functions','anchor' => 'function_if'),
1346 'IFNULL' => array('link' => 'control-flow-functions','anchor' => 'function_ifnull'),
1347 'IN' => array('link' => 'comparison-operators','anchor' => 'function_in'),
1348 'INET_ATON' => array('link' => 'miscellaneous-functions','anchor' => 'function_inet_aton'),
1349 'INET_NTOA' => array('link' => 'miscellaneous-functions','anchor' => 'function_inet_ntoa'),
1350 'INSERT' => array('link' => 'string-functions','anchor' => 'function_insert'),
1351 'INSTR' => array('link' => 'string-functions','anchor' => 'function_instr'),
1352 'INTERVAL' => array('link' => 'comparison-operators','anchor' => 'function_interval'),
1353 'IS_FREE_LOCK' => array('link' => 'miscellaneous-functions','anchor' => 'function_is_free_lock'),
1354 'IS_USED_LOCK' => array('link' => 'miscellaneous-functions','anchor' => 'function_is_used_lock'),
1355 'IS' => array('link' => 'comparison-operators','anchor' => 'operator_is'),
1356 'ISNULL' => array('link' => 'comparison-operators','anchor' => 'function_isnull'),
1357 'LAST_DAY' => array('link' => 'date-and-time-functions','anchor' => 'function_last_day'),
1358 'LAST_INSERT_ID' => array('link' => 'information-functions','anchor' => 'function_last_insert_id'),
1359 'LCASE' => array('link' => 'string-functions','anchor' => 'function_lcase'),
1360 'LEAST' => array('link' => 'comparison-operators','anchor' => 'function_least'),
1361 'LEFT' => array('link' => 'string-functions','anchor' => 'function_left'),
1362 'LENGTH' => array('link' => 'string-functions','anchor' => 'function_length'),
1363 'LIKE' => array('link' => 'string-comparison-functions','anchor' => 'operator_like'),
1364 'LN' => array('link' => 'mathematical-functions','anchor' => 'function_ln'),
1365 'LOAD_FILE' => array('link' => 'string-functions','anchor' => 'function_load_file'),
1366 'LOCALTIME' => array('link' => 'date-and-time-functions','anchor' => 'function_localtime'),
1367 'LOCALTIMESTAMP' => array('link' => 'date-and-time-functions','anchor' => 'function_localtimestamp'),
1368 'LOCATE' => array('link' => 'string-functions','anchor' => 'function_locate'),
1369 'LOG10' => array('link' => 'mathematical-functions','anchor' => 'function_log10'),
1370 'LOG2' => array('link' => 'mathematical-functions','anchor' => 'function_log2'),
1371 'LOG' => array('link' => 'mathematical-functions','anchor' => 'function_log'),
1372 'LOWER' => array('link' => 'string-functions','anchor' => 'function_lower'),
1373 'LPAD' => array('link' => 'string-functions','anchor' => 'function_lpad'),
1374 'LTRIM' => array('link' => 'string-functions','anchor' => 'function_ltrim'),
1375 'MAKE_SET' => array('link' => 'string-functions','anchor' => 'function_make_set'),
1376 'MAKEDATE' => array('link' => 'date-and-time-functions','anchor' => 'function_makedate'),
1377 'MAKETIME' => array('link' => 'date-and-time-functions','anchor' => 'function_maketime'),
1378 'MASTER_POS_WAIT' => array('link' => 'miscellaneous-functions','anchor' => 'function_master_pos_wait'),
1379 'MATCH' => array('link' => 'fulltext-search','anchor' => 'function_match'),
1380 'MAX' => array('link' => 'group-by-functions','anchor' => 'function_max'),
1381 'MD5' => array('link' => 'encryption-functions','anchor' => 'function_md5'),
1382 'MICROSECOND' => array('link' => 'date-and-time-functions','anchor' => 'function_microsecond'),
1383 'MID' => array('link' => 'string-functions','anchor' => 'function_mid'),
1384 'MIN' => array('link' => 'group-by-functions','anchor' => 'function_min'),
1385 'MINUTE' => array('link' => 'date-and-time-functions','anchor' => 'function_minute'),
1386 'MOD' => array('link' => 'mathematical-functions','anchor' => 'function_mod'),
1387 'MONTH' => array('link' => 'date-and-time-functions','anchor' => 'function_month'),
1388 'MONTHNAME' => array('link' => 'date-and-time-functions','anchor' => 'function_monthname'),
1389 'NAME_CONST' => array('link' => 'miscellaneous-functions','anchor' => 'function_name_const'),
1390 'NOT' => array('link' => 'logical-operators','anchor' => 'operator_not'),
1391 'NOW' => array('link' => 'date-and-time-functions','anchor' => 'function_now'),
1392 'NULLIF' => array('link' => 'control-flow-functions','anchor' => 'function_nullif'),
1393 'OCT' => array('link' => 'mathematical-functions','anchor' => 'function_oct'),
1394 'OCTET_LENGTH' => array('link' => 'string-functions','anchor' => 'function_octet_length'),
1395 'OLD_PASSWORD' => array('link' => 'encryption-functions','anchor' => 'function_old_password'),
1396 'OR' => array('link' => 'logical-operators','anchor' => 'operator_or'),
1397 'ORD' => array('link' => 'string-functions','anchor' => 'function_ord'),
1398 'PASSWORD' => array('link' => 'encryption-functions','anchor' => 'function_password'),
1399 'PERIOD_ADD' => array('link' => 'date-and-time-functions','anchor' => 'function_period_add'),
1400 'PERIOD_DIFF' => array('link' => 'date-and-time-functions','anchor' => 'function_period_diff'),
1401 'PI' => array('link' => 'mathematical-functions','anchor' => 'function_pi'),
1402 'POSITION' => array('link' => 'string-functions','anchor' => 'function_position'),
1403 'POW' => array('link' => 'mathematical-functions','anchor' => 'function_pow'),
1404 'POWER' => array('link' => 'mathematical-functions','anchor' => 'function_power'),
1405 'QUARTER' => array('link' => 'date-and-time-functions','anchor' => 'function_quarter'),
1406 'QUOTE' => array('link' => 'string-functions','anchor' => 'function_quote'),
1407 'RADIANS' => array('link' => 'mathematical-functions','anchor' => 'function_radians'),
1408 'RAND' => array('link' => 'mathematical-functions','anchor' => 'function_rand'),
1409 'REGEXP' => array('link' => 'regexp','anchor' => 'operator_regexp'),
1410 'RELEASE_LOCK' => array('link' => 'miscellaneous-functions','anchor' => 'function_release_lock'),
1411 'REPEAT' => array('link' => 'string-functions','anchor' => 'function_repeat'),
1412 'REPLACE' => array('link' => 'string-functions','anchor' => 'function_replace'),
1413 'REVERSE' => array('link' => 'string-functions','anchor' => 'function_reverse'),
1414 'RIGHT' => array('link' => 'string-functions','anchor' => 'function_right'),
1415 'RLIKE' => array('link' => 'regexp','anchor' => 'operator_rlike'),
1416 'ROUND' => array('link' => 'mathematical-functions','anchor' => 'function_round'),
1417 'ROW_COUNT' => array('link' => 'information-functions','anchor' => 'function_row_count'),
1418 'RPAD' => array('link' => 'string-functions','anchor' => 'function_rpad'),
1419 'RTRIM' => array('link' => 'string-functions','anchor' => 'function_rtrim'),
1420 'SCHEMA' => array('link' => 'information-functions','anchor' => 'function_schema'),
1421 'SEC_TO_TIME' => array('link' => 'date-and-time-functions','anchor' => 'function_sec_to_time'),
1422 'SECOND' => array('link' => 'date-and-time-functions','anchor' => 'function_second'),
1423 'SESSION_USER' => array('link' => 'information-functions','anchor' => 'function_session_user'),
1424 'SHA' => array('link' => 'encryption-functions','anchor' => 'function_sha1'),
1425 'SHA1' => array('link' => 'encryption-functions','anchor' => 'function_sha1'),
1426 'SIGN' => array('link' => 'mathematical-functions','anchor' => 'function_sign'),
1427 'SIN' => array('link' => 'mathematical-functions','anchor' => 'function_sin'),
1428 'SLEEP' => array('link' => 'miscellaneous-functions','anchor' => 'function_sleep'),
1429 'SOUNDEX' => array('link' => 'string-functions','anchor' => 'function_soundex'),
1430 'SPACE' => array('link' => 'string-functions','anchor' => 'function_space'),
1431 'SQRT' => array('link' => 'mathematical-functions','anchor' => 'function_sqrt'),
1432 'STD' => array('link' => 'group-by-functions','anchor' => 'function_std'),
1433 'STDDEV_POP' => array('link' => 'group-by-functions','anchor' => 'function_stddev_pop'),
1434 'STDDEV_SAMP' => array('link' => 'group-by-functions','anchor' => 'function_stddev_samp'),
1435 'STDDEV' => array('link' => 'group-by-functions','anchor' => 'function_stddev'),
1436 'STR_TO_DATE' => array('link' => 'date-and-time-functions','anchor' => 'function_str_to_date'),
1437 'STRCMP' => array('link' => 'string-comparison-functions','anchor' => 'function_strcmp'),
1438 'SUBDATE' => array('link' => 'date-and-time-functions','anchor' => 'function_subdate'),
1439 'SUBSTR' => array('link' => 'string-functions','anchor' => 'function_substr'),
1440 'SUBSTRING_INDEX' => array('link' => 'string-functions','anchor' => 'function_substring_index'),
1441 'SUBSTRING' => array('link' => 'string-functions','anchor' => 'function_substring'),
1442 'SUBTIME' => array('link' => 'date-and-time-functions','anchor' => 'function_subtime'),
1443 'SUM' => array('link' => 'group-by-functions','anchor' => 'function_sum'),
1444 'SYSDATE' => array('link' => 'date-and-time-functions','anchor' => 'function_sysdate'),
1445 'SYSTEM_USER' => array('link' => 'information-functions','anchor' => 'function_system_user'),
1446 'TAN' => array('link' => 'mathematical-functions','anchor' => 'function_tan'),
1447 'TIME_FORMAT' => array('link' => 'date-and-time-functions','anchor' => 'function_time_format'),
1448 'TIME_TO_SEC' => array('link' => 'date-and-time-functions','anchor' => 'function_time_to_sec'),
1449 'TIME' => array('link' => 'date-and-time-functions','anchor' => 'function_time'),
1450 'TIMEDIFF' => array('link' => 'date-and-time-functions','anchor' => 'function_timediff'),
1451 'TIMESTAMP' => array('link' => 'date-and-time-functions','anchor' => 'function_timestamp'),
1452 'TIMESTAMPADD' => array('link' => 'date-and-time-functions','anchor' => 'function_timestampadd'),
1453 'TIMESTAMPDIFF' => array('link' => 'date-and-time-functions','anchor' => 'function_timestampdiff'),
1454 'TO_DAYS' => array('link' => 'date-and-time-functions','anchor' => 'function_to_days'),
1455 'TRIM' => array('link' => 'string-functions','anchor' => 'function_trim'),
1456 'TRUNCATE' => array('link' => 'mathematical-functions','anchor' => 'function_truncate'),
1457 'UCASE' => array('link' => 'string-functions','anchor' => 'function_ucase'),
1458 'UNCOMPRESS' => array('link' => 'encryption-functions','anchor' => 'function_uncompress'),
1459 'UNCOMPRESSED_LENGTH' => array('link' => 'encryption-functions','anchor' => 'function_uncompressed_length'),
1460 'UNHEX' => array('link' => 'string-functions','anchor' => 'function_unhex'),
1461 'UNIX_TIMESTAMP' => array('link' => 'date-and-time-functions','anchor' => 'function_unix_timestamp'),
1462 'UpdateXML' => array('link' => 'xml-functions','anchor' => 'function_updatexml'),
1463 'UPPER' => array('link' => 'string-functions','anchor' => 'function_upper'),
1464 'USER' => array('link' => 'information-functions','anchor' => 'function_user'),
1465 'UTC_DATE' => array('link' => 'date-and-time-functions','anchor' => 'function_utc_date'),
1466 'UTC_TIME' => array('link' => 'date-and-time-functions','anchor' => 'function_utc_time'),
1467 'UTC_TIMESTAMP' => array('link' => 'date-and-time-functions','anchor' => 'function_utc_timestamp'),
1468 'UUID_SHORT' => array('link' => 'miscellaneous-functions','anchor' => 'function_uuid_short'),
1469 'UUID' => array('link' => 'miscellaneous-functions','anchor' => 'function_uuid'),
1470 'VALUES' => array('link' => 'miscellaneous-functions','anchor' => 'function_values'),
1471 'VAR_POP' => array('link' => 'group-by-functions','anchor' => 'function_var_pop'),
1472 'VAR_SAMP' => array('link' => 'group-by-functions','anchor' => 'function_var_samp'),
1473 'VARIANCE' => array('link' => 'group-by-functions','anchor' => 'function_variance'),
1474 'VERSION' => array('link' => 'information-functions','anchor' => 'function_version'),
1475 'WEEK' => array('link' => 'date-and-time-functions','anchor' => 'function_week'),
1476 'WEEKDAY' => array('link' => 'date-and-time-functions','anchor' => 'function_weekday'),
1477 'WEEKOFYEAR' => array('link' => 'date-and-time-functions','anchor' => 'function_weekofyear'),
1478 'XOR' => array('link' => 'logical-operators','anchor' => 'operator_xor'),
1479 'YEAR' => array('link' => 'date-and-time-functions','anchor' => 'function_year'),
1480 'YEARWEEK' => array('link' => 'date-and-time-functions','anchor' => 'function_yearweek'),
1481 'SOUNDS_LIKE' => array('link' => 'string-functions','anchor' => 'operator_sounds-like'),
1482 'IS_NOT_NULL' => array('link' => 'comparison-operators','anchor' => 'operator_is-not-null'),
1483 'IS_NOT' => array('link' => 'comparison-operators','anchor' => 'operator_is-not'),
1484 'IS_NULL' => array('link' => 'comparison-operators','anchor' => 'operator_is-null'),
1485 'NOT_LIKE' => array('link' => 'string-comparison-functions','anchor' => 'operator_not-like'),
1486 'NOT_REGEXP' => array('link' => 'regexp','anchor' => 'operator_not-regexp'),
1487 'COUNT_DISTINCT' => array('link' => 'group-by-functions','anchor' => 'function_count-distinct'),
1488 'NOT_IN' => array('link' => 'comparison-operators','anchor' => 'function_not-in')