after 4 days (!?) development, DB2 driver for D6 is now ready for testing. it take IBM's D5 DB2 implementation as base reference, and reuse almost all D6 oracle driver (http://drupal.org/node/39260) special handling for overcoming DB2-specific limitations.
DB2-specific limitations includes:
- 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.
- 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
- 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.
- name of constraint can only be max. 18 characters, where column only support for max. 30 characters (yup, even worse than oracle: both max. 30). here i will need to 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
- a huge size of reserved word list, when compare with ANSI. it 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
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. we only need to clone, and rewrite those handle for DB2, and that's all :)
again, it is depending on 2 important patches due to 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 :)