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 (
32 'AREA', // polygon-property-functions.html
44 'BIT_XOR', // group-by-functions.html
45 'Boundary', // general-geometry-property-functions.html
49 'CENTROID', // multipolygon-property-functions.html
50 'CHAR', // string-functions.html
52 'CHARSET', // information-functions.html
55 'COERCIBILITY', // information-functions.html
56 'COLLATION', // information-functions.html
57 'COMPRESS', // string-functions.html
67 'CRC32', // mathematical-functions.html
75 'DATE', // date-and-time-functions.html
76 'DATEDIFF', // date-and-time-functions.html
87 'DEFAULT', // miscellaneous-functions.html
91 'DIMENSION', // general-geometry-property-functions.html
95 'ENDPOINT', // linestring-property-functions.html
96 'ENVELOPE', // general-geometry-property-functions.html
99 'EXTERIORRING', // polygon-property-functions.html
108 'GEOMETRYN', // geometrycollection-property-functions.html
109 'GEOMETRYTYPE', // general-geometry-property-functions.html
112 'GLENGTH', // linestring-property-functions.html
115 'GROUP_UNIQUE_USERS',
118 'IF', //control-flow-functions.html
122 'INSERT', // string-functions.html
124 'INTERIORRINGN', // polygon-property-functions.html
126 'ISCLOSED', // multilinestring-property-functions.html
127 'ISEMPTY', // general-geometry-property-functions.html
129 'ISRING', // linestring-property-functions.html
130 'ISSIMPLE', // general-geometry-property-functions.html
132 'IS_USED_LOCK', // miscellaneous-functions.html
165 'NUMGEOMETRIES', // geometrycollection-property-functions.html
166 'NUMINTERIORRINGS', // polygon-property-functions.html
167 'NUMPOINTS', // linestring-property-functions.html
176 'POINTN', // linestring-property-functions.html
177 'POINTONSURFACE', // multipolygon-property-functions.html
187 'REPLACE', // string-functions.html
191 'ROW_COUNT', // information-functions.html
194 'SCHEMA', // information-functions.html
202 'SLEEP', // miscellaneous-functions.html
206 'SRID', // general-geometry-property-functions.html
207 'STARTPOINT', // linestring-property-functions.html
210 'STDDEV_POP', // group-by-functions.html
211 'STDDEV_SAMP', // group-by-functions.html
231 'TRUNCATE', // mathematical-functions.html
233 'UNCOMPRESS', // string-functions.html
234 'UNCOMPRESSED_LENGTH', // string-functions.html
235 'UNHEX', // string-functions.html
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
251 'X', // point-property-functions.html
252 'Y', // point-property-functions.html
256 //$PMA_SQPdata_function_name_cnt = count($PMA_SQPdata_function_name);
257 $PMA_SQPdata_function_name_cnt = 229;
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);
268 $PMA_SQPdata_column_attrib = array (
273 'BERKELEYDB', // Engine alias BDB
275 'BLACKHOLE', // Engine
279 'FEDERATED', // Engine
281 'INNOBASE', // Engine alias InnoDB
282 'INNODB', // Engine InnoDB
284 'MEMORY', // Engine alias HEAP, but preferred
286 'MRG_ISAM', // Engine
287 'MRG_MYISAM', // Engine alias MERGE
288 'MYISAM', // Engine MyISAM
290 'NDB', // Engine alias NDBCLUSTER
291 'NDBCLUSTER', // Engine
299 //$PMA_SQPdata_column_attrib_cnt = count($PMA_SQPdata_column_attrib);
300 $PMA_SQPdata_column_attrib_cnt = 29;
302 $PMA_SQPdata_reserved_word = array (
393 'GEMINI_SPIN_RETRIES',
438 'MASTER_CONNECT_RETRY',
446 'MAX_CONNECTIONS_PER_HOUR',
447 'MAX_QUERIES_PER_HOUR',
449 'MAX_UPDATES_PER_HOUR',
450 'MAX_USER_CONNECTIONS',
463 // 'NO' is not allowed in SQL-99 but is allowed in MySQL
522 'SOUNDS', // string-functions.html
529 'SQL_CALC_FOUND_ROWS',
533 'SQL_LOW_PRIORITY_UPDATES',
536 'SQL_QUOTE_SHOW_CREATE',
539 'SQL_SLAVE_SKIP_COUNTER',
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 (
738 'GEOMETRYCOLLECTION',
814 'MASTER_CONNECT_RETRY',
829 'MAX_CONNECTIONS_PER_HOUR',
830 'MAX_QUERIES_PER_HOUR',
832 'MAX_UPDATES_PER_HOUR',
833 'MAX_USER_CONNECTIONS',
843 'MINUTE_MICROSECOND',
867 'NO_WRITE_TO_BINLOG',
945 'SECOND_MICROSECOND',
974 'SQL_CALC_FOUND_ROWS',
979 'SQL_TSI_FRAC_SECOND',
1066 // echo count($PMA_SQPdata_forbidden_word);
1067 $PMA_SQPdata_forbidden_word_cnt = 479;
1069 $PMA_SQPdata_column_type = array (
1075 'BOOLEAN', // numeric-type-overview.html
1104 'SERIAL', //BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE
1117 //$PMA_SQPdata_column_type_cnt = count($PMA_SQPdata_column_type);
1118 $PMA_SQPdata_column_type_cnt = 46;
1122 foreach ( $GLOBALS as $n => $a ) {
1123 echo is_array( $a ) ? $n . ': ' . count( $a ) . '<br />' : '';