Re: Cannot Use DBVERSION_72 With DBLIB In 0.91 Release
"James K. Lowden" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 3 Sep 2011 22:29:43 -0400 Ken Collins <[email protected]> wrote: > 1) I can not configure FreeTDS --with-tdsver="7.2". Is this an > oversight? Yes, maybe. It's not fully supported, as you've found out. > 2) I found out that dbsetversion is basically a no-op that sets a > global. Sorry? A "no-op that sets a global" is a contradiction. > However, it has not been updated with DBVERSION_72 and was > throwing a bunch of "FreeTDS: db-lib: exiting because client error > handler returned INT_EXIT for msgno 20206" which was misleading. Message 20206 is SYBEIVERS, "Illegal version level specified." (I don't like "illegal", but that's what Sybase uses.) Acknowledged, this behavior is surprising and db-lib's non-support of TDS 7.2 isn't documented. Is that what you mean by "misleading"? > Should it be patched like so? > > --- dblib.c > +++ (clipboard) > @@ -5801,8 +5801,8 @@ > case DBVERSION_42: > case DBVERSION_46: > case DBVERSION_100: > - case DBVERSION_70: > - case DBVERSION_80: > + case DBVERSION_71: > + case DBVERSION_72: > g_dblib_version = version; > return SUCCEED; > default: No. 7.0 is a valid version, and 80 is an alias for 71: sybdb.h:78 #define DBVERSION_80 DBVERSION_71 > 3) Even if I do not use dbsetversion and avoid the problem above and > instead rely on dbsetlversion(DBVERSION_72), I can not get a > connection. The message is "TDS version downgraded to 7.1!" and it is > driving me nuts. I consistently get this error weather I use the > TDSVER environment variable, freetds.conf setting, etc. Any insight? That error *message* is courtesy of yours truly. Previously, the downgrade occurred silently. The reason for the message is "explained" in login.c: /* disable tds9 if iconv wanted, currently not supported */ I have not had time to investigate what that really means, or whether the downgrade is necessary and, if so, what might be done. I accept that iconv could be involved, and I've concluded that charset conversion should be removed from libtds. libtds is undergoing major change, possibly even a rewrite if I am able to demonstrate feasibility and efficacy. When iconv is removed from FreeTDS and libtds supports TDS 7.3 (yes, 7.3), we'll be in a position to support all datatypes in db-lib, including Unicode types. These changes will require, are requiring, significant effort both interesting and difficult. To anyone reading this who wants to be a part of it: please join. There is much to do, and learn by doing. --jkl