commit freetds for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/128a7b98d536a9cf9b4d4d5a90d63475.jpg?s=120&d=mm&r=g)
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package freetds for openSUSE:Factory checked in at 2022-12-24 14:50:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/freetds (Old) and /work/SRC/openSUSE:Factory/.freetds.new.1563 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "freetds" Sat Dec 24 14:50:53 2022 rev:35 rq:1044254 version:1.3.16 Changes: -------- --- /work/SRC/openSUSE:Factory/freetds/freetds.changes 2022-12-07 17:33:15.463978237 +0100 +++ /work/SRC/openSUSE:Factory/.freetds.new.1563/freetds.changes 2022-12-24 14:50:56.955161696 +0100 @@ -1,0 +2,8 @@ +Thu Dec 22 12:41:30 UTC 2022 - Dirk M��ller+ +- update to 1.3.16: + * tds_close_socket and tds_connection_close could have been called + while reading/writing TLS sockets so calling tds_ssl_deinit + cause some used structure to be released while used. + +------------------------------------------------------------------- Old: ---- freetds-1.3.15.tar.gz New: ---- freetds-1.3.16.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ freetds.spec ++++++ --- /var/tmp/diff_new_pack.4KUxE3/_old 2022-12-24 14:50:57.459164637 +0100 +++ /var/tmp/diff_new_pack.4KUxE3/_new 2022-12-24 14:50:57.467164684 +0100 @@ -17,7 +17,7 @@ Name: freetds -Version: 1.3.15 +Version: 1.3.16 Release: 0 Summary: A free re-implementation of the TDS (Tabular Data Stream) protocol License: GPL-2.0-or-later AND LGPL-2.1-or-later ++++++ freetds-1.3.15.tar.gz -> freetds-1.3.16.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetds-1.3.15/ChangeLog new/freetds-1.3.16/ChangeLog --- old/freetds-1.3.15/ChangeLog 2022-11-22 10:01:08.000000000 +0100 +++ new/freetds-1.3.16/ChangeLog 2022-12-09 10:01:06.000000000 +0100 @@ -1,4 +1,15 @@ Author: Frediano Ziglio +Date: Thu Dec 8 07:20:01 2022 +0000 + + tds: Fix use-after-free in TLS code + + tds_close_socket and tds_connection_close could have been called + while reading/writing TLS sockets so calling tds_ssl_deinit + cause some used structure to be released while used. + + Reported-by: Jonas B��low + +Author: Frediano Ziglio Date: Mon Nov 21 11:05:07 2022 +0000 odbc: Fix some issues with SQLCopyDesc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetds-1.3.15/configure new/freetds-1.3.16/configure --- old/freetds-1.3.15/configure 2022-11-22 10:01:14.000000000 +0100 +++ new/freetds-1.3.16/configure 2022-12-09 10:01:12.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for FreeTDS 1.3.15. +# Generated by GNU Autoconf 2.69 for FreeTDS 1.3.16. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='FreeTDS' PACKAGE_TARNAME='freetds' -PACKAGE_VERSION='1.3.15' -PACKAGE_STRING='FreeTDS 1.3.15' +PACKAGE_VERSION='1.3.16' +PACKAGE_STRING='FreeTDS 1.3.16' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1438,7 +1438,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures FreeTDS 1.3.15 to adapt to many kinds of systems. +\`configure' configures FreeTDS 1.3.16 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1508,7 +1508,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of FreeTDS 1.3.15:";; + short | recursive ) echo "Configuration of FreeTDS 1.3.16:";; esac cat <<\_ACEOF @@ -1672,7 +1672,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -FreeTDS configure 1.3.15 +FreeTDS configure 1.3.16 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2377,7 +2377,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by FreeTDS $as_me 1.3.15, which was +It was created by FreeTDS $as_me 1.3.16, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3243,7 +3243,7 @@ # Define the identity of the package. PACKAGE='freetds' - VERSION='1.3.15' + VERSION='1.3.16' cat >>confdefs.h <<_ACEOF @@ -22214,7 +22214,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by FreeTDS $as_me 1.3.15, which was +This file was extended by FreeTDS $as_me 1.3.16, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22280,7 +22280,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -FreeTDS config.status 1.3.15 +FreeTDS config.status 1.3.16 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetds-1.3.15/configure.ac new/freetds-1.3.16/configure.ac --- old/freetds-1.3.15/configure.ac 2022-11-22 10:01:08.000000000 +0100 +++ new/freetds-1.3.16/configure.ac 2022-12-09 10:01:06.000000000 +0100 @@ -11,7 +11,7 @@ # ------------------------------------------------------------ # Initialization # ------------------------------------------------------------ -AC_INIT(FreeTDS, 1.3.15) +AC_INIT(FreeTDS, 1.3.16) AC_CONFIG_SRCDIR(src/dblib/dblib.c) AC_PREREQ(2.53) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetds-1.3.15/doc/bsqldb.1 new/freetds-1.3.16/doc/bsqldb.1 --- old/freetds-1.3.15/doc/bsqldb.1 2022-11-22 10:01:33.000000000 +0100 +++ new/freetds-1.3.16/doc/bsqldb.1 2022-12-09 10:01:31.000000000 +0100 @@ -1,7 +1,7 @@ .\" cf. groff_mdoc .Dd March 26, 2015 .Dt BSQLDB 1 -.Os FreeTDS 1.3.15 +.Os FreeTDS 1.3.16 .Sh NAME .Nm bsqldb .Nd batch SQL script processor using DB-Library diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetds-1.3.15/doc/bsqlodbc.1 new/freetds-1.3.16/doc/bsqlodbc.1 --- old/freetds-1.3.15/doc/bsqlodbc.1 2022-11-22 10:01:33.000000000 +0100 +++ new/freetds-1.3.16/doc/bsqlodbc.1 2022-12-09 10:01:31.000000000 +0100 @@ -1,6 +1,6 @@ .\" cf. groff_mdoc .Dd March 25, 2015 -.Os FreeTDS 1.3.15 +.Os FreeTDS 1.3.16 .Dt BSQLODBC FreeTDS "FreeTDS Reference Manual" .\" .Sh NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetds-1.3.15/doc/datacopy.1 new/freetds-1.3.16/doc/datacopy.1 --- old/freetds-1.3.15/doc/datacopy.1 2022-11-22 10:01:33.000000000 +0100 +++ new/freetds-1.3.16/doc/datacopy.1 2022-12-09 10:01:31.000000000 +0100 @@ -1,6 +1,6 @@ .\" cf. groff_mdoc .Dd March 25, 2015 -.Os FreeTDS 1.3.15 +.Os FreeTDS 1.3.16 .Dt DATACOPY FreeTDS "FreeTDS Reference Manual" .\" .Sh NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetds-1.3.15/doc/defncopy.1 new/freetds-1.3.16/doc/defncopy.1 --- old/freetds-1.3.15/doc/defncopy.1 2022-11-22 10:01:33.000000000 +0100 +++ new/freetds-1.3.16/doc/defncopy.1 2022-12-09 10:01:31.000000000 +0100 @@ -1,6 +1,6 @@ .\" cf. groff_mdoc .Dd April 26, 2012 -.Os FreeTDS 1.3.15 +.Os FreeTDS 1.3.16 .Dt DEFNCOPY FreeTDS "FreeTDS Reference Manual" .\" .Sh NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetds-1.3.15/doc/fisql.1 new/freetds-1.3.16/doc/fisql.1 --- old/freetds-1.3.15/doc/fisql.1 2022-11-22 10:01:33.000000000 +0100 +++ new/freetds-1.3.16/doc/fisql.1 2022-12-09 10:01:31.000000000 +0100 @@ -1,6 +1,6 @@ .\" cf. groff_mdoc .Dd March 25, 2015 -.Os FreeTDS 1.3.15 +.Os FreeTDS 1.3.16 .Dt FISQL FreeTDS "FreeTDS Reference Manual" .\" .Sh NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetds-1.3.15/doc/freebcp.1 new/freetds-1.3.16/doc/freebcp.1 --- old/freetds-1.3.15/doc/freebcp.1 2022-11-22 10:01:33.000000000 +0100 +++ new/freetds-1.3.16/doc/freebcp.1 2022-12-09 10:01:31.000000000 +0100 @@ -1,6 +1,6 @@ .\" cf. groff_mdoc .Dd March 25, 2015 -.Os FreeTDS 1.3.15 +.Os FreeTDS 1.3.16 .Dt FREEBCP 1 .Sh NAME .Nm freebcp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetds-1.3.15/doc/freetds.conf.5 new/freetds-1.3.16/doc/freetds.conf.5 --- old/freetds-1.3.15/doc/freetds.conf.5 2022-11-22 10:01:33.000000000 +0100 +++ new/freetds-1.3.16/doc/freetds.conf.5 2022-12-09 10:01:31.000000000 +0100 @@ -1,5 +1,5 @@ .Dd May 2, 2017 -.Os FreeTDS 1.3.15 +.Os FreeTDS 1.3.16 .Dt FREETDS.CONF "FreeTDS 5" "FreeTDS Reference Manual" . .Sh NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetds-1.3.15/doc/osql.1 new/freetds-1.3.16/doc/osql.1 --- old/freetds-1.3.15/doc/osql.1 2022-11-22 10:01:33.000000000 +0100 +++ new/freetds-1.3.16/doc/osql.1 2022-12-09 10:01:31.000000000 +0100 @@ -1,6 +1,6 @@ .\" cf. groff_mdoc .Dd April 26, 2012 -.Os FreeTDS 1.3.15 +.Os FreeTDS 1.3.16 .Dt OSQL FreeTDS "FreeTDS Reference Manual" .\" .Sh NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetds-1.3.15/doc/reference/a00077_source.html new/freetds-1.3.16/doc/reference/a00077_source.html --- old/freetds-1.3.15/doc/reference/a00077_source.html 2022-11-22 10:01:45.000000000 +0100 +++ new/freetds-1.3.16/doc/reference/a00077_source.html 2022-12-09 10:01:44.000000000 +0100 @@ -582,7 +582,7 @@ static int tds_dstr_isempty(const DSTR *s)test if string is emptyDefinition: string.h:60TDSRET tds_bcp_done(TDSSOCKET *tds, int *rows_copied)Tell we finished sending BCP data to server.Definition: bulk.c:836-RETCODE bcp_init(DBPROCESS *dbproc, const char *tblname, const char *hfile, const char *errfile, int direction)Prepare for bulk copy operation on a table.Definition: bcp.c:167+int tds7_get_instance_ports(FILE *output, struct addrinfo *addr)Get port of all instances.Definition: net.c:1093int tds7_get_instance_ports(FILE *output, struct addrinfo *addr)Get port of all instances.Definition: net.c:1091struct addrinfo * tds_lookup_host(const char *servername)Get the IP address for a hostname.Definition: config.c:987static int _bcp_convert_out(DBPROCESS *dbproc, TDSCOLUMN *curcol, BCP_HOSTCOLINFO *hostcol, TDS_UCHAR **p_data, const char *bcpdatefmt)Convert column for output (usually to a file) Conversion is slightly different from input as:Definition: bcp.c:725@@ -721,7 +721,7 @@unsigned char * row_datarow data, NULL for resinfo->current_rowDefinition: buffering.h:5-Definition: proto.h:56+int tds7_get_instance_port(struct addrinfo *addr, const char *instance)Get port of given instance.Definition: net.c:1229int tds7_get_instance_port(struct addrinfo *addr, const char *instance)Get port of given instance.Definition: net.c:1227TDSRET tds_submit_rpc(TDSSOCKET *tds, const char *rpc_name, TDSPARAMINFO *params, TDSHEADERS *head)Calls a RPC from server.Definition: query.c:1929diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetds-1.3.15/doc/reference/a00269_source.html new/freetds-1.3.16/doc/reference/a00269_source.html --- old/freetds-1.3.15/doc/reference/a00269_source.html 2022-11-22 10:01:47.000000000 +0100 +++ new/freetds-1.3.16/doc/reference/a00269_source.html 2022-12-09 10:01:46.000000000 +0100 @@ -497,7 +497,7 @@Definition: ctlib.h:69static void tds_swap_numeric(TDS_NUMERIC *num)Converts numeric from Microsoft representation to internal one (Sybase).Definition: data.c:1674-Main include file for libtds.+static int tds_socket_read(TDSCONNECTION *conn, TDSSOCKET *tds, unsigned char *buf, int buflen)Read from an OS socket @TODO remove tds, save error somewhere, report error in another way.Definition: net.c:727static int tds_socket_read(TDSCONNECTION *conn, TDSSOCKET *tds, unsigned char *buf, int buflen)Read from an OS socket @TODO remove tds, save error somewhere, report error in another way.Definition: net.c:725@@ -508,7 +508,7 @@int(* read)(struct tds_input_stream *stream, void *ptr, size_t len)read some data Return 0 if end of stream Return <0 if error (actually not defined)Definition: stream.h:35-TDSRET tds_bcp_done(TDSSOCKET *tds, int *rows_copied)Tell we finished sending BCP data to server.Definition: bulk.c:836+int tds7_get_instance_ports(FILE *output, struct addrinfo *addr)Get port of all instances.Definition: net.c:1093int tds7_get_instance_ports(FILE *output, struct addrinfo *addr)Get port of all instances.Definition: net.c:1091TDSRET tds_generic_put(TDSSOCKET *tds, TDSCOLUMN *curcol, int bcp7)Write data to wire.Definition: data.c:919@@ -543,7 +543,7 @@unsigned char canonicinternal numeric index into array of all encodingsDefinition: tds.h:624Definition: poll.h:52TDSDYNAMIC * dynslist of dynamic allocated for this connection contains only dynamic allocated on the serverDefinition: tds.h:1112-TDSRET tds_alloc_row(TDSRESULTINFO *res_info)Allocate space for row store return NULL on out of memory.Definition: mem.c:524+int tds_goodread(TDSSOCKET *tds, unsigned char *buf, int buflen)Loops until we have received some characters return -1 on failure.Definition: net.c:916int tds_goodread(TDSSOCKET *tds, unsigned char *buf, int buflen)Loops until we have received some characters return -1 on failure.Definition: net.c:914unsigned data_lendata length, this does not account SMP header, only TDS partDefinition: tds.h:1071@@ -606,7 +606,7 @@Definition: md5.h:8static TDSRET tds5_put_params(TDSSOCKET *tds, TDSPARAMINFO *info, int flags) TDS_WURSend parameters to server.Definition: query.c:1693-unsigned char tds_get_byte(TDSSOCKET *tds)Return a single byte from the input buffer.Definition: read.c:72+static int tds_socket_write(TDSCONNECTION *conn, TDSSOCKET *tds, const unsigned char *buf, int buflen)Write to an OS socket.Definition: net.c:762static int tds_socket_write(TDSCONNECTION *conn, TDSSOCKET *tds, const unsigned char *buf, int buflen)Write to an OS socket.Definition: net.c:760static int tds5_bcp_add_fixed_columns(TDSBCPINFO *bcpinfo, tds_bcp_get_col_data get_col_data, tds_bcp_null_error null_error, int offset, unsigned char *rowbuffer, int start)Add fixed size columns to the row.Definition: bulk.c:507TDSRET tds_submit_optioncmd(TDSSOCKET *tds, TDS_OPTION_CMD command, TDS_OPTION option, TDS_OPTION_ARG *param, TDS_INT param_size)Send option commands to server.Definition: query.c:3389@@ -618,7 +618,7 @@DSTR * tds_dstr_get(TDSSOCKET *tds, DSTR *s, size_t len)Reads a string from wire and put in a DSTR.Definition: read.c:293const char * tds_next_placeholder(const char *start)Get position of next placeholder.Definition: query.c:535-Definition: proto.h:62+int tds_goodwrite(TDSSOCKET *tds, const unsigned char *buffer, size_t buflen)Definition: net.c:987int tds_goodwrite(TDSSOCKET *tds, const unsigned char *buffer, size_t buflen)Definition: net.c:985Definition: tds.h:628@@ -660,7 +660,7 @@volatile unsigned char in_cancelindicate we are waiting a cancel reply; discard tokens till acknowledge; 1 mean we have to send cance...Definition: tds.h:1248void * tds_alloc_param_data(TDSCOLUMN *curparam)Allocate data for a parameter.Definition: mem.c:364-static bool tds_cursor_check_allocated(TDSCONNECTION *conn, TDSCURSOR *cursor)Check if a cursor is allocated into the server.Definition: query.c:2991+int tds_select(TDSSOCKET *tds, unsigned tds_sel, int timeout_seconds)Select on a socket until it's available or the timeout expires.Definition: net.c:612int tds_select(TDSSOCKET *tds, unsigned tds_sel, int timeout_seconds)Select on a socket until it's available or the timeout expires.Definition: net.c:610#define TDS_PUT_N_AS_UCS2(tds, s)Utility to convert a constant ascii string to ucs2 and send to server.Definition: query.c:110@@ -755,7 +755,7 @@int tds_get_size_by_type(TDS_SERVER_TYPE servertype)Return the number of bytes needed by specified type.Definition: tds_types.h:9Definition: proto.h:56-static TDSERRNO tds_setup_socket(TDS_SYS_SOCKET *p_sock, struct addrinfo *addr, unsigned int port, int *p_oserr)Setup the socket and attempt a connection.Definition: net.c:249+int tds7_get_instance_port(struct addrinfo *addr, const char *instance)Get port of given instance.Definition: net.c:1229int tds7_get_instance_port(struct addrinfo *addr, const char *instance)Get port of given instance.Definition: net.c:1227static TDSRET tds_query_flush_packet(TDSSOCKET *tds)Flush query packet.Definition: query.c:178diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetds-1.3.15/doc/reference/a00287_source.html new/freetds-1.3.16/doc/reference/a00287_source.html --- old/freetds-1.3.15/doc/reference/a00287_source.html 2022-11-22 10:01:47.000000000 +0100 +++ new/freetds-1.3.16/doc/reference/a00287_source.html 2022-12-09 10:01:46.000000000 +0100 @@ -470,7 +470,7 @@TDSRET tds_submit_rpc(TDSSOCKET *tds, const char *rpc_name, TDSPARAMINFO *params, TDSHEADERS *head)Calls a RPC from server.Definition: query.c:1929-int tds_read_packet(TDSSOCKET *tds)Read in one 'packet' from the server.Definition: packet.c:527+int tds_select(TDSSOCKET *tds, unsigned tds_sel, int timeout_seconds)Select on a socket until it's available or the timeout expires.Definition: net.c:612diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetds-1.3.15/doc/reference/a00359_source.html new/freetds-1.3.16/doc/reference/a00359_source.html --- old/freetds-1.3.15/doc/reference/a00359_source.html 2022-11-22 10:01:44.000000000 +0100 +++ new/freetds-1.3.16/doc/reference/a00359_source.html 2022-12-09 10:01:43.000000000 +0100 @@ -634,7 +634,7 @@ - + @@ -643,7 +643,7 @@ - + @@ -767,7 +767,7 @@ - + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetds-1.3.15/doc/reference/a00407_source.html new/freetds-1.3.16/doc/reference/a00407_source.html --- old/freetds-1.3.15/doc/reference/a00407_source.html 2022-11-22 10:01:44.000000000 +0100 +++ new/freetds-1.3.16/doc/reference/a00407_source.html 2022-12-09 10:01:43.000000000 +0100 @@ -70,7 +70,7 @@int tds_select(TDSSOCKET *tds, unsigned tds_sel, int timeout_seconds)Select on a socket until it's available or the timeout expires.Definition: net.c:610
If you want to get your hands really dirty, here are some big ideas to contemplate.
After many years developing FreeTDS, we've learned quite a bit about the protocol and how to write database libraries. Unfortunately, though, one of the things holding us back ��� and, obviously hampering the project ��� is the underlying utility library.
This wouldn't be a from-scratch effort; most of the code is already written. What's needed is a more uniform API that better reflects the TDS protocol, and that does not attempt character set conversions immediately on receipt of the data.
This would be a new client library modelled after stdio
, a project to demonstrate what database programming should be like.
If you want to get your hands really dirty, here are some big ideas to contemplate.
After many years developing FreeTDS, we've learned quite a bit about the protocol and how to write database libraries. Unfortunately, though, one of the things holding us back ��� and, obviously hampering the project ��� is the underlying utility library.
This wouldn't be a from-scratch effort; most of the code is already written. What's needed is a more uniform API that better reflects the TDS protocol, and that does not attempt character set conversions immediately on receipt of the data.
This would be a new client library modelled after stdio
, a project to demonstrate what database programming should be like.
The TDS protocol version is probably something you'd rather not know even existed, much less something you'd have to choose. But there's not that much to it, really. Unless you run into an incompatibility, you're best off running with the highest protocol version supported by your server. That's what the vendors' own products do, which is why when you read the Sybase or Microsoft documentation you find no mention of TDS versions. -
Table��3.1.��Versions of the TDS Protocol, by Product
Product | TDS Version | Comment |
---|---|---|
Sybase before System 10, Microsoft SQL Server 6.x | 4.2 | Still works with all products, subject to its limitations. |
Sybase System 10 and above | 5.0 | Still the most current protocol used by Sybase. |
Sybase System SQL Anywhere | 5.0 only | Originally Watcom SQL Server, a completely separate codebase. Our best information is that SQL Anywhere first supported TDS in version 5.5.03 using the OpenServer Gateway (OSG), and native TDS 5.0 support arrived with version 6.0. |
Microsoft SQL Server 7.0 | 7.0 | Includes support for the extended datatypes in SQL Server 7.0 (such as char/varchar fields of more than 255 characters), and support for Unicode. |
Microsoft SQL Server 2000 | 7.1 | Include support for bigint (64 bit integers), variant and collation on all fields. Collation is not widely used. |
Microsoft SQL Server 2005 | 7.2 | Includes support for varchar(max), varbinary(max), xml datatypes and MARS[a]. |
Microsoft SQL Server 2008 | 7.3 | Includes support for time, date, datetime2, datetimeoffset. |
Microsoft SQL Server 2012 or 2014 | 7.4 | Includes support for session recovery. |
[a] Multiple Active Result Sets. |
Version 1.1 improved the discovery of the protocol version. +
Table��3.1.��Versions of the TDS Protocol, by Product
Product | TDS Version | Comment |
---|---|---|
Sybase before System 10, Microsoft SQL Server 6.x | 4.2 | Still works with all products, subject to its limitations. |
Sybase System 10 and above | 5.0 | Still the most current protocol used by Sybase. |
Sybase System SQL Anywhere | 5.0 only | Originally Watcom SQL Server, a completely separate codebase. Our best information is that SQL Anywhere first supported TDS in version 5.5.03 using the OpenServer Gateway (OSG), and native TDS 5.0 support arrived with version 6.0. |
Microsoft SQL Server 7.0 | 7.0 | Includes support for the extended datatypes in SQL Server 7.0 (such as char/varchar fields of more than 255 characters), and support for Unicode. |
Microsoft SQL Server 2000 | 7.1 | Include support for bigint (64 bit integers), variant and collation on all fields. Collation is not widely used. |
Microsoft SQL Server 2005 | 7.2 | Includes support for varchar(max), varbinary(max), xml datatypes and MARS[a]. |
Microsoft SQL Server 2008 | 7.3 | Includes support for time, date, datetime2, datetimeoffset. |
Microsoft SQL Server 2012 or 2014 | 7.4 | Includes support for session recovery. |
[a] Multiple Active Result Sets. |
Version 1.1 improved the discovery of the protocol version.
If you are using Microsoft SQL Server is recommended to leave the version to auto
(the default).
If you are using any Sybase product you could set version to 5.0 to get faster connections (although auto
will work too).
-
Choosing the correct TDS protocol version for use with SQL Server can be confusing. Hopefully, these steps will lead you to the correct version. If you have a Sybase server, you should be able to use version 5.0, otherwise, if you have Microsoft SQL Server refer to the following section.
Step 1: Find out which FreeTDS version you are running. You can use the command: `tsql -C`
Step 2: Find out what version of Microsoft SQL Server you are running.
Step 3: Pick the lower TDS Version number out of what matches steps 1 and 2 from the table below.
@@ -17,7 +17,7 @@
If you are running FreeTDS Version 0.64 or 0.82 with Microsoft SQL Server 2000, use TDS Version 8.0 instead of 7.1.
If you are running FreeTDS Version 0.91 or greater with Microsoft SQL Server 2000, use TDS Version 7.1.
Please note, this is ONLY if you need Microsoft SQL Server 2000 support.
For best results, use the highest version of the protocol supported by your server. If you encounter problems, try a lower version. If that works, though, please report it to the mailing list! -
In the earlier days of FreeTDS, Microsoft did not release official specs for the TDS protocol. +
In the earlier days of FreeTDS, Microsoft did not release official specs for the TDS protocol. When MSSQL 2000 (product 8.0) was released, there was semi-official indications from the Microsoft community that the TDS protocol would be version 8.0. So the FreeTDS developers adopted that version for FreeTDS. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freetds-1.3.15/doc/userguide/ConfirmInstall.html new/freetds-1.3.16/doc/userguide/ConfirmInstall.html --- old/freetds-1.3.15/doc/userguide/ConfirmInstall.html 2022-11-22 10:01:41.000000000 +0100 +++ new/freetds-1.3.16/doc/userguide/ConfirmInstall.html 2022-12-09 10:01:39.000000000 +0100 @@ -77,7 +77,7 @@ Adaptive Server connection failed There was a problem connecting to the server
- ���Unexpected EOF from the server��� seems to be a fairly common message when the wrong TDS version is used. Note that there's no complaint about the login.
If the right TDS version is used, the server will accept the login packet and examine its contents to authenticate the user. If there's a problem, the server will say so. This is the first time we're receiving a message from the server. [8] + ���Unexpected EOF from the server��� seems to be a fairly common message when the wrong TDS version is used. Note that there's no complaint about the login.
If the right TDS version is used, the server will accept the login packet and examine its contents to authenticate the user. If there's a problem, the server will say so. This is the first time we're receiving a message from the server. [8]
Example��3.8.��Login failure
$
tsql -S
@@ -86,7 +86,7 @@ Login failed for user 'notme'. Msg 20002, Level 9, State -1, Server OpenClient, Line -1 Adaptive Server connection failed - There was a problem connecting to the serverservername
-U notme
Bypassing freetds.conf
:
tsql
{-H hostname
} {-p port
} {-U username
} [-Ppassword
] [-C]
+ There was a problem connecting to the server
Bypassing freetds.conf
:
tsql
{-H hostname
} {-p port
} {-U username
} [-Ppassword
] [-C]
Keep in mind that the TDS protocol version normally comes from freetds.conf
. When using tsql this way, the library uses the compiled-in default (set by the configure
script). If that's not what you want, override it using the TDSVER
environment variable.
Example��3.9.��Connect with tsql using a hostname and port number
$
TDSVER=auto tsql -H
@@ -113,4 +113,4 @@ In yourhillary
-p4100
-Usa
PWD
file, add aSRV
entry specifying the DSN entry for yourodbc.ini
. The ODBC tests all build their ownodbc.ini
and try to redirect the Driver Manager to it, however this functionality is very DM dependent and may well fail unless you have eitheriODBC
orunixODBC
.
Tip The
PWD
provided by FreeTDS includes usernames and passwords that probably don't exist on your server. -
[8] If you'd like to help the project and want to so something fairly easy but still useful, modify tsql to distinguish clearly between errors returned by the library, and those returned by the server. Errors should be marked ���error��� and don't return state or a line number, but can contain an error code (and message) from the operating system.
[8] If you'd like to help the project and want to so something fairly easy but still useful, modify tsql to distinguish clearly between errors returned by the library, and those returned by the server. Errors should be marked ���error��� and don't return state or a line number, but can contain an error code (and message) from the operating system.