Bug #24794 DatabaseMetaData.getSQLKeywords() doesn't return Reserved Words new in MySQL 5.0
Submitted: 4 Dec 2006 11:51 Modified: 22 Feb 2007 14:31
Reporter: Mick Francis (Candidate Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:5.0.4 OS:Windows (WinXP)
Assigned to: Mark Matthews CPU Architecture:Any

[4 Dec 2006 11:51] Mick Francis
Description:
The MySQL Ref Man says the following:

 The following are new reserved words in MySQL 5.0: ASENSITIVE, CALL, CONDITION, CONNECTION, CONTINUE, CURSOR, DECLARE, DETERMINISTIC, EACH, ELSEIF, EXIT, FETCH, GOTO, INOUT, INSENSITIVE, ITERATE, LABEL, LEAVE, LOOP, MODIFIES, OUT, READS, RELEASE, REPEAT, RETURN, SCHEMA, SCHEMAS, SENSITIVE, SPECIFIC, SQL, SQLEXCEPTION, SQLSTATE, SQLWARNING, TRIGGER, UNDO, UPGRADE, WHILE.

DatabaseMetaData.getSQLKeywords() returns only the following:

 AUTO_INCREMENT
 BINARY
 BLOB
 ENUM
 INFILE
 LOAD
 MEDIUMINT
 OPTION
 OUTFILE
 REPLACE
 SET
 TEXT
 UNSIGNED
 ZEROFILL

How to repeat:
Call DatabaseMetaData.getSQLKeywords() for a MySQL connection.
[7 Dec 2006 12:56] Tonci Grgin
Hi Mick and thanks for your problem report.
Verified as described. DatabaseMetaData.getSQLKeywords() is not in sync with manual page: http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html

 - MySQL server 5.0.27BK on WinXP Pro SP2 host with JDK 1.5.10 and latest c/J 5.0 sources.
[2 Feb 2007 22:04] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/19282
[22 Feb 2007 14:31] MC Brown
A note has been added to the 5.0.5 changelog.