Ready for Testing: New DB2 Driver for Drupal

Events happening in the community are now at Drupal community events on www.drupal.org.
hswong3i's picture

After 4 days (!?) development, a new DB2 driver for Drupal 6.x is now ready for testing. It takes IBM's D5 DB2 implementation as base reference, and reuse almost all Oracle driver for Drupal 6.x progress for overcoming DB2-specific limitations.

The latest version of DB2 driver overcome the following DB2-specific limitations:

  1. Map "text:big" to "VARCHAR(4000)", as like as oracle driver's handling. This is all due to DB2 max. table space limitation, even it can support for max. 32672 characters for VARCHAR.
  2. BLOB/CLOB also require special handling for INSERT/UPDATE query (so reuse LOBs patch's hook). even DB2 allow direct insert of BLOB/CLOB within query body, it will easy to be oversize when inserting a huge block of contect (e.g. menu cache contant 140K of characters, which will cause error when INSERT/UPDATE). again, similar handling as oracle driver
  3. Once again, we don't have perfect db_num_rows() implementation within DB2, so just simply forget about it. It will reuse the progress of "remove db_num_rows()" patch: nothing special other than this.
  4. Name of constraint can only be max. 18 characters, where column can only be max. 30 characters (yup, even worse than oracle: both max. 30). I split the trimming action into 2 parts: first handle constraint limitation, and than column. For all others (e.g. table or index name, can support for max. 128 characters) will be handled as like as column (max. 30) for standardize
  5. A huge size of reserved word list, when compare with ANSI. DB2 comes with 168 (!?) extra reserved words, when compare with all version of ANSI standard. BTW, just feel free about this, we did similar rewrite action for oracle driver, and so it is just a simple clone

So how come it can be complete within such short period (only 4 days)? The reason is very simple: we have already discover almost all special handle for overcoming database-specific limitation, when implementing oracle driver. What we need to do is clone and rewrite those handle for DB2, and that's all :)

Again, it is depending on 2 important patches based on cross DB compatibility concern: LOBs patch (http://drupal.org/node/147947) and "remove db_num_rows()" patch (http://drupal.org/node/163191). Surly we also face some other small bugs among core modules, based on "query friendly" concern, but this is not a great problem. They can be handled one by one :)

If you are interesting about this topic, please feel free to test it out, and send back your feedback, bugs, and suggestions.

Drupal 6.x LOBs patch issue: http://drupal.org/node/147947
Drupal 6.x "remove db_num_rows()" issue: http://drupal.org/node/163191
Drupal 6.x DB2 driver issue: http://drupal.org/node/165788

Enterprise

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week