|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-11-28 00:30 UTC] vesely at tana dot it
Description:
------------
Please add tests for db-4.5 and newer: the compilation does not fail if by chance an older db-4.1 (in my case) existed.
However, when calling dbd->set_errcall the process crashes with pc=0. That happens because the DB structure changed and newer elements have been inserted in the middle of it, rather than at the bottom.
Hopefully, one day BDB will come with an official m4 macro. I already asked them...
One more thing, the errcall has different arguments in 4.5:
--- ./ext/dba/dba_db4.c% 2006-11-27 23:54:31.021697000 +0100
+++ ./ext/dba/dba_db4.c 2006-11-27 23:54:31.031696000 +0100
@@ -35,7 +35,7 @@
#include <db.h>
#endif
-static void php_dba_db4_errcall_fcn(const char *errpfx, char *msg)
+static void php_dba_db4_errcall_fcn(const DB_ENV*env, const char *errpfx, const char *msg)
{
TSRMLS_FETCH();
Reproduce code:
---------------
This was trapped in the test suite. (Since the program aborted its output was different.)
Expected result:
----------------
database handler: db4
3NYNYY
Content String 2
Content 2 replaced
Read during write: not allowed
Content 2 replaced 2nd time
The 6th value
array(3) {
["key number 6"]=>
string(13) "The 6th value"
["key2"]=>
string(27) "Content 2 replaced 2nd time"
["key5"]=>
string(23) "The last content string"
}
Actual result:
--------------
database handler: db4
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
I bet that patch works, but it's difficult for me to test it. I've done the following, which works: --- configure% 2006-11-28 10:53:19.851446000 +0100 +++ configure 2006-11-28 10:53:19.981427000 +0100 @@ -26166,7 +26166,7 @@ fi done - for LIB in db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db; do + for LIB in db-4.5 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db; do if test -f $THIS_PREFIX/lib/lib$LIB.a -o -f $THIS_PREFIX/lib/lib$LIB.$SHLIB_SUFFIX_NAME; then I guess that's about the same as the patch you produced, from an end-user perspective - thanx