sixd                                     Mon, 27 Jun 2011 22:58:59 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=312540

Log:
Keep the DBA DB4 test status quo after Berkeley DB 5.2 introduced error message 
prefixes

Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/dba/dba_db4.c
    U   php/php-src/branches/PHP_5_4/ext/dba/dba_db4.c
    U   php/php-src/trunk/ext/dba/dba_db4.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2011-06-27 22:48:53 UTC (rev 312539)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-06-27 22:58:59 UTC (rev 312540)
@@ -7,8 +7,11 @@
 - DateTime extension:
   . Fixed bug where the DateTime object got changed while using date_diff().
     (Derick)
+
+- DBA extension:
+  . Supress warning on non-existent file open with Berkeley DB 5.2 (Chris 
Jones)

-- PDO ODBC:
+- PDO ODBC driver:
   . Fixed data type usage in 64bit. (leocsilva at gmail dot com)



Modified: php/php-src/branches/PHP_5_3/ext/dba/dba_db4.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/dba/dba_db4.c      2011-06-27 22:48:53 UTC 
(rev 312539)
+++ php/php-src/branches/PHP_5_3/ext/dba/dba_db4.c      2011-06-27 22:58:59 UTC 
(rev 312540)
@@ -46,11 +46,12 @@

 #if (DB_VERSION_MAJOR == 5 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8))
 /* Bug 51086, Berkeley DB 4.8.26 */
-/* This code suppresses a BDB 4.8 error message that BDB incorrectly emits */
+/* This code suppresses a BDB 4.8+ error message, thus keeping PHP test 
compatibility */
        {
                char *function = get_active_function_name(TSRMLS_C);
                if (function && (!strcmp(function,"dba_popen") || 
!strcmp(function,"dba_open"))
-                       && !strncmp(msg, "fop_read_meta", 
sizeof("fop_read_meta")-1)) {
+                       && (!strncmp(msg, "fop_read_meta", 
sizeof("fop_read_meta")-1)
+                               || !strncmp(msg, "BDB0004 fop_read_meta", 
sizeof("BDB0004 fop_read_meta")-1))) {
                        return;
                }
        }

Modified: php/php-src/branches/PHP_5_4/ext/dba/dba_db4.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/dba/dba_db4.c      2011-06-27 22:48:53 UTC 
(rev 312539)
+++ php/php-src/branches/PHP_5_4/ext/dba/dba_db4.c      2011-06-27 22:58:59 UTC 
(rev 312540)
@@ -46,11 +46,12 @@

 #if (DB_VERSION_MAJOR == 5 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8))
 /* Bug 51086, Berkeley DB 4.8.26 */
-/* This code suppresses a BDB 4.8 error message that BDB incorrectly emits */
+/* This code suppresses a BDB 4.8+ error message, thus keeping PHP test 
compatibility */
        {
                char *function = get_active_function_name(TSRMLS_C);
                if (function && (!strcmp(function,"dba_popen") || 
!strcmp(function,"dba_open"))
-                       && !strncmp(msg, "fop_read_meta", 
sizeof("fop_read_meta")-1)) {
+                       && (!strncmp(msg, "fop_read_meta", 
sizeof("fop_read_meta")-1)
+                               || !strncmp(msg, "BDB0004 fop_read_meta", 
sizeof("BDB0004 fop_read_meta")-1))) {
                        return;
                }
        }

Modified: php/php-src/trunk/ext/dba/dba_db4.c
===================================================================
--- php/php-src/trunk/ext/dba/dba_db4.c 2011-06-27 22:48:53 UTC (rev 312539)
+++ php/php-src/trunk/ext/dba/dba_db4.c 2011-06-27 22:58:59 UTC (rev 312540)
@@ -46,11 +46,12 @@

 #if (DB_VERSION_MAJOR == 5 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8))
 /* Bug 51086, Berkeley DB 4.8.26 */
-/* This code suppresses a BDB 4.8 error message that BDB incorrectly emits */
+/* This code suppresses a BDB 4.8+ error message, thus keeping PHP test 
compatibility */
        {
                char *function = get_active_function_name(TSRMLS_C);
                if (function && (!strcmp(function,"dba_popen") || 
!strcmp(function,"dba_open"))
-                       && !strncmp(msg, "fop_read_meta", 
sizeof("fop_read_meta")-1)) {
+                       && (!strncmp(msg, "fop_read_meta", 
sizeof("fop_read_meta")-1)
+                               || !strncmp(msg, "BDB0004 fop_read_meta", 
sizeof("BDB0004 fop_read_meta")-1))) {
                        return;
                }
        }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to