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