felipe          Thu May 14 01:26:39 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/odbc   php_odbc.c 
  Log:
  MFH:
  - Fixed bug #42414 (some odbc_*() functions incompatible with Oracle ODBC 
driver)
    patch by: jhml at gmx dot net
  
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/php_odbc.c?r1=1.189.2.4.2.7.2.19&r2=1.189.2.4.2.7.2.20&diff_format=u
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.189.2.4.2.7.2.19 
php-src/ext/odbc/php_odbc.c:1.189.2.4.2.7.2.20
--- php-src/ext/odbc/php_odbc.c:1.189.2.4.2.7.2.19      Fri May  1 03:02:46 2009
+++ php-src/ext/odbc/php_odbc.c Thu May 14 01:26:39 2009
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_odbc.c,v 1.189.2.4.2.7.2.19 2009/05/01 03:02:46 felipe Exp $ */
+/* $Id: php_odbc.c,v 1.189.2.4.2.7.2.20 2009/05/14 01:26:39 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -3127,6 +3127,10 @@
                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 @@
                efree(result);
                RETURN_FALSE;
        }
+       
+       if (cat_len == 0) {
+               cat = NULL;
+       }
 
        rc = SQLColumnPrivileges(result->stmt, 
                        cat, SAFE_SQL_NTS(cat),
@@ -3265,6 +3273,10 @@
                efree(result);
                RETURN_FALSE;
        }
+       
+       if (pcat_len == 0) {
+               pcat = NULL;
+       }
 
        rc = SQLForeignKeys(result->stmt, 
                        pcat, SAFE_SQL_NTS(pcat), 
@@ -3388,6 +3400,10 @@
                efree(result);
                RETURN_FALSE;
        }
+       
+       if (cat_len == 0) {
+               cat = NULL;
+       }
 
        rc = SQLPrimaryKeys(result->stmt, 
                        cat, SAFE_SQL_NTS(cat), 
@@ -3589,6 +3605,10 @@
                efree(result);
                RETURN_FALSE;
        }
+       
+       if (cat_len == 0) {
+               cat = NULL;
+       }
 
        rc = SQLSpecialColumns(result->stmt, 
                        type,
@@ -3658,6 +3678,10 @@
                efree(result);
                RETURN_FALSE;
        }
+       
+       if (cat_len == 0) {
+               cat = NULL;
+       }
 
        rc = SQLStatistics(result->stmt, 
                        cat, SAFE_SQL_NTS(cat),
@@ -3721,6 +3745,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

Reply via email to