From 2d618f3fd7e596b0226e1f5ca2ed763610aeb3c9 Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Thu, 10 Jun 2010 13:03:09 +0000 Subject: [PATCH] 1. Take --without-iodbc(unixODBC) configure option into account. 2. Apply the patch by Peter Crabtree which fixes a crash bug. --- configure.ac | 8 ++++---- info.c | 6 ++++-- version.h | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 425bcb8..ce516f3 100644 --- a/configure.ac +++ b/configure.ac @@ -29,9 +29,9 @@ AC_ARG_WITH(unixodbc, [ --with-unixodbc=DIR odbc_config installation of uni else ODBC_CONFIG=${ODBC_CONFIG}/bin/odbc_config fi + with_unixodbc=yes fi - - with_unixodbc=yes], + ], [with_unixodbc=yes]) @@ -53,9 +53,9 @@ AC_ARG_WITH(iodbc, [ --with-iodbc=DIR iodbc_config installation of iODBC], else ODBC_CONFIG=${ODBC_CONFIG}/bin/iodbc-config fi + with_iodbc=yes fi - - with_iodbc=yes], + ], [with_iodbc=no]) diff --git a/info.c b/info.c index 8ef8fe5..feb7fd2 100644 --- a/info.c +++ b/info.c @@ -1497,11 +1497,13 @@ allow_public_schema(ConnectionClass *conn, const char *szSchemaName, SQLSMALLINT const char *user = CC_get_username(conn); size_t userlen = strlen(user); + if (NULL == szSchemaName) + return FALSE; + if (SQL_NTS == cbSchemaName) cbSchemaName = strlen(szSchemaName); - return (NULL != szSchemaName && - cbSchemaName == (SQLSMALLINT) userlen && + return (cbSchemaName == (SQLSMALLINT) userlen && strnicmp(szSchemaName, user, userlen) == 0 && stricmp(CC_get_current_schema(conn), pubstr) == 0); } diff --git a/version.h b/version.h index c3526b6..8053417 100644 --- a/version.h +++ b/version.h @@ -12,6 +12,6 @@ #define POSTGRESDRIVERVERSION "08.04.0201" #define POSTGRES_RESOURCE_VERSION "08.04.0201\0" #define PG_DRVFILE_VERSION 8,4,02,01 -#define PG_BUILD_VERSION "201005260001" +#define PG_BUILD_VERSION "201006100001" #endif -- 2.39.5