Skip to content
Permalink
Browse files

Seit MySQL 6 darf COLUMN_PATTERN in meta.getColumns(null,schema,table…

  • Loading branch information...
willuhn committed Mar 17, 2017
1 parent 1e80763 commit a6c3c2d9e8a476258142d4c1f6ccc79f0a28e4f9
Showing with 10 additions and 2 deletions.
  1. +10 −2 src/de/willuhn/datasource/db/AbstractDBObject.java
@@ -165,10 +165,18 @@ protected void init() throws SQLException
try {

String schema = System.getProperty(getService().getClass().getName() + ".schema",null); // BUGZILLA 960
meta = getConnection().getMetaData().getColumns(null,schema,tableName,null);
try
{
meta = getConnection().getMetaData().getColumns(null,schema,tableName,null);
}
catch (Exception e)
{
Logger.trace("unable to fetch table meta-data using NULL column name pattern, trying '%', see https://bugs.mysql.com/bug.php?id=81105");
meta = getConnection().getMetaData().getColumns(null,schema,tableName,"%");
}
String field;
if (!meta.next())
throw new SQLException("unable to determine meta data for table " + tableName);
throw new SQLException("database table not found: " + tableName);

do
{

0 comments on commit a6c3c2d

Please sign in to comment.
You can’t perform that action at this time.