felipe Thu May 14 01:25:17 2009 UTC
Modified files:
/php-src/ext/odbc php_odbc.c
Log:
- Fixed bug #42414 (some odbc_*() functions incompatible with Oracle ODBC
driver)
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/php_odbc.c?r1=1.219&r2=1.220&diff_format=u
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.219 php-src/ext/odbc/php_odbc.c:1.220
--- php-src/ext/odbc/php_odbc.c:1.219 Fri May 1 03:02:32 2009
+++ php-src/ext/odbc/php_odbc.c Thu May 14 01:25:17 2009
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_odbc.c,v 1.219 2009/05/01 03:02:32 felipe Exp $ */
+/* $Id: php_odbc.c,v 1.220 2009/05/14 01:25:17 felipe Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -3122,6 +3122,10 @@
schema = NULL;
}
+ if (cat && cat_len == 0) {
+ cat = NULL;
+ }
+
rc = SQLColumns(result->stmt,
cat, (SQLSMALLINT) cat_len,
schema, (SQLSMALLINT) schema_len,
@@ -3184,6 +3188,10 @@
efree(result);
RETURN_FALSE;
}
+
+ if (cat_len == 0) {
+ cat = NULL;
+ }
rc = SQLColumnPrivileges(result->stmt,
cat, SAFE_SQL_NTS(cat),
@@ -3260,6 +3268,10 @@
efree(result);
RETURN_FALSE;
}
+
+ if (pcat_len == 0) {
+ pcat = NULL;
+ }
rc = SQLForeignKeys(result->stmt,
pcat, SAFE_SQL_NTS(pcat),
@@ -3385,6 +3397,10 @@
efree(result);
RETURN_FALSE;
}
+
+ if (cat_len == 0) {
+ cat = NULL;
+ }
rc = SQLPrimaryKeys(result->stmt, cat, SAFE_SQL_NTS(cat), schema,
SAFE_SQL_NTS(schema), table, SAFE_SQL_NTS(table) );
@@ -3583,6 +3599,10 @@
efree(result);
RETURN_FALSE;
}
+
+ if (cat_len == 0) {
+ cat = NULL;
+ }
rc = SQLSpecialColumns(result->stmt,
type,
@@ -3652,6 +3672,10 @@
efree(result);
RETURN_FALSE;
}
+
+ if (cat_len == 0) {
+ cat = NULL;
+ }
rc = SQLStatistics(result->stmt,
cat, SAFE_SQL_NTS(cat),
@@ -3715,6 +3739,10 @@
efree(result);
RETURN_FALSE;
}
+
+ if (cat_len == 0) {
+ cat = NULL;
+ }
rc = SQLTablePrivileges(result->stmt,
cat, SAFE_SQL_NTS(cat),
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php