[daisy] [JIRA] Commented: (DSY-350) Patches to make Daisy 1.5 run with IBM DB2

Bruno Dumon (JIRA) issues at cocoondev.org
Fri Sep 15 13:40:08 CDT 2006


    [ http://issues.cocoondev.org//browse/DSY-350?page=comments#action_12917 ] 

Bruno Dumon commented on DSY-350:
---------------------------------

Thanks for contributing these patches and comprehensive overview of changes.

I think there's not much chance we'll add it to the 1.5 branch, because on the one hand we don't add new functionality to older releases which is not added to trunk too, and OTOH because it's unlikely we'll do another 1.5 release (except for upcoming 1.5.1 for the Windows installer) and would like to invest our limited resources to trunk development. That doesn't make your patch less interesting of course, as the core issues and solutions stay the same.

For the torque scripts, you could have spared yourself some work by simply taking the DB2 scripts from torque. In fact, I would still recommend to look at this (you can find the scripts in the torque source download in the directory src/generator/src/templates/). Maybe this will also solve your problem with booleans and the too-long constraint names.

Just for future reference I add a link here to the discussion about case-sensitive searching:
http://lists.cocoondev.org/pipermail/daisy/2006-September/005029.html

> Patches to make Daisy 1.5 run with IBM DB2
> ------------------------------------------
>
>          Key: DSY-350
>          URL: http://issues.cocoondev.org//browse/DSY-350
>      Project: Daisy
>         Type: Improvement
>   Components: Database support
>     Versions: public - 1.5
>     Reporter: Aaron Digulla
>     Priority: Minor
>  Attachments: daisy-patch.txt, daisy-patch.txt
>
> *NOTE* This patch is *not* ready to be included. Please read the comments below and give me feedback so I can fix everything.
> - The patch is against Daisy 1.5. I can't really create a patch against 2.0 because we're using 1.5 in production and that's my topmost priority. If have a good solution, I'm game.
> - Removed illegal quotes in many SQL statements
> - Fixed setObject(N, null) in LocalDocumentStrategy.storeFields() which DB2 doesn't like (and Oracle, too)
> - Fixed a couple of unused imports
> - LocalCollectionStrategy: backported a fix from trunk (invoking the event COLLECTION_DELETED). Not sure about this one.
> - LocalEmailSubscriptionManager contains "select null from" which doesn't work with DB2 (and probably Oracle). Use "select 1 from" instead.
> - install/maven.xml: Build SQL for DB2 and invoke an additional task to shorten constraint names which are too long for DB2 (max. 18 chars)
> - install/src/torque/sql/base/db2/columns.vm: Unicode strings are stored as UTF-8 bytes in VARCHAR, so each VARCHAR must be twice as long in DB2
> There is also an attempt to make BOOLEANCHAR with DB2 which doesn't work. No idea why I get "CHAR" for columns which are defined as BOOLEANCHAR in daisy-schema.xml in this file.
> - Most of the other torque/velocity files are copied from the Oracle files. The types in install/src/torque/sql/base/db2/db.props are adjusted according to the DB2 documentation. They say that the JDBC driver maps "boolean" to SMALLINT (except in PreparedStatement.setObject() ...)
> - install/src/schema/daisy-schema.xml: This is a big one. Replaced all DATE by TIMESTAMP (because these fields like last_modified contain more than just the day)
> I also had to replace BOOLEANCHAR by BIT to allow to map it to SMALLINT as DB2 JDBC required.
> - install/DB2DatabaseSpecifics.java: In getPreStatements(), I create a new stored procedure which I need to drop tables without errors. It would be better if the DB connection was passed into this method so I could do the error handling myself.
> As it is now, the method will fail unless you create the method manually before you run the installation for the first time.
> (There might be a way to drop the procedure safely but I couldn't find it)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



More information about the daisy mailing list