TomD
unread,Mar 19, 2008, 10:34:37 AM3/19/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to apache.dbd.odbc
I uploaded v1.0.10 for Windows and Unix today. It's not a release
that most people will need to scramble to install, but it addresses a
few edge cases.
BUGS FIXED
A pool-cleanup is now scheduled for non-prepared select statements.
Current Apache modules always use prepared statements, but a long-
running module might choose to make ad-hoc apr_dbd_select() calls and
expect them to be cleaned up when the pool passed to apr_dbd_select()
is cleared.
v1.0.10 fixes a few obscure bugs regarding closing connections and
statements. These are not likely to affect current Apache modules,
but experimenting with a scripting module allowed me to try
combinations which ordinarily wouldn't occur.
Since you can pass any pool you want to the dbd functions, it is
possible to call apr_dbd_close() to close a connection - and sometime
later a pool cleanup tries to close a statement on that same
connection.
v1.0.10 now refrains from closing statement handles at pool-cleanup
time if they are associated with closed connections, since some ODBC
drivers don't handle this well.
NEW FEATURE
Several databases use the ODBC API as their native interface; e.g.
DB2, Informix, Oracle's TimesTen in-memory-database. These databases
support bypassing the ODBC Manager and linking directly with their
driver library, as long as you are willing to forgo the ability to
access other ODBC databases with the driver.
You can link odbc-dbd this way using the --with-odbclib= configure
switch on Unix, or with the ODBC_LIB= Makefile option on Windows. Be
sure to specify the directory for the library, for example (Informix):
NMAKE -f Makefile.win APR="C:\Apache2 ODBC_LIB="C:\ProgramFiles\ibm
\Informix\Client-SDK\lib\iclit09b.lib"
-or-
./configure LDFLAGS="-L/opt/informix/lib" --with-odbclib=iclit09b.so
--with-apr=/opt/apache2
If your database driver only supports ODBC version 2, you can now add
a preprocessor definition ODBCVER=0x0200 (Unix) or a Makefile option
ODBCVER=0x0200 (Windows) to build a v2 driver. For example
(TimesTen):
NMAKE -f Makefile.win APR=C:\Apache2 ODBCVER=0x0200 ODBC_LIB="C:
\TimesTen\tt70_32\lib\ttdv70.lib"
-or-
./configure CPPFLAGS="-DODBCVER=0x0200 -I/opt/TimesTen/tt70/include"
LDFLAGS="-L/opt/TimesTen/tt70/lib" --with-odbclib=tten --with-apr=/
opt/apache2
If I can find the time I plan to add additional options so you can
create a driver with a unique name when you use this facility - for
example: apr_dbd_informix.dll or apr_dbd_informix.so. This is a
little bit messy because the driver entry point name must correspond
to the driver filename, so for now it still builds apr_dbd_odbc.dll or
apr_dbd_odbc.so as the single-database driver.
FYI - all these changes are also in the SVN trunk branch for Apache
2.3+/APR 1.3+, but they are not as thoroughly tested as the 1.0 branch
for current Apache/APR releases.
-tom-