Re: case insensitive identifiers in queries
Posted by: Todd Farmer
Date: July 17, 2012 02:15PM

Hi Chris,

There is not a parameter in Connector/J to transform user queries to use lower-case identifiers. You have three options:

1. Reload the entire database, making sure to set lower_case_table_names=1 in the server configuration file and restarting the server before reloading the data. This will make table identifiers case-insensitive:

http://dev.mysql.com/doc/refman/5.5/en/identifier-case-sensitivity.html

2. Write your own interceptor that parses queries and translates identifiers to lower case. You can use the StatementInterceptorV2 interface, as described here:

http://mysqlblog.fivefarmers.com/2011/10/17/connectorj-extension-points-statement-interceptors/

3. Rewrite your queries to use case-matched identifiers.

Hope that helps.

--
Todd Farmer
MySQL @ Oracle
http://www.oracle.com/mysql/

Options: ReplyQuote


Subject
Written By
Posted
Re: case insensitive identifiers in queries
July 17, 2012 02:15PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.