summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2009-05-14 01:27:23 +0000
committerFelipe Pena <felipe@php.net>2009-05-14 01:27:23 +0000
commit913c81d4ad511c0d901bd1b71e4246c444aa94e2 (patch)
treedf4127ba7abb51b34d67b9420d7fd7cfa6c8ac1a
parent82b940adf25665bfc2622e857958a82047b00874 (diff)
downloadphp-git-913c81d4ad511c0d901bd1b71e4246c444aa94e2.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 64d2ffea4a..6a747cbd90 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -2994,6 +2994,10 @@ PHP_FUNCTION(odbc_columns)
*/
if (table && strlen(table) && schema && !strlen(schema)) schema = NULL;
+ if (cat && cat_len == 0) {
+ cat = NULL;
+ }
+
rc = SQLColumns(result->stmt,
cat, cat_len,
schema, schema_len,
@@ -3068,6 +3072,10 @@ PHP_FUNCTION(odbc_columnprivileges)
efree(result);
RETURN_FALSE;
}
+
+ if (cat_len == 0) {
+ cat = NULL;
+ }
rc = SQLColumnPrivileges(result->stmt,
cat, SAFE_SQL_NTS(cat),
@@ -3162,6 +3170,10 @@ PHP_FUNCTION(odbc_foreignkeys)
efree(result);
RETURN_FALSE;
}
+
+ if (pcat_len == 0) {
+ pcat = NULL;
+ }
rc = SQLForeignKeys(result->stmt,
pcat, SAFE_SQL_NTS(pcat),
@@ -3305,6 +3317,10 @@ PHP_FUNCTION(odbc_primarykeys)
efree(result);
RETURN_FALSE;
}
+
+ if (cat_len == 0) {
+ cat = NULL;
+ }
rc = SQLPrimaryKeys(result->stmt,
cat, SAFE_SQL_NTS(cat),
@@ -3543,6 +3559,10 @@ PHP_FUNCTION(odbc_specialcolumns)
efree(result);
RETURN_FALSE;
}
+
+ if (cat_len == 0) {
+ cat = NULL;
+ }
rc = SQLSpecialColumns(result->stmt,
type,
@@ -3624,6 +3644,10 @@ PHP_FUNCTION(odbc_statistics)
efree(result);
RETURN_FALSE;
}
+
+ if (cat_len == 0) {
+ cat = NULL;
+ }
rc = SQLStatistics(result->stmt,
cat, SAFE_SQL_NTS(cat),
@@ -3698,6 +3722,10 @@ PHP_FUNCTION(odbc_tableprivileges)
efree(result);
RETURN_FALSE;
}
+
+ if (cat_len == 0) {
+ cat = NULL;
+ }
rc = SQLTablePrivileges(result->stmt,
cat, SAFE_SQL_NTS(cat),