From 11f4909068dca4ff10d6381c5069aaafa2cdbc28 Mon Sep 17 00:00:00 2001 From: Andreas Karajannis Date: Sun, 21 May 2000 08:46:51 +0000 Subject: [PATCH] Turn off retrieving the whole error stack --- ext/odbc/php_odbc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 4445eb2ab67..79c533ddcaa 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -468,8 +468,11 @@ void ODBC_SQL_ERROR(HENV henv, HDBC conn, HSTMT stmt, char *func) RETCODE rc; ODBCLS_FETCH(); - while(henv != SQL_NULL_HENV){ + /* This leads to an endless loop in many drivers! + * + while(henv != SQL_NULL_HENV){ do { + */ rc = SQLError(henv, conn, stmt, state, &error, errormsg, sizeof(errormsg)-1, &errormsgsize); if (func) { @@ -479,9 +482,10 @@ void ODBC_SQL_ERROR(HENV henv, HDBC conn, HSTMT stmt, char *func) php_error(E_WARNING, "SQL error: %s, SQL state %s", errormsg, state); } - + /* } while (SQL_SUCCEEDED(rc)); } + */ } void php_odgbc_fetch_attribs(INTERNAL_FUNCTION_PARAMETERS, int mode)