[freetds] ct-lib logging

James K. Lowden jklowden at freetds.org
Sun May 3 16:32:33 EDT 2009


I improved ct-lib logging.  Each API call and most internal calls are now
logged, enabling the reader to understand the calling sequence.  

There have been a couple of messages lately about ct-lib parameter
passing. I enhanced the logging because I found the logs unrevealing, and
because most ct-lib users aren't C programmers: most of them are using
DBD::Sybase, and aren't aware of what underlying functions are being
called, much less with what arguments.  

How helpful this will actually be remains to be seen.  ct-lib arguments
are generally pointers to structures, and all the interesting stuff is in
the structures.  This first pass just prints the pointer values, so you
can see that the function was called and whether or not the pointers were
NULL.  Later it would be helpful to dump the structures themselves.  If
anyone wants to contribute a dumper function or two -- give it a file
descriptor and a pointer, and it writes a human-readable description of
the contents -- that would be be a great aid.  

There was a spate of reports in the last two weeks regarding ct-lib
parameter handling.  As of now, I'm confused:  It looked to me as though
people were trying to use Perl DBI placeholders with TDS 7.0, which is
known and documented not to work.  If that wasn't the case, I encourage
you to relink with the latest snapshot (LD_LIBRARY_PATH might help), and
post a new log.  Perhaps the activity will be a little clearer.  

--jkl



More information about the FreeTDS mailing list