Skip to Content.
Sympa Menu

freetds - Re: [freetds] Applying Steve Murphee patch

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Steve Murphree" <smurph AT smcomp.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Applying Steve Murphee patch
  • Date: Sun, 13 Jul 2003 00:58:56 -0700


----- Original Message -----
From: "Frediano Ziglio" <freddyz77 AT tin.it>
To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
Sent: Saturday, July 12, 2003 9:12 AM
Subject: [freetds] Applying Steve Murphee patch


> I'm merging Steve patch. However there are some things I don't like very
> much and other I just want to discuss:
> - static buffer. product name, dsn and other use static buffer, I think
> in a second time to transform them in dynamic one

I was in a hurry to get something going for work. :-) dynamic sounds good
to me.

> - zstring functions. There are already functions to work with string in
> libtds...

I started with the 0.61 release. Some things were duplicate efforts.

> - checks. Steve added some check (parameters value checks) that should
> be done by DM, not by driver

The goal was to link against the libodbc in place of a driver manager for
those systems that don't have shared libraries e.g. OpenBSD/mvme88k :-)
The IBM DB2 cli library also does this. Also, the way I interpret the
ODBC API, the driver is responsible for some of these value checks.
Microsoft clearly marks which sqlstates the driver manager returns and
which sqlstates the driver returns. They may be implemented by some
driver managers, but an assumption is an assumption is an assumption...
I also could have gone a bit overboard. :-)

> - DSN entries. Configuration from DSN (but not from string) was modified
> breaking backward compatibility (freetds.conf configuration removed). I
> don't dislike the idea of others entries.

My goal was to isolate the user from the TDS configuration. It was a
complete hack to achieve this. :-) Maybe a better way can be figured.

> - native_sql. It's a copy&paste of prepare_call...

I think that SQLNative should return stuff like prepare call does. The
problem was that prepare call modified statement variables and is called
in the context of a statement. SQLNative is called in the context of a
connection. I had not figured a way to merge the code into a common
function.

> - tds_login in TDS_DBC. tds_login was thought as a temporary structure,
> is used only to store username.

??? I don't understand.

> - error handling. Error handling was mainly rewritten. I don't
> understand why...

Error handling was rewritten to more closely resemble the M$ driver.
It allows for the driver to return a native error code plus a API
speced sqlstate. No more -1 native error codes. Some of this was
done after 0.61 in the CVS tree so a bit of duplication happened.
Also, an attempt to map SQL Server native error codes to M$ SQL
Server ODBC driver sqlstate codes was implemented so as not
to return 42000 for every native error code that was not handled
by the driver. Comlete v2 to v3 mapping. Complete ODBC
API defined sqlstate messages.

>
> I'm a bit perfectionist, I know...
>
> The patch is very good and add many things, mainly attributes
> descriptors, however require some fix.

Please elaborate. I have also expanded upon the attributes and
row descriptors. There is now a real IRD and ARD in my local
tree. I was waiting until the RPC issue was completed before
I implemented IPD and APD. Plus SQLCopyDesc and all
functional descriptor functions.

>
> I'm blindfolded (I did an operation, don't worry) so I can't merge it
> very quickly...

Get well soon! I hope it wasn't painful.

Steve





Archive powered by MHonArc 2.6.24.

Top of Page