Skip to Content.
Sympa Menu

freetds - dblib text/image support

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT umcc.ais.org>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: dblib text/image support
  • Date: Tue, 26 Oct 1999 23:42:50 -0400 (EDT)



Hi everyone!

I've commited the first cut of dblib text and image support to CVS. This
implements dbtxptr(), dbtxtimestamp(), dbwritetext(), dbreadtext() and
others.

There are a couple of bugs and unimplemented pieces left, so don't
consider this totally complete yet. A few of the issues:

1) It only handles non-logged (bulk) updates in dbwritetext(), so you must
have select into/bulk set on the database.
2) text and image types have been removed from the row buffer, and thus
row buffering will not work for text/image. The row buffer stores
datatypes with their maximal size, and since text/image type can be 2
gig this is not practical. It would be nice in the future to store a
pointer to the text/image data in the row buffer, but that requires
making sure we free all the pointers when dropping rows, and I didn't
want to introduce code that could leak that much memory until
everything else is working.
3) It probably doesn't handle error conditions as well as it should.
(read: I don't have traps of errors to know how to deal with them)
4) I only tested with TDS 4.2, so there may be some issues with 5.0

On the plus side, bcp support shouldn't be that difficult now since they
both use the same packet types to push data to the server.

I've also fixed a long standing bug in dblib regarding how it deals with
query which return no results (such as 'use dbname' or any set command).
It's previous behaviour would return NO_MORE_RESULTS whereas the real
dblib returns SUCCEED on the first invocation followed by NO_MORE_RESULTS.

I also have some updated protocol documentation which I'm hoping to finish
this week sometime. It's not complete but it should bring the
documentation closer to what the code is currently implementing. It
should also make it easier for new ppl to jump in and help (I hope).

So with all the changes, I'd appreciate it if everyone could check it out
in case I missed something. I ran all the unittests plus quite a few
queries through sqsh (which caught a few more bugs), but I can't promise I
got them all.

I'd like to get BCP support rolled in and at that point maybe up the
version to 0.50 (although I was hoping to have a functional ODBC driver by
0.50...).

Brian (who is off to bed because he has to work tommorow)






  • dblib text/image support, Brian Bruns, 10/26/1999

Archive powered by MHonArc 2.6.24.

Top of Page