changeset 1135:e5f6212bf508

upgrade package freetds to cvs
author Mark Brand <mabrand@mabrand.nl>
date Mon, 13 Sep 2010 20:26:27 +0200
parents 3bbf91cb006a
children cf87e39ecc2c
files src/freetds-1-fastforward.patch
diffstat 1 files changed, 137 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/freetds-1-fastforward.patch	Mon Sep 13 17:38:10 2010 +0200
+++ b/src/freetds-1-fastforward.patch	Mon Sep 13 20:26:27 2010 +0200
@@ -153988,3 +153988,140 @@
  /* Define to 1 if you have the GNU Readline library. */
  #define HAVE_READLINE 1
  
+
+commit 1ffe71750c4393409f2c03695f2fe0f8203cf0d1
+Author: freddy77 <freddy77>
+Date:   Mon Sep 13 16:38:21 2010 +0000
+
+    improve dbsetlversion and dbcolinfo, add dbiscount
+
+diff --git a/include/sybdb.h b/include/sybdb.h
+index 9f849a8..14a6091 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.92 2010/02/07 21:56:09 jklowden Exp $";
++static const char rcsid_sybdb_h[] = "$Id: sybdb.h,v 1.93 2010/09/13 16:38:21 freddy77 Exp $";
+ static const void *const no_unused_sybdb_h_warn[] = { rcsid_sybdb_h, no_unused_sybdb_h_warn };
+ 
+ #ifdef FALSE
+diff --git a/src/dblib/dblib.c b/src/dblib/dblib.c
+index 6fd790c..7cf1887 100644
+--- a/src/dblib/dblib.c
++++ b/src/dblib/dblib.c
+@@ -75,7 +75,7 @@
+ #include <dmalloc.h>
+ #endif
+ 
+-TDS_RCSID(var, "$Id: dblib.c,v 1.365 2010/07/27 08:53:12 freddy77 Exp $");
++TDS_RCSID(var, "$Id: dblib.c,v 1.366 2010/09/13 16:38:21 freddy77 Exp $");
+ 
+ static RETCODE _dbresults(DBPROCESS * dbproc);
+ static int _db_get_server_type(int bindtype);
+
+commit 48b183443a8c6a8366e1b1f1f9639a906447649a
+Author: freddy77 <freddy77>
+Date:   Mon Sep 13 16:38:21 2010 +0000
+
+    improve dbsetlversion and dbcolinfo, add dbiscount
+
+diff --git a/ChangeLog b/ChangeLog
+index 70e2560..aafacb7 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,11 @@
++Mon Sep 13 18:32:55 CEST 2010    Frediano Ziglio <freddy77_A_gmail_D_com>
++	* include/sybdb.h src/dblib/dblib.c:
++	- patch from LacaK
++	 1. in dbsetlversion() fixes DBVER60 case and adds support for 
++	    DBVERSION_71 and DBVERSION_72
++	 2. adds dbiscount() which is Microsoft specific DB-Library function
++	 3. in dbcolinfo() adds support Updatabe and Identity fields in DBCOL structure
++
+ Thu Sep  2 12:35:00 CDT 2010   Craig A. Berry <craigberry@mac.com>
+         * Find the system poll and poll.h on VMS.
+         * vms/config_h.vms
+@@ -2849,4 +2857,4 @@ Wed Jan  9 19:54:43 EST 2008	JK Lowden <jklowden@freetds.org>
+ 	* ChangeLog-0.82 added because of release
+ 	
+ $FreeTDS$
+-$Id: ChangeLog,v 1.3117 2010/09/02 18:01:42 berryc Exp $
++$Id: ChangeLog,v 1.3118 2010/09/13 16:38:21 freddy77 Exp $
+diff --git a/include/sybdb.h b/include/sybdb.h
+index 14a6091..96aa97e 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.93 2010/09/13 16:38:21 freddy77 Exp $";
++static const char rcsid_sybdb_h[] = "$Id: sybdb.h,v 1.94 2010/09/13 16:39:28 freddy77 Exp $";
+ static const void *const no_unused_sybdb_h_warn[] = { rcsid_sybdb_h, no_unused_sybdb_h_warn };
+ 
+ #ifdef FALSE
+@@ -626,6 +626,7 @@ DBINT dbcolutype(DBPROCESS * dbprocess, int column);
+ DBINT dbconvert(DBPROCESS * dbproc, int srctype, const BYTE * src, DBINT srclen, int desttype, BYTE * dest, DBINT destlen);
+ DBINT dbconvert_ps(DBPROCESS * dbprocess, int srctype, BYTE * src, DBINT srclen, int desttype, BYTE * dest, DBINT destlen,
+ 		   DBTYPEINFO * typeinfo);
++BOOL dbiscount(DBPROCESS * dbproc);
+ DBINT dbcount(DBPROCESS * dbproc);
+ 
+ #define DBCOUNT(x) dbcount((x))
+diff --git a/src/dblib/dblib.c b/src/dblib/dblib.c
+index 7cf1887..7539648 100644
+--- a/src/dblib/dblib.c
++++ b/src/dblib/dblib.c
+@@ -75,7 +75,7 @@
+ #include <dmalloc.h>
+ #endif
+ 
+-TDS_RCSID(var, "$Id: dblib.c,v 1.366 2010/09/13 16:38:21 freddy77 Exp $");
++TDS_RCSID(var, "$Id: dblib.c,v 1.367 2010/09/13 16:39:28 freddy77 Exp $");
+ 
+ static RETCODE _dbresults(DBPROCESS * dbproc);
+ static int _db_get_server_type(int bindtype);
+@@ -915,7 +915,13 @@ dbsetlversion (LOGINREC * login, BYTE version)
+ 		login->tds_login->tds_version = 0x402;
+ 		return SUCCEED;
+ 	case DBVER60:
+-		login->tds_login->tds_version = 0x600;
++		login->tds_login->tds_version = 0x700;
++		return SUCCEED;
++	case DBVERSION_71:
++		tds_set_version(login->tds_login, 7, 1);
++		return SUCCEED;
++	case DBVERSION_72:
++		tds_set_version(login->tds_login, 7, 2);
+ 		return SUCCEED;
+ 	}
+ 	
+@@ -2703,6 +2709,15 @@ dbanullbind(DBPROCESS * dbproc, int computeid, int column, DBINT * indicator)
+  * 	- for select, count of rows returned, after all rows have been fetched.  
+  * \sa DBCOUNT(), dbnextrow(), dbresults().
+  */
++BOOL
++dbiscount(DBPROCESS * dbproc)
++{
++	tdsdump_log(TDS_DBG_FUNC, "dbiscount(%p)\n", dbproc);
++	CHECK_PARAMETER(dbproc, SYBENULL, -1);
++
++	return dbproc->tds_socket && dbproc->tds_socket->rows_affected != TDS_NO_COUNT;
++}
++
+ DBINT
+ dbcount(DBPROCESS * dbproc)
+ {
+@@ -2890,6 +2905,9 @@ dbcolinfo (DBPROCESS *dbproc, CI_TYPE type, DBINT column, DBINT computeid, DBCOL
+ 			pdbcol->Scale = ps->scale;
+ 		}
+ 
++		pdbcol->Updatable = colinfo->column_writeable ? TRUE : FALSE;
++		pdbcol->Identity = colinfo->column_identity ? TRUE : FALSE;
++
+ 		return SUCCEED;
+ 	}
+