Skip to Content.
Sympa Menu

freetds - [freetds] DBOPTION structure now private

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] DBOPTION structure now private
  • Date: Sat, 20 Jan 2007 15:42:26 -0500

I moved the DBOPTION structure out of sybdb.h, removed the unused members,
removed the "opt" prefix from the members, and removed the bogus freeing
function that would rely on the optnext pointer if in fact we had a linked
list. (We don't; we use an array of 36 members, now at least 36 * 6 bytes
smaller with most compilers.)

Checking Sybase's sybdb.h, I see it *is* defined there, with this comment:

** DBOPTION - This structure is used to store the current dataserver
** options. This will be used if TDS version is less than 5.0.

Well, TDS 5.0 was introduced over 10 years ago. I don't mind supporting
the TDS 4.2 protocol, but I have difficulty believing there's much code
out there that relies on this structure being public, because the optnext
pointer and optstatus are useless in FreeTDS. Any code that thinks it's
traversing the DBOPTION linked list is broken, and changing that code to
use dbsetopt, dbclropt, and dbisopt is straightforward.

I imagine Sybase actually uses optnext and knows what optstatus means, and
probably has code written to use them, so I can understand why they'd
leave the structure in sybdb.h.

If you have working code that uses this structure in such a way that my
removal of it causes you pain, I would be interested in hearing about it.
I figure I'm not causing too much pain, because of course you can put it
back yourself. But if you have a lot of company, I should probably
restore it in the main tree.

--jkl



  • [freetds] DBOPTION structure now private, James K. Lowden, 01/20/2007

Archive powered by MHonArc 2.6.24.

Top of Page