Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/databases/mysql-connector-odbc/Makefile,v
retrieving revision 1.26
diff -u -p -r1.26 Makefile
--- Makefile	23 Jan 2009 23:42:04 -0000	1.26
+++ Makefile	26 Jan 2009 18:38:41 -0000
@@ -8,7 +8,7 @@
 PORTNAME=	mysql-connector-odbc
 PORTVERSION=	3.51.26
 DISTVERSIONSUFFIX=	r1127
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	databases
 MASTER_SITES=	${MASTER_SITE_MYSQL}
 MASTER_SITE_SUBDIR=	Connector-ODBC/3.51
@@ -45,9 +45,8 @@ WITH_UNIXODBC?=	yes
 .endif
 
 .if defined(WITH_UNIXODBC)
-BROKEN=			does not compile
-
 LIB_DEPENDS+=		odbc.1:${PORTSDIR}/databases/unixODBC
+BUILD_DEPENDS=		unixODBC>=2.2.14_1:${PORTSDIR}/databases/unixODBC
 CONFIGURE_ARGS+=	--with-odbc-ini=${LOCALBASE}/etc/odbc.ini \
 			--with-unixODBC=${LOCALBASE}
 CFLAGS+=		${PTHREAD_LIBS}
Index: files/patch-driver_myutil.h
===================================================================
RCS file: /home/pcvs/ports/databases/mysql-connector-odbc/files/patch-driver_myutil.h,v
retrieving revision 1.1
diff -u -p -r1.1 patch-driver_myutil.h
--- files/patch-driver_myutil.h	9 Jan 2009 07:10:43 -0000	1.1
+++ files/patch-driver_myutil.h	26 Jan 2009 18:03:23 -0000
@@ -3,8 +3,9 @@
 @@ -174,7 +174,7 @@
  				      SQLLEN *pcbValue);
  SQLRETURN SQL_API my_SQLExtendedFetch(SQLHSTMT hstmt, SQLUSMALLINT fFetchType,
- 				      SQLROWOFFSET irow, SQLULEN *pcrow,
+-				      SQLROWOFFSET irow, SQLULEN *pcrow,
 -				      SQLUSMALLINT FAR *rgfRowStatus, bool upd_status);
++				      SQLLEN irow, SQLULEN *pcrow,
 +				      SQLUSMALLINT FAR *rgfRowStatus, my_bool upd_status);
  SQLRETURN copy_stmt_error(STMT FAR *src, STMT FAR *dst);
  int unireg_to_c_datatype(MYSQL_FIELD *field);
Index: files/patch-driver_results.c
===================================================================
RCS file: /home/pcvs/ports/databases/mysql-connector-odbc/files/patch-driver_results.c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-driver_results.c
--- files/patch-driver_results.c	9 Jan 2009 07:10:43 -0000	1.1
+++ files/patch-driver_results.c	26 Jan 2009 18:01:56 -0000
@@ -1,7 +1,11 @@
---- driver/results.c.orig	2008-04-11 01:58:44.000000000 -0800
-+++ driver/results.c	2009-01-08 11:46:27.000000000 -0900
-@@ -1248,7 +1248,7 @@
-                                        SQLROWOFFSET         irow,
+--- driver/results.c.orig	2008-04-11 16:58:44.000000000 +0700
++++ driver/results.c	2009-01-27 00:01:01.000000000 +0600
+@@ -1245,10 +1245,10 @@
+ */
+ SQLRETURN SQL_API my_SQLExtendedFetch( SQLHSTMT             hstmt,
+                                        SQLUSMALLINT         fFetchType,
+-                                       SQLROWOFFSET         irow,
++                                       SQLLEN               irow,
                                         SQLULEN             *pcrow,
                                         SQLUSMALLINT FAR    *rgfRowStatus,
 -                                       bool                 upd_status )
@@ -9,3 +13,26 @@
  {
      ulong rows_to_fetch;
      long cur_row, max_row;
+@@ -1511,19 +1511,16 @@
+ 
+ SQLRETURN SQL_API SQLExtendedFetch( SQLHSTMT        hstmt,
+                                     SQLUSMALLINT    fFetchType,
+-                                    SQLROWOFFSET    irow,
+-                                    SQLROWSETSIZE  *pcrow,
++                                    SQLLEN          irow,
++                                    SQLULEN        *pcrow,
+                                     SQLUSMALLINT FAR *rgfRowStatus )
+ {
+     SQLRETURN rc;
+-    SQLULEN rows;
+     STMT_OPTIONS *options= &((STMT FAR *)hstmt)->stmt_options;
+ 
+     options->rowStatusPtr_ex= rgfRowStatus;
+ 
+-    rc= my_SQLExtendedFetch(hstmt, fFetchType, irow, &rows, rgfRowStatus, 1);
+-    if (pcrow)
+-      *pcrow= (SQLROWSETSIZE)rows;
++    rc= my_SQLExtendedFetch(hstmt, fFetchType, irow, pcrow, rgfRowStatus, 1);
+ 
+     return rc;
+ }
Index: files/patch-driver_utility.c
===================================================================
RCS file: files/patch-driver_utility.c
diff -N files/patch-driver_utility.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-driver_utility.c	26 Jan 2009 18:16:03 -0000
@@ -0,0 +1,38 @@
+--- driver/utility.c.orig	2009-01-27 00:14:43.000000000 +0600
++++ driver/utility.c	2009-01-27 00:15:46.000000000 +0600
+@@ -504,11 +504,6 @@
+ 
+     return field_is_binary ? SQL_BINARY : SQL_CHAR;
+ 
+-  /*
+-    MYSQL_TYPE_VARCHAR is never actually sent, this just silences
+-    a compiler warning.
+-  */
+-  case MYSQL_TYPE_VARCHAR:
+   case MYSQL_TYPE_VAR_STRING:
+     if (buff)
+       (void)strmov(buff, field_is_binary ? "varbinary" : "varchar");
+@@ -657,7 +652,6 @@
+ 
+   case MYSQL_TYPE_ENUM:
+   case MYSQL_TYPE_SET:
+-  case MYSQL_TYPE_VARCHAR:
+   case MYSQL_TYPE_VAR_STRING:
+   case MYSQL_TYPE_STRING:
+   case MYSQL_TYPE_TINY_BLOB:
+@@ -783,7 +777,6 @@
+ 
+   case MYSQL_TYPE_ENUM:
+   case MYSQL_TYPE_SET:
+-  case MYSQL_TYPE_VARCHAR:
+   case MYSQL_TYPE_VAR_STRING:
+   case MYSQL_TYPE_STRING:
+   case MYSQL_TYPE_TINY_BLOB:
+@@ -867,7 +860,6 @@
+ 
+   case MYSQL_TYPE_ENUM:
+   case MYSQL_TYPE_SET:
+-  case MYSQL_TYPE_VARCHAR:
+   case MYSQL_TYPE_VAR_STRING:
+   case MYSQL_TYPE_STRING:
+   case MYSQL_TYPE_TINY_BLOB:
