This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 207867 - Informix returns string in metadata space padded
Summary: Informix returns string in metadata space padded
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-28 11:49 UTC by matthias42
Modified: 2012-02-10 18:01 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
proposed patch (16.22 KB, patch)
2012-01-28 11:49 UTC, matthias42
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description matthias42 2012-01-28 11:49:11 UTC
Created attachment 115342 [details]
proposed patch

I noticed, that my informix connections failed to display foreign keys. In my own code I found, that sometimes informix return space padded string in the metadata so basicly I now trim every string returned by metadata. This assumes  that no sane DBMS uses space padding in the "real data". I guard the trimming for null values, which are left unaltered.

Additionally the metadata model makes the assumption, that a DBMS not supporting catalogs in definition statements, also does not allow catalogs in queries. This assumption is wrong. Informix only allows creates in the same catalog, but queries can be cross catalog. I removed the guard in JDBCMetadata and just try to get the catalogs. If this fails it gets logged but we don't do an early exit. Instead the core then falls back to the old "we don't see other catalogs" behaviour.

Together with the fix from bug #207866 I can now see all catalogs of an server and use "show data" on them.
Comment 1 Jiri Rechtacek 2012-02-10 18:01:13 UTC
Thanks. Applied in core-main/rev/754606a7d290