Re: Firebird Adapter

From: Holger Hoffstätte (holge..izards.de)
Date: Sun Aug 31 2003 - 09:44:19 EDT

  • Next message: Brad Messerle: "Suggestions"

    Hello Andrus,

    good to see you back and already busy again :)

    > Ok, I nailed down the main offender - constraint error on ARTGROUP
    > table. Note that ARTGROUP has a reflexive relationship to itself. And
    > Firebird seems to be the only database out of all we work with that
    > will have referential integrity complaints when you run a query like
    > this: "DELETE FROM ARTGROUP". So there was nothing wrong with adapter,

    Isn't that somehow wrong? IMHO the SQL engine should see that removing all
    rows should also effectively unravel the entire constraint chain.

    > 1. Performing any JDBC operation on tables or other DB objects that do
    > not exist results in OutOfMemoryError (yikes!) A few unit tests in

    Yes, I have noticed this as well at the time I checked in Heiko's sources.
    I briefly looked into it and it seemed to generate insane amounts of
    protocol data forever.

    > 2. SelectQueryTst.testSelectLikeExactMatch fails. This particular unit
    > test is controversial (see postgresql discussions on this list 4-5
    > months ago), but it demonstrates that exact comparison of CHAR columns
    > is impossible due to space padding. On other databases workaround was
    > to strip padding (e.g. RTRIM(ARTIST_NAME) = 'xyz'). I am not sure how
    > to do this on Firebird. Does it even support string functions in SQL?

    It does not seem to:

    SQL> select artist_name from artist where artist_name like 'artist1';
    SQL> select artist_name from artist where artist_name like 'artist1*';
    SQL> select artist_name from artist where artist_name like 'artist1%';

    ARTIST_NAME
    ===============================================================================
    artist1
    artist10

    SQL> select artist_name from artist where rtrim(artist_name) like
    'artist1';
    Statement failed, SQLCODE = -804

    Dynamic SQL Error
    -SQL error code = -804
    -Function unknown
    -RTRIM
    SQL>

    Interestingly enough, googling for 'Firebird rtrim' finds a lot of
    documents where people happily use rtrim etc. - not sure if this applies
    to the older Interbase version; I did not find anything in the SQL
    reference either.

    > a. Stored Procedures. Chances are that they'll work out of the box, but
    > setting up unit tests requires some effort. See
    > org.objectstyle.cayenne.unittest.SybaseDelegate (under tests source)
    > for a good example how to setup database-specific DDL for stored
    > procedures testing.

    If I read the release notes for the current Firebird JDBC driver
    correctly, stored procedure invocation is currently broken and will be
    fixed in a future driver. Not sure if this is still the case? The release
    notes seemed a little out of date even in the latest 1.0.1 package.

    > b. LOB. Support for LOBs may just work (e.g. Sybase) or may require
    > some serious customization (Oracle). This need to be tested.
    >
    > BTW, a. and b. should be tried for DB2 adapter as well... Volunteers?

    I'll try to look into the Firebird OOM further (since it's a real
    showstopper) but have my own three week long (and mostly computerless)
    vacation coming up as well.. If Scott's and Tore's bugs with flattened
    relationships are fixed I'd say release rc2 and mention individual driver
    shortcomings in the release notes.

    Holger



    This archive was generated by hypermail 2.0.0 : Sun Aug 31 2003 - 09:43:47 EDT