From 973a9644c5b8c992ed52f5d81e7d4696f2171a02 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Sat, 11 Dec 2010 01:11:00 +0100 Subject: upgrade package freetds to cvs --- src/freetds-1-fastforward.patch | 352 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 352 insertions(+) diff --git a/src/freetds-1-fastforward.patch b/src/freetds-1-fastforward.patch index eb947b3..b2ab75f 100644 --- a/src/freetds-1-fastforward.patch +++ b/src/freetds-1-fastforward.patch @@ -160329,3 +160329,355 @@ index ea8d6f1..9cdb942 100644 } void + +commit 0bd65e0fbc6ae4240739ed63401a3138eb679a67 +Author: freddy77 +Date: Fri Dec 3 15:01:28 2010 +0000 + + small comment updates + +diff --git a/ChangeLog b/ChangeLog +index 2cd446f..90aa06f 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,6 @@ ++Fri Dec 3 16:01:20 CET 2010 Frediano Ziglio ++ * src/tds/token.c: small comment updates ++ + Tue Nov 30 11:55:20 CET 2010 Frediano Ziglio + * src/tds/login.c: + - fix problem with ct_connect if server not set (reported by Peter +@@ -3042,4 +3045,4 @@ Wed Jan 9 19:54:43 EST 2008 JK Lowden + * ChangeLog-0.82 added because of release + + $FreeTDS$ +-$Id: ChangeLog,v 1.3166 2010/11/30 10:55:43 freddy77 Exp $ ++$Id: ChangeLog,v 1.3167 2010/12/03 15:01:28 freddy77 Exp $ +diff --git a/src/tds/token.c b/src/tds/token.c +index 155271f..c21cbdb 100644 +--- a/src/tds/token.c ++++ b/src/tds/token.c +@@ -43,7 +43,7 @@ + #include + #endif + +-TDS_RCSID(var, "$Id: token.c,v 1.391 2010/11/26 08:41:26 freddy77 Exp $"); ++TDS_RCSID(var, "$Id: token.c,v 1.392 2010/12/03 15:01:29 freddy77 Exp $"); + + #define USE_ICONV tds->use_iconv + +@@ -1483,7 +1483,7 @@ tds7_get_data_info(TDSSOCKET * tds, TDSCOLUMN * curcol) + break; + case 2: + curcol->column_size = tds_get_smallint(tds); +- /* under TDS9 this means ?var???(MAX) */ ++ /* under TDS7.2 this means ?var???(MAX) */ + if (curcol->column_size < 0 && IS_TDS72_PLUS(tds)) { + curcol->column_size = 0x3ffffffflu; + curcol->column_varint_size = 8; +@@ -1743,7 +1743,6 @@ tds_get_data_info(TDSSOCKET * tds, TDSCOLUMN * curcol, int is_param) + } + + /* read sql collation info */ +- /* TODO: we should use it ! */ + if (IS_TDS71_PLUS(tds) && is_collate_type(curcol->on_server.column_type)) { + tds_get_n(tds, curcol->column_collation, 5); + curcol->char_conv = + +commit 3f948ab973122807947fb648f786508a28295024 +Author: freddy77 +Date: Fri Dec 3 16:01:09 2010 +0000 + + fix problem for cross compiled Darwin system + +diff --git a/ChangeLog b/ChangeLog +index 90aa06f..4190d4f 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++Fri Dec 3 17:01:00 CET 2010 Frediano Ziglio ++ * m4/sprintf_i64_format.m4: ++ - fix problem for cross compiled Darwin system ++ + Fri Dec 3 16:01:20 CET 2010 Frediano Ziglio + * src/tds/token.c: small comment updates + +@@ -3045,4 +3049,4 @@ Wed Jan 9 19:54:43 EST 2008 JK Lowden + * ChangeLog-0.82 added because of release + + $FreeTDS$ +-$Id: ChangeLog,v 1.3167 2010/12/03 15:01:28 freddy77 Exp $ ++$Id: ChangeLog,v 1.3168 2010/12/03 16:01:09 freddy77 Exp $ +diff --git a/m4/sprintf_i64_format.m4 b/m4/sprintf_i64_format.m4 +index 1e2bc82..14108af 100644 +--- a/m4/sprintf_i64_format.m4 ++++ b/m4/sprintf_i64_format.m4 +@@ -1,4 +1,4 @@ +-dnl $Id: sprintf_i64_format.m4,v 1.9 2007/07/07 17:55:48 freddy77 Exp $ ++dnl $Id: sprintf_i64_format.m4,v 1.10 2010/12/03 16:01:12 freddy77 Exp $ + ## + # Test for 64bit integer sprintf format specifier + # ld 64 bit machine +@@ -24,7 +24,9 @@ if test "x$tds_i64_format" = "x"; then + #include + + #if !defined(__GLIBC__) || __GLIBC__ < 2 || !defined(__GLIBC_MINOR__) || __GLIBC_MINOR__ < 2 +-#error no proper glibc ++# if !defined(__APPLE__) ++# error no proper glibc or darwin system ++# endif + #endif + + int main() + +commit 9cb9e29dcf5d3327343ee79d3a79aba5910ce509 +Author: freddy77 +Date: Mon Dec 6 15:24:28 2010 +0000 + + fix protocol problem with TDS7.2 and XML with schema + +diff --git a/ChangeLog b/ChangeLog +index 4190d4f..d8c882c 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++Mon Dec 6 16:23:53 CET 2010 Frediano Ziglio ++ * src/odbc/unittests/data.c src/tds/token.c: ++ - fix protocol problem with TDS7.2 and XML with schema ++ + Fri Dec 3 17:01:00 CET 2010 Frediano Ziglio + * m4/sprintf_i64_format.m4: + - fix problem for cross compiled Darwin system +@@ -3049,4 +3053,4 @@ Wed Jan 9 19:54:43 EST 2008 JK Lowden + * ChangeLog-0.82 added because of release + + $FreeTDS$ +-$Id: ChangeLog,v 1.3168 2010/12/03 16:01:09 freddy77 Exp $ ++$Id: ChangeLog,v 1.3169 2010/12/06 15:24:28 freddy77 Exp $ +diff --git a/src/odbc/unittests/data.c b/src/odbc/unittests/data.c +index 8938928..6f83522 100644 +--- a/src/odbc/unittests/data.c ++++ b/src/odbc/unittests/data.c +@@ -13,7 +13,7 @@ + * Also we have to check normal char and wide char + */ + +-static char software_version[] = "$Id: data.c,v 1.33 2010/07/05 09:20:33 freddy77 Exp $"; ++static char software_version[] = "$Id: data.c,v 1.34 2010/12/06 15:24:28 freddy77 Exp $"; + static void *no_unused_var_warn[] = { software_version, no_unused_var_warn }; + + static int result = 0; +@@ -212,6 +212,12 @@ main(int argc, char *argv[]) + Test("NVARCHAR(MAX)", "Micio mao", SQL_C_CHAR, "9 Micio mao"); + Test("VARBINARY(MAX)", "ciao", SQL_C_BINARY, "6369616F"); + Test("XML", "ciaohi", SQL_C_CHAR, "28 ciaohi"); ++ ++ /* XML with schema */ ++ odbc_command("IF EXISTS(SELECT * FROM sys.xml_schema_collections WHERE [name] = 'test_schema') DROP XML SCHEMA COLLECTION test_schema"); ++ odbc_command("CREATE XML SCHEMA COLLECTION test_schema AS ''"); ++ Test("XML(test_schema)", "ciao", SQL_C_CHAR, "17 ciao"); ++ odbc_command("DROP XML SCHEMA COLLECTION test_schema"); + } + + odbc_disconnect(); +diff --git a/src/tds/token.c b/src/tds/token.c +index c21cbdb..8c04a58 100644 +--- a/src/tds/token.c ++++ b/src/tds/token.c +@@ -43,7 +43,7 @@ + #include + #endif + +-TDS_RCSID(var, "$Id: token.c,v 1.392 2010/12/03 15:01:29 freddy77 Exp $"); ++TDS_RCSID(var, "$Id: token.c,v 1.393 2010/12/06 15:24:28 freddy77 Exp $"); + + #define USE_ICONV tds->use_iconv + +@@ -1523,13 +1523,26 @@ tds7_get_data_info(TDSSOCKET * tds, TDSCOLUMN * curcol) + + if (is_blob_type(curcol->column_type)) { + /* discard this additional byte */ +- /* TODO discover its meaning */ +- if (IS_TDS72_PLUS(tds)) +- tds_get_byte(tds); +- curcol->table_namelen = +- tds_get_string(tds, tds_get_smallint(tds), curcol->table_name, sizeof(curcol->table_name) - 1); +- } else if (IS_TDS72_PLUS(tds) && curcol->column_type == SYBMSXML) +- tds_get_byte(tds); ++ if (IS_TDS72_PLUS(tds)) { ++ unsigned char num_parts = tds_get_byte(tds); ++ /* TODO do not discard first ones */ ++ for (; num_parts; --num_parts) { ++ curcol->table_namelen = ++ tds_get_string(tds, tds_get_smallint(tds), curcol->table_name, sizeof(curcol->table_name) - 1); ++ } ++ } else { ++ curcol->table_namelen = ++ tds_get_string(tds, tds_get_smallint(tds), curcol->table_name, sizeof(curcol->table_name) - 1); ++ } ++ } else if (IS_TDS72_PLUS(tds) && curcol->column_type == SYBMSXML) { ++ unsigned char has_schema = tds_get_byte(tds); ++ if (has_schema) { ++ /* discard schema informations */ ++ tds_get_string(tds, tds_get_byte(tds), NULL, 0); /* dbname */ ++ tds_get_string(tds, tds_get_byte(tds), NULL, 0); /* schema owner */ ++ tds_get_string(tds, tds_get_smallint(tds), NULL, 0); /* schema collection */ ++ } ++ } + + /* + * under 7.0 lengths are number of characters not + +commit c89d2d382aeda03cc130fa8db604419f533da0b8 +Author: jklowden +Date: Fri Dec 10 20:46:19 2010 +0000 + + Better Win32 compatibility + +diff --git a/ChangeLog b/ChangeLog +index d8c882c..125c71c 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++Fri Dec 10 15:42:12 EST 2010 JK Lowden ++ * include/sqlfront.h include/sybdb.h Better Win32 compatibility ++ * src/apps/tsql.c report Kerberos compiled-in status ++ + Mon Dec 6 16:23:53 CET 2010 Frediano Ziglio + * src/odbc/unittests/data.c src/tds/token.c: + - fix protocol problem with TDS7.2 and XML with schema +@@ -3053,4 +3057,4 @@ Wed Jan 9 19:54:43 EST 2008 JK Lowden + * ChangeLog-0.82 added because of release + + $FreeTDS$ +-$Id: ChangeLog,v 1.3169 2010/12/06 15:24:28 freddy77 Exp $ ++$Id: ChangeLog,v 1.3170 2010/12/10 20:46:19 jklowden Exp $ +diff --git a/include/sqlfront.h b/include/sqlfront.h +index cd38c8e..645a5e9 100644 +--- a/include/sqlfront.h ++++ b/include/sqlfront.h +@@ -22,11 +22,30 @@ + + #include "./sybfront.h" + +-static const char rcsid_sqlfront_h[] = "$Id: sqlfront.h,v 1.5 2009/01/16 20:27:56 jklowden Exp $"; ++static const char rcsid_sqlfront_h[] = "$Id: sqlfront.h,v 1.6 2010/12/10 20:46:19 jklowden Exp $"; + static const void *const no_unused_sqlfront_h_warn[] = { rcsid_sqlfront_h, no_unused_sqlfront_h_warn }; + + typedef DBPROCESS * PDBPROCESS; + typedef LOGINREC * PLOGINREC; + typedef DBCURSOR * PDBCURSOR; + ++typedef int * LPINT; ++typedef char * LPSTR; ++typedef BYTE * LPBYTE; ++typedef void * LPVOID; ++typedef const char * LPCSTR; ++ ++typedef const LPINT LPCINT; ++typedef const LPBYTE LPCBYTE ; ++typedef USHORT * LPUSHORT; ++typedef const LPUSHORT LPCUSHORT; ++typedef DBINT * LPDBINT; ++typedef const LPDBINT LPCDBINT; ++typedef DBBINARY * LPDBBINARY; ++typedef const LPDBBINARY LPCDBBINARY; ++typedef DBDATEREC * LPDBDATEREC; ++typedef const LPDBDATEREC LPCDBDATEREC; ++typedef DBDATETIME * LPDBDATETIME; ++typedef const LPDBDATETIME LPCDBDATETIME; ++ + #endif +diff --git a/include/sybdb.h b/include/sybdb.h +index 03805dc..0d34102 100644 +--- a/include/sybdb.h ++++ b/include/sybdb.h +@@ -41,7 +41,7 @@ extern "C" + #define TDS_STATIC_CAST(type, a) ((type)(a)) + #endif + +-static const char rcsid_sybdb_h[] = "$Id: sybdb.h,v 1.95 2010/09/14 02:12:47 jklowden Exp $"; ++static const char rcsid_sybdb_h[] = "$Id: sybdb.h,v 1.96 2010/12/10 20:46:19 jklowden Exp $"; + static const void *const no_unused_sybdb_h_warn[] = { rcsid_sybdb_h, no_unused_sybdb_h_warn }; + + #ifdef FALSE +@@ -266,13 +266,17 @@ typedef struct + + typedef struct + { +- DBUSMALLINT days; +- DBUSMALLINT minutes; ++ DBUSMALLINT days; // days since Jan-1-1900 ++ DBUSMALLINT minutes; // minutes since midnight + } DBDATETIME4; + + #ifdef MSDBLIB +-#define DBDATETIM4 DBDATETIME4 +-#define SQLCHAR SYBCHAR ++# define SQLCHAR SYBCHAR ++ typedef struct ++ { ++ DBUSMALLINT numdays; ++ DBUSMALLINT nummins; ++ } DBDATETIM4; + #endif + + typedef struct tds_dblib_loginrec LOGINREC; + +commit 4297fd6a25332c9fb0e0529da54ecce02811ad71 +Author: jklowden +Date: Fri Dec 10 20:46:22 2010 +0000 + + report Kerberos compiled-in status + +diff --git a/src/apps/tsql.c b/src/apps/tsql.c +index 615edd5..127f00c 100644 +--- a/src/apps/tsql.c ++++ b/src/apps/tsql.c +@@ -87,7 +87,7 @@ + #include "tdsconvert.h" + #include "replacements.h" + +-TDS_RCSID(var, "$Id: tsql.c,v 1.137 2010/09/14 00:56:22 jklowden Exp $"); ++TDS_RCSID(var, "$Id: tsql.c,v 1.138 2010/12/10 20:46:22 jklowden Exp $"); + + #define TDS_ISSPACE(c) isspace((unsigned char) (c)) + +@@ -393,6 +393,17 @@ get_default_instance_port(const char hostname[]) + # define LC_ALL 0 + #endif + ++#ifdef HAVE_SSPI ++const char have_sspi[] = "yes"; ++#else ++const char have_sspi[] = "no"; ++#endif ++#ifdef ENABLE_KRB5 ++const char enable_krb5[] = "yes"; ++#else ++const char enable_krb5[] = "no"; ++#endif ++ + static void + populate_login(TDSLOGIN * login, int argc, char **argv) + { +@@ -456,7 +467,7 @@ populate_login(TDSLOGIN * login, int argc, char **argv) + break; + case 'C': + settings = tds_get_compiletime_settings(); +- printf("%s\n%35s: %s\n%35s: %s\n%35s: %s\n%35s: %s\n%35s: %s\n%35s: %s\n%35s: %s\n%35s: %s\n%35s: %s\n", ++ printf("%s\n%35s: %s\n%35s: %s\n%35s: %s\n%35s: %s\n%35s: %s\n%35s: %s\n%35s: %s\n%35s: %s\n%35s: %s\n%35s: %s\n%35s: %s\n", + "Compile-time settings (established with the \"configure\" script)", + "Version", settings->freetds_version, + "freetds.conf directory", settings->sysconfdir, +@@ -468,7 +479,9 @@ populate_login(TDSLOGIN * login, int argc, char **argv) + "iconv library", settings->libiconv ? "yes" : "no", + "TDS version", settings->tdsver, + "iODBC", settings->iodbc ? "yes" : "no", +- "unixodbc", settings->unixodbc ? "yes" : "no"); ++ "unixodbc", settings->unixodbc ? "yes" : "no", ++ "SSPI \"trusted\" logins", have_sspi, ++ "Keberos", enable_krb5); + exit(0); + break; + default: -- cgit v0.12