[teiid-users] Issue using MySQL

Steven Hawkins shawkins at redhat.com
Mon Apr 20 10:18:31 EDT 2009


I reopened TEIID-379 and addressed this in 6.1.0.

----- Original Message -----
From: "Davide Cerbo" <d.cerbo at pronetics.it>
To: teiid-users at lists.jboss.org
Sent: Monday, April 20, 2009 7:04:27 AM GMT -06:00 US/Canada Central
Subject: [teiid-users] Issue using MySQL

Hi all,
I'm using Teiid to connect to a Derby and MySQL databases.
The designer (version pre-6.0.0) works well, but when I trying to
connect from my application I have the follow error:

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an
error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near 'sql-mode =
'ANSI'' at line 1

The cause is line 84 in MySQLTranslator.java:
stmt.execute("set SESSION sql-mode = 'ANSI'"); //$NON-NLS-1$
The correct syntax it would be:
set SESSION sql_mode = 'ANSI
I have take this syntax from:
http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html

I have compiled the source and now it works.

-- 
Davide Cerbo
-----------
http://www.pronetics.it
http://www.sourcesense.com
http://www.jesty.it
http://jugsalerno.wordpress.com
-----------
_______________________________________________
teiid-users mailing list
teiid-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/teiid-users



More information about the teiid-users mailing list