PageRenderTime 48ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 1ms

/phpmyadmin/libraries/sqlparser.data.php

https://bitbucket.org/adarshj/convenient_website
PHP | 1499 lines | 1438 code | 9 blank | 52 comment | 2 complexity | be8c13aac80f1504499ebeb19c7a0504 MD5 | raw file
Possible License(s): Apache-2.0, MPL-2.0-no-copyleft-exception, LGPL-2.1, BSD-2-Clause, GPL-2.0, LGPL-3.0
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * SQL Parser Matching Data
  5. *
  6. * Copyright 2002 Robin Johnson <robbat2@users.sourceforge.net>
  7. * http://www.orbis-terrarum.net/?l=people.robbat2
  8. *
  9. * This data is used by the SQL Parser to recognize keywords
  10. *
  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.
  13. *
  14. * It's easier to use only uppercase for proper sorting. In case of
  15. * doubt, use the test case to verify.
  16. *
  17. * @package PhpMyAdmin
  18. */
  19. if (! defined('PHPMYADMIN')) {
  20. exit;
  21. }
  22. if (! isset($GLOBALS['sql_delimiter'])) {
  23. $GLOBALS['sql_delimiter'] = ';';
  24. }
  25. /**
  26. * @global array MySQL function names
  27. */
  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. 'MPOINTFROMTEXT', // MPointFromText()
  207. 'MPOINTFROMWKB', // MPointFromWKB()
  208. 'MPOLYFROMTEXT', // MPolyFromText()
  209. 'MPOLYFROMWKB', // MPolyFromWKB()
  210. 'MULTILINESTRING', // MultiLineString()
  211. 'MULTILINESTRINGFROMTEXT', // MultiLineStringFromText()
  212. 'MULTILINESTRINGFROMWKB', // MultiLineStringFromWKB()
  213. 'MULTIPOINT', // MultiPoint()
  214. 'MULTIPOINTFROMTEXT', // MultiPointFromText()
  215. 'MULTIPOINTFROMWKB', // MultiPointFromWKB()
  216. 'MULTIPOLYGON', // MultiPolygon()
  217. 'MULTIPOLYGONFROMTEXT', // MultiPolygonFromText()
  218. 'MULTIPOLYGONFROMWKB', // MultiPolygonFromWKB()
  219. 'NAME_CONST', // NAME_CONST()
  220. 'NOW', // NOW()
  221. 'NULLIF',
  222. 'NUMGEOMETRIES', // NumGeometries() geometrycollection-property-functions.html
  223. 'NUMINTERIORRINGS', // NumInteriorRings() polygon-property-functions.html
  224. 'NUMPOINTS', // NumPoints() linestring-property-functions.html
  225. 'OCT',
  226. 'OCTET_LENGTH',
  227. 'OLD_PASSWORD',
  228. 'ORD',
  229. 'OVERLAPS', // Overlaps()
  230. 'PASSWORD',
  231. 'PERIOD_ADD',
  232. 'PERIOD_DIFF',
  233. 'PI',
  234. 'POINT', // Point()
  235. 'POINTFROMTEXT', // PointFromText()
  236. 'POINTFROMWKB', // PointFromWKB()
  237. 'POINTN', // PointN() inestring-property-functions.html
  238. 'POINTONSURFACE', // PointOnSurface() multipolygon-property-functions.html
  239. 'POLYFROMTEXT', // PolyFromText()
  240. 'POLYFROMWKB', // PolyFromWKB()
  241. 'POLYGON', // Polygon()
  242. 'POLYGONFROMTEXT', // PolygonFromText()
  243. 'POLYGONFROMWKB', // PolygonFromWKB()
  244. 'POSITION',
  245. 'POW',
  246. 'POWER',
  247. 'QUARTER',
  248. 'QUOTE',
  249. 'RADIANS',
  250. 'RAND',
  251. 'RELATED', // Related()
  252. 'RELEASE_LOCK',
  253. 'REPEAT',
  254. 'REPLACE', // string-functions.html
  255. 'REVERSE',
  256. 'RIGHT',
  257. 'ROUND',
  258. 'ROW_COUNT', // information-functions.html
  259. 'RPAD',
  260. 'RTRIM',
  261. 'SCHEMA', // information-functions.html
  262. 'SECOND',
  263. 'SEC_TO_TIME',
  264. 'SESSION_USER',
  265. 'SHA',
  266. 'SHA1',
  267. 'SIGN',
  268. 'SIN',
  269. 'SLEEP', // miscellaneous-functions.html
  270. 'SOUNDEX',
  271. 'SPACE',
  272. 'SQRT',
  273. 'SRID', // general-geometry-property-functions.html
  274. 'STARTPOINT', // StartPoint() linestring-property-functions.html
  275. 'STD',
  276. 'STDDEV',
  277. 'STDDEV_POP', // group-by-functions.html
  278. 'STDDEV_SAMP', // group-by-functions.html
  279. 'STRCMP',
  280. 'STR_TO_DATE',
  281. 'SUBDATE',
  282. 'SUBSTR',
  283. 'SUBSTRING',
  284. 'SUBSTRING_INDEX',
  285. 'SUBTIME',
  286. 'SUM',
  287. 'SYMDIFFERENCE', // SymDifference()
  288. 'SYSDATE',
  289. 'SYSTEM_USER',
  290. 'TAN',
  291. 'TIME',
  292. 'TIMEDIFF',
  293. 'TIMESTAMP',
  294. 'TIMESTAMPADD',
  295. 'TIMESTAMPDIFF',
  296. 'TIME_FORMAT',
  297. 'TIME_TO_SEC',
  298. 'TOUCHES', // Touches()
  299. 'TO_DAYS',
  300. 'TRIM',
  301. 'TRUNCATE', // mathematical-functions.html
  302. 'UCASE',
  303. 'UNCOMPRESS', // string-functions.html
  304. 'UNCOMPRESSED_LENGTH', // string-functions.html
  305. 'UNHEX', // string-functions.html
  306. 'UNIQUE_USERS',
  307. 'UNIX_TIMESTAMP',
  308. 'UPDATEXML', // UpdateXML() xml-functions.html
  309. 'UPPER',
  310. 'USER',
  311. 'UTC_DATE',
  312. 'UTC_TIME',
  313. 'UTC_TIMESTAMP',
  314. 'UUID', // miscellaneous-functions.html
  315. 'VARIANCE', // group-by-functions.html
  316. 'VAR_POP', // group-by-functions.html
  317. 'VAR_SAMP', // group-by-functions.html
  318. 'VERSION',
  319. 'WEEK',
  320. 'WEEKDAY',
  321. 'WEEKOFYEAR',
  322. 'WITHIN', // Within()
  323. 'X', // point-property-functions.html
  324. 'Y', // point-property-functions.html
  325. 'YEAR',
  326. 'YEARWEEK'
  327. );
  328. /**
  329. * @global array MySQL attributes
  330. */
  331. $PMA_SQPdata_column_attrib = array (
  332. 'ARCHIVE', // Engine
  333. 'ASCII',
  334. 'AUTO_INCREMENT',
  335. 'BDB', // Engine
  336. 'BERKELEYDB', // Engine alias BDB
  337. 'BINARY',
  338. 'BLACKHOLE', // Engine
  339. 'CSV', // Engine
  340. 'DEFAULT',
  341. 'EXAMPLE', // Engine
  342. 'FEDERATED', // Engine
  343. 'HEAP', // Engine
  344. 'INNOBASE', // Engine alias InnoDB
  345. 'INNODB', // Engine InnoDB
  346. 'ISAM', // Engine
  347. 'MARIA', // Engine
  348. 'MEMORY', // Engine alias HEAP, but preferred
  349. 'MERGE', // Engine
  350. 'MRG_ISAM', // Engine
  351. 'MRG_MYISAM', // Engine alias MERGE
  352. 'MYISAM', // Engine MyISAM
  353. 'NATIONAL',
  354. 'NDB', // Engine alias NDBCLUSTER
  355. 'NDBCLUSTER', // Engine
  356. 'PRECISION',
  357. 'UNDEFINED',
  358. 'UNICODE',
  359. 'UNSIGNED',
  360. 'VARYING',
  361. 'ZEROFILL'
  362. );
  363. /**
  364. * words that are reserved by MySQL and may not be used as identifiers without quotes
  365. *
  366. * @see http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html
  367. *
  368. * @global array MySQL reserved words
  369. */
  370. $PMA_SQPdata_reserved_word = array (
  371. 'ACCESSIBLE', // 5.1
  372. 'ACTION',
  373. 'ADD',
  374. 'AFTER',
  375. 'AGAINST',
  376. 'AGGREGATE',
  377. 'ALGORITHM',
  378. 'ALL',
  379. 'ALTER',
  380. 'ANALYSE',
  381. 'ANALYZE',
  382. 'AND',
  383. 'AS',
  384. 'ASC',
  385. 'AUTOCOMMIT',
  386. 'AUTO_INCREMENT',
  387. 'AVG_ROW_LENGTH',
  388. 'BACKUP',
  389. 'BEGIN',
  390. 'BETWEEN',
  391. 'BINLOG',
  392. 'BOTH',
  393. 'BY',
  394. 'CASCADE',
  395. 'CASE',
  396. 'CHANGE',
  397. 'CHANGED',
  398. 'CHARSET',
  399. 'CHECK',
  400. 'CHECKSUM',
  401. 'COLLATE',
  402. 'COLLATION',
  403. 'COLUMN',
  404. 'COLUMNS',
  405. 'COMMENT',
  406. 'COMMIT',
  407. 'COMMITTED',
  408. 'COMPRESSED',
  409. 'CONCURRENT',
  410. 'CONSTRAINT',
  411. 'CONTAINS',
  412. 'CONVERT',
  413. 'CREATE',
  414. 'CROSS',
  415. 'CURRENT_TIMESTAMP',
  416. 'DATABASE',
  417. 'DATABASES',
  418. 'DAY',
  419. 'DAY_HOUR',
  420. 'DAY_MINUTE',
  421. 'DAY_SECOND',
  422. 'DECLARE',
  423. 'DEFINER',
  424. 'DELAYED',
  425. 'DELAY_KEY_WRITE',
  426. 'DELETE',
  427. 'DESC',
  428. 'DESCRIBE',
  429. 'DETERMINISTIC',
  430. 'DISTINCT',
  431. 'DISTINCTROW',
  432. 'DIV',
  433. 'DO',
  434. 'DROP',
  435. 'DUMPFILE',
  436. 'DUPLICATE',
  437. 'DYNAMIC',
  438. 'ELSE',
  439. 'ENCLOSED',
  440. 'END',
  441. 'ENGINE',
  442. 'ENGINES',
  443. 'ESCAPE',
  444. 'ESCAPED',
  445. 'EVENTS',
  446. 'EXECUTE',
  447. 'EXISTS',
  448. 'EXPLAIN',
  449. 'EXTENDED',
  450. 'FALSE',
  451. 'FAST',
  452. 'FIELDS',
  453. 'FILE',
  454. 'FIRST',
  455. 'FIXED',
  456. 'FLUSH',
  457. 'FOR',
  458. 'FORCE',
  459. 'FOREIGN',
  460. 'FROM',
  461. 'FULL',
  462. 'FULLTEXT',
  463. 'FUNCTION',
  464. 'GEMINI',
  465. 'GEMINI_SPIN_RETRIES',
  466. 'GENERAL',
  467. 'GLOBAL',
  468. 'GRANT',
  469. 'GRANTS',
  470. 'GROUP',
  471. 'HAVING',
  472. 'HEAP',
  473. 'HIGH_PRIORITY',
  474. 'HOSTS',
  475. 'HOUR',
  476. 'HOUR_MINUTE',
  477. 'HOUR_SECOND',
  478. 'IDENTIFIED',
  479. 'IF',
  480. 'IGNORE',
  481. 'IGNORE_SERVER_IDS',
  482. 'IN',
  483. 'INDEX',
  484. 'INDEXES',
  485. 'INFILE',
  486. 'INNER',
  487. 'INSERT',
  488. 'INSERT_ID',
  489. 'INSERT_METHOD',
  490. 'INTERVAL',
  491. 'INTO',
  492. 'INVOKER',
  493. 'IS',
  494. 'ISOLATION',
  495. 'JOIN',
  496. 'KEY',
  497. 'KEYS',
  498. 'KILL',
  499. 'LAST_INSERT_ID',
  500. 'LEADING',
  501. 'LEFT',
  502. 'LIKE',
  503. 'LIMIT',
  504. 'LINEAR', // 5.1
  505. 'LINES',
  506. 'LOAD',
  507. 'LOCAL',
  508. 'LOCK',
  509. 'LOCKS',
  510. 'LOGS',
  511. 'LOW_PRIORITY',
  512. 'MARIA', // 5.1 ?
  513. 'MASTER_CONNECT_RETRY',
  514. 'MASTER_HEARTBEAT_PERIOD',
  515. 'MASTER_HOST',
  516. 'MASTER_LOG_FILE',
  517. 'MASTER_LOG_POS',
  518. 'MASTER_PASSWORD',
  519. 'MASTER_PORT',
  520. 'MASTER_USER',
  521. 'MATCH',
  522. 'MAXVALUE',
  523. 'MAX_CONNECTIONS_PER_HOUR',
  524. 'MAX_QUERIES_PER_HOUR',
  525. 'MAX_ROWS',
  526. 'MAX_UPDATES_PER_HOUR',
  527. 'MAX_USER_CONNECTIONS',
  528. 'MEDIUM',
  529. 'MERGE',
  530. 'MINUTE',
  531. 'MINUTE_SECOND',
  532. 'MIN_ROWS',
  533. 'MODE',
  534. 'MODIFY',
  535. 'MONTH',
  536. 'MRG_MYISAM',
  537. 'MYISAM',
  538. 'NAMES',
  539. 'NATURAL',
  540. // 'NO' is not allowed in SQL-99 but is allowed in MySQL
  541. //'NO',
  542. 'NOT',
  543. 'NULL',
  544. 'OFFSET',
  545. 'ON',
  546. 'OPEN',
  547. 'OPTIMIZE',
  548. 'OPTION',
  549. 'OPTIONALLY',
  550. 'OR',
  551. 'ORDER',
  552. 'OUTER',
  553. 'OUTFILE',
  554. 'PACK_KEYS',
  555. 'PAGE', // 5.1-maria ?
  556. 'PAGE_CHECKSUM', // 5.1
  557. 'PARTIAL',
  558. 'PARTITION', // 5.1
  559. 'PARTITIONS', // 5.1
  560. 'PASSWORD',
  561. 'PRIMARY',
  562. 'PRIVILEGES',
  563. 'PROCEDURE',
  564. 'PROCESS',
  565. 'PROCESSLIST',
  566. 'PURGE',
  567. 'QUICK',
  568. 'RAID0',
  569. 'RAID_CHUNKS',
  570. 'RAID_CHUNKSIZE',
  571. 'RAID_TYPE',
  572. 'RANGE', // 5.1
  573. 'READ',
  574. 'READ_ONLY', // 5.1
  575. 'READ_WRITE', // 5.1
  576. 'REFERENCES',
  577. 'REGEXP',
  578. 'RELOAD',
  579. 'RENAME',
  580. 'REPAIR',
  581. 'REPEATABLE',
  582. 'REPLACE',
  583. 'REPLICATION',
  584. 'RESET',
  585. 'RESIGNAL',
  586. 'RESTORE',
  587. 'RESTRICT',
  588. 'RETURN',
  589. 'RETURNS',
  590. 'REVOKE',
  591. 'RIGHT',
  592. 'RLIKE',
  593. 'ROLLBACK',
  594. 'ROW',
  595. 'ROWS',
  596. 'ROW_FORMAT',
  597. 'SECOND',
  598. 'SECURITY',
  599. 'SELECT',
  600. 'SEPARATOR',
  601. 'SERIALIZABLE',
  602. 'SESSION',
  603. 'SHARE',
  604. 'SHOW',
  605. 'SHUTDOWN',
  606. 'SIGNAL',
  607. 'SLAVE',
  608. 'SLOW',
  609. 'SONAME',
  610. 'SOUNDS', // string-functions.html
  611. 'SQL',
  612. 'SQL_AUTO_IS_NULL',
  613. 'SQL_BIG_RESULT',
  614. 'SQL_BIG_SELECTS',
  615. 'SQL_BIG_TABLES',
  616. 'SQL_BUFFER_RESULT',
  617. 'SQL_CACHE',
  618. 'SQL_CALC_FOUND_ROWS',
  619. 'SQL_LOG_BIN',
  620. 'SQL_LOG_OFF',
  621. 'SQL_LOG_UPDATE',
  622. 'SQL_LOW_PRIORITY_UPDATES',
  623. 'SQL_MAX_JOIN_SIZE',
  624. 'SQL_NO_CACHE',
  625. 'SQL_QUOTE_SHOW_CREATE',
  626. 'SQL_SAFE_UPDATES',
  627. 'SQL_SELECT_LIMIT',
  628. 'SQL_SLAVE_SKIP_COUNTER',
  629. 'SQL_SMALL_RESULT',
  630. 'SQL_WARNINGS',
  631. 'START',
  632. 'STARTING',
  633. 'STATUS',
  634. 'STOP',
  635. 'STORAGE',
  636. 'STRAIGHT_JOIN',
  637. 'STRING',
  638. 'STRIPED',
  639. 'SUPER',
  640. 'TABLE',
  641. 'TABLES',
  642. 'TEMPORARY',
  643. 'TERMINATED',
  644. 'THEN',
  645. 'TO',
  646. 'TRAILING',
  647. 'TRANSACTIONAL', // 5.1 ?
  648. 'TRUE',
  649. 'TRUNCATE',
  650. 'TYPE',
  651. 'TYPES',
  652. 'UNCOMMITTED',
  653. 'UNION',
  654. 'UNIQUE',
  655. 'UNLOCK',
  656. 'UPDATE',
  657. 'USAGE',
  658. 'USE',
  659. 'USING',
  660. 'VALUES',
  661. 'VARIABLES',
  662. 'VIEW',
  663. 'WHEN',
  664. 'WHERE',
  665. 'WITH',
  666. 'WORK',
  667. 'WRITE',
  668. 'XOR',
  669. 'YEAR_MONTH'
  670. );
  671. /**
  672. * words forbidden to be used as column or table name wihtout quotes
  673. * as seen in http://dev.mysql.com/doc/mysql/en/reserved-words.html
  674. *
  675. * @global array MySQL forbidden words
  676. */
  677. $PMA_SQPdata_forbidden_word = array (
  678. 'ACCESSIBLE', // 5.1
  679. 'ACTION',
  680. 'ADD',
  681. 'AFTER',
  682. 'AGAINST',
  683. 'AGGREGATE',
  684. 'ALGORITHM',
  685. 'ALL',
  686. 'ALTER',
  687. 'ANALYZE',
  688. 'AND',
  689. 'ANY',
  690. 'AS',
  691. 'ASC',
  692. 'ASCII',
  693. 'ASENSITIVE',
  694. 'AUTO_INCREMENT',
  695. 'AVG',
  696. 'AVG_ROW_LENGTH',
  697. 'BACKUP',
  698. 'BDB',
  699. 'BEFORE',
  700. 'BEGIN',
  701. 'BERKELEYDB',
  702. 'BETWEEN',
  703. 'BIGINT',
  704. 'BINARY',
  705. 'BINLOG',
  706. 'BIT',
  707. 'BLOB',
  708. 'BOOL',
  709. 'BOOLEAN',
  710. 'BOTH',
  711. 'BTREE',
  712. 'BY',
  713. 'BYTE',
  714. 'CACHE',
  715. 'CALL',
  716. 'CASCADE',
  717. 'CASCADED',
  718. 'CASE',
  719. 'CHAIN',
  720. 'CHANGE',
  721. 'CHANGED',
  722. 'CHAR',
  723. 'CHARACTER',
  724. 'CHARSET',
  725. 'CHECK',
  726. 'CHECKSUM',
  727. 'CIPHER',
  728. 'CLOSE',
  729. 'COLLATE',
  730. 'COLLATION',
  731. 'COLUMN',
  732. 'COLUMNS',
  733. 'COMMENT',
  734. 'COMMIT',
  735. 'COMMITTED',
  736. 'COMPACT',
  737. 'COMPRESSED',
  738. 'CONCURRENT',
  739. 'CONDITION',
  740. 'CONNECTION',
  741. 'CONSISTENT',
  742. 'CONSTRAINT',
  743. 'CONTAINS',
  744. 'CONTINUE',
  745. 'CONVERT',
  746. 'CREATE',
  747. 'CROSS',
  748. 'CUBE',
  749. 'CURRENT_DATE',
  750. 'CURRENT_TIME',
  751. 'CURRENT_TIMESTAMP',
  752. 'CURRENT_USER',
  753. 'CURSOR',
  754. 'DATA',
  755. 'DATABASE',
  756. 'DATABASES',
  757. 'DATE',
  758. 'DATETIME',
  759. 'DAY',
  760. 'DAY_HOUR',
  761. 'DAY_MICROSECOND',
  762. 'DAY_MINUTE',
  763. 'DAY_SECOND',
  764. 'DEALLOCATE',
  765. 'DEC',
  766. 'DECIMAL',
  767. 'DECLARE',
  768. 'DEFAULT',
  769. 'DEFINER',
  770. 'DELAYED',
  771. 'DELAY_KEY_WRITE',
  772. 'DELETE',
  773. 'DESC',
  774. 'DESCRIBE',
  775. 'DES_KEY_FILE',
  776. 'DETERMINISTIC',
  777. 'DIRECTORY',
  778. 'DISABLE',
  779. 'DISCARD',
  780. 'DISTINCT',
  781. 'DISTINCTROW',
  782. 'DIV',
  783. 'DO',
  784. 'DOUBLE',
  785. 'DROP',
  786. 'DUAL',
  787. 'DUMPFILE',
  788. 'DUPLICATE',
  789. 'DYNAMIC',
  790. 'EACH',
  791. 'ELSE',
  792. 'ELSEIF',
  793. 'ENABLE',
  794. 'ENCLOSED',
  795. 'END',
  796. 'ENGINE',
  797. 'ENGINES',
  798. 'ENUM',
  799. 'ERRORS',
  800. 'ESCAPE',
  801. 'ESCAPED',
  802. 'EVENTS',
  803. 'EXECUTE',
  804. 'EXISTS',
  805. 'EXIT',
  806. 'EXPANSION',
  807. 'EXPLAIN',
  808. 'EXTENDED',
  809. 'FALSE',
  810. 'FAST',
  811. 'FETCH',
  812. 'FIELDS',
  813. 'FILE',
  814. 'FIRST',
  815. 'FIXED',
  816. 'FLOAT',
  817. 'FLOAT4',
  818. 'FLOAT8',
  819. 'FLUSH',
  820. 'FOR',
  821. 'FORCE',
  822. 'FOREIGN',
  823. 'FOUND',
  824. 'FRAC_SECOND',
  825. 'FROM',
  826. 'FULL',
  827. 'FULLTEXT',
  828. 'FUNCTION',
  829. 'GEOMETRY',
  830. 'GEOMETRYCOLLECTION',
  831. 'GET_FORMAT',
  832. 'GLOBAL',
  833. 'GOTO',
  834. 'GRANT',
  835. 'GRANTS',
  836. 'GROUP',
  837. 'HANDLER',
  838. 'HASH',
  839. 'HAVING',
  840. 'HELP',
  841. 'HIGH_PRIORITY',
  842. 'HOSTS',
  843. 'HOUR',
  844. 'HOUR_MICROSECOND',
  845. 'HOUR_MINUTE',
  846. 'HOUR_SECOND',
  847. 'IDENTIFIED',
  848. 'IF',
  849. 'IGNORE',
  850. 'IMPORT',
  851. 'IN',
  852. 'INDEX',
  853. 'INDEXES',
  854. 'INFILE',
  855. 'INNER',
  856. 'INNOBASE',
  857. 'INNODB',
  858. 'INOUT',
  859. 'INSENSITIVE',
  860. 'INSERT',
  861. 'INSERT_METHOD',
  862. 'INT',
  863. 'INT1',
  864. 'INT2',
  865. 'INT3',
  866. 'INT4',
  867. 'INT8',
  868. 'INTEGER',
  869. 'INTERVAL',
  870. 'INTO',
  871. 'INVOKER',
  872. 'IO_THREAD',
  873. 'IS',
  874. 'ISOLATION',
  875. 'ISSUER',
  876. 'ITERATE',
  877. 'JOIN',
  878. 'KEY',
  879. 'KEYS',
  880. 'KILL',
  881. 'LABEL',
  882. 'LANGUAGE',
  883. 'LAST',
  884. 'LEADING',
  885. 'LEAVE',
  886. 'LEAVES',
  887. 'LEFT',
  888. 'LIKE',
  889. 'LIMIT',
  890. 'LINEAR', // 5.1
  891. 'LINES',
  892. 'LINESTRING',
  893. 'LOAD',
  894. 'LOCAL',
  895. 'LOCALTIME',
  896. 'LOCALTIMESTAMP',
  897. 'LOCK',
  898. 'LOCKS',
  899. 'LOGS',
  900. 'LONG',
  901. 'LONGBLOB',
  902. 'LONGTEXT',
  903. 'LOOP',
  904. 'LOW_PRIORITY',
  905. 'MASTER',
  906. 'MASTER_CONNECT_RETRY',
  907. 'MASTER_HOST',
  908. 'MASTER_LOG_FILE',
  909. 'MASTER_LOG_POS',
  910. 'MASTER_PASSWORD',
  911. 'MASTER_PORT',
  912. 'MASTER_SERVER_ID',
  913. 'MASTER_SSL',
  914. 'MASTER_SSL_CA',
  915. 'MASTER_SSL_CAPATH',
  916. 'MASTER_SSL_CERT',
  917. 'MASTER_SSL_CIPHER',
  918. 'MASTER_SSL_KEY',
  919. 'MASTER_USER',
  920. 'MATCH',
  921. 'MAX_CONNECTIONS_PER_HOUR',
  922. 'MAX_QUERIES_PER_HOUR',
  923. 'MAX_ROWS',
  924. 'MAX_UPDATES_PER_HOUR',
  925. 'MAX_USER_CONNECTIONS',
  926. 'MEDIUM',
  927. 'MEDIUMBLOB',
  928. 'MEDIUMINT',
  929. 'MEDIUMTEXT',
  930. 'MERGE',
  931. 'MICROSECOND',
  932. 'MIDDLEINT',
  933. 'MIGRATE',
  934. 'MINUTE',
  935. 'MINUTE_MICROSECOND',
  936. 'MINUTE_SECOND',
  937. 'MIN_ROWS',
  938. 'MOD',
  939. 'MODE',
  940. 'MODIFIES',
  941. 'MODIFY',
  942. 'MONTH',
  943. 'MULTILINESTRING',
  944. 'MULTIPOINT',
  945. 'MULTIPOLYGON',
  946. 'MUTEX',
  947. 'NAME',
  948. 'NAMES',
  949. 'NATIONAL',
  950. 'NATURAL',
  951. 'NCHAR',
  952. 'NDB',
  953. 'NDBCLUSTER',
  954. 'NEW',
  955. 'NEXT',
  956. 'NO',
  957. 'NONE',
  958. 'NOT',
  959. 'NO_WRITE_TO_BINLOG',
  960. 'NULL',
  961. 'NUMERIC',
  962. 'NVARCHAR',
  963. 'OFFSET',
  964. 'OLD_PASSWORD',
  965. 'ON',
  966. 'ONE',
  967. 'ONE_SHOT',
  968. 'OPEN',
  969. 'OPTIMIZE',
  970. 'OPTION',
  971. 'OPTIONALLY',
  972. 'OR',
  973. 'ORDER',
  974. 'OUT',
  975. 'OUTER',
  976. 'OUTFILE',
  977. 'PACK_KEYS',
  978. 'PARTIAL',
  979. 'PASSWORD',
  980. 'PHASE',
  981. 'POINT',
  982. 'POLYGON',
  983. 'PRECISION',
  984. 'PREPARE',
  985. 'PREV',
  986. 'PRIMARY',
  987. 'PRIVILEGES',
  988. 'PROCEDURE',
  989. 'PROCESSLIST',
  990. 'PURGE',
  991. 'QUARTER',
  992. 'QUERY',
  993. 'QUICK',
  994. 'RAID0',
  995. 'RAID_CHUNKS',
  996. 'RAID_CHUNKSIZE',
  997. 'RAID_TYPE',
  998. 'RANGE', // 5.1
  999. 'READ',
  1000. 'READS',
  1001. 'READ_ONLY', // 5.1
  1002. 'READ_WRITE', // 5.1
  1003. 'REAL',
  1004. 'RECOVER',
  1005. 'REDUNDANT',
  1006. 'REFERENCES',
  1007. 'REGEXP',
  1008. 'RELAY_LOG_FILE',
  1009. 'RELAY_LOG_POS',
  1010. 'RELAY_THREAD',
  1011. 'RELEASE',
  1012. 'RELOAD',
  1013. 'RENAME',
  1014. 'REPAIR',
  1015. 'REPEAT',
  1016. 'REPEATABLE',
  1017. 'REPLACE',
  1018. 'REPLICATION',
  1019. 'REQUIRE',
  1020. 'RESET',
  1021. 'RESTORE',
  1022. 'RESTRICT',
  1023. 'RESUME',
  1024. 'RETURN',
  1025. 'RETURNS',
  1026. 'REVOKE',
  1027. 'RIGHT',
  1028. 'RLIKE',
  1029. 'ROLLBACK',
  1030. 'ROLLUP',
  1031. 'ROUTINE',
  1032. 'ROW',
  1033. 'ROWS',
  1034. 'ROW_FORMAT',
  1035. 'RTREE',
  1036. 'SAVEPOINT',
  1037. 'SCHEMA',
  1038. 'SCHEMAS',
  1039. 'SECOND',
  1040. 'SECOND_MICROSECOND',
  1041. 'SECURITY',
  1042. 'SELECT',
  1043. 'SENSITIVE',
  1044. 'SEPARATOR',
  1045. 'SERIAL',
  1046. 'SERIALIZABLE',
  1047. 'SESSION',
  1048. 'SET',
  1049. 'SHARE',
  1050. 'SHOW',
  1051. 'SHUTDOWN',
  1052. 'SIGNED',
  1053. 'SIMPLE',
  1054. 'SLAVE',
  1055. 'SMALLINT',
  1056. 'SNAPSHOT',
  1057. 'SOME',
  1058. 'SONAME',
  1059. 'SOUNDS',
  1060. 'SPATIAL',
  1061. 'SPECIFIC',
  1062. 'SQL',
  1063. 'SQLEXCEPTION',
  1064. 'SQLSTATE',
  1065. 'SQLWARNING',
  1066. 'SQL_BIG_RESULT',
  1067. 'SQL_BUFFER_RESULT',
  1068. 'SQL_CACHE',
  1069. 'SQL_CALC_FOUND_ROWS',
  1070. 'SQL_NO_CACHE',
  1071. 'SQL_SMALL_RESULT',
  1072. 'SQL_THREAD',
  1073. 'SQL_TSI_DAY',
  1074. 'SQL_TSI_FRAC_SECOND',
  1075. 'SQL_TSI_HOUR',
  1076. 'SQL_TSI_MINUTE',
  1077. 'SQL_TSI_MONTH',
  1078. 'SQL_TSI_QUARTER',
  1079. 'SQL_TSI_SECOND',
  1080. 'SQL_TSI_WEEK',
  1081. 'SQL_TSI_YEAR',
  1082. 'SSL',
  1083. 'START',
  1084. 'STARTING',
  1085. 'STATUS',
  1086. 'STOP',
  1087. 'STORAGE',
  1088. 'STRAIGHT_JOIN',
  1089. 'STRING',
  1090. 'STRIPED',
  1091. 'SUBJECT',
  1092. 'SUPER',
  1093. 'SUSPEND',
  1094. 'TABLE',
  1095. 'TABLES',
  1096. 'TABLESPACE',
  1097. 'TEMPORARY',
  1098. 'TEMPTABLE',
  1099. 'TERMINATED',
  1100. 'TEXT',
  1101. 'THEN',
  1102. 'TIME',
  1103. 'TIMESTAMP',
  1104. 'TIMESTAMPADD',
  1105. 'TIMESTAMPDIFF',
  1106. 'TINYBLOB',
  1107. 'TINYINT',
  1108. 'TINYTEXT',
  1109. 'TO',
  1110. 'TRAILING',
  1111. 'TRANSACTION',
  1112. 'TRIGGER',
  1113. 'TRIGGERS',
  1114. 'TRUE',
  1115. 'TRUNCATE',
  1116. 'TYPE',
  1117. 'TYPES',
  1118. 'UNCOMMITTED',
  1119. 'UNDEFINED',
  1120. 'UNDO',
  1121. 'UNICODE',
  1122. 'UNION',
  1123. 'UNIQUE',
  1124. 'UNKNOWN',
  1125. 'UNLOCK',
  1126. 'UNSIGNED',
  1127. 'UNTIL',
  1128. 'UPDATE',
  1129. 'USAGE',
  1130. 'USE',
  1131. 'USER',
  1132. 'USER_RESOURCES',
  1133. 'USE_FRM',
  1134. 'USING',
  1135. 'UTC_DATE',
  1136. 'UTC_TIME',
  1137. 'UTC_TIMESTAMP',
  1138. 'VALUE',
  1139. 'VALUES',
  1140. 'VARBINARY',
  1141. 'VARCHAR',
  1142. 'VARCHARACTER',
  1143. 'VARIABLES',
  1144. 'VARYING',
  1145. 'VIEW',
  1146. 'WARNINGS',
  1147. 'WEEK',
  1148. 'WHEN',
  1149. 'WHERE',
  1150. 'WHILE',
  1151. 'WITH',
  1152. 'WORK',
  1153. 'WRITE',
  1154. 'X509',
  1155. 'XA',
  1156. 'XOR',
  1157. 'YEAR',
  1158. 'YEAR_MONTH',
  1159. 'ZEROFILL'
  1160. );
  1161. /**
  1162. * the MySQL column/data types
  1163. *
  1164. * @see http://dev.mysql.com/doc/refman/5.1/en/data-types.html
  1165. * @see http://dev.mysql.com/doc/refman/5.1/en/mysql-spatial-datatypes.html
  1166. *
  1167. * @global array MySQL column types
  1168. */
  1169. $PMA_SQPdata_column_type = array (
  1170. 'BIGINT',
  1171. 'BINARY',
  1172. 'BIT',
  1173. 'BLOB',
  1174. 'BOOL',
  1175. 'BOOLEAN', // numeric-type-overview.html
  1176. 'CHAR',
  1177. 'CHARACTER',
  1178. 'DATE',
  1179. 'DATETIME',
  1180. 'DEC',
  1181. 'DECIMAL',
  1182. 'DOUBLE',
  1183. 'ENUM',
  1184. 'FLOAT',
  1185. 'FLOAT4',
  1186. 'FLOAT8',
  1187. 'GEOMETRY', // spatial
  1188. 'GEOMETRYCOLLECTION', // spatial
  1189. 'INT',
  1190. 'INT1',
  1191. 'INT2',
  1192. 'INT3',
  1193. 'INT4',
  1194. 'INT8',
  1195. 'INTEGER',
  1196. 'LINESTRING', // spatial
  1197. 'LONG',
  1198. 'LONGBLOB',
  1199. 'LONGTEXT',
  1200. 'MEDIUMBLOB',
  1201. 'MEDIUMINT',
  1202. 'MEDIUMTEXT',
  1203. 'MIDDLEINT',
  1204. 'MULTILINESTRING', // spatial
  1205. 'MULTIPOINT', // spatial
  1206. 'MULTIPOLYGON', // spatial
  1207. 'NCHAR',
  1208. 'NUMERIC',
  1209. 'POINT', // spatial
  1210. 'POLYGON', // spatial
  1211. 'REAL',
  1212. 'SERIAL', // alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
  1213. 'SET',
  1214. 'SMALLINT',
  1215. 'TEXT',
  1216. 'TIME',
  1217. 'TIMESTAMP',
  1218. 'TINYBLOB',
  1219. 'TINYINT',
  1220. 'TINYTEXT',
  1221. 'VARBINARY',
  1222. 'VARCHAR',
  1223. 'YEAR'
  1224. );
  1225. /**
  1226. * Documentation links for operators.
  1227. */
  1228. $PMA_SQPdata_operators_docs = array(
  1229. '!=' => array('link' => 'comparison-operators','anchor' => 'operator_not-equal'),
  1230. '<>' => array('link' => 'comparison-operators','anchor' => 'operator_not-equal'),
  1231. '!' => array('link' => 'logical-operators','anchor' => 'operator_not'),
  1232. '||' => array('link' => 'logical-operators','anchor' => 'operator_or'),
  1233. '+' => array('link' => 'arithmetic-functions','anchor' => 'operator_plus'),
  1234. '>>' => array('link' => 'bit-functions','anchor' => 'operator_right-shift'),
  1235. '-' => array('link' => 'arithmetic-functions','anchor' => 'operator_minus'),
  1236. '*' => array('link' => 'arithmetic-functions','anchor' => 'operator_times'),
  1237. '&&' => array('link' => 'logical-operators','anchor' => 'operator_and'),
  1238. '&' => array('link' => 'bit-functions','anchor' => 'operator_bitwise-and'),
  1239. '~' => array('link' => 'bit-functions','anchor' => 'operator_bitwise-invert'),
  1240. '|' => array('link' => 'bit-functions','anchor' => 'operator_bitwise-or'),
  1241. '^' => array('link' => 'bit-functions','anchor' => 'operator_bitwise-xor'),
  1242. '=' => array('link' => 'assignment-operators','anchor' => 'operator_assign-equal'),
  1243. ':=' => array('link' => 'assignment-operators','anchor' => 'operator_assign-value'),
  1244. '/' => array('link' => 'arithmetic-functions','anchor' => 'operator_divide'),
  1245. '<=>' => array('link' => 'comparison-operators','anchor' => 'operator_equal-to'),
  1246. '=' => array('link' => 'comparison-operators','anchor' => 'operator_equal'),
  1247. '>=' => array('link' => 'comparison-operators','anchor' => 'operator_greater-than-or-equal'),
  1248. '>' => array('link' => 'comparison-operators','anchor' => 'operator_greater-than'),
  1249. '<<' => array('link' => 'bit-functions','anchor' => 'operator_left-shift'),
  1250. '<=' => array('link' => 'comparison-operators','anchor' => 'operator_less-than-or-equal'),
  1251. '<' => array('link' => 'comparison-operators','anchor' => 'operator_less-than'),
  1252. '%' => array('link' => 'arithmetic-functions','anchor' => 'operator_mod')
  1253. );
  1254. /**
  1255. * Documentation links for functions.
  1256. */
  1257. $PMA_SQPdata_functions_docs = array(
  1258. 'ABS' => array('link' => 'mathematical-functions','anchor' => 'function_abs'),
  1259. 'ACOS' => array('link' => 'mathematical-functions','anchor' => 'function_acos'),
  1260. 'ADDDATE' => array('link' => 'date-and-time-functions','anchor' => 'function_adddate'),
  1261. 'ADDTIME' => array('link' => 'date-and-time-functions','anchor' => 'function_addtime'),
  1262. 'AES_DECRYPT' => array('link' => 'encryption-functions','anchor' => 'function_aes_decrypt'),
  1263. 'AES_ENCRYPT' => array('link' => 'encryption-functions','anchor' => 'function_aes_encrypt'),
  1264. 'AND' => array('link' => 'logical-operators','anchor' => 'operator_and'),
  1265. 'ASCII' => array('link' => 'string-functions','anchor' => 'function_ascii'),
  1266. 'ASIN' => array('link' => 'mathematical-functions','anchor' => 'function_asin'),
  1267. 'ATAN2' => array('link' => 'mathematical-functions','anchor' => 'function_atan2'),
  1268. 'ATAN' => array('link' => 'mathematical-functions','anchor' => 'function_atan2'),
  1269. 'ATAN' => array('link' => 'mathematical-functions','anchor' => 'function_atan'),
  1270. 'AVG' => array('link' => 'group-by-functions','anchor' => 'function_avg'),
  1271. 'BENCHMARK' => array('link' => 'information-functions','anchor' => 'function_benchmark'),
  1272. 'BIN' => array('link' => 'string-functions','anchor' => 'function_bin'),
  1273. 'BINARY' => array('link' => 'cast-functions','anchor' => 'operator_binary'),
  1274. 'BIT_AND' => array('link' => 'group-by-functions','anchor' => 'function_bit_and'),
  1275. 'BIT_COUNT' => array('link' => 'bit-functions','anchor' => 'function_bit_count'),
  1276. 'BIT_LENGTH' => array('link' => 'string-functions','anchor' => 'function_bit_length'),
  1277. 'BIT_OR' => array('link' => 'group-by-functions','anchor' => 'function_bit_or'),
  1278. 'BIT_XOR' => array('link' => 'group-by-functions','anchor' => 'function_bit_xor'),
  1279. 'CASE' => array('link' => 'control-flow-functions','anchor' => 'operator_case'),
  1280. 'CAST' => array('link' => 'cast-functions','anchor' => 'function_cast'),
  1281. 'CEIL' => array('link' => 'mathematical-functions','anchor' => 'function_ceil'),
  1282. 'CEILING' => array('link' => 'mathematical-functions','anchor' => 'function_ceiling'),
  1283. 'CHAR_LENGTH' => array('link' => 'string-functions','anchor' => 'function_char_length'),
  1284. 'CHAR' => array('link' => 'string-functions','anchor' => 'function_char'),
  1285. 'CHARACTER_LENGTH' => array('link' => 'string-functions','anchor' => 'function_character_length'),
  1286. 'CHARSET' => array('link' => 'information-functions','anchor' => 'function_charset'),
  1287. 'COALESCE' => array('link' => 'comparison-operators','anchor' => 'function_coalesce'),
  1288. 'COERCIBILITY' => array('link' => 'information-functions','anchor' => 'function_coercibility'),
  1289. 'COLLATION' => array('link' => 'information-functions','anchor' => 'function_collation'),
  1290. 'COMPRESS' => array('link' => 'encryption-functions','anchor' => 'function_compress'),
  1291. 'CONCAT_WS' => array('link' => 'string-functions','anchor' => 'function_concat_ws'),
  1292. 'CONCAT' => array('link' => 'string-functions','anchor' => 'function_concat'),
  1293. 'CONNECTION_ID' => array('link' => 'information-functions','anchor' => 'function_connection_id'),
  1294. 'CONV' => array('link' => 'mathematical-functions','anchor' => 'function_conv'),
  1295. 'CONVERT_TZ' => array('link' => 'date-and-time-functions','anchor' => 'function_convert_tz'),
  1296. 'Convert' => array('link' => 'cast-functions','anchor' => 'function_convert'),
  1297. 'COS' => array('link' => 'mathematical-functions','anchor' => 'function_cos'),
  1298. 'COT' => array('link' => 'mathematical-functions','anchor' => 'function_cot'),
  1299. 'COUNT' => array('link' => 'group-by-functions','anchor' => 'function_count'),
  1300. 'CRC32' => array('link' => 'mathematical-functions','anchor' => 'function_crc32'),
  1301. 'CURDATE' => array('link' => 'date-and-time-functions','anchor' => 'function_curdate'),
  1302. 'CURRENT_DATE' => array('link' => 'date-and-time-functions','anchor' => 'function_current_date'),
  1303. 'CURRENT_TIME' => array('link' => 'date-and-time-functions','anchor' => 'function_current_time'),
  1304. 'CURRENT_TIMESTAMP' => array('link' => 'date-and-time-functions','anchor' => 'function_current_timestamp'),
  1305. 'CURRENT_USER' => array('link' => 'information-functions','anchor' => 'function_current_user'),
  1306. 'CURTIME' => array('link' => 'date-and-time-functions','anchor' => 'function_curtime'),
  1307. 'DATABASE' => array('link' => 'information-functions','anchor' => 'function_database'),
  1308. 'DATE_ADD' => array('link' => 'date-and-time-functions','anchor' => 'function_date_add'),
  1309. 'DATE_FORMAT' => array('link' => 'date-and-time-functions','anchor' => 'function_date_format'),
  1310. 'DATE_SUB' => array('link' => 'date-and-time-functions','anchor' => 'function_date_sub'),
  1311. 'DATE' => array('link' => 'date-and-time-functions','anchor' => 'function_date'),
  1312. 'DATEDIFF' => array('link' => 'date-and-time-functions','anchor' => 'function_datediff'),
  1313. 'DAY' => array('link' => 'date-and-time-functions','anchor' => 'function_day'),
  1314. 'DAYNAME' => array('link' => 'date-and-time-functions','anchor' => 'function_dayname'),
  1315. 'DAYOFMONTH' => array('link' => 'date-and-time-functions','anchor' => 'function_dayofmonth'),
  1316. 'DAYOFWEEK' => array('link' => 'date-and-time-functions','anchor' => 'function_dayofweek'),
  1317. 'DAYOFYEAR' => array('link' => 'date-and-time-functions','anchor' => 'function_dayofyear'),
  1318. 'DECLARE' => array('link' => 'declare', 'anchor' => 'declare'),
  1319. 'DECODE' => array('link' => 'encryption-functions','anchor' => 'function_decode'),
  1320. 'DEFAULT' => array('link' => 'miscellaneous-functions','anchor' => 'function_default'),
  1321. 'DEGREES' => array('link' => 'mathematical-functions','anchor' => 'function_degrees'),
  1322. 'DES_DECRYPT' => array('link' => 'encryption-functions','anchor' => 'function_des_decrypt'),
  1323. 'DES_ENCRYPT' => array('link' => 'encryption-functions','anchor' => 'function_des_encrypt'),
  1324. 'DIV' => array('link' => 'arithmetic-functions','anchor' => 'operator_div'),
  1325. 'ELT' => array('link' => 'string-functions','anchor' => 'function_elt'),
  1326. 'ENCODE' => array('link' => 'encryption-functions','anchor' => 'function_encode'),
  1327. 'ENCRYPT' => array('link' => 'encryption-functions','anchor' => 'function_encrypt'),
  1328. 'EXP' => array('link' => 'mathematical-functions','anchor' => 'function_exp'),
  1329. 'EXPORT_SET' => array('link' => 'string-functions','anchor' => 'function_export_set'),
  1330. 'EXTRACT' => array('link' => 'date-and-time-functions','anchor' => 'function_extract'),
  1331. 'ExtractValue' => array('link' => 'xml-functions','anchor' => 'function_extractvalue'),
  1332. 'FIELD' => array('link' => 'string-functions','anchor' => 'function_field'),
  1333. 'FIND_IN_SET' => array('link' => 'string-functions','anchor' => 'function_find_in_set'),
  1334. 'FLOOR' => array('link' => 'mathematical-functions','anchor' => 'function_floor'),
  1335. 'FORMAT' => array('link' => 'string-functions','anchor' => 'function_format'),
  1336. 'FOUND_ROWS' => array('link' => 'information-functions','anchor' => 'function_found_rows'),
  1337. 'FROM_DAYS' => array('link' => 'date-and-time-functions','anchor' => 'function_from_days'),
  1338. 'FROM_UNIXTIME' => array('link' => 'date-and-time-functions','anchor' => 'function_from_unixtime'),
  1339. 'GET_FORMAT' => array('link' => 'date-and-time-functions','anchor' => 'function_get_format'),
  1340. 'GET_LOCK' => array('link' => 'miscellaneous-functions','anchor' => 'function_get_lock'),
  1341. 'GREATEST' => array('link' => 'comparison-operators','anchor' => 'function_greatest'),
  1342. 'GROUP_CONCAT' => array('link' => 'group-by-functions','anchor' => 'function_group_concat'),
  1343. 'HEX' => array('link' => 'string-functions','anchor' => 'function_hex'),
  1344. 'HOUR' => array('link' => 'date-and-time-functions','anchor' => 'function_hour'),
  1345. 'IF' => array('link' => 'control-flow-functions','anchor' => 'function_if'),
  1346. 'IFNULL' => array('link' => 'control-flow-functions','anchor' => 'function_ifnull'),
  1347. 'IN' => array('link' => 'comparison-operators','anchor' => 'function_in'),
  1348. 'INET_ATON' => array('link' => 'miscellaneous-functions','anchor' => 'function_inet_aton'),
  1349. 'INET_NTOA' => array('link' => 'miscellaneous-functions','anchor' => 'function_inet_ntoa'),
  1350. 'INSERT' => array('link' => 'string-functions','anchor' => 'function_insert'),
  1351. 'INSTR' => array('link' => 'string-functions','anchor' => 'function_instr'),
  1352. 'INTERVAL' => array('link' => 'comparison-operators','anchor' => 'function_interval'),
  1353. 'IS_FREE_LOCK' => array('link' => 'miscellaneous-functions','anchor' => 'function_is_free_lock'),
  1354. 'IS_USED_LOCK' => array('link' => 'miscellaneous-functions','anchor' => 'function_is_used_lock'),
  1355. 'IS' => array('link' => 'comparison-operators','anchor' => 'operator_is'),
  1356. 'ISNULL' => array('link' => 'comparison-operators','anchor' => 'function_isnull'),
  1357. 'LAST_DAY' => array('link' => 'date-and-time-functions','anchor' => 'function_last_day'),
  1358. 'LAST_INSERT_ID' => array('link' => 'information-functions','anchor' => 'function_last_insert_id'),
  1359. 'LCASE' => array('link' => 'string-functions','anchor' => 'function_lcase'),
  1360. 'LEAST' => array('link' => 'comparison-operators','anchor' => 'function_least'),
  1361. 'LEFT' => array('link' => 'string-functions','anchor' => 'function_left'),
  1362. 'LENGTH' => array('link' => 'string-functions','anchor' => 'function_length'),
  1363. 'LIKE' => array('link' => 'string-comparison-functions','anchor' => 'operator_like'),
  1364. 'LN' => array('link' => 'mathematical-functions','anchor' => 'function_ln'),
  1365. 'LOAD_FILE' => array('link' => 'string-functions','anchor' => 'function_load_file'),
  1366. 'LOCALTIME' => array('link' => 'date-and-time-functions','anchor' => 'function_localtime'),
  1367. 'LOCALTIMESTAMP' => array('link' => 'date-and-time-functions','anchor' => 'function_localtimestamp'),
  1368. 'LOCATE' => array('link' => 'string-functions','anchor' => 'function_locate'),
  1369. 'LOG10' => array('link' => 'mathematical-functions','anchor' => 'function_log10'),
  1370. 'LOG2' => array('link' => 'mathematical-functions','anchor' => 'function_log2'),
  1371. 'LOG' => array('link' => 'mathematical-functions','anchor' => 'function_log'),
  1372. 'LOWER' => array('link' => 'string-functions','anchor' => 'function_lower'),
  1373. 'LPAD' => array('link' => 'string-functions','anchor' => 'function_lpad'),
  1374. 'LTRIM' => array('link' => 'string-functions','anchor' => 'function_ltrim'),
  1375. 'MAKE_SET' => array('link' => 'string-functions','anchor' => 'function_make_set'),
  1376. 'MAKEDATE' => array('link' => 'date-and-time-functions','anchor' => 'function_makedate'),
  1377. 'MAKETIME' => array('link' => 'date-and-time-functions','anchor' => 'function_maketime'),
  1378. 'MASTER_POS_WAIT' => array('link' => 'miscellaneous-functions','anchor' => 'function_master_pos_wait'),
  1379. 'MATCH' => array('link' => 'fulltext-search','anchor' => 'function_match'),
  1380. 'MAX' => array('link' => 'group-by-functions','anchor' => 'function_max'),
  1381. 'MD5' => array('link' => 'encryption-functions','anchor' => 'function_md5'),
  1382. 'MICROSECOND' => array('link' => 'date-and-time-functions','anchor' => 'function_microsecond'),
  1383. 'MID' => array('link' => 'string-functions','anchor' => 'function_mid'),
  1384. 'MIN' => array('link' => 'group-by-functions','anchor' => 'function_min'),
  1385. 'MINUTE' => array('link' => 'date-and-time-functions','anchor' => 'function_minute'),
  1386. 'MOD' => array('link' => 'mathematical-functions','anchor' => 'function_mod'),
  1387. 'MONTH' => array('link' => 'date-and-time-functions','anchor' => 'function_month'),
  1388. 'MONTHNAME' => array('link' => 'date-and-time-functions','anchor' => 'function_monthname'),
  1389. 'NAME_CONST' => array('link' => 'miscellaneous-functions','anchor' => 'function_name_const'),
  1390. 'NOT' => array('link' => 'logical-operators','anchor' => 'operator_not'),
  1391. 'NOW' => array('link' => 'date-and-time-functions','anchor' => 'function_now'),
  1392. 'NULLIF' => array('link' => 'control-flow-functions','anchor' => 'function_nullif'),
  1393. 'OCT' => array('link' => 'mathematical-functions','anchor' => 'function_oct'),
  1394. 'OCTET_LENGTH' => array('link' => 'string-functions','anchor' => 'function_octet_length'),
  1395. 'OLD_PASSWORD' => array('link' => 'encryption-functions','anchor' => 'function_old_password'),
  1396. 'OR' => array('link' => 'logical-operators','anchor' => 'operator_or'),
  1397. 'ORD' => array('link' => 'string-functions','anchor' => 'function_ord'),
  1398. 'PASSWORD' => array('link' => 'encryption-functions','anchor' => 'function_password'),
  1399. 'PERIOD_ADD' => array('link' => 'date-and-time-functions','anchor' => 'function_period_add'),
  1400. 'PERIOD_DIFF' => array('link' => 'date-and-time-functions','anchor' => 'function_period_diff'),
  1401. 'PI' => array('link' => 'mathematical-functions','anchor' => 'function_pi'),
  1402. 'POSITION' => array('link' => 'string-functions','anchor' => 'function_position'),
  1403. 'POW' => array('link' => 'mathematical-functions','anchor' => 'function_pow'),
  1404. 'POWER' => array('link' => 'mathematical-functions','anchor' => 'function_power'),
  1405. 'QUARTER' => array('link' => 'date-and-time-functions','anchor' => 'function_quarter'),
  1406. 'QUOTE' => array('link' => 'string-functions','anchor' => 'function_quote'),
  1407. 'RADIANS' => array('link' => 'mathematical-functions','anchor' => 'function_radians'),
  1408. 'RAND' => array('link' => 'mathematical-functions','anchor' => 'function_rand'),
  1409. 'REGEXP' => array('link' => 'regexp','anchor' => 'operator_regexp'),
  1410. 'RELEASE_LOCK' => array('link' => 'miscellaneous-functions','anchor' => 'function_release_lock'),
  1411. 'REPEAT' => array('link' => 'string-functions','anchor' => 'function_repeat'),
  1412. 'REPLACE' => array('link' => 'string-functions','anchor' => 'function_replace'),
  1413. 'REVERSE' => array('link' => 'string-functions','anchor' => 'function_reverse'),
  1414. 'RIGHT' => array('link' => 'string-functions','anchor' => 'function_right'),
  1415. 'RLIKE' => array('link' => 'regexp','anchor' => 'operator_rlike'),
  1416. 'ROUND' => array('link' => 'mathematical-functions','anchor' => 'function_round'),
  1417. 'ROW_COUNT' => array('link' => 'information-functions','anchor' => 'function_row_count'),
  1418. 'RPAD' => array('link' => 'string-functions','anchor' => 'function_rpad'),
  1419. 'RTRIM' => array('link' => 'string-functions','anchor' => 'function_rtrim'),
  1420. 'SCHEMA' => array('link' => 'information-functions','anchor' => 'function_schema'),
  1421. 'SEC_TO_TIME' => array('link' => 'date-and-time-functions','anchor' => 'function_sec_to_time'),
  1422. 'SECOND' => array('link' => 'date-and-time-functions','anchor' => 'function_second'),
  1423. 'SESSION_USER' => array('link' => 'information-functions','anchor' => 'function_session_user'),
  1424. 'SHA' => array('link' => 'encryption-functions','anchor' => 'function_sha1'),
  1425. 'SHA1' => array('link' => 'encryption-functions','anchor' => 'function_sha1'),
  1426. 'SIGN' => array('link' => 'mathematical-functions','anchor' => 'function_sign'),
  1427. 'SIN' => array('link' => 'mathematical-functions','anchor' => 'function_sin'),
  1428. 'SLEEP' => array('link' => 'miscellaneous-functions','anchor' => 'function_sleep'),
  1429. 'SOUNDEX' => array('link' => 'string-functions','anchor' => 'function_soundex'),
  1430. 'SPACE' => array('link' => 'string-functions','anchor' => 'function_space'),
  1431. 'SQRT' => array('link' => 'mathematical-functions','anchor' => 'function_sqrt'),
  1432. 'STD' => array('link' => 'group-by-functions','anchor' => 'function_std'),
  1433. 'STDDEV_POP' => array('link' => 'group-by-functions','anchor' => 'function_stddev_pop'),
  1434. 'STDDEV_SAMP' => array('link' => 'group-by-functions','anchor' => 'function_stddev_samp'),
  1435. 'STDDEV' => array('link' => 'group-by-functions','anchor' => 'function_stddev'),
  1436. 'STR_TO_DATE' => array('link' => 'date-and-time-functions','anchor' => 'function_str_to_date'),
  1437. 'STRCMP' => array('link' => 'string-comparison-functions','anchor' => 'function_strcmp'),
  1438. 'SUBDATE' => array('link' => 'date-and-time-functions','anchor' => 'function_subdate'),
  1439. 'SUBSTR' => array('link' => 'string-functions','anchor' => 'function_substr'),
  1440. 'SUBSTRING_INDEX' => array('link' => 'string-functions','anchor' => 'function_substring_index'),
  1441. 'SUBSTRING' => array('link' => 'string-functions','anchor' => 'function_substring'),
  1442. 'SUBTIME' => array('link' => 'date-and-time-functions','anchor' => 'function_subtime'),
  1443. 'SUM' => array('link' => 'group-by-functions','anchor' => 'function_sum'),
  1444. 'SYSDATE' => array('link' => 'date-and-time-functions','anchor' => 'function_sysdate'),
  1445. 'SYSTEM_USER' => array('link' => 'information-functions','anchor' => 'function_system_user'),
  1446. 'TAN' => array('link' => 'mathematical-functions','anchor' => 'function_tan'),
  1447. 'TIME_FORMAT' => array('link' => 'date-and-time-functions','anchor' => 'function_time_format'),
  1448. 'TIME_TO_SEC' => array('link' => 'date-and-time-functions','anchor' => 'function_time_to_sec'),
  1449. 'TIME' => array('link' => 'date-and-time-functions','anchor' => 'function_time'),
  1450. 'TIMEDIFF' => array('link' => 'date-and-time-functions','anchor' => 'function_timediff'),
  1451. 'TIMESTAMP' => array('link' => 'date-and-time-functions','anchor' => 'function_timestamp'),
  1452. 'TIMESTAMPADD' => array('link' => 'date-and-time-functions','anchor' => 'function_timestampadd'),
  1453. 'TIMESTAMPDIFF' => array('link' => 'date-and-time-functions','anchor' => 'function_timestampdiff'),
  1454. 'TO_DAYS' => array('link' => 'date-and-time-functions','anchor' => 'function_to_days'),
  1455. 'TRIM' => array('link' => 'string-functions','anchor' => 'function_trim'),
  1456. 'TRUNCATE' => array('link' => 'mathematical-functions','anchor' => 'function_truncate'),
  1457. 'UCASE' => array('link' => 'string-functions','anchor' => 'function_ucase'),
  1458. 'UNCOMPRESS' => array('link' => 'encryption-functions','anchor' => 'function_uncompress'),
  1459. 'UNCOMPRESSED_LENGTH' => array('link' => 'encryption-functions','anchor' => 'function_uncompressed_length'),
  1460. 'UNHEX' => array('link' => 'string-functions','anchor' => 'function_unhex'),
  1461. 'UNIX_TIMESTAMP' => array('link' => 'date-and-time-functions','anchor' => 'function_unix_timestamp'),
  1462. 'UpdateXML' => array('link' => 'xml-functions','anchor' => 'function_updatexml'),
  1463. 'UPPER' => array('link' => 'string-functions','anchor' => 'function_upper'),
  1464. 'USER' => array('link' => 'information-functions','anchor' => 'function_user'),
  1465. 'UTC_DATE' => array('link' => 'date-and-time-functions','anchor' => 'function_utc_date'),
  1466. 'UTC_TIME' => array('link' => 'date-and-time-functions','anchor' => 'function_utc_time'),
  1467. 'UTC_TIMESTAMP' => array('link' => 'date-and-time-functions','anchor' => 'function_utc_timestamp'),
  1468. 'UUID_SHORT' => array('link' => 'miscellaneous-functions','anchor' => 'function_uuid_short'),
  1469. 'UUID' => array('link' => 'miscellaneous-functions','anchor' => 'function_uuid'),
  1470. 'VALUES' => array('link' => 'miscellaneous-functions','anchor' => 'function_values'),
  1471. 'VAR_POP' => array('link' => 'group-by-functions','anchor' => 'function_var_pop'),
  1472. 'VAR_SAMP' => array('link' => 'group-by-functions','anchor' => 'function_var_samp'),
  1473. 'VARIANCE' => array('link' => 'group-by-functions','anchor' => 'function_variance'),
  1474. 'VERSION' => array('link' => 'information-functions','anchor' => 'function_version'),
  1475. 'WEEK' => array('link' => 'date-and-time-functions','anchor' => 'function_week'),
  1476. 'WEEKDAY' => array('link' => 'date-and-time-functions','anchor' => 'function_weekday'),
  1477. 'WEEKOFYEAR' => array('link' => 'date-and-time-functions','anchor' => 'function_weekofyear'),
  1478. 'XOR' => array('link' => 'logical-operators','anchor' => 'operator_xor'),
  1479. 'YEAR' => array('link' => 'date-and-time-functions','anchor' => 'function_year'),
  1480. 'YEARWEEK' => array('link' => 'date-and-time-functions','anchor' => 'function_yearweek'),
  1481. 'SOUNDS_LIKE' => array('link' => 'string-functions','anchor' => 'operator_sounds-like'),
  1482. 'IS_NOT_NULL' => array('link' => 'comparison-operators','anchor' => 'operator_is-not-null'),
  1483. 'IS_NOT' => array('link' => 'comparison-operators','anchor' => 'operator_is-not'),
  1484. 'IS_NULL' => array('link' => 'comparison-operators','anchor' => 'operator_is-null'),
  1485. 'NOT_LIKE' => array('link' => 'string-comparison-functions','anchor' => 'operator_not-like'),
  1486. 'NOT_REGEXP' => array('link' => 'regexp','anchor' => 'operator_not-regexp'),
  1487. 'COUNT_DISTINCT' => array('link' => 'group-by-functions','anchor' => 'function_count-distinct'),
  1488. 'NOT_IN' => array('link' => 'comparison-operators','anchor' => 'function_not-in')
  1489. );
  1490. ?>