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