Skip to Content.
Sympa Menu

freetds - [freetds] dbbind rejects -1 varlen

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: TDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] dbbind rejects -1 varlen
  • Date: Sun, 2 Dec 2007 22:23:52 -0500

The FreeTDS implementation of dbbind() was at odds with the documentation:
it accepted -1 as a length to mean "buffer is big enough". Documentation
from both vendors says the proper value is zero, not -1. I must say I'm
amazed no one pointed that out before.

dbbind() now fails if varlen < 0. I was unable to find an appropriate
error message, so it doesn't call the error handler; it just fails with a
message to the log.

I changed dbbind, bsqldb, and about 15 unittests. Unfortunately, I can't
commit the changes now because SF is having server difficulties afaict.
So the patch is attached in case you want it.

--jkl

Attachment: dbbind.unittests.diff
Description: Binary data



  • [freetds] dbbind rejects -1 varlen, James K. Lowden, 12/02/2007

Archive powered by MHonArc 2.6.24.

Top of Page