krummas / DrizzleJDBC

A BSD licensed JDBC driver for Drizzle and MySQL
BSD 3-Clause "New" or "Revised" License
31 stars 22 forks source link

Unknown table 'referential_constraints' in MySQL 5.0.x #23

Open tplessers opened 10 years ago

tplessers commented 10 years ago

Hello,

I'm using the drizzle-jdbc driver to interface with MySQL. Everything works well on MySQL 5.1.x, but on 5.0.x I receive an error :

2013-02-12 16:36:03,234 INFO [STDOUT] Feb 12, 2013 4:36:03 PM org.drizzle.jdbc.internal.mysql.MySQLProtocol executeQuery WARNING: Could not execute query org.drizzle.jdbc.internal.common.query.DrizzleQuery@67adf2d7: Unknown table 'referential_constraints' in information_schema 2013-02-12 16:36:03,243 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 1109, SQLState: 42S02 2013-02-12 16:36:03,244 ERROR [org.hibernate.util.JDBCExceptionReporter] Unknown table 'referential_constraints' in information_schema

information_schema.referential_constraints is indeed available from MySQL 5.1.x on. I did some Googling on this issue, but I can't seem to find a solution for it. Is upgrading to 5.1.x the only possibility, or can this be fixed somehow?

Kind Regards. Tim.

krummas commented 10 years ago

i guess i could try to rewrite the query to get the keys in the table, not very easy though