2.11.1.2 release
[phpmyadmin/arisferyanto.git] / libraries / sqlparser.data.php
blobcb2f8aa43597d1fff60d1a2c4159e0de28b94b45
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 * Note: before adding a value in the arrays, ensure that you respect
15 * proper sorting, especially with underscores. And don't forget to
16 * update the _cnt variable at the end of each array.
17 * (It's slower to have PHP do the count).
19 * It's easier to use only uppercase for proper sorting. In case of
20 * doubt, use the DEBUG code after this function's definition.
22 * @version$Id$
25 /**
26 * @global array MySQL function names
28 $PMA_SQPdata_function_name = array (
29 'ABS',
30 'ACOS',
31 'ADDDATE',
32 'ADDTIME',
33 'AES_DECRYPT',
34 'AES_ENCRYPT',
35 'AREA', // Area() polygon-property-functions.html
36 'ASBINARY', // AsBinary()
37 'ASCII',
38 'ASIN',
39 'ASTEXT', // AsText()
40 'ATAN',
41 'ATAN2',
42 'AVG',
43 'BDMPOLYFROMTEXT', // BdMPolyFromText()
44 'BDMPOLYFROMWKB', // BdMPolyFromWKB()
45 'BDPOLYFROMTEXT', // BdPolyFromText()
46 'BDPOLYFROMWKB', // BdPolyFromWKB()
47 'BENCHMARK',
48 'BIN',
49 'BIT_AND',
50 'BIT_COUNT',
51 'BIT_LENGTH',
52 'BIT_OR',
53 'BIT_XOR', // group-by-functions.html
54 'BOUNDARY', // Boundary() general-geometry-property-functions.html
55 'BUFFER', // Buffer()
56 'CAST',
57 'CEIL',
58 'CEILING',
59 'CENTROID', // Centroid() multipolygon-property-functions.html
60 'CHAR', // string-functions.html
61 'CHARACTER_LENGTH',
62 'CHARSET', // information-functions.html
63 'CHAR_LENGTH',
64 'COALESCE',
65 'COERCIBILITY', // information-functions.html
66 'COLLATION', // information-functions.html
67 'COMPRESS', // string-functions.html
68 'CONCAT',
69 'CONCAT_WS',
70 'CONNECTION_ID',
71 'CONTAINS', // Contains()
72 'CONV',
73 'CONVERT',
74 'CONVERT_TZ',
75 'CONVEXHULL', // ConvexHull()
76 'COS',
77 'COT',
78 'COUNT',
79 'CRC32', // mathematical-functions.html
80 'CROSSES', // Crosses()
81 'CURDATE',
82 'CURRENT_DATE',
83 'CURRENT_TIME',
84 'CURRENT_TIMESTAMP',
85 'CURRENT_USER',
86 'CURTIME',
87 'DATABASE',
88 'DATE', // date-and-time-functions.html
89 'DATEDIFF', // date-and-time-functions.html
90 'DATE_ADD',
91 'DATE_DIFF',
92 'DATE_FORMAT',
93 'DATE_SUB',
94 'DAY',
95 'DAYNAME',
96 'DAYOFMONTH',
97 'DAYOFWEEK',
98 'DAYOFYEAR',
99 'DECODE',
100 'DEFAULT', // miscellaneous-functions.html
101 'DEGREES',
102 'DES_DECRYPT',
103 'DES_ENCRYPT',
104 'DIFFERENCE', // Difference()
105 'DIMENSION', // Dimension() general-geometry-property-functions.html
106 'DISJOINT', // Disjoint()
107 'DISTANCE', // Distance()
108 'ELT',
109 'ENCODE',
110 'ENCRYPT',
111 'ENDPOINT', // EndPoint() linestring-property-functions.html
112 'ENVELOPE', // Envelope() general-geometry-property-functions.html
113 'EQUALS', // Equals()
114 'EXP',
115 'EXPORT_SET',
116 'EXTERIORRING', // ExteriorRing() polygon-property-functions.html
117 'EXTRACT',
118 'EXTRACTVALUE', // ExtractValue() xml-functions.html
119 'FIELD',
120 'FIND_IN_SET',
121 'FLOOR',
122 'FORMAT',
123 'FOUND_ROWS',
124 'FROM_DAYS',
125 'FROM_UNIXTIME',
126 'GEOMCOLLFROMTEXT', // GeomCollFromText()
127 'GEOMCOLLFROMWKB', // GeomCollFromWKB()
128 'GEOMETRYCOLLECTION', // GeometryCollection()
129 'GEOMETRYCOLLECTIONFROMTEXT', // GeometryCollectionFromText()
130 'GEOMETRYCOLLECTIONFROMWKB', // GeometryCollectionFromWKB()
131 'GEOMETRYFROMTEXT', // GeometryFromText()
132 'GEOMETRYFROMWKB', // GeometryFromWKB()
133 'GEOMETRYN', // GeometryN() geometrycollection-property-functions.html
134 'GEOMETRYTYPE', // GeometryType() general-geometry-property-functions.html
135 'GEOMFROMTEXT', // GeomFromText()
136 'GEOMFROMWKB', // GeomFromWKB()
137 'GET_FORMAT',
138 'GET_LOCK',
139 'GLENGTH', // GLength() linestring-property-functions.html
140 'GREATEST',
141 'GROUP_CONCAT',
142 'GROUP_UNIQUE_USERS',
143 'HEX',
144 'HOUR',
145 'IF', //control-flow-functions.html
146 'IFNULL',
147 'INET_ATON',
148 'INET_NTOA',
149 'INSERT', // string-functions.html
150 'INSTR',
151 'INTERIORRINGN', // InteriorRingN() polygon-property-functions.html
152 'INTERSECTION', // Intersection()
153 'INTERSECTS', // Intersects()
154 'INTERVAL',
155 'ISCLOSED', // IsClosed() multilinestring-property-functions.html
156 'ISEMPTY', // IsEmpty() general-geometry-property-functions.html
157 'ISNULL',
158 'ISRING', // IsRing() linestring-property-functions.html
159 'ISSIMPLE', // IsSimple() general-geometry-property-functions.html
160 'IS_FREE_LOCK',
161 'IS_USED_LOCK', // miscellaneous-functions.html
162 'LAST_DAY',
163 'LAST_INSERT_ID',
164 'LCASE',
165 'LEAST',
166 'LEFT',
167 'LENGTH',
168 'LINEFROMTEXT', // LineFromText()
169 'LINEFROMWKB', // LineFromWKB()
170 'LINESTRING', // LineString()
171 'LINESTRINGFROMTEXT', // LineStringFromText()
172 'LINESTRINGFROMWKB', // LineStringFromWKB()
173 'LN',
174 'LOAD_FILE',
175 'LOCALTIME',
176 'LOCALTIMESTAMP',
177 'LOCATE',
178 'LOG',
179 'LOG10',
180 'LOG2',
181 'LOWER',
182 'LPAD',
183 'LTRIM',
184 'MAKEDATE',
185 'MAKETIME',
186 'MAKE_SET',
187 'MASTER_POS_WAIT',
188 'MAX',
189 'MBRCONTAINS', // MBRContains()
190 'MBRDISJOINT', // MBRDisjoint()
191 'MBREQUAL', // MBREqual()
192 'MBRINTERSECTS', // MBRIntersects()
193 'MBROVERLAPS', // MBROverlaps()
194 'MBRTOUCHES', // MBRTouches()
195 'MBRWITHIN', // MBRWithin()
196 'MD5',
197 'MICROSECOND',
198 'MID',
199 'MIN',
200 'MINUTE',
201 'MLINEFROMTEXT', // MLineFromText()
202 'MLINEFROMWKB', // MLineFromWKB()
203 'MOD',
204 'MONTH',
205 'MONTHNAME',
206 'NOW',
207 'MPOINTFROMTEXT', // MPointFromText()
208 'MPOINTFROMWKB', // MPointFromWKB()
209 'MPOLYFROMTEXT', // MPolyFromText()
210 'MPOLYFROMWKB', // MPolyFromWKB()
211 'MULTILINESTRING', // MultiLineString()
212 'MULTILINESTRINGFROMTEXT', // MultiLineStringFromText()
213 'MULTILINESTRINGFROMWKB', // MultiLineStringFromWKB()
214 'MULTIPOINT', // MultiPoint()
215 'MULTIPOINTFROMTEXT', // MultiPointFromText()
216 'MULTIPOINTFROMWKB', // MultiPointFromWKB()
217 'MULTIPOLYGON', // MultiPolygon()
218 'MULTIPOLYGONFROMTEXT', // MultiPolygonFromText()
219 'MULTIPOLYGONFROMWKB', // MultiPolygonFromWKB()
220 'NAME_CONST', // NAME_CONST()
221 'NOW', // NOW()
222 'NULLIF',
223 'NUMGEOMETRIES', // NumGeometries() geometrycollection-property-functions.html
224 'NUMINTERIORRINGS', // NumInteriorRings() polygon-property-functions.html
225 'NUMPOINTS', // NumPoints() linestring-property-functions.html
226 'OCT',
227 'OCTET_LENGTH',
228 'OLD_PASSWORD',
229 'ORD',
230 'OVERLAPS', // Overlaps()
231 'PASSWORD',
232 'PERIOD_ADD',
233 'PERIOD_DIFF',
234 'PI',
235 'POINT', // Point()
236 'POINTFROMTEXT', // PointFromText()
237 'POINTFROMWKB', // PointFromWKB()
238 'POINTN', // PointN() inestring-property-functions.html
239 'POINTONSURFACE', // PointOnSurface() multipolygon-property-functions.html
240 'POLYFROMTEXT', // PolyFromText()
241 'POLYFROMWKB', // PolyFromWKB()
242 'POLYGON', // Polygon()
243 'POLYGONFROMTEXT', // PolygonFromText()
244 'POLYGONFROMWKB', // PolygonFromWKB()
245 'POSITION',
246 'POW',
247 'POWER',
248 'QUARTER',
249 'QUOTE',
250 'RADIANS',
251 'RAND',
252 'RELATED', // Related()
253 'RELEASE_LOCK',
254 'REPEAT',
255 'REPLACE', // string-functions.html
256 'REVERSE',
257 'RIGHT',
258 'ROUND',
259 'ROW_COUNT', // information-functions.html
260 'RPAD',
261 'RTRIM',
262 'SCHEMA', // information-functions.html
263 'SECOND',
264 'SEC_TO_TIME',
265 'SESSION_USER',
266 'SHA',
267 'SHA1',
268 'SIGN',
269 'SIN',
270 'SLEEP', // miscellaneous-functions.html
271 'SOUNDEX',
272 'SPACE',
273 'SQRT',
274 'SRID', // general-geometry-property-functions.html
275 'STARTPOINT', // StartPoint() linestring-property-functions.html
276 'STD',
277 'STDDEV',
278 'STDDEV_POP', // group-by-functions.html
279 'STDDEV_SAMP', // group-by-functions.html
280 'STRCMP',
281 'STR_TO_DATE',
282 'SUBDATE',
283 'SUBSTR',
284 'SUBSTRING',
285 'SUBSTRING_INDEX',
286 'SUBTIME',
287 'SUM',
288 'SYMDIFFERENCE', // SymDifference()
289 'SYSDATE',
290 'SYSTEM_USER',
291 'TAN',
292 'TIME',
293 'TIMEDIFF',
294 'TIMESTAMP',
295 'TIMESTAMPADD',
296 'TIMESTAMPDIFF',
297 'TIME_FORMAT',
298 'TIME_TO_SEC',
299 'TOUCHES', // Touches()
300 'TO_DAYS',
301 'TRIM',
302 'TRUNCATE', // mathematical-functions.html
303 'UCASE',
304 'UNCOMPRESS', // string-functions.html
305 'UNCOMPRESSED_LENGTH', // string-functions.html
306 'UNHEX', // string-functions.html
307 'UNIQUE_USERS',
308 'UNIX_TIMESTAMP',
309 'UPDATEXML', // UpdateXML() xml-functions.html
310 'UPPER',
311 'USER',
312 'UTC_DATE',
313 'UTC_TIME',
314 'UTC_TIMESTAMP',
315 'UUID', // miscellaneous-functions.html
316 'VARIANCE', // group-by-functions.html
317 'VAR_POP', // group-by-functions.html
318 'VAR_SAMP', // group-by-functions.html
319 'VERSION',
320 'WEEK',
321 'WEEKDAY',
322 'WEEKOFYEAR',
323 'WITHIN', // Within()
324 'X', // point-property-functions.html
325 'Y', // point-property-functions.html
326 'YEAR',
327 'YEARWEEK'
330 * $PMA_SQPdata_function_name_cnt = count($PMA_SQPdata_function_name);
332 * @global integer MySQL attributes count
334 $PMA_SQPdata_function_name_cnt = 299;
337 * DEBUG
338 $test_PMA_SQPdata_function_name = $PMA_SQPdata_function_name;
339 sort($PMA_SQPdata_function_name);
340 if ($PMA_SQPdata_function_name != $test_PMA_SQPdata_function_name) {
341 echo 'sort properly like this<pre>';
342 print_r($PMA_SQPdata_function_name);
343 echo '</pre>';
348 * @global array MySQL attributes
350 $PMA_SQPdata_column_attrib = array (
351 'ARCHIVE', // Engine
352 'ASCII',
353 'AUTO_INCREMENT',
354 'BDB', // Engine
355 'BERKELEYDB', // Engine alias BDB
356 'BINARY',
357 'BLACKHOLE', // Engine
358 'CSV', // Engine
359 'DEFAULT',
360 'EXAMPLE', // Engine
361 'FEDERATED', // Engine
362 'HEAP', // Engine
363 'INNOBASE', // Engine alias InnoDB
364 'INNODB', // Engine InnoDB
365 'ISAM', // Engine
366 'MEMORY', // Engine alias HEAP, but preferred
367 'MERGE', // Engine
368 'MRG_ISAM', // Engine
369 'MRG_MYISAM', // Engine alias MERGE
370 'MYISAM', // Engine MyISAM
371 'NATIONAL',
372 'NDB', // Engine alias NDBCLUSTER
373 'NDBCLUSTER', // Engine
374 'PRECISION',
375 'UNDEFINED',
376 'UNICODE',
377 'UNSIGNED',
378 'VARYING',
379 'ZEROFILL'
382 * $PMA_SQPdata_column_attrib_cnt = count($PMA_SQPdata_column_attrib);
384 * @global integer MySQL attributes count
386 $PMA_SQPdata_column_attrib_cnt = 29;
389 * words that are reserved by MySQL and may not be used as identifiers without quotes
391 * @see http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html
393 * @global array MySQL reserved words
395 $PMA_SQPdata_reserved_word = array (
396 'ACCESSIBLE', // 5.1
397 'ACTION',
398 'ADD',
399 'AFTER',
400 'AGAINST',
401 'AGGREGATE',
402 'ALGORITHM',
403 'ALL',
404 'ALTER',
405 'ANALYSE',
406 'ANALYZE',
407 'AND',
408 'AS',
409 'ASC',
410 'AUTOCOMMIT',
411 'AUTO_INCREMENT',
412 'AVG_ROW_LENGTH',
413 'BACKUP',
414 'BEGIN',
415 'BETWEEN',
416 'BINLOG',
417 'BOTH',
418 'BY',
419 'CASCADE',
420 'CASE',
421 'CHANGE',
422 'CHANGED',
423 'CHARSET',
424 'CHECK',
425 'CHECKSUM',
426 'COLLATE',
427 'COLLATION',
428 'COLUMN',
429 'COLUMNS',
430 'COMMENT',
431 'COMMIT',
432 'COMMITTED',
433 'COMPRESSED',
434 'CONCURRENT',
435 'CONSTRAINT',
436 'CONVERT',
437 'CREATE',
438 'CROSS',
439 'CURRENT_TIMESTAMP',
440 'DATA',
441 'DATABASE',
442 'DATABASES',
443 'DAY',
444 'DAY_HOUR',
445 'DAY_MINUTE',
446 'DAY_SECOND',
447 'DEFINER',
448 'DELAYED',
449 'DELAY_KEY_WRITE',
450 'DELETE',
451 'DESC',
452 'DESCRIBE',
453 'DISTINCT',
454 'DISTINCTROW',
455 'DIV',
456 'DO',
457 'DROP',
458 'DUMPFILE',
459 'DUPLICATE',
460 'DYNAMIC',
461 'ELSE',
462 'ENCLOSED',
463 'END',
464 'ENGINE',
465 'ENGINES',
466 'ESCAPE',
467 'ESCAPED',
468 'EVENTS',
469 'EXECUTE',
470 'EXISTS',
471 'EXPLAIN',
472 'EXTENDED',
473 'FAST',
474 'FIELDS',
475 'FILE',
476 'FIRST',
477 'FIXED',
478 'FLUSH',
479 'FOR',
480 'FORCE',
481 'FOREIGN',
482 'FROM',
483 'FULL',
484 'FULLTEXT',
485 'FUNCTION',
486 'GEMINI',
487 'GEMINI_SPIN_RETRIES',
488 'GLOBAL',
489 'GRANT',
490 'GRANTS',
491 'GROUP',
492 'HAVING',
493 'HEAP',
494 'HIGH_PRIORITY',
495 'HOSTS',
496 'HOUR',
497 'HOUR_MINUTE',
498 'HOUR_SECOND',
499 'IDENTIFIED',
500 'IF',
501 'IGNORE',
502 'IN',
503 'INDEX',
504 'INDEXES',
505 'INFILE',
506 'INNER',
507 'INSERT',
508 'INSERT_ID',
509 'INSERT_METHOD',
510 'INTERVAL',
511 'INTO',
512 'IS',
513 'ISOLATION',
514 'JOIN',
515 'KEY',
516 'KEYS',
517 'KILL',
518 'LAST_INSERT_ID',
519 'LEADING',
520 'LEFT',
521 'LEVEL',
522 'LIKE',
523 'LIMIT',
524 'LINEAR', // 5.1
525 'LINES',
526 'LOAD',
527 'LOCAL',
528 'LOCK',
529 'LOCKS',
530 'LOGS',
531 'LOW_PRIORITY',
532 'MASTER',
533 'MASTER_CONNECT_RETRY',
534 'MASTER_HOST',
535 'MASTER_LOG_FILE',
536 'MASTER_LOG_POS',
537 'MASTER_PASSWORD',
538 'MASTER_PORT',
539 'MASTER_USER',
540 'MATCH',
541 'MAX_CONNECTIONS_PER_HOUR',
542 'MAX_QUERIES_PER_HOUR',
543 'MAX_ROWS',
544 'MAX_UPDATES_PER_HOUR',
545 'MAX_USER_CONNECTIONS',
546 'MEDIUM',
547 'MERGE',
548 'MIN_ROWS',
549 'MINUTE',
550 'MINUTE_SECOND',
551 'MODE',
552 'MODIFY',
553 'MONTH',
554 'MRG_MYISAM',
555 'MYISAM',
556 'NAMES',
557 'NATURAL',
558 // 'NO' is not allowed in SQL-99 but is allowed in MySQL
559 //'NO',
560 'NOT',
561 'NULL',
562 'OFFSET',
563 'ON',
564 'OPEN',
565 'OPTIMIZE',
566 'OPTION',
567 'OPTIONALLY',
568 'OR',
569 'ORDER',
570 'OUTER',
571 'OUTFILE',
572 'PACK_KEYS',
573 'PARTIAL',
574 'PASSWORD',
575 'PRIMARY',
576 'PRIVILEGES',
577 'PROCEDURE',
578 'PROCESS',
579 'PROCESSLIST',
580 'PURGE',
581 'QUICK',
582 'RAID0',
583 'RAID_CHUNKS',
584 'RAID_CHUNKSIZE',
585 'RAID_TYPE',
586 'RANGE', // 5.1
587 'READ',
588 'READ_ONLY', // 5.1
589 'READ_WRITE', // 5.1
590 'REFERENCES',
591 'REGEXP',
592 'RELOAD',
593 'RENAME',
594 'REPAIR',
595 'REPEATABLE',
596 'REPLACE',
597 'REPLICATION',
598 'RESET',
599 'RESTORE',
600 'RESTRICT',
601 'RETURN',
602 'RETURNS',
603 'REVOKE',
604 'RIGHT',
605 'RLIKE',
606 'ROLLBACK',
607 'ROW',
608 'ROW_FORMAT',
609 'ROWS',
610 'SECOND',
611 'SELECT',
612 'SEPARATOR',
613 'SERIALIZABLE',
614 'SESSION',
615 'SHARE',
616 'SHOW',
617 'SHUTDOWN',
618 'SLAVE',
619 'SONAME',
620 'SOUNDS', // string-functions.html
621 'SQL_AUTO_IS_NULL',
622 'SQL_BIG_RESULT',
623 'SQL_BIG_SELECTS',
624 'SQL_BIG_TABLES',
625 'SQL_BUFFER_RESULT',
626 'SQL_CACHE',
627 'SQL_CALC_FOUND_ROWS',
628 'SQL_LOG_BIN',
629 'SQL_LOG_OFF',
630 'SQL_LOG_UPDATE',
631 'SQL_LOW_PRIORITY_UPDATES',
632 'SQL_MAX_JOIN_SIZE',
633 'SQL_NO_CACHE',
634 'SQL_QUOTE_SHOW_CREATE',
635 'SQL_SAFE_UPDATES',
636 'SQL_SELECT_LIMIT',
637 'SQL_SLAVE_SKIP_COUNTER',
638 'SQL_SMALL_RESULT',
639 'SQL_WARNINGS',
640 'START',
641 'STARTING',
642 'STATUS',
643 'STOP',
644 'STORAGE',
645 'STRAIGHT_JOIN',
646 'STRING',
647 'STRIPED',
648 'SUPER',
649 'TABLE',
650 'TABLES',
651 'TEMPORARY',
652 'TERMINATED',
653 'THEN',
654 'TO',
655 'TRAILING',
656 'TRUNCATE',
657 'TYPE',
658 'TYPES',
659 'UNCOMMITTED',
660 'UNION',
661 'UNIQUE',
662 'UNLOCK',
663 'UPDATE',
664 'USAGE',
665 'USE',
666 'USING',
667 'VALUES',
668 'VARIABLES',
669 'VIEW',
670 'WHEN',
671 'WHERE',
672 'WITH',
673 'WORK',
674 'WRITE',
675 'XOR',
676 'YEAR_MONTH'
679 * $PMA_SQPdata_reserved_word_cnt = count($PMA_SQPdata_reserved_word);
681 * @global integer MySQL reserved words count
683 $PMA_SQPdata_reserved_word_cnt = 279;
686 * words forbidden to be used as column or table name wihtout quotes
687 * as seen in http://dev.mysql.com/doc/mysql/en/reserved-words.html
689 * @global array MySQL forbidden words
691 $PMA_SQPdata_forbidden_word = array (
692 'ACCESSIBLE', // 5.1
693 'ACTION',
694 'ADD',
695 'AFTER',
696 'AGAINST',
697 'AGGREGATE',
698 'ALGORITHM',
699 'ALL',
700 'ALTER',
701 'ANALYZE',
702 'AND',
703 'ANY',
704 'AS',
705 'ASC',
706 'ASCII',
707 'ASENSITIVE',
708 'AUTO_INCREMENT',
709 'AVG',
710 'AVG_ROW_LENGTH',
711 'BACKUP',
712 'BDB',
713 'BEFORE',
714 'BEGIN',
715 'BERKELEYDB',
716 'BETWEEN',
717 'BIGINT',
718 'BINARY',
719 'BINLOG',
720 'BIT',
721 'BLOB',
722 'BOOL',
723 'BOOLEAN',
724 'BOTH',
725 'BTREE',
726 'BY',
727 'BYTE',
728 'CACHE',
729 'CALL',
730 'CASCADE',
731 'CASCADED',
732 'CASE',
733 'CHAIN',
734 'CHANGE',
735 'CHANGED',
736 'CHAR',
737 'CHARACTER',
738 'CHARSET',
739 'CHECK',
740 'CHECKSUM',
741 'CIPHER',
742 'CLOSE',
743 'COLLATE',
744 'COLLATION',
745 'COLUMN',
746 'COLUMNS',
747 'COMMENT',
748 'COMMIT',
749 'COMMITTED',
750 'COMPACT',
751 'COMPRESSED',
752 'CONCURRENT',
753 'CONDITION',
754 'CONNECTION',
755 'CONSISTENT',
756 'CONSTRAINT',
757 'CONTAINS',
758 'CONTINUE',
759 'CONVERT',
760 'CREATE',
761 'CROSS',
762 'CUBE',
763 'CURRENT_DATE',
764 'CURRENT_TIME',
765 'CURRENT_TIMESTAMP',
766 'CURRENT_USER',
767 'CURSOR',
768 'DATA',
769 'DATABASE',
770 'DATABASES',
771 'DATE',
772 'DATETIME',
773 'DAY',
774 'DAY_HOUR',
775 'DAY_MICROSECOND',
776 'DAY_MINUTE',
777 'DAY_SECOND',
778 'DEALLOCATE',
779 'DEC',
780 'DECIMAL',
781 'DECLARE',
782 'DEFAULT',
783 'DEFINER',
784 'DELAYED',
785 'DELAY_KEY_WRITE',
786 'DELETE',
787 'DESC',
788 'DESCRIBE',
789 'DES_KEY_FILE',
790 'DETERMINISTIC',
791 'DIRECTORY',
792 'DISABLE',
793 'DISCARD',
794 'DISTINCT',
795 'DISTINCTROW',
796 'DIV',
797 'DO',
798 'DOUBLE',
799 'DROP',
800 'DUAL',
801 'DUMPFILE',
802 'DUPLICATE',
803 'DYNAMIC',
804 'EACH',
805 'ELSE',
806 'ELSEIF',
807 'ENABLE',
808 'ENCLOSED',
809 'END',
810 'ENGINE',
811 'ENGINES',
812 'ENUM',
813 'ERRORS',
814 'ESCAPE',
815 'ESCAPED',
816 'EVENTS',
817 'EXECUTE',
818 'EXISTS',
819 'EXIT',
820 'EXPANSION',
821 'EXPLAIN',
822 'EXTENDED',
823 'FALSE',
824 'FAST',
825 'FETCH',
826 'FIELDS',
827 'FILE',
828 'FIRST',
829 'FIXED',
830 'FLOAT',
831 'FLOAT4',
832 'FLOAT8',
833 'FLUSH',
834 'FOR',
835 'FORCE',
836 'FOREIGN',
837 'FOUND',
838 'FRAC_SECOND',
839 'FROM',
840 'FULL',
841 'FULLTEXT',
842 'FUNCTION',
843 'GEOMETRY',
844 'GEOMETRYCOLLECTION',
845 'GET_FORMAT',
846 'GLOBAL',
847 'GOTO',
848 'GRANT',
849 'GRANTS',
850 'GROUP',
851 'HANDLER',
852 'HASH',
853 'HAVING',
854 'HELP',
855 'HIGH_PRIORITY',
856 'HOSTS',
857 'HOUR',
858 'HOUR_MICROSECOND',
859 'HOUR_MINUTE',
860 'HOUR_SECOND',
861 'IDENTIFIED',
862 'IF',
863 'IGNORE',
864 'IMPORT',
865 'IN',
866 'INDEX',
867 'INDEXES',
868 'INFILE',
869 'INNER',
870 'INNOBASE',
871 'INNODB',
872 'INOUT',
873 'INSENSITIVE',
874 'INSERT',
875 'INSERT_METHOD',
876 'INT',
877 'INT1',
878 'INT2',
879 'INT3',
880 'INT4',
881 'INT8',
882 'INTEGER',
883 'INTERVAL',
884 'INTO',
885 'INVOKER',
886 'IO_THREAD',
887 'IS',
888 'ISOLATION',
889 'ISSUER',
890 'ITERATE',
891 'JOIN',
892 'KEY',
893 'KEYS',
894 'KILL',
895 'LABEL',
896 'LANGUAGE',
897 'LAST',
898 'LEADING',
899 'LEAVE',
900 'LEAVES',
901 'LEFT',
902 'LEVEL',
903 'LIKE',
904 'LIMIT',
905 'LINEAR', // 5.1
906 'LINES',
907 'LINESTRING',
908 'LOAD',
909 'LOCAL',
910 'LOCALTIME',
911 'LOCALTIMESTAMP',
912 'LOCK',
913 'LOCKS',
914 'LOGS',
915 'LONG',
916 'LONGBLOB',
917 'LONGTEXT',
918 'LOOP',
919 'LOW_PRIORITY',
920 'MASTER',
921 'MASTER_CONNECT_RETRY',
922 'MASTER_HOST',
923 'MASTER_LOG_FILE',
924 'MASTER_LOG_POS',
925 'MASTER_PASSWORD',
926 'MASTER_PORT',
927 'MASTER_SERVER_ID',
928 'MASTER_SSL',
929 'MASTER_SSL_CA',
930 'MASTER_SSL_CAPATH',
931 'MASTER_SSL_CERT',
932 'MASTER_SSL_CIPHER',
933 'MASTER_SSL_KEY',
934 'MASTER_USER',
935 'MATCH',
936 'MAX_CONNECTIONS_PER_HOUR',
937 'MAX_QUERIES_PER_HOUR',
938 'MAX_ROWS',
939 'MAX_UPDATES_PER_HOUR',
940 'MAX_USER_CONNECTIONS',
941 'MEDIUM',
942 'MEDIUMBLOB',
943 'MEDIUMINT',
944 'MEDIUMTEXT',
945 'MERGE',
946 'MICROSECOND',
947 'MIDDLEINT',
948 'MIGRATE',
949 'MINUTE',
950 'MINUTE_MICROSECOND',
951 'MINUTE_SECOND',
952 'MIN_ROWS',
953 'MOD',
954 'MODE',
955 'MODIFIES',
956 'MODIFY',
957 'MONTH',
958 'MULTILINESTRING',
959 'MULTIPOINT',
960 'MULTIPOLYGON',
961 'MUTEX',
962 'NAME',
963 'NAMES',
964 'NATIONAL',
965 'NATURAL',
966 'NCHAR',
967 'NDB',
968 'NDBCLUSTER',
969 'NEW',
970 'NEXT',
971 'NO',
972 'NONE',
973 'NOT',
974 'NO_WRITE_TO_BINLOG',
975 'NULL',
976 'NUMERIC',
977 'NVARCHAR',
978 'OFFSET',
979 'OLD_PASSWORD',
980 'ON',
981 'ONE',
982 'ONE_SHOT',
983 'OPEN',
984 'OPTIMIZE',
985 'OPTION',
986 'OPTIONALLY',
987 'OR',
988 'ORDER',
989 'OUT',
990 'OUTER',
991 'OUTFILE',
992 'PACK_KEYS',
993 'PARTIAL',
994 'PASSWORD',
995 'PHASE',
996 'POINT',
997 'POLYGON',
998 'PRECISION',
999 'PREPARE',
1000 'PREV',
1001 'PRIMARY',
1002 'PRIVILEGES',
1003 'PROCEDURE',
1004 'PROCESSLIST',
1005 'PURGE',
1006 'QUARTER',
1007 'QUERY',
1008 'QUICK',
1009 'RAID0',
1010 'RAID_CHUNKS',
1011 'RAID_CHUNKSIZE',
1012 'RAID_TYPE',
1013 'RANGE', // 5.1
1014 'READ',
1015 'READ_ONLY', // 5.1
1016 'READ_WRITE', // 5.1
1017 'READS',
1018 'REAL',
1019 'RECOVER',
1020 'REDUNDANT',
1021 'REFERENCES',
1022 'REGEXP',
1023 'RELAY_LOG_FILE',
1024 'RELAY_LOG_POS',
1025 'RELAY_THREAD',
1026 'RELEASE',
1027 'RELOAD',
1028 'RENAME',
1029 'REPAIR',
1030 'REPEAT',
1031 'REPEATABLE',
1032 'REPLACE',
1033 'REPLICATION',
1034 'REQUIRE',
1035 'RESET',
1036 'RESTORE',
1037 'RESTRICT',
1038 'RESUME',
1039 'RETURN',
1040 'RETURNS',
1041 'REVOKE',
1042 'RIGHT',
1043 'RLIKE',
1044 'ROLLBACK',
1045 'ROLLUP',
1046 'ROUTINE',
1047 'ROW',
1048 'ROWS',
1049 'ROW_FORMAT',
1050 'RTREE',
1051 'SAVEPOINT',
1052 'SCHEMA',
1053 'SCHEMAS',
1054 'SECOND',
1055 'SECOND_MICROSECOND',
1056 'SECURITY',
1057 'SELECT',
1058 'SENSITIVE',
1059 'SEPARATOR',
1060 'SERIAL',
1061 'SERIALIZABLE',
1062 'SESSION',
1063 'SET',
1064 'SHARE',
1065 'SHOW',
1066 'SHUTDOWN',
1067 'SIGNED',
1068 'SIMPLE',
1069 'SLAVE',
1070 'SMALLINT',
1071 'SNAPSHOT',
1072 'SOME',
1073 'SONAME',
1074 'SOUNDS',
1075 'SPATIAL',
1076 'SPECIFIC',
1077 'SQL',
1078 'SQLEXCEPTION',
1079 'SQLSTATE',
1080 'SQLWARNING',
1081 'SQL_BIG_RESULT',
1082 'SQL_BUFFER_RESULT',
1083 'SQL_CACHE',
1084 'SQL_CALC_FOUND_ROWS',
1085 'SQL_NO_CACHE',
1086 'SQL_SMALL_RESULT',
1087 'SQL_THREAD',
1088 'SQL_TSI_DAY',
1089 'SQL_TSI_FRAC_SECOND',
1090 'SQL_TSI_HOUR',
1091 'SQL_TSI_MINUTE',
1092 'SQL_TSI_MONTH',
1093 'SQL_TSI_QUARTER',
1094 'SQL_TSI_SECOND',
1095 'SQL_TSI_WEEK',
1096 'SQL_TSI_YEAR',
1097 'SSL',
1098 'START',
1099 'STARTING',
1100 'STATUS',
1101 'STOP',
1102 'STORAGE',
1103 'STRAIGHT_JOIN',
1104 'STRING',
1105 'STRIPED',
1106 'SUBJECT',
1107 'SUPER',
1108 'SUSPEND',
1109 'TABLE',
1110 'TABLES',
1111 'TABLESPACE',
1112 'TEMPORARY',
1113 'TEMPTABLE',
1114 'TERMINATED',
1115 'TEXT',
1116 'THEN',
1117 'TIME',
1118 'TIMESTAMP',
1119 'TIMESTAMPADD',
1120 'TIMESTAMPDIFF',
1121 'TINYBLOB',
1122 'TINYINT',
1123 'TINYTEXT',
1124 'TO',
1125 'TRAILING',
1126 'TRANSACTION',
1127 'TRIGGER',
1128 'TRIGGERS',
1129 'TRUE',
1130 'TRUNCATE',
1131 'TYPE',
1132 'TYPES',
1133 'UNCOMMITTED',
1134 'UNDEFINED',
1135 'UNDO',
1136 'UNICODE',
1137 'UNION',
1138 'UNIQUE',
1139 'UNKNOWN',
1140 'UNLOCK',
1141 'UNSIGNED',
1142 'UNTIL',
1143 'UPDATE',
1144 'USAGE',
1145 'USE',
1146 'USER',
1147 'USER_RESOURCES',
1148 'USE_FRM',
1149 'USING',
1150 'UTC_DATE',
1151 'UTC_TIME',
1152 'UTC_TIMESTAMP',
1153 'VALUE',
1154 'VALUES',
1155 'VARBINARY',
1156 'VARCHAR',
1157 'VARCHARACTER',
1158 'VARIABLES',
1159 'VARYING',
1160 'VIEW',
1161 'WARNINGS',
1162 'WEEK',
1163 'WHEN',
1164 'WHERE',
1165 'WHILE',
1166 'WITH',
1167 'WORK',
1168 'WRITE',
1169 'X509',
1170 'XA',
1171 'XOR',
1172 'YEAR',
1173 'YEAR_MONTH',
1174 'ZEROFILL'
1177 * count($PMA_SQPdata_forbidden_word);
1179 * @global integer MySQL forbidden words count
1181 $PMA_SQPdata_forbidden_word_cnt = 483;
1184 * the MySQL column/data types
1186 * @see http://dev.mysql.com/doc/refman/5.1/en/data-types.html
1187 * @see http://dev.mysql.com/doc/refman/5.1/en/mysql-spatial-datatypes.html
1189 * @global array MySQL column types
1191 $PMA_SQPdata_column_type = array (
1192 'BIGINT',
1193 'BINARY',
1194 'BIT',
1195 'BLOB',
1196 'BOOL',
1197 'BOOLEAN', // numeric-type-overview.html
1198 'CHAR',
1199 'CHARACTER',
1200 'DATE',
1201 'DATETIME',
1202 'DEC',
1203 'DECIMAL',
1204 'DOUBLE',
1205 'ENUM',
1206 'FLOAT',
1207 'FLOAT4',
1208 'FLOAT8',
1209 'GEOMETRY', // spatial
1210 'GEOMETRYCOLLECTION', // spatial
1211 'INT',
1212 'INT1',
1213 'INT2',
1214 'INT3',
1215 'INT4',
1216 'INT8',
1217 'INTEGER',
1218 'LINESTRING', // spatial
1219 'LONG',
1220 'LONGBLOB',
1221 'LONGTEXT',
1222 'MEDIUMBLOB',
1223 'MEDIUMINT',
1224 'MEDIUMTEXT',
1225 'MIDDLEINT',
1226 'MULTILINESTRING', // spatial
1227 'MULTIPOINT', // spatial
1228 'MULTIPOLYGON', // spatial
1229 'NCHAR',
1230 'NUMERIC',
1231 'POINT', // spatial
1232 'POLYGON', // spatial
1233 'REAL',
1234 'SERIAL', // alsias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
1235 'SET',
1236 'SMALLINT',
1237 'TEXT',
1238 'TIME',
1239 'TIMESTAMP',
1240 'TINYBLOB',
1241 'TINYINT',
1242 'TINYTEXT',
1243 'VARBINARY',
1244 'VARCHAR',
1245 'YEAR'
1248 * $PMA_SQPdata_column_type_cnt = count($PMA_SQPdata_column_type);
1250 * @global integer MySQL column types count
1252 $PMA_SQPdata_column_type_cnt = 54;
1255 * check counts
1256 foreach ($GLOBALS as $n => $a) {
1257 echo is_array($a) ? $n . ': ' . count($a) . '<br />' : '';