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