ID:               48270
 Updated by:       [email protected]
 Reported By:      VJTD3 at VJTD3 dot com
 Status:           Open
 Bug Type:         DBM/DBA related
 Operating System: linux redhat fedora 10
 PHP Version:      5.2.9
 New Comment:

DBA does not define any constants, and never had as far as I can see in
userland. Plus your using constants incorrectly and your example (if
valid) should have been:

echo (defined('DB_HASH') ? 1 : 0);


Previous Comments:
------------------------------------------------------------------------

[2009-05-14 01:11:48] VJTD3 at VJTD3 dot com

Description:
------------
dba_open when used with the "driver" db4 defaults to btree but hash is
needed. (system databases are in hash not btree.) DB_HASH is not defined
and isn't passed when defined to the creation environment.

db.h
typedef enum {
        DB_BTREE=1,
        DB_HASH=2,
        DB_RECNO=3,
        DB_QUEUE=4,
        DB_UNKNOWN=5
} DBTYPE;

example showing DB_HASH not defined
<?php
 echo (defined(DB_HASH) ? 1 : 0);
?>

Reproduce code:
---------------
<?php
 echo (defined(DB_HASH) ? 1 : 0);
?>

Expected result:
----------------
return the proper value and create a database in that format then using
dba_open.

Actual result:
--------------
dba_open does not accept the constant and only uses btree then hash is
needed by system files.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48270&edit=1

Reply via email to