When the following is called and the connection URL
does not specify a default database. An exception is
thrown.
"jdbc:mysql://hostname:3306/"
DatabaseMetaData.getTables( null, null, null, new
String[] {"TABLE"} );
Instead of using the default database, any time a
null catalog name is given pass to getTables, it
should return a ResultSet looping through every
database. But, since changing this would cause
backward compatibility issues, I would propose that
if null is passed and if the "_Database" variable is
null (not connected to a default database), then
instead of throwing the following exception, a
ResultSet containing information from every database
would be useful.
java.sql.SQLException: Syntax error or access
violation: You have an error in your SQL syntax
near 'like '%'' at line 1
at org.gjt.mm.mysql.MysqlIO.sendCommand
(Unknown Source)
at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect
(Unknown Source)
at org.gjt.mm.mysql.MysqlIO.sqlQuery(Unknown
Source)
at org.gjt.mm.mysql.Connection.execSQL
(Unknown Source)
at org.gjt.mm.mysql.Connection.execSQL
(Unknown Source)
at org.gjt.mm.mysql.Statement.executeQuery
(Unknown Source)
at
org.gjt.mm.mysql.jdbc2.Statement.executeQuery(Unknown
Source)
at org.gjt.mm.mysql.DatabaseMetaData.getTables
(Unknown Source)
Thanks!
Logged In: YES
user_id=116907
Changed to a feature request