Upgraded phpmyadmin to 4.0.4 (All Languages) - No modifications yet
[openemr.git] / phpmyadmin / libraries / sqlparser.data.php
blobfab1177d88e8fe736b1fa051fa2d6feba18108bf
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', // polygon-property-functions.html
38 'ASBINARY',
39 'ASCII',
40 'ASIN',
41 'ASTEXT',
42 'ATAN',
43 'ATAN2',
44 'AVG',
45 'BDMPOLYFROMTEXT',
46 'BDMPOLYFROMWKB',
47 'BDPOLYFROMTEXT',
48 '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', // general-geometry-property-functions.html
57 'BUFFER',
58 'CAST',
59 'CEIL',
60 'CEILING',
61 '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',
74 'CONV',
75 'CONVERT',
76 'CONVERT_TZ',
77 'CONVEXHULL',
78 'COS',
79 'COT',
80 'COUNT',
81 'CRC32', // mathematical-functions.html
82 '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',
107 'DIMENSION', // general-geometry-property-functions.html
108 'DISJOINT',
109 'DISTANCE',
110 'ELT',
111 'ENCODE',
112 'ENCRYPT',
113 'ENDPOINT', // linestring-property-functions.html
114 'ENVELOPE', // general-geometry-property-functions.html
115 'EQUALS',
116 'EXP',
117 'EXPORT_SET',
118 'EXTERIORRING', // polygon-property-functions.html
119 'EXTRACT',
120 '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',
129 'GEOMCOLLFROMWKB',
130 'GEOMETRYCOLLECTION',
131 'GEOMETRYCOLLECTIONFROMTEXT',
132 'GEOMETRYCOLLECTIONFROMWKB',
133 'GEOMETRYFROMTEXT',
134 'GEOMETRYFROMWKB',
135 'GEOMETRYN', // geometrycollection-property-functions.html
136 'GEOMETRYTYPE', // general-geometry-property-functions.html
137 'GEOMFROMTEXT',
138 'GEOMFROMWKB',
139 'GET_FORMAT',
140 'GET_LOCK',
141 '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', // polygon-property-functions.html
154 'INTERSECTION',
155 'INTERSECTS',
156 'INTERVAL',
157 'ISCLOSED', // multilinestring-property-functions.html
158 'ISEMPTY', // general-geometry-property-functions.html
159 'ISNULL',
160 'ISRING', // linestring-property-functions.html
161 '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',
171 'LINEFROMWKB',
172 'LINESTRING',
173 'LINESTRINGFROMTEXT',
174 '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',
192 'MBRDISJOINT',
193 'MBREQUAL',
194 'MBRINTERSECTS',
195 'MBROVERLAPS',
196 'MBRTOUCHES',
197 'MBRWITHIN',
198 'MD5',
199 'MICROSECOND',
200 'MID',
201 'MIN',
202 'MINUTE',
203 'MLINEFROMTEXT',
204 'MLINEFROMWKB',
205 'MOD',
206 'MONTH',
207 'MONTHNAME',
208 'MPOINTFROMTEXT',
209 'MPOINTFROMWKB',
210 'MPOLYFROMTEXT',
211 'MPOLYFROMWKB',
212 'MULTILINESTRING',
213 'MULTILINESTRINGFROMTEXT',
214 'MULTILINESTRINGFROMWKB',
215 'MULTIPOINT',
216 'MULTIPOINTFROMTEXT',
217 'MULTIPOINTFROMWKB',
218 'MULTIPOLYGON',
219 'MULTIPOLYGONFROMTEXT',
220 'MULTIPOLYGONFROMWKB',
221 'NAME_CONST', // NAME_CONST()
222 'NOW',
223 'NULLIF',
224 'NUMGEOMETRIES', // geometrycollection-property-functions.html
225 'NUMINTERIORRINGS', // polygon-property-functions.html
226 'NUMPOINTS', // linestring-property-functions.html
227 'OCT',
228 'OCTET_LENGTH',
229 'OLD_PASSWORD',
230 'ORD',
231 'OVERLAPS',
232 'PASSWORD',
233 'PERIOD_ADD',
234 'PERIOD_DIFF',
235 'PI',
236 'POINT',
237 'POINTFROMTEXT',
238 'POINTFROMWKB',
239 'POINTN', // inestring-property-functions.html
240 'POINTONSURFACE', // multipolygon-property-functions.html
241 'POLYFROMTEXT',
242 'POLYFROMWKB',
243 'POLYGON',
244 'POLYGONFROMTEXT',
245 'POLYGONFROMWKB',
246 'POSITION',
247 'POW',
248 'POWER',
249 'QUARTER',
250 'QUOTE',
251 'RADIANS',
252 'RAND',
253 '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', // 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',
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',
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', // 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',
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
369 * quotes
371 * @see http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html
373 * @global array MySQL reserved words
375 $PMA_SQPdata_reserved_word = array (
376 'ACCESSIBLE', // 5.1
377 'ACTION',
378 'ADD',
379 'AFTER',
380 'AGAINST',
381 'AGGREGATE',
382 'ALGORITHM',
383 'ALL',
384 'ALTER',
385 'ANALYSE',
386 'ANALYZE',
387 'AND',
388 'AS',
389 'ASC',
390 'AUTOCOMMIT',
391 'AUTO_INCREMENT',
392 'AVG_ROW_LENGTH',
393 'BACKUP',
394 'BEGIN',
395 'BETWEEN',
396 'BINLOG',
397 'BOTH',
398 'BY',
399 'CASCADE',
400 'CASE',
401 'CHANGE',
402 'CHANGED',
403 'CHARSET',
404 'CHECK',
405 'CHECKSUM',
406 'COLLATE',
407 'COLLATION',
408 'COLUMN',
409 'COLUMNS',
410 'COMMENT',
411 'COMMIT',
412 'COMMITTED',
413 'COMPRESSED',
414 'CONCURRENT',
415 'CONSTRAINT',
416 'CONTAINS',
417 'CONVERT',
418 'CREATE',
419 'CROSS',
420 'CURRENT_TIMESTAMP',
421 'DATABASE',
422 'DATABASES',
423 'DAY',
424 'DAY_HOUR',
425 'DAY_MINUTE',
426 'DAY_SECOND',
427 'DECLARE',
428 'DEFINER',
429 'DELAYED',
430 'DELAY_KEY_WRITE',
431 'DELETE',
432 'DESC',
433 'DESCRIBE',
434 'DETERMINISTIC',
435 'DISTINCT',
436 'DISTINCTROW',
437 'DIV',
438 'DO',
439 'DROP',
440 'DUMPFILE',
441 'DUPLICATE',
442 'DYNAMIC',
443 'ELSE',
444 'ENCLOSED',
445 'END',
446 'ENGINE',
447 'ENGINES',
448 'ESCAPE',
449 'ESCAPED',
450 'EVENTS',
451 'EXECUTE',
452 'EXISTS',
453 'EXPLAIN',
454 'EXTENDED',
455 'FALSE',
456 'FAST',
457 'FIELDS',
458 'FILE',
459 'FIRST',
460 'FIXED',
461 'FLUSH',
462 'FOR',
463 'FORCE',
464 'FOREIGN',
465 'FROM',
466 'FULL',
467 'FULLTEXT',
468 'FUNCTION',
469 'GEMINI',
470 'GEMINI_SPIN_RETRIES',
471 'GENERAL',
472 'GLOBAL',
473 'GRANT',
474 'GRANTS',
475 'GROUP',
476 'HAVING',
477 'HEAP',
478 'HIGH_PRIORITY',
479 'HOSTS',
480 'HOUR',
481 'HOUR_MINUTE',
482 'HOUR_SECOND',
483 'IDENTIFIED',
484 'IF',
485 'IGNORE',
486 'IGNORE_SERVER_IDS',
487 'IN',
488 'INDEX',
489 'INDEXES',
490 'INFILE',
491 'INNER',
492 'INSERT',
493 'INSERT_ID',
494 'INSERT_METHOD',
495 'INTERVAL',
496 'INTO',
497 'INVOKER',
498 'IS',
499 'ISOLATION',
500 'JOIN',
501 'KEY',
502 'KEYS',
503 'KILL',
504 'LAST_INSERT_ID',
505 'LEADING',
506 'LEFT',
507 'LIKE',
508 'LIMIT',
509 'LINEAR', // 5.1
510 'LINES',
511 'LOAD',
512 'LOCAL',
513 'LOCK',
514 'LOCKS',
515 'LOGS',
516 'LOW_PRIORITY',
517 'MARIA', // 5.1 ?
518 'MASTER_CONNECT_RETRY',
519 'MASTER_HEARTBEAT_PERIOD',
520 'MASTER_HOST',
521 'MASTER_LOG_FILE',
522 'MASTER_LOG_POS',
523 'MASTER_PASSWORD',
524 'MASTER_PORT',
525 'MASTER_USER',
526 'MATCH',
527 'MAXVALUE',
528 'MAX_CONNECTIONS_PER_HOUR',
529 'MAX_QUERIES_PER_HOUR',
530 'MAX_ROWS',
531 'MAX_UPDATES_PER_HOUR',
532 'MAX_USER_CONNECTIONS',
533 'MEDIUM',
534 'MERGE',
535 'MINUTE',
536 'MINUTE_SECOND',
537 'MIN_ROWS',
538 'MODE',
539 'MODIFY',
540 'MONTH',
541 'MRG_MYISAM',
542 'MYISAM',
543 'NAMES',
544 'NATURAL',
545 // 'NO' is not allowed in SQL-99 but is allowed in MySQL
546 //'NO',
547 'NOT',
548 'NULL',
549 'OFFSET',
550 'ON',
551 'OPEN',
552 'OPTIMIZE',
553 'OPTION',
554 'OPTIONALLY',
555 'OR',
556 'ORDER',
557 'OUTER',
558 'OUTFILE',
559 'PACK_KEYS',
560 'PAGE', // 5.1-maria ?
561 'PAGE_CHECKSUM', // 5.1
562 'PARTIAL',
563 'PARTITION', // 5.1
564 'PARTITIONS', // 5.1
565 'PASSWORD',
566 'PRIMARY',
567 'PRIVILEGES',
568 'PROCEDURE',
569 'PROCESS',
570 'PROCESSLIST',
571 'PURGE',
572 'QUICK',
573 'RAID0',
574 'RAID_CHUNKS',
575 'RAID_CHUNKSIZE',
576 'RAID_TYPE',
577 'RANGE', // 5.1
578 'READ',
579 'READ_ONLY', // 5.1
580 'READ_WRITE', // 5.1
581 'REFERENCES',
582 'REGEXP',
583 'RELOAD',
584 'RENAME',
585 'REPAIR',
586 'REPEATABLE',
587 'REPLACE',
588 'REPLICATION',
589 'RESET',
590 'RESIGNAL',
591 'RESTORE',
592 'RESTRICT',
593 'RETURN',
594 'RETURNS',
595 'REVOKE',
596 'RIGHT',
597 'RLIKE',
598 'ROLLBACK',
599 'ROW',
600 'ROWS',
601 'ROW_FORMAT',
602 'SECOND',
603 'SECURITY',
604 'SELECT',
605 'SEPARATOR',
606 'SERIALIZABLE',
607 'SESSION',
608 'SHARE',
609 'SHOW',
610 'SHUTDOWN',
611 'SIGNAL',
612 'SLAVE',
613 'SLOW',
614 'SONAME',
615 'SOUNDS', // string-functions.html
616 'SQL',
617 'SQL_AUTO_IS_NULL',
618 'SQL_BIG_RESULT',
619 'SQL_BIG_SELECTS',
620 'SQL_BIG_TABLES',
621 'SQL_BUFFER_RESULT',
622 'SQL_CACHE',
623 'SQL_CALC_FOUND_ROWS',
624 'SQL_LOG_BIN',
625 'SQL_LOG_OFF',
626 'SQL_LOG_UPDATE',
627 'SQL_LOW_PRIORITY_UPDATES',
628 'SQL_MAX_JOIN_SIZE',
629 'SQL_NO_CACHE',
630 'SQL_QUOTE_SHOW_CREATE',
631 'SQL_SAFE_UPDATES',
632 'SQL_SELECT_LIMIT',
633 'SQL_SLAVE_SKIP_COUNTER',
634 'SQL_SMALL_RESULT',
635 'SQL_WARNINGS',
636 'START',
637 'STARTING',
638 'STATUS',
639 'STOP',
640 'STORAGE',
641 'STRAIGHT_JOIN',
642 'STRING',
643 'STRIPED',
644 'SUPER',
645 'TABLE',
646 'TABLES',
647 'TEMPORARY',
648 'TERMINATED',
649 'THEN',
650 'TO',
651 'TRAILING',
652 'TRANSACTIONAL', // 5.1 ?
653 'TRUE',
654 'TRUNCATE',
655 'TYPE',
656 'TYPES',
657 'UNCOMMITTED',
658 'UNION',
659 'UNIQUE',
660 'UNLOCK',
661 'UPDATE',
662 'USAGE',
663 'USE',
664 'USING',
665 'VALUES',
666 'VARIABLES',
667 'VIEW',
668 'WHEN',
669 'WHERE',
670 'WITH',
671 'WORK',
672 'WRITE',
673 'XOR',
674 'YEAR_MONTH'
678 * words forbidden to be used as column or table name without quotes
679 * as seen in http://dev.mysql.com/doc/refman/5.6/en/reserved-words.html
681 * @global array MySQL forbidden words
683 $PMA_SQPdata_forbidden_word = array (
684 'ACCESSIBLE',
685 'ADD',
686 'ALL',
687 'ALTER',
688 'ANALYZE',
689 'AND',
690 'AS',
691 'ASC',
692 'ASENSITIVE',
693 'BEFORE',
694 'BETWEEN',
695 'BIGINT',
696 'BINARY',
697 'BLOB',
698 'BOTH',
699 'BY',
700 'CALL',
701 'CASCADE',
702 'CASE',
703 'CHANGE',
704 'CHAR',
705 'CHARACTER',
706 'CHECK',
707 'COLLATE',
708 'COLUMN',
709 'CONDITION',
710 'CONSTRAINT',
711 'CONTINUE',
712 'CONVERT',
713 'CREATE',
714 'CROSS',
715 'CURRENT_DATE',
716 'CURRENT_TIME',
717 'CURRENT_TIMESTAMP',
718 'CURRENT_USER',
719 'CURSOR',
720 'DATABASE',
721 'DATABASES',
722 'DAY_HOUR',
723 'DAY_MICROSECOND',
724 'DAY_MINUTE',
725 'DAY_SECOND',
726 'DEC',
727 'DECIMAL',
728 'DECLARE',
729 'DEFAULT',
730 'DELAYED',
731 'DELETE',
732 'DESC',
733 'DESCRIBE',
734 'DETERMINISTIC',
735 'DISTINCT',
736 'DISTINCTROW',
737 'DIV',
738 'DOUBLE',
739 'DROP',
740 'DUAL',
741 'EACH',
742 'ELSE',
743 'ELSEIF',
744 'ENCLOSED',
745 'ESCAPED',
746 'EXISTS',
747 'EXIT',
748 'EXPLAIN',
749 'FALSE',
750 'FETCH',
751 'FLOAT',
752 'FLOAT4',
753 'FLOAT8',
754 'FOR',
755 'FORCE',
756 'FOREIGN',
757 'FROM',
758 'FULLTEXT',
759 'GENERAL',
760 'GET',
761 'GRANT',
762 'GROUP',
763 'HAVING',
764 'HIGH_PRIORITY',
765 'HOUR_MICROSECOND',
766 'HOUR_MINUTE',
767 'HOUR_SECOND',
768 'IF',
769 'IGNORE',
770 'IGNORE_SERVER_IDS',
771 'IN',
772 'INDEX',
773 'INFILE',
774 'INNER',
775 'INOUT',
776 'INSENSITIVE',
777 'INSERT',
778 'INT',
779 'INT1',
780 'INT2',
781 'INT3',
782 'INT4',
783 'INT8',
784 'INTEGER',
785 'INTERVAL',
786 'INTO',
787 'IO_AFTER_GTIDS',
788 'IO_BEFORE_GTIDS',
789 'IS',
790 'ITERATE',
791 'JOIN',
792 'KEY',
793 'KEYS',
794 'KILL',
795 'LEADING',
796 'LEAVE',
797 'LEFT',
798 'LIKE',
799 'LIMIT',
800 'LINEAR',
801 'LINES',
802 'LOAD',
803 'LOCALTIME',
804 'LOCALTIMESTAMP',
805 'LOCK',
806 'LONG',
807 'LONGBLOB',
808 'LONGTEXT',
809 'LOOP',
810 'LOW_PRIORITY',
811 'MASTER_BIND',
812 'MASTER_HEARTBEAT_PERIOD',
813 'MASTER_SSL_VERIFY_SERVER_CERT',
814 'MATCH',
815 'MAXVALUE',
816 'MEDIUMBLOB',
817 'MEDIUMINT',
818 'MEDIUMTEXT',
819 'MIDDLEINT',
820 'MINUTE_MICROSECOND',
821 'MINUTE_SECOND',
822 'MOD',
823 'MODIFIES',
824 'NATURAL',
825 'NOT',
826 'NO_WRITE_TO_BINLOG',
827 'NULL',
828 'NUMERIC',
829 'ON',
830 'ONE_SHOT',
831 'OPTIMIZE',
832 'OPTION',
833 'OPTIONALLY',
834 'OR',
835 'ORDER',
836 'OUT',
837 'OUTER',
838 'OUTFILE',
839 'PARTITION',
840 'PRECISION',
841 'PRIMARY',
842 'PROCEDURE',
843 'PURGE',
844 'RANGE',
845 'READ',
846 'READS',
847 'READ_WRITE',
848 'REAL',
849 'REFERENCES',
850 'REGEXP',
851 'RELEASE',
852 'RENAME',
853 'REPEAT',
854 'REPLACE',
855 'REQUIRE',
856 'RESIGNAL',
857 'RESTRICT',
858 'RETURN',
859 'REVOKE',
860 'RIGHT',
861 'RLIKE',
862 'SCHEMA',
863 'SCHEMAS',
864 'SECOND_MICROSECOND',
865 'SELECT',
866 'SENSITIVE',
867 'SEPARATOR',
868 'SET',
869 'SHOW',
870 'SIGNAL',
871 'SLOW',
872 'SMALLINT',
873 'SPATIAL',
874 'SPECIFIC',
875 'SQL',
876 'SQLEXCEPTION',
877 'SQLSTATE',
878 'SQLWARNING',
879 'SQL_AFTER_GTIDS',
880 'SQL_BEFORE_GTIDS',
881 'SQL_BIG_RESULT',
882 'SQL_CALC_FOUND_ROWS',
883 'SQL_SMALL_RESULT',
884 'SSL',
885 'STARTING',
886 'STRAIGHT_JOIN',
887 'TABLE',
888 'TERMINATED',
889 'THEN',
890 'TINYBLOB',
891 'TINYINT',
892 'TINYTEXT',
893 'TO',
894 'TRAILING',
895 'TRIGGER',
896 'TRUE',
897 'UNDO',
898 'UNION',
899 'UNIQUE',
900 'UNLOCK',
901 'UNSIGNED',
902 'UPDATE',
903 'USAGE',
904 'USE',
905 'USING',
906 'UTC_DATE',
907 'UTC_TIME',
908 'UTC_TIMESTAMP',
909 'VALUES',
910 'VARBINARY',
911 'VARCHAR',
912 'VARCHARACTER',
913 'VARYING',
914 'WHEN',
915 'WHERE',
916 'WHILE',
917 'WITH',
918 'WRITE',
919 'XOR',
920 'YEAR_MONTH',
921 'ZEROFILL'
925 * the MySQL column/data types
927 * @see http://dev.mysql.com/doc/refman/5.1/en/data-types.html
928 * @see http://dev.mysql.com/doc/refman/5.1/en/mysql-spatial-datatypes.html
930 * @global array MySQL column types
932 $PMA_SQPdata_column_type = array (
933 'BIGINT',
934 'BINARY',
935 'BIT',
936 'BLOB',
937 'BOOL',
938 'BOOLEAN', // numeric-type-overview.html
939 'CHAR',
940 'CHARACTER',
941 'DATE',
942 'DATETIME',
943 'DEC',
944 'DECIMAL',
945 'DOUBLE',
946 'ENUM',
947 'FLOAT',
948 'FLOAT4',
949 'FLOAT8',
950 'GEOMETRY', // spatial
951 'GEOMETRYCOLLECTION', // spatial
952 'INT',
953 'INT1',
954 'INT2',
955 'INT3',
956 'INT4',
957 'INT8',
958 'INTEGER',
959 'LINESTRING', // spatial
960 'LONG',
961 'LONGBLOB',
962 'LONGTEXT',
963 'MEDIUMBLOB',
964 'MEDIUMINT',
965 'MEDIUMTEXT',
966 'MIDDLEINT',
967 'MULTILINESTRING', // spatial
968 'MULTIPOINT', // spatial
969 'MULTIPOLYGON', // spatial
970 'NCHAR',
971 'NUMERIC',
972 'POINT', // spatial
973 'POLYGON', // spatial
974 'REAL',
975 'SERIAL', // alias
976 'SET',
977 'SMALLINT',
978 'TEXT',
979 'TIME',
980 'TIMESTAMP',
981 'TINYBLOB',
982 'TINYINT',
983 'TINYTEXT',
984 'VARBINARY',
985 'VARCHAR',
986 'YEAR'
990 * Documentation links for operators.
992 $PMA_SQPdata_operators_docs = array(
993 '!=' => array(
994 'link' => 'comparison-operators',
995 'anchor' => 'operator_not-equal',
997 '<>' => array(
998 'link' => 'comparison-operators',
999 'anchor' => 'operator_not-equal',
1001 '!' => array(
1002 'link' => 'logical-operators',
1003 'anchor' => 'operator_not',
1005 '||' => array(
1006 'link' => 'logical-operators',
1007 'anchor' => 'operator_or',
1009 '+' => array(
1010 'link' => 'arithmetic-functions',
1011 'anchor' => 'operator_plus',
1013 '>>' => array(
1014 'link' => 'bit-functions',
1015 'anchor' => 'operator_right-shift',
1017 '-' => array(
1018 'link' => 'arithmetic-functions',
1019 'anchor' => 'operator_minus',
1021 '*' => array(
1022 'link' => 'arithmetic-functions',
1023 'anchor' => 'operator_times',
1025 '&&' => array(
1026 'link' => 'logical-operators',
1027 'anchor' => 'operator_and',
1029 '&' => array(
1030 'link' => 'bit-functions',
1031 'anchor' => 'operator_bitwise-and',
1033 '~' => array(
1034 'link' => 'bit-functions',
1035 'anchor' => 'operator_bitwise-invert',
1037 '|' => array(
1038 'link' => 'bit-functions',
1039 'anchor' => 'operator_bitwise-or',
1041 '^' => array(
1042 'link' => 'bit-functions',
1043 'anchor' => 'operator_bitwise-xor',
1045 //FIXME:duplicated key "="
1046 '=' => array(
1047 'link' => 'assignment-operators',
1048 'anchor' => 'operator_assign-equal',
1050 ':=' => array(
1051 'link' => 'assignment-operators',
1052 'anchor' => 'operator_assign-value',
1054 '/' => array(
1055 'link' => 'arithmetic-functions',
1056 'anchor' => 'operator_divide',
1058 '<=>' => array(
1059 'link' => 'comparison-operators',
1060 'anchor' => 'operator_equal-to',
1062 //FIXME:duplicated key "="
1063 '=' => array(
1064 'link' => 'comparison-operators',
1065 'anchor' => 'operator_equal',
1067 '>=' => array(
1068 'link' => 'comparison-operators',
1069 'anchor' => 'operator_greater-than-or-equal',
1071 '>' => array(
1072 'link' => 'comparison-operators',
1073 'anchor' => 'operator_greater-than',
1075 '<<' => array(
1076 'link' => 'bit-functions',
1077 'anchor' => 'operator_left-shift',
1079 '<=' => array(
1080 'link' => 'comparison-operators',
1081 'anchor' => 'operator_less-than-or-equal',
1083 '<' => array(
1084 'link' => 'comparison-operators',
1085 'anchor' => 'operator_less-than',
1087 '%' => array(
1088 'link' => 'arithmetic-functions',
1089 'anchor' => 'operator_mod',
1094 * Documentation links for functions.
1096 $PMA_SQPdata_functions_docs = array(
1097 'ABS' => array(
1098 'link' => 'mathematical-functions',
1099 'anchor' => 'function_abs',
1101 'ACOS' => array(
1102 'link' => 'mathematical-functions',
1103 'anchor' => 'function_acos',
1105 'ADDDATE' => array(
1106 'link' => 'date-and-time-functions',
1107 'anchor' => 'function_adddate',
1109 'ADDTIME' => array(
1110 'link' => 'date-and-time-functions',
1111 'anchor' => 'function_addtime',
1113 'AES_DECRYPT' => array(
1114 'link' => 'encryption-functions',
1115 'anchor' => 'function_aes_decrypt',
1117 'AES_ENCRYPT' => array(
1118 'link' => 'encryption-functions',
1119 'anchor' => 'function_aes_encrypt',
1121 'AND' => array(
1122 'link' => 'logical-operators',
1123 'anchor' => 'operator_and',
1125 'ASCII' => array(
1126 'link' => 'string-functions',
1127 'anchor' => 'function_ascii',
1129 'ASIN' => array(
1130 'link' => 'mathematical-functions',
1131 'anchor' => 'function_asin',
1133 'ATAN2' => array(
1134 'link' => 'mathematical-functions',
1135 'anchor' => 'function_atan2',
1137 'ATAN' => array(
1138 'link' => 'mathematical-functions',
1139 'anchor' => 'function_atan',
1141 'AVG' => array(
1142 'link' => 'group-by-functions',
1143 'anchor' => 'function_avg',
1145 'BENCHMARK' => array(
1146 'link' => 'information-functions',
1147 'anchor' => 'function_benchmark',
1149 'BIN' => array(
1150 'link' => 'string-functions',
1151 'anchor' => 'function_bin',
1153 'BINARY' => array(
1154 'link' => 'cast-functions',
1155 'anchor' => 'operator_binary',
1157 'BIT_AND' => array(
1158 'link' => 'group-by-functions',
1159 'anchor' => 'function_bit_and',
1161 'BIT_COUNT' => array(
1162 'link' => 'bit-functions',
1163 'anchor' => 'function_bit_count',
1165 'BIT_LENGTH' => array(
1166 'link' => 'string-functions',
1167 'anchor' => 'function_bit_length',
1169 'BIT_OR' => array(
1170 'link' => 'group-by-functions',
1171 'anchor' => 'function_bit_or',
1173 'BIT_XOR' => array(
1174 'link' => 'group-by-functions',
1175 'anchor' => 'function_bit_xor',
1177 'CASE' => array(
1178 'link' => 'control-flow-functions',
1179 'anchor' => 'operator_case',
1181 'CAST' => array(
1182 'link' => 'cast-functions',
1183 'anchor' => 'function_cast',
1185 'CEIL' => array(
1186 'link' => 'mathematical-functions',
1187 'anchor' => 'function_ceil',
1189 'CEILING' => array(
1190 'link' => 'mathematical-functions',
1191 'anchor' => 'function_ceiling',
1193 'CHAR_LENGTH' => array(
1194 'link' => 'string-functions',
1195 'anchor' => 'function_char_length',
1197 'CHAR' => array(
1198 'link' => 'string-functions',
1199 'anchor' => 'function_char',
1201 'CHARACTER_LENGTH' => array(
1202 'link' => 'string-functions',
1203 'anchor' => 'function_character_length',
1205 'CHARSET' => array(
1206 'link' => 'information-functions',
1207 'anchor' => 'function_charset',
1209 'COALESCE' => array(
1210 'link' => 'comparison-operators',
1211 'anchor' => 'function_coalesce',
1213 'COERCIBILITY' => array(
1214 'link' => 'information-functions',
1215 'anchor' => 'function_coercibility',
1217 'COLLATION' => array(
1218 'link' => 'information-functions',
1219 'anchor' => 'function_collation',
1221 'COMPRESS' => array(
1222 'link' => 'encryption-functions',
1223 'anchor' => 'function_compress',
1225 'CONCAT_WS' => array(
1226 'link' => 'string-functions',
1227 'anchor' => 'function_concat_ws',
1229 'CONCAT' => array(
1230 'link' => 'string-functions',
1231 'anchor' => 'function_concat',
1233 'CONNECTION_ID' => array(
1234 'link' => 'information-functions',
1235 'anchor' => 'function_connection_id',
1237 'CONV' => array(
1238 'link' => 'mathematical-functions',
1239 'anchor' => 'function_conv',
1241 'CONVERT_TZ' => array(
1242 'link' => 'date-and-time-functions',
1243 'anchor' => 'function_convert_tz',
1245 'Convert' => array(
1246 'link' => 'cast-functions',
1247 'anchor' => 'function_convert',
1249 'COS' => array(
1250 'link' => 'mathematical-functions',
1251 'anchor' => 'function_cos',
1253 'COT' => array(
1254 'link' => 'mathematical-functions',
1255 'anchor' => 'function_cot',
1257 'COUNT' => array(
1258 'link' => 'group-by-functions',
1259 'anchor' => 'function_count',
1261 'CRC32' => array(
1262 'link' => 'mathematical-functions',
1263 'anchor' => 'function_crc32',
1265 'CURDATE' => array(
1266 'link' => 'date-and-time-functions',
1267 'anchor' => 'function_curdate',
1269 'CURRENT_DATE' => array(
1270 'link' => 'date-and-time-functions',
1271 'anchor' => 'function_current_date',
1273 'CURRENT_TIME' => array(
1274 'link' => 'date-and-time-functions',
1275 'anchor' => 'function_current_time',
1277 'CURRENT_TIMESTAMP' => array(
1278 'link' => 'date-and-time-functions',
1279 'anchor' => 'function_current_timestamp',
1281 'CURRENT_USER' => array(
1282 'link' => 'information-functions',
1283 'anchor' => 'function_current_user',
1285 'CURTIME' => array(
1286 'link' => 'date-and-time-functions',
1287 'anchor' => 'function_curtime',
1289 'DATABASE' => array(
1290 'link' => 'information-functions',
1291 'anchor' => 'function_database',
1293 'DATE_ADD' => array(
1294 'link' => 'date-and-time-functions',
1295 'anchor' => 'function_date_add',
1297 'DATE_FORMAT' => array(
1298 'link' => 'date-and-time-functions',
1299 'anchor' => 'function_date_format',
1301 'DATE_SUB' => array(
1302 'link' => 'date-and-time-functions',
1303 'anchor' => 'function_date_sub',
1305 'DATE' => array(
1306 'link' => 'date-and-time-functions',
1307 'anchor' => 'function_date',
1309 'DATEDIFF' => array(
1310 'link' => 'date-and-time-functions',
1311 'anchor' => 'function_datediff',
1313 'DAY' => array(
1314 'link' => 'date-and-time-functions',
1315 'anchor' => 'function_day',
1317 'DAYNAME' => array(
1318 'link' => 'date-and-time-functions',
1319 'anchor' => 'function_dayname',
1321 'DAYOFMONTH' => array(
1322 'link' => 'date-and-time-functions',
1323 'anchor' => 'function_dayofmonth',
1325 'DAYOFWEEK' => array(
1326 'link' => 'date-and-time-functions',
1327 'anchor' => 'function_dayofweek',
1329 'DAYOFYEAR' => array(
1330 'link' => 'date-and-time-functions',
1331 'anchor' => 'function_dayofyear',
1333 'DECLARE' => array('link' => 'declare', 'anchor' => 'declare'),
1334 'DECODE' => array(
1335 'link' => 'encryption-functions',
1336 'anchor' => 'function_decode',
1338 'DEFAULT' => array(
1339 'link' => 'miscellaneous-functions',
1340 'anchor' => 'function_default',
1342 'DEGREES' => array(
1343 'link' => 'mathematical-functions',
1344 'anchor' => 'function_degrees',
1346 'DES_DECRYPT' => array(
1347 'link' => 'encryption-functions',
1348 'anchor' => 'function_des_decrypt',
1350 'DES_ENCRYPT' => array(
1351 'link' => 'encryption-functions',
1352 'anchor' => 'function_des_encrypt',
1354 'DIV' => array(
1355 'link' => 'arithmetic-functions',
1356 'anchor' => 'operator_div',
1358 'ELT' => array(
1359 'link' => 'string-functions',
1360 'anchor' => 'function_elt',
1362 'ENCODE' => array(
1363 'link' => 'encryption-functions',
1364 'anchor' => 'function_encode',
1366 'ENCRYPT' => array(
1367 'link' => 'encryption-functions',
1368 'anchor' => 'function_encrypt',
1370 'EXP' => array(
1371 'link' => 'mathematical-functions',
1372 'anchor' => 'function_exp',
1374 'EXPORT_SET' => array(
1375 'link' => 'string-functions',
1376 'anchor' => 'function_export_set',
1378 'EXTRACT' => array(
1379 'link' => 'date-and-time-functions',
1380 'anchor' => 'function_extract',
1382 'ExtractValue' => array(
1383 'link' => 'xml-functions',
1384 'anchor' => 'function_extractvalue',
1386 'FIELD' => array(
1387 'link' => 'string-functions',
1388 'anchor' => 'function_field',
1390 'FIND_IN_SET' => array(
1391 'link' => 'string-functions',
1392 'anchor' => 'function_find_in_set',
1394 'FLOOR' => array(
1395 'link' => 'mathematical-functions',
1396 'anchor' => 'function_floor',
1398 'FORMAT' => array(
1399 'link' => 'string-functions',
1400 'anchor' => 'function_format',
1402 'FOUND_ROWS' => array(
1403 'link' => 'information-functions',
1404 'anchor' => 'function_found_rows',
1406 'FROM_DAYS' => array(
1407 'link' => 'date-and-time-functions',
1408 'anchor' => 'function_from_days',
1410 'FROM_UNIXTIME' => array(
1411 'link' => 'date-and-time-functions',
1412 'anchor' => 'function_from_unixtime',
1414 'GET_FORMAT' => array(
1415 'link' => 'date-and-time-functions',
1416 'anchor' => 'function_get_format',
1418 'GET_LOCK' => array(
1419 'link' => 'miscellaneous-functions',
1420 'anchor' => 'function_get_lock',
1422 'GREATEST' => array(
1423 'link' => 'comparison-operators',
1424 'anchor' => 'function_greatest',
1426 'GROUP_CONCAT' => array(
1427 'link' => 'group-by-functions',
1428 'anchor' => 'function_group_concat',
1430 'HEX' => array(
1431 'link' => 'string-functions',
1432 'anchor' => 'function_hex',
1434 'HOUR' => array(
1435 'link' => 'date-and-time-functions',
1436 'anchor' => 'function_hour',
1438 'IF' => array(
1439 'link' => 'control-flow-functions',
1440 'anchor' => 'function_if',
1442 'IFNULL' => array(
1443 'link' => 'control-flow-functions',
1444 'anchor' => 'function_ifnull',
1446 'IN' => array(
1447 'link' => 'comparison-operators',
1448 'anchor' => 'function_in',
1450 'INET_ATON' => array(
1451 'link' => 'miscellaneous-functions',
1452 'anchor' => 'function_inet_aton',
1454 'INET_NTOA' => array(
1455 'link' => 'miscellaneous-functions',
1456 'anchor' => 'function_inet_ntoa',
1458 'INSERT' => array(
1459 'link' => 'string-functions',
1460 'anchor' => 'function_insert',
1462 'INSTR' => array(
1463 'link' => 'string-functions',
1464 'anchor' => 'function_instr',
1466 'INTERVAL' => array(
1467 'link' => 'comparison-operators',
1468 'anchor' => 'function_interval',
1470 'IS_FREE_LOCK' => array(
1471 'link' => 'miscellaneous-functions',
1472 'anchor' => 'function_is_free_lock',
1474 'IS_USED_LOCK' => array(
1475 'link' => 'miscellaneous-functions',
1476 'anchor' => 'function_is_used_lock',
1478 'IS' => array(
1479 'link' => 'comparison-operators',
1480 'anchor' => 'operator_is',
1482 'ISNULL' => array(
1483 'link' => 'comparison-operators',
1484 'anchor' => 'function_isnull',
1486 'LAST_DAY' => array(
1487 'link' => 'date-and-time-functions',
1488 'anchor' => 'function_last_day',
1490 'LAST_INSERT_ID' => array(
1491 'link' => 'information-functions',
1492 'anchor' => 'function_last_insert_id',
1494 'LCASE' => array(
1495 'link' => 'string-functions',
1496 'anchor' => 'function_lcase',
1498 'LEAST' => array(
1499 'link' => 'comparison-operators',
1500 'anchor' => 'function_least',
1502 'LEFT' => array(
1503 'link' => 'string-functions',
1504 'anchor' => 'function_left',
1506 'LENGTH' => array(
1507 'link' => 'string-functions',
1508 'anchor' => 'function_length',
1510 'LIKE' => array(
1511 'link' => 'string-comparison-functions',
1512 'anchor' => 'operator_like',
1514 'LN' => array(
1515 'link' => 'mathematical-functions',
1516 'anchor' => 'function_ln',
1518 'LOAD_FILE' => array(
1519 'link' => 'string-functions',
1520 'anchor' => 'function_load_file',
1522 'LOCALTIME' => array(
1523 'link' => 'date-and-time-functions',
1524 'anchor' => 'function_localtime',
1526 'LOCALTIMESTAMP' => array(
1527 'link' => 'date-and-time-functions',
1528 'anchor' => 'function_localtimestamp',
1530 'LOCATE' => array(
1531 'link' => 'string-functions',
1532 'anchor' => 'function_locate',
1534 'LOG10' => array(
1535 'link' => 'mathematical-functions',
1536 'anchor' => 'function_log10',
1538 'LOG2' => array(
1539 'link' => 'mathematical-functions',
1540 'anchor' => 'function_log2',
1542 'LOG' => array(
1543 'link' => 'mathematical-functions',
1544 'anchor' => 'function_log',
1546 'LOWER' => array(
1547 'link' => 'string-functions',
1548 'anchor' => 'function_lower',
1550 'LPAD' => array(
1551 'link' => 'string-functions',
1552 'anchor' => 'function_lpad',
1554 'LTRIM' => array(
1555 'link' => 'string-functions',
1556 'anchor' => 'function_ltrim',
1558 'MAKE_SET' => array(
1559 'link' => 'string-functions',
1560 'anchor' => 'function_make_set',
1562 'MAKEDATE' => array(
1563 'link' => 'date-and-time-functions',
1564 'anchor' => 'function_makedate',
1566 'MAKETIME' => array(
1567 'link' => 'date-and-time-functions',
1568 'anchor' => 'function_maketime',
1570 'MASTER_POS_WAIT' => array(
1571 'link' => 'miscellaneous-functions',
1572 'anchor' => 'function_master_pos_wait',
1574 'MATCH' => array(
1575 'link' => 'fulltext-search',
1576 'anchor' => 'function_match',
1578 'MAX' => array(
1579 'link' => 'group-by-functions',
1580 'anchor' => 'function_max',
1582 'MD5' => array(
1583 'link' => 'encryption-functions',
1584 'anchor' => 'function_md5',
1586 'MICROSECOND' => array(
1587 'link' => 'date-and-time-functions',
1588 'anchor' => 'function_microsecond',
1590 'MID' => array(
1591 'link' => 'string-functions',
1592 'anchor' => 'function_mid',
1594 'MIN' => array(
1595 'link' => 'group-by-functions',
1596 'anchor' => 'function_min',
1598 'MINUTE' => array(
1599 'link' => 'date-and-time-functions',
1600 'anchor' => 'function_minute',
1602 'MOD' => array(
1603 'link' => 'mathematical-functions',
1604 'anchor' => 'function_mod',
1606 'MONTH' => array(
1607 'link' => 'date-and-time-functions',
1608 'anchor' => 'function_month',
1610 'MONTHNAME' => array(
1611 'link' => 'date-and-time-functions',
1612 'anchor' => 'function_monthname',
1614 'NAME_CONST' => array(
1615 'link' => 'miscellaneous-functions',
1616 'anchor' => 'function_name_const',
1618 'NOT' => array(
1619 'link' => 'logical-operators',
1620 'anchor' => 'operator_not',
1622 'NOW' => array(
1623 'link' => 'date-and-time-functions',
1624 'anchor' => 'function_now',
1626 'NULLIF' => array(
1627 'link' => 'control-flow-functions',
1628 'anchor' => 'function_nullif',
1630 'OCT' => array(
1631 'link' => 'mathematical-functions',
1632 'anchor' => 'function_oct',
1634 'OCTET_LENGTH' => array(
1635 'link' => 'string-functions',
1636 'anchor' => 'function_octet_length',
1638 'OLD_PASSWORD' => array(
1639 'link' => 'encryption-functions',
1640 'anchor' => 'function_old_password',
1642 'OR' => array(
1643 'link' => 'logical-operators',
1644 'anchor' => 'operator_or',
1646 'ORD' => array(
1647 'link' => 'string-functions',
1648 'anchor' => 'function_ord',
1650 'PASSWORD' => array(
1651 'link' => 'encryption-functions',
1652 'anchor' => 'function_password',
1654 'PERIOD_ADD' => array(
1655 'link' => 'date-and-time-functions',
1656 'anchor' => 'function_period_add',
1658 'PERIOD_DIFF' => array(
1659 'link' => 'date-and-time-functions',
1660 'anchor' => 'function_period_diff',
1662 'PI' => array(
1663 'link' => 'mathematical-functions',
1664 'anchor' => 'function_pi',
1666 'POSITION' => array(
1667 'link' => 'string-functions',
1668 'anchor' => 'function_position',
1670 'POW' => array(
1671 'link' => 'mathematical-functions',
1672 'anchor' => 'function_pow',
1674 'POWER' => array(
1675 'link' => 'mathematical-functions',
1676 'anchor' => 'function_power',
1678 'QUARTER' => array(
1679 'link' => 'date-and-time-functions',
1680 'anchor' => 'function_quarter',
1682 'QUOTE' => array(
1683 'link' => 'string-functions',
1684 'anchor' => 'function_quote',
1686 'RADIANS' => array(
1687 'link' => 'mathematical-functions',
1688 'anchor' => 'function_radians',
1690 'RAND' => array(
1691 'link' => 'mathematical-functions',
1692 'anchor' => 'function_rand',
1694 'REGEXP' => array(
1695 'link' => 'regexp',
1696 'anchor' => 'operator_regexp',
1698 'RELEASE_LOCK' => array(
1699 'link' => 'miscellaneous-functions',
1700 'anchor' => 'function_release_lock',
1702 'REPEAT' => array(
1703 'link' => 'string-functions',
1704 'anchor' => 'function_repeat',
1706 'REPLACE' => array(
1707 'link' => 'string-functions',
1708 'anchor' => 'function_replace',
1710 'REVERSE' => array(
1711 'link' => 'string-functions',
1712 'anchor' => 'function_reverse',
1714 'RIGHT' => array(
1715 'link' => 'string-functions',
1716 'anchor' => 'function_right',
1718 'RLIKE' => array(
1719 'link' => 'regexp',
1720 'anchor' => 'operator_rlike',
1722 'ROUND' => array(
1723 'link' => 'mathematical-functions',
1724 'anchor' => 'function_round',
1726 'ROW_COUNT' => array(
1727 'link' => 'information-functions',
1728 'anchor' => 'function_row_count',
1730 'RPAD' => array(
1731 'link' => 'string-functions',
1732 'anchor' => 'function_rpad',
1734 'RTRIM' => array(
1735 'link' => 'string-functions',
1736 'anchor' => 'function_rtrim',
1738 'SCHEMA' => array(
1739 'link' => 'information-functions',
1740 'anchor' => 'function_schema',
1742 'SEC_TO_TIME' => array(
1743 'link' => 'date-and-time-functions',
1744 'anchor' => 'function_sec_to_time',
1746 'SECOND' => array(
1747 'link' => 'date-and-time-functions',
1748 'anchor' => 'function_second',
1750 'SESSION_USER' => array(
1751 'link' => 'information-functions',
1752 'anchor' => 'function_session_user',
1754 'SHA' => array(
1755 'link' => 'encryption-functions',
1756 'anchor' => 'function_sha1',
1758 'SHA1' => array(
1759 'link' => 'encryption-functions',
1760 'anchor' => 'function_sha1',
1762 'SIGN' => array(
1763 'link' => 'mathematical-functions',
1764 'anchor' => 'function_sign',
1766 'SIN' => array(
1767 'link' => 'mathematical-functions',
1768 'anchor' => 'function_sin',
1770 'SLEEP' => array(
1771 'link' => 'miscellaneous-functions',
1772 'anchor' => 'function_sleep',
1774 'SOUNDEX' => array(
1775 'link' => 'string-functions',
1776 'anchor' => 'function_soundex',
1778 'SPACE' => array(
1779 'link' => 'string-functions',
1780 'anchor' => 'function_space',
1782 'SQRT' => array(
1783 'link' => 'mathematical-functions',
1784 'anchor' => 'function_sqrt',
1786 'STD' => array(
1787 'link' => 'group-by-functions',
1788 'anchor' => 'function_std',
1790 'STDDEV_POP' => array(
1791 'link' => 'group-by-functions',
1792 'anchor' => 'function_stddev_pop',
1794 'STDDEV_SAMP' => array(
1795 'link' => 'group-by-functions',
1796 'anchor' => 'function_stddev_samp',
1798 'STDDEV' => array(
1799 'link' => 'group-by-functions',
1800 'anchor' => 'function_stddev',
1802 'STR_TO_DATE' => array(
1803 'link' => 'date-and-time-functions',
1804 'anchor' => 'function_str_to_date',
1806 'STRCMP' => array(
1807 'link' => 'string-comparison-functions',
1808 'anchor' => 'function_strcmp',
1810 'SUBDATE' => array(
1811 'link' => 'date-and-time-functions',
1812 'anchor' => 'function_subdate',
1814 'SUBSTR' => array(
1815 'link' => 'string-functions',
1816 'anchor' => 'function_substr',
1818 'SUBSTRING_INDEX' => array(
1819 'link' => 'string-functions',
1820 'anchor' => 'function_substring_index',
1822 'SUBSTRING' => array(
1823 'link' => 'string-functions',
1824 'anchor' => 'function_substring',
1826 'SUBTIME' => array(
1827 'link' => 'date-and-time-functions',
1828 'anchor' => 'function_subtime',
1830 'SUM' => array(
1831 'link' => 'group-by-functions',
1832 'anchor' => 'function_sum',
1834 'SYSDATE' => array(
1835 'link' => 'date-and-time-functions',
1836 'anchor' => 'function_sysdate',
1838 'SYSTEM_USER' => array(
1839 'link' => 'information-functions',
1840 'anchor' => 'function_system_user',
1842 'TAN' => array(
1843 'link' => 'mathematical-functions',
1844 'anchor' => 'function_tan',
1846 'TIME_FORMAT' => array(
1847 'link' => 'date-and-time-functions',
1848 'anchor' => 'function_time_format',
1850 'TIME_TO_SEC' => array(
1851 'link' => 'date-and-time-functions',
1852 'anchor' => 'function_time_to_sec',
1854 'TIME' => array(
1855 'link' => 'date-and-time-functions',
1856 'anchor' => 'function_time',
1858 'TIMEDIFF' => array(
1859 'link' => 'date-and-time-functions',
1860 'anchor' => 'function_timediff',
1862 'TIMESTAMP' => array(
1863 'link' => 'date-and-time-functions',
1864 'anchor' => 'function_timestamp',
1866 'TIMESTAMPADD' => array(
1867 'link' => 'date-and-time-functions',
1868 'anchor' => 'function_timestampadd',
1870 'TIMESTAMPDIFF' => array(
1871 'link' => 'date-and-time-functions',
1872 'anchor' => 'function_timestampdiff',
1874 'TO_DAYS' => array(
1875 'link' => 'date-and-time-functions',
1876 'anchor' => 'function_to_days',
1878 'TRIM' => array(
1879 'link' => 'string-functions',
1880 'anchor' => 'function_trim',
1882 'TRUNCATE' => array(
1883 'link' => 'mathematical-functions',
1884 'anchor' => 'function_truncate',
1886 'UCASE' => array(
1887 'link' => 'string-functions',
1888 'anchor' => 'function_ucase',
1890 'UNCOMPRESS' => array(
1891 'link' => 'encryption-functions',
1892 'anchor' => 'function_uncompress',
1894 'UNCOMPRESSED_LENGTH' => array(
1895 'link' => 'encryption-functions',
1896 'anchor' => 'function_uncompressed_length',
1898 'UNHEX' => array(
1899 'link' => 'string-functions',
1900 'anchor' => 'function_unhex',
1902 'UNIX_TIMESTAMP' => array(
1903 'link' => 'date-and-time-functions',
1904 'anchor' => 'function_unix_timestamp',
1906 'UpdateXML' => array(
1907 'link' => 'xml-functions',
1908 'anchor' => 'function_updatexml',
1910 'UPPER' => array(
1911 'link' => 'string-functions',
1912 'anchor' => 'function_upper',
1914 'USER' => array(
1915 'link' => 'information-functions',
1916 'anchor' => 'function_user',
1918 'UTC_DATE' => array(
1919 'link' => 'date-and-time-functions',
1920 'anchor' => 'function_utc_date',
1922 'UTC_TIME' => array(
1923 'link' => 'date-and-time-functions',
1924 'anchor' => 'function_utc_time',
1926 'UTC_TIMESTAMP' => array(
1927 'link' => 'date-and-time-functions',
1928 'anchor' => 'function_utc_timestamp',
1930 'UUID_SHORT' => array(
1931 'link' => 'miscellaneous-functions',
1932 'anchor' => 'function_uuid_short',
1934 'UUID' => array(
1935 'link' => 'miscellaneous-functions',
1936 'anchor' => 'function_uuid',
1938 'VALUES' => array(
1939 'link' => 'miscellaneous-functions',
1940 'anchor' => 'function_values',
1942 'VAR_POP' => array(
1943 'link' => 'group-by-functions',
1944 'anchor' => 'function_var_pop',
1946 'VAR_SAMP' => array(
1947 'link' => 'group-by-functions',
1948 'anchor' => 'function_var_samp',
1950 'VARIANCE' => array(
1951 'link' => 'group-by-functions',
1952 'anchor' => 'function_variance',
1954 'VERSION' => array(
1955 'link' => 'information-functions',
1956 'anchor' => 'function_version',
1958 'WEEK' => array(
1959 'link' => 'date-and-time-functions',
1960 'anchor' => 'function_week',
1962 'WEEKDAY' => array(
1963 'link' => 'date-and-time-functions',
1964 'anchor' => 'function_weekday',
1966 'WEEKOFYEAR' => array(
1967 'link' => 'date-and-time-functions',
1968 'anchor' => 'function_weekofyear',
1970 'XOR' => array(
1971 'link' => 'logical-operators',
1972 'anchor' => 'operator_xor',
1974 'YEAR' => array(
1975 'link' => 'date-and-time-functions',
1976 'anchor' => 'function_year',
1978 'YEARWEEK' => array(
1979 'link' => 'date-and-time-functions',
1980 'anchor' => 'function_yearweek',
1982 'SOUNDS_LIKE' => array(
1983 'link' => 'string-functions',
1984 'anchor' => 'operator_sounds-like',
1986 'IS_NOT_NULL' => array(
1987 'link' => 'comparison-operators',
1988 'anchor' => 'operator_is-not-null',
1990 'IS_NOT' => array(
1991 'link' => 'comparison-operators',
1992 'anchor' => 'operator_is-not',
1994 'IS_NULL' => array(
1995 'link' => 'comparison-operators',
1996 'anchor' => 'operator_is-null',
1998 'NOT_LIKE' => array(
1999 'link' => 'string-comparison-functions',
2000 'anchor' => 'operator_not-like',
2002 'NOT_REGEXP' => array(
2003 'link' => 'regexp',
2004 'anchor' => 'operator_not-regexp',
2006 'COUNT_DISTINCT' => array(
2007 'link' => 'group-by-functions',
2008 'anchor' => 'function_count-distinct',
2010 'NOT_IN' => array(
2011 'link' => 'comparison-operators',
2012 'anchor' => 'function_not-in',