summaryrefslogtreecommitdiff
path: root/community-staging/myodbc
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-12-17 23:14:43 +0000
committerroot <root@rshg054.dnsready.net>2011-12-17 23:14:43 +0000
commit146025aa1c838c12fa7b4873414da73816bfb6bd (patch)
tree22bcdae4c400322b756f2f4cc360de8c08b946a4 /community-staging/myodbc
parent492f7c22a61fdb0488000da9f66d68e11bb43918 (diff)
Sat Dec 17 23:14:43 UTC 2011
Diffstat (limited to 'community-staging/myodbc')
-rw-r--r--community-staging/myodbc/PKGBUILD31
-rw-r--r--community-staging/myodbc/myconf.h.in165
-rw-r--r--community-staging/myodbc/myodbc-64bit.patch85
-rw-r--r--community-staging/myodbc/myodbc-add-mysys.patch29
-rw-r--r--community-staging/myodbc/myodbc-my-free.patch253
-rw-r--r--community-staging/myodbc/myodbc-shutdown.patch27
6 files changed, 590 insertions, 0 deletions
diff --git a/community-staging/myodbc/PKGBUILD b/community-staging/myodbc/PKGBUILD
new file mode 100644
index 000000000..1a9738827
--- /dev/null
+++ b/community-staging/myodbc/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 60685 2011-12-16 21:38:28Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+pkgname=myodbc
+pkgver=5.1.9
+pkgrel=2
+pkgdesc="ODBC driver/connector for MySQL"
+arch=(i686 x86_64)
+url="http://dev.mysql.com/downloads/connector/odbc/"
+depends=('unixodbc' 'libmysqlclient')
+license=('GPL')
+options=('libtool')
+source=("http://mysql.cce.usp.br/Downloads/Connector-ODBC/5.1/mysql-connector-odbc-${pkgver}.tar.gz"
+ myconf.h.in)
+md5sums=('80f146bd384a9011d968aa67df27e68e'
+ '6c99c83e309b18d15ef0f07f0b461241')
+
+build() {
+ cd $srcdir/mysql-connector-odbc-${pkgver}
+ cp $srcdir/myconf.h.in driver/myconf.h.in
+ [ -x configure ] || { aclocal; libtoolize; automake --add-missing; autoreconf; }
+ [ -f Makefile ] || CFLAGS="$CFLAGS -DTHREAD" \
+ ./configure --prefix=/usr --sysconfdir=/etc --with-unixODBC=/usr --with-odbc-ini=/etc/odbc.ini \
+ --with-mysql-path=/usr --without-x --disable-gui --disable-test
+ make
+}
+
+package() {
+ cd $srcdir/mysql-connector-odbc-${pkgver}
+ make DESTDIR=$pkgdir install
+}
diff --git a/community-staging/myodbc/myconf.h.in b/community-staging/myodbc/myconf.h.in
new file mode 100644
index 000000000..2a04eebba
--- /dev/null
+++ b/community-staging/myodbc/myconf.h.in
@@ -0,0 +1,165 @@
+/* driver/myconf.h.in. Generated from configure.in by autoheader. */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <iodbcinst.h> header file. */
+#undef HAVE_IODBCINST_H
+
+/* Define to 1 if you have the <isqlext.h> header file. */
+#undef HAVE_ISQLEXT_H
+
+/* Define to 1 if you have the <isqltypes.h> header file. */
+#undef HAVE_ISQLTYPES_H
+
+/* Define to 1 if you have the <isql.h> header file. */
+#undef HAVE_ISQL_H
+
+/* Define to 1 if you have the `z' library (-lz). */
+#undef HAVE_LIBZ
+
+/* Define to 1 if you have the `localtime_r' function. */
+#undef HAVE_LOCALTIME_R
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <odbcinst.h> header file. */
+#undef HAVE_ODBCINST_H
+
+/* Define to 1 if you have the <sqlext.h> header file. */
+#undef HAVE_SQLEXT_H
+
+/* Define if SQLGetPrivateProfileString is defined */
+#undef HAVE_SQLGETPRIVATEPROFILESTRING
+
+/* Define to 1 if you have the `SQLGetPrivateProfileStringW' function. */
+#undef HAVE_SQLGETPRIVATEPROFILESTRINGW
+
+/* Define to 1 if you have the <sqltypes.h> header file. */
+#undef HAVE_SQLTYPES_H
+
+/* Define to 1 if you have the <sql.h> header file. */
+#undef HAVE_SQL_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strndup' function. */
+#undef HAVE_STRNDUP
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define if SQLCHAR is undefined */
+#undef SQLCHAR
+
+/* Define if SQLHDBC is undefined */
+#undef SQLHDBC
+
+/* Define if SQLHENV is undefined */
+#undef SQLHENV
+
+/* Define if SQLHSTMT is undefined */
+#undef SQLHSTMT
+
+/* Define if SQLHWND is undefined */
+#undef SQLHWND
+
+/* Define if SQLINTEGER is undefined */
+#undef SQLINTEGER
+
+/* Define if SQLPOINTER is undefined */
+#undef SQLPOINTER
+
+/* Define if SQLRETURN is undefined */
+#undef SQLRETURN
+
+/* Define if SQLSMALLINT is undefined */
+#undef SQLSMALLINT
+
+/* Define if SQLUINTEGER is undefined */
+#undef SQLUINTEGER
+
+/* Define if SQLUSMALLINT is undefined */
+#undef SQLUSMALLINT
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define path to system ODBC.INI file */
+#undef SYSTEM_ODBC_INI
+
+/* Define if compiler defines C99 __func__ macro */
+#undef USE_C99_FUNC_MACRO
+
+/* Define if compiler defines __FUNCTION__ */
+#undef USE_GNU_FUNC_MACRO
+
+/* use iODBC */
+#undef USE_IODBC
+
+/* Define if SQLColAttribute() last arg is compatible with SQLLEN* */
+#undef USE_SQLCOLATTRIBUTE_SQLLEN_PTR
+
+/* Define if SQLColAttribute() last arg is compatible with SQLPOINTER */
+#undef USE_SQLCOLATTRIBUTE_SQLPOINTER
+
+/* Define if SQLParamOptions() 2nd and 3rd arg is compatible with SQLUINTEGER
+ */
+#undef USE_SQLPARAMOPTIONS_SQLUINTEGER_PTR
+
+/* Define if SQLParamOptions() 2nd and 3rd arg is compatible with SQLULEN */
+#undef USE_SQLPARAMOPTIONS_SQLULEN_PTR
+
+/* use unixODBC */
+#undef USE_UNIXODBC
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if the X Window System is missing or not being used. */
+#undef X_DISPLAY_MISSING
+
+/* Define if we are using unix build environment */
+#undef _UNIX_
diff --git a/community-staging/myodbc/myodbc-64bit.patch b/community-staging/myodbc/myodbc-64bit.patch
new file mode 100644
index 000000000..ac62d816a
--- /dev/null
+++ b/community-staging/myodbc/myodbc-64bit.patch
@@ -0,0 +1,85 @@
+Fix some 64-bitness issues arising from unixODBC 2.2.14 changes.
+
+
+diff -Naur mysql-connector-odbc-5.1.8.orig/driver/utility.c mysql-connector-odbc-5.1.8/driver/utility.c
+--- mysql-connector-odbc-5.1.8.orig/driver/utility.c 2010-10-28 14:33:18.000000000 -0400
++++ mysql-connector-odbc-5.1.8/driver/utility.c 2010-12-23 17:15:37.516602586 -0500
+@@ -1205,7 +1205,7 @@
+ {
+ /* See comment for fill_transfer_oct_len_buff()*/
+ SQLLEN size= get_display_size(stmt, field);
+- sprintf(buff,size == SQL_NO_TOTAL ? "%d" : (sizeof(SQLLEN) == 4 ? "%lu" : "%lld"), size);
++ sprintf(buff, (size == SQL_NO_TOTAL ? "%ld" : "%lu"), size);
+
+ return size;
+ }
+@@ -1228,7 +1228,7 @@
+ */
+ SQLLEN len= get_transfer_octet_length(stmt, field);
+
+- sprintf(buff, len == SQL_NO_TOTAL ? "%d" : (sizeof(SQLLEN) == 4 ? "%lu" : "%lld"), len );
++ sprintf(buff, (len == SQL_NO_TOTAL ? "%ld" : "%lu"), len );
+
+ return len;
+ }
+@@ -1245,8 +1245,7 @@
+ SQLULEN fill_column_size_buff(char *buff, STMT *stmt, MYSQL_FIELD *field)
+ {
+ SQLULEN size= get_column_size(stmt, field);
+- sprintf(buff, (size== SQL_NO_TOTAL ? "%d" :
+- (sizeof(SQLULEN) == 4 ? "%lu" : "%llu")), size);
++ sprintf(buff, (size== SQL_NO_TOTAL ? "%ld" : "%lu"), size);
+ return size;
+ }
+
+diff -Naur mysql-connector-odbc-5.1.8.orig/test/my_catalog.c mysql-connector-odbc-5.1.8/test/my_catalog.c
+--- mysql-connector-odbc-5.1.8.orig/test/my_catalog.c 2010-10-28 14:33:18.000000000 -0400
++++ mysql-connector-odbc-5.1.8/test/my_catalog.c 2010-12-23 17:16:26.284605944 -0500
+@@ -599,7 +599,7 @@
+ fprintf(stdout, "# Column Name : %s\n", szColName);
+ fprintf(stdout, "# NameLengh : %d\n", pcbColName);
+ fprintf(stdout, "# DataType : %d\n", pfSqlType);
+- fprintf(stdout, "# ColumnSize : %d\n", pcbColDef);
++ fprintf(stdout, "# ColumnSize : %ld\n", pcbColDef);
+ fprintf(stdout, "# DecimalDigits : %d\n", pibScale);
+ fprintf(stdout, "# Nullable : %d\n", pfNullable);
+
+@@ -632,7 +632,7 @@
+
+ rc = SQLGetConnectAttr(hdbc, SQL_ATTR_CURRENT_CATALOG, db, sizeof(db), &len);
+ mycon(hdbc,rc);
+- fprintf(stdout,"current_catalog: %s (%ld)\n", db, len);
++ fprintf(stdout,"current_catalog: %s (%d)\n", db, len);
+ is_num(len, 4);
+ is_str(db, "test", 5);
+
+@@ -653,7 +653,7 @@
+
+ rc = SQLGetConnectAttr(hdbc, SQL_ATTR_CURRENT_CATALOG, db, 255, &len);
+ mycon(hdbc,rc);
+- fprintf(stdout,"current_catalog: %s (%ld)\n", db, len);
++ fprintf(stdout,"current_catalog: %s (%d)\n", db, len);
+ is_num(len, 17);
+ is_str(db, cur_db, 18);
+
+diff -Naur mysql-connector-odbc-5.1.8.orig/test/my_cursor.c mysql-connector-odbc-5.1.8/test/my_cursor.c
+--- mysql-connector-odbc-5.1.8.orig/test/my_cursor.c 2010-10-28 14:33:18.000000000 -0400
++++ mysql-connector-odbc-5.1.8/test/my_cursor.c 2010-12-23 17:12:16.632676933 -0500
+@@ -711,7 +711,7 @@
+
+ rc = SQLRowCount(hstmt1,&row_count);
+ mystmt(hstmt1,rc);
+- fprintf(stdout, "rows affected: %d\n", row_count);
++ fprintf(stdout, "rows affected: %ld\n", row_count);
+ myassert(row_count == 1);
+
+ rc = SQLExtendedFetch(hstmt,SQL_FETCH_NEXT,1,NULL,&rgfRowStatus);
+@@ -732,7 +732,7 @@
+
+ rc = SQLRowCount(hstmt1,&row_count);
+ mystmt(hstmt1,rc);
+- fprintf(stdout, "rows affected: %d\n", row_count);
++ fprintf(stdout, "rows affected: %ld\n", row_count);
+ myassert(row_count == 1);
+
+ SQLFreeStmt(hstmt,SQL_UNBIND);
diff --git a/community-staging/myodbc/myodbc-add-mysys.patch b/community-staging/myodbc/myodbc-add-mysys.patch
new file mode 100644
index 000000000..a30466114
--- /dev/null
+++ b/community-staging/myodbc/myodbc-add-mysys.patch
@@ -0,0 +1,29 @@
+Add files extracted from mysql into the driver build script.
+
+
+diff -Naur mysql-connector-odbc-5.1.8.orig/util/Makefile.am mysql-connector-odbc-5.1.8/util/Makefile.am
+--- mysql-connector-odbc-5.1.8.orig/util/Makefile.am 2010-10-28 14:33:17.000000000 -0400
++++ mysql-connector-odbc-5.1.8/util/Makefile.am 2010-12-23 18:09:00.359695597 -0500
+@@ -10,6 +10,22 @@
+ installer.c \
+ odbcinstw.c \
+ unicode_transcode.c \
++ array.c \
++ list.c \
++ my_alloc.c \
++ my_malloc.c \
++ string.c \
++ int2str.c \
++ is_prefix.c \
++ longlong2str.c \
++ strcend.c \
++ strend.c \
++ strfill.c \
++ strmake.c \
++ strmov.c \
++ strxmov.c \
++ mysys_err.h \
++ mysys_priv.h \
+ MYODBCUtil.h \
+ MYODBCUtilAllocDataSource.c \
+ MYODBCUtilAllocDriver.c \
diff --git a/community-staging/myodbc/myodbc-my-free.patch b/community-staging/myodbc/myodbc-my-free.patch
new file mode 100644
index 000000000..cf7730a59
--- /dev/null
+++ b/community-staging/myodbc/myodbc-my-free.patch
@@ -0,0 +1,253 @@
+Once again, mysql can't manage to ship a mysql-connector-odbc release
+on time ... mysql 5.5 changed the my_free() function and the released
+connector version is not up to speed. Can't use NEAR anymore, either.
+
+
+diff -Naur mysql-connector-odbc-5.1.8.orig/driver/catalog.c mysql-connector-odbc-5.1.8/driver/catalog.c
+--- mysql-connector-odbc-5.1.8.orig/driver/catalog.c 2010-10-28 14:33:18.000000000 -0400
++++ mysql-connector-odbc-5.1.8/driver/catalog.c 2010-12-23 17:50:52.916552525 -0500
+@@ -94,11 +94,11 @@
+ {
+ if (stmt->result)
+ {
+- my_free((char *)stmt->result, MYF(0));
++ my_free((char *)stmt->result);
+ }
+ if (stmt->result_array)
+ {
+- my_free((char *)stmt->result_array, MYF(0));
++ my_free((char *)stmt->result_array);
+ }
+ set_mem_error(&stmt->dbc->mysql);
+ return handle_connection_error(stmt);
+diff -Naur mysql-connector-odbc-5.1.8.orig/driver/catalog_no_i_s.c mysql-connector-odbc-5.1.8/driver/catalog_no_i_s.c
+--- mysql-connector-odbc-5.1.8.orig/driver/catalog_no_i_s.c 2010-10-28 14:33:18.000000000 -0400
++++ mysql-connector-odbc-5.1.8/driver/catalog_no_i_s.c 2010-12-23 17:51:41.493551970 -0500
+@@ -269,13 +269,13 @@
+ pthread_mutex_lock(&dbc->lock);
+ if (mysql_query(mysql, select))
+ {
+- my_free(select, MYF(0));
++ my_free(select);
+ pthread_mutex_unlock(&dbc->lock);
+ return NULL;
+ }
+ result= mysql_store_result(&dbc->mysql);
+ pthread_mutex_unlock(&dbc->lock);
+- my_free(select, MYF(0));
++ my_free(select);
+
+ return result;
+ }
+@@ -1094,7 +1094,7 @@
+ SQLFORE_KEYS_FIELDS *
+ row_count,
+ MYF(0));
+- my_free((char *)tempdata, MYF(0));
++ my_free((char *)tempdata);
+
+ if (!stmt->result_array)
+ {
+@@ -1323,12 +1323,12 @@
+ && (j != mypcREMARKS)
+ && (j != mypcCOLUMN_DEF)
+ && (j != mypcIS_NULLABLE))
+- my_free(((char**)cur_params->data)[j], MYF(0));
++ my_free(((char**)cur_params->data)[j]);
+ }
+ /* cleanup the list */
+ params= list_delete_forward(params);
+- my_free(cur_params->data, MYF(0));
+- my_free(cur_params, MYF(0));
++ my_free(cur_params->data);
++ my_free(cur_params);
+ }
+ }
+ }
+@@ -1675,7 +1675,7 @@
+ }
+
+ dynstr_free(&dynQuery);
+- my_free(params_r, MYF(0));
++ my_free(params_r);
+
+ return nReturn;
+ }
+diff -Naur mysql-connector-odbc-5.1.8.orig/driver/desc.c mysql-connector-odbc-5.1.8/driver/desc.c
+--- mysql-connector-odbc-5.1.8.orig/driver/desc.c 2010-10-28 14:33:18.000000000 -0400
++++ mysql-connector-odbc-5.1.8/driver/desc.c 2010-12-23 17:51:06.532607921 -0500
+@@ -65,7 +65,7 @@
+ */
+ if (my_init_dynamic_array(&desc->records, sizeof(DESCREC), 0, 0))
+ {
+- my_free((char *)desc, MYF(0));
++ my_free((char *)desc);
+ return NULL;
+ }
+ desc->desc_type= desc_type;
+@@ -111,7 +111,7 @@
+ if (aprec->par.alloced)
+ {
+ aprec->par.alloced= FALSE;
+- my_free(aprec->par.value, MYF(0));
++ my_free(aprec->par.value);
+ }
+ }
+ }
+diff -Naur mysql-connector-odbc-5.1.8.orig/driver/driver.h mysql-connector-odbc-5.1.8/driver/driver.h
+--- mysql-connector-odbc-5.1.8.orig/driver/driver.h 2010-10-28 14:33:18.000000000 -0400
++++ mysql-connector-odbc-5.1.8/driver/driver.h 2010-12-23 17:50:43.017608761 -0500
+@@ -113,7 +113,7 @@
+ /* Max Primary keys in a cursor * WHERE clause */
+ #define MY_MAX_PK_PARTS 32
+
+-#define x_free(A) { void *tmp= (A); if (tmp) my_free((char *) tmp,MYF(MY_WME+MY_FAE)); }
++#define x_free(A) { void *tmp= (A); if (tmp) my_free((char *) tmp); }
+
+
+ /* We don't make any assumption about what the default may be. */
+diff -Naur mysql-connector-odbc-5.1.8.orig/driver/execute.c mysql-connector-odbc-5.1.8/driver/execute.c
+--- mysql-connector-odbc-5.1.8.orig/driver/execute.c 2010-10-28 14:33:18.000000000 -0400
++++ mysql-connector-odbc-5.1.8/driver/execute.c 2010-12-23 17:49:52.799552481 -0500
+@@ -96,7 +96,7 @@
+ exit:
+ pthread_mutex_unlock(&stmt->dbc->lock);
+ if ( query != stmt->query )
+- my_free(query,MYF(0));
++ my_free(query);
+
+ /*
+ If the original query was modified, we reset stmt->query so that the
+@@ -104,7 +104,7 @@
+ */
+ if (stmt->orig_query)
+ {
+- my_free(stmt->query,MYF(0));
++ my_free(stmt->query);
+ stmt->query= stmt->orig_query;
+ stmt->query_end= stmt->orig_query_end;
+ stmt->orig_query= NULL;
+@@ -625,7 +625,7 @@
+
+ out:
+ if (free_data)
+- my_free(data, MYF(0));
++ my_free(data);
+
+ *toptr= to;
+ return SQL_SUCCESS;
+@@ -1060,7 +1060,7 @@
+ if ( cbValue == SQL_NULL_DATA )
+ {
+ if ( aprec->par.alloced )
+- my_free(aprec->par.value,MYF(0));
++ my_free(aprec->par.value);
+ aprec->par.alloced= FALSE;
+ aprec->par.value= NULL;
+ return SQL_SUCCESS;
+diff -Naur mysql-connector-odbc-5.1.8.orig/driver/handle.c mysql-connector-odbc-5.1.8/driver/handle.c
+--- mysql-connector-odbc-5.1.8.orig/driver/handle.c 2010-10-28 14:33:18.000000000 -0400
++++ mysql-connector-odbc-5.1.8/driver/handle.c 2010-12-23 17:50:17.425586339 -0500
+@@ -112,7 +112,7 @@
+ GlobalUnlock(GlobalHandle((HGLOBAL) henv));
+ GlobalFree(GlobalHandle((HGLOBAL) henv));
+ #else
+- if (henv) my_free((char*) henv,MYF(0));
++ if (henv) my_free((char*) henv);
+ myodbc_end();
+ #endif /* _UNIX_ */
+ return(SQL_SUCCESS);
+@@ -251,7 +251,8 @@
+ LIST *next;
+
+ dbc->env->connections= list_delete(dbc->env->connections,&dbc->list);
+- my_free(dbc->database,MYF(MY_ALLOW_ZERO_PTR));
++ if (dbc->database)
++ my_free(dbc->database);
+ if (dbc->ds)
+ ds_delete(dbc->ds);
+ pthread_mutex_destroy(&dbc->lock);
+@@ -268,7 +269,7 @@
+ GlobalUnlock(GlobalHandle((HGLOBAL) hdbc));
+ GlobalFree(GlobalHandle((HGLOBAL) hdbc));
+ #else
+- my_free((char*) hdbc,MYF(0));
++ my_free((char*) hdbc);
+ #endif
+ return SQL_SUCCESS;
+ }
+@@ -513,7 +514,7 @@
+ GlobalUnlock(GlobalHandle ((HGLOBAL) hstmt));
+ GlobalFree(GlobalHandle((HGLOBAL) hstmt));
+ #else
+- my_free((char*) hstmt,MYF(0));
++ my_free((char*) hstmt);
+ #endif /* _UNIX_*/
+ return SQL_SUCCESS;
+ }
+diff -Naur mysql-connector-odbc-5.1.8.orig/driver/options.c mysql-connector-odbc-5.1.8/driver/options.c
+--- mysql-connector-odbc-5.1.8.orig/driver/options.c 2010-10-28 14:33:18.000000000 -0400
++++ mysql-connector-odbc-5.1.8/driver/options.c 2010-12-23 17:50:28.864604596 -0500
+@@ -301,7 +301,7 @@
+ return SQL_ERROR;
+ }
+ }
+- my_free(dbc->database,MYF(0));
++ my_free(dbc->database);
+ dbc->database= my_strdup(db,MYF(MY_WME));
+ pthread_mutex_unlock(&dbc->lock);
+ }
+diff -Naur mysql-connector-odbc-5.1.8.orig/driver/prepare.c mysql-connector-odbc-5.1.8/driver/prepare.c
+--- mysql-connector-odbc-5.1.8.orig/driver/prepare.c 2010-10-28 14:33:18.000000000 -0400
++++ mysql-connector-odbc-5.1.8/driver/prepare.c 2010-12-23 17:51:17.175676805 -0500
+@@ -93,7 +93,7 @@
+ CLEAR_STMT_ERROR(stmt);
+
+ if (stmt->query)
+- my_free(stmt->query, MYF(0));
++ my_free(stmt->query);
+
+ if (dupe && szSqlStr)
+ stmt->query= (char *)szSqlStr;
+@@ -223,7 +223,7 @@
+ {
+ aprec->par.alloced= FALSE;
+ assert(aprec->par.value);
+- my_free(aprec->par.value,MYF(0));
++ my_free(aprec->par.value);
+ aprec->par.value = NULL;
+ }
+
+diff -Naur mysql-connector-odbc-5.1.8.orig/driver/utility.c mysql-connector-odbc-5.1.8/driver/utility.c
+--- mysql-connector-odbc-5.1.8.orig/driver/utility.c 2010-10-28 14:33:18.000000000 -0400
++++ mysql-connector-odbc-5.1.8/driver/utility.c 2010-12-23 17:49:05.498552376 -0500
+@@ -930,7 +930,7 @@
+ ulong max_length= stmt->stmt_options.max_length;
+ ulong *offset= &stmt->getdata.src_offset;
+ #if MYSQL_VERSION_ID >= 40100
+- char NEAR _dig_vec[] =
++ char _dig_vec[] =
+ "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ #endif
+
+@@ -2154,7 +2154,7 @@
+
+ my_bool reget_current_catalog(DBC FAR *dbc)
+ {
+- my_free(dbc->database,MYF(0));
++ my_free(dbc->database);
+ dbc->database= NULL;
+
+ if ( odbc_stmt(dbc, "select database()") )
+diff -Naur mysql-connector-odbc-5.1.8.orig/util/stringutil.h mysql-connector-odbc-5.1.8/util/stringutil.h
+--- mysql-connector-odbc-5.1.8.orig/util/stringutil.h 2010-10-28 14:33:17.000000000 -0400
++++ mysql-connector-odbc-5.1.8/util/stringutil.h 2010-12-23 17:51:51.848676475 -0500
+@@ -41,7 +41,7 @@
+ #include <sqlext.h>
+
+ #ifndef x_free
+-#define x_free(A) { void *tmp= (A); if (tmp) my_free((char *) tmp,MYF(MY_WME+MY_FAE)); }
++#define x_free(A) { void *tmp= (A); if (tmp) my_free((char *) tmp); }
+ #endif
+
+ #define myodbc_min(a, b) ((a) < (b) ? (a) : (b))
diff --git a/community-staging/myodbc/myodbc-shutdown.patch b/community-staging/myodbc/myodbc-shutdown.patch
new file mode 100644
index 000000000..ec0cf3d36
--- /dev/null
+++ b/community-staging/myodbc/myodbc-shutdown.patch
@@ -0,0 +1,27 @@
+myodbc_end is really only usable during Windows DLL unload, since it's not
+connection-specific and not thread-safe either. This bit of brain fade
+accounts for our bug #185343 and several bugs filed at mysql.com.
+
+Furthermore, my_end() isn't exported from libmysqlclient anymore.
+Hence, best fix is to turn the function into a no-op.
+
+
+diff -Naur mysql-connector-odbc-5.1.8.orig/driver/dll.c mysql-connector-odbc-5.1.8/driver/dll.c
+--- mysql-connector-odbc-5.1.8.orig/driver/dll.c 2010-10-28 14:33:18.000000000 -0400
++++ mysql-connector-odbc-5.1.8/driver/dll.c 2010-12-23 15:05:49.394608226 -0500
+@@ -94,6 +94,7 @@
+ */
+ void myodbc_end()
+ {
++#if 0
+ if (!--myodbc_inited)
+ {
+ my_free(decimal_point,MYF(0));
+@@ -121,6 +122,7 @@
+ my_end(0);
+ #endif
+ }
++#endif
+ }
+
+