Subject FBDatabaseMetaData and underscores
Author llafranc78
Hi :))

I just encountered a real problem...

In my db I've got many (MANY) tables whose names contain underscores (i.e
MODEL_HEAD). Now, if I use FBDatabaseMetaData.getColumns() on such
tables, If I'm lucky (read: "If the table name is SHORT enough"), I
get the right ResultSet, otherwise I get following Exception:
java.sql.DataTruncation: Data truncation

at org.firebirdsql.jdbc.FBStringField.setString(


at org.firebirdsql.jdbc.FBConnection.doQuery(


The problem is that underscores are treated as wildcards, and so the
call to "Clause tableClause = new Clause("RF.RDB$RELATION_NAME",
tableNamePattern);" (line 2227) adds SPACES (that's 31 spaces...) plus
"%" to the table name, thus causing it's length to increase, and in
some cases this causes the Exception.

This is really bothering me, because I cannot change the table names,
and I really didn't think of underscores as wildcards. And ironically,
a few Firebird system tables contain underscores in their names...

Shall I blame myself or is this a bug?

TIA :)