From: Date: January 31 2008 10:50pm Subject: Connector/ODBC 3.51 commit: r1012 - branches/guffert/driver List-Archive: http://lists.mysql.com/commits/41528 Message-Id: <200801312150.m0VLoDjm010571@bk-internal.mysql.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modified: branches/guffert/driver/catalog.c branches/guffert/driver/info.c branches/guffert/driver/options.c Log: added connection checks when possibly asking for the database before being connected Modified: branches/guffert/driver/catalog.c =================================================================== --- branches/guffert/driver/catalog.c 2008-01-31 16:43:35 UTC (rev 1011) +++ branches/guffert/driver/catalog.c 2008-01-31 21:50:13 UTC (rev 1012) @@ -2027,7 +2027,7 @@ /* **************************************************************************** -SQLProcesures and SQLProcedureColumns +SQLProcedures and SQLProcedureColumns **************************************************************************** */ Modified: branches/guffert/driver/info.c =================================================================== --- branches/guffert/driver/info.c 2008-01-31 16:43:35 UTC (rev 1011) +++ branches/guffert/driver/info.c 2008-01-31 21:50:13 UTC (rev 1012) @@ -213,7 +213,7 @@ MYINFO_SET_STR("N"); case SQL_DATABASE_NAME: - if (reget_current_catalog(dbc)) + if (is_connected(dbc) && reget_current_catalog(dbc)) return set_dbc_error(dbc, "HY000", "SQLGetInfo() failed to return current catalog.", 0); Modified: branches/guffert/driver/options.c =================================================================== --- branches/guffert/driver/options.c 2008-01-31 16:43:35 UTC (rev 1011) +++ branches/guffert/driver/options.c 2008-01-31 21:50:13 UTC (rev 1012) @@ -415,7 +415,7 @@ break; case SQL_ATTR_CURRENT_CATALOG: - if (reget_current_catalog(dbc)) + if (is_connected(dbc) && reget_current_catalog(dbc)) return set_handle_error(SQL_HANDLE_DBC, hdbc, MYERR_S1000, "Unable to get current catalog", 0); else