summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2009-05-14 01:26:39 +0000
committerFelipe Pena <felipe@php.net>2009-05-14 01:26:39 +0000
commit652b77243cd72617d04af9c3e8f1a20cb0ac0ae8 (patch)
tree3e27f63250a04693a0bfd28edd8dc149a3f874c9
parent475cf4d288577827f8e94b2774a8d8ebf9958d98 (diff)
downloadphp-git-652b77243cd72617d04af9c3e8f1a20cb0ac0ae8.tar.gz
MFH:
- Fixed bug #42414 (some odbc_*() functions incompatible with Oracle ODBC driver) patch by: jhml at gmx dot net
-rw-r--r--ext/odbc/php_odbc.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index dc349bf413..331acdcf62 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -3127,6 +3127,10 @@ PHP_FUNCTION(odbc_columns)
schema = NULL;
}
+ if (cat && cat_len == 0) {
+ cat = NULL;
+ }
+
rc = SQLColumns(result->stmt,
cat, (SQLSMALLINT) cat_len,
schema, (SQLSMALLINT) schema_len,
@@ -3189,6 +3193,10 @@ PHP_FUNCTION(odbc_columnprivileges)
efree(result);
RETURN_FALSE;
}
+
+ if (cat_len == 0) {
+ cat = NULL;
+ }
rc = SQLColumnPrivileges(result->stmt,
cat, SAFE_SQL_NTS(cat),
@@ -3265,6 +3273,10 @@ PHP_FUNCTION(odbc_foreignkeys)
efree(result);
RETURN_FALSE;
}
+
+ if (pcat_len == 0) {
+ pcat = NULL;
+ }
rc = SQLForeignKeys(result->stmt,
pcat, SAFE_SQL_NTS(pcat),
@@ -3388,6 +3400,10 @@ PHP_FUNCTION(odbc_primarykeys)
efree(result);
RETURN_FALSE;
}
+
+ if (cat_len == 0) {
+ cat = NULL;
+ }
rc = SQLPrimaryKeys(result->stmt,
cat, SAFE_SQL_NTS(cat),
@@ -3589,6 +3605,10 @@ PHP_FUNCTION(odbc_specialcolumns)
efree(result);
RETURN_FALSE;
}
+
+ if (cat_len == 0) {
+ cat = NULL;
+ }
rc = SQLSpecialColumns(result->stmt,
type,
@@ -3658,6 +3678,10 @@ PHP_FUNCTION(odbc_statistics)
efree(result);
RETURN_FALSE;
}
+
+ if (cat_len == 0) {
+ cat = NULL;
+ }
rc = SQLStatistics(result->stmt,
cat, SAFE_SQL_NTS(cat),
@@ -3721,6 +3745,10 @@ PHP_FUNCTION(odbc_tableprivileges)
efree(result);
RETURN_FALSE;
}
+
+ if (cat_len == 0) {
+ cat = NULL;
+ }
rc = SQLTablePrivileges(result->stmt,
cat, SAFE_SQL_NTS(cat),