#48270 [Opn->Bgs]: dba_open DB4 DB_HASH does not work
| From: | kalle@php.net | Date: | Tue, 19 May 2009 15:02:45 +0000 |
| Subject: | #48270 [Opn->Bgs]: dba_open DB4 DB_HASH does not work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-137509@lists.php.net to get a copy of this message | ||
ID: 48270
Updated by: kalle@php.net
Reported By: VJTD3 at VJTD3 dot com
-Status: Open
+Status: Bogus
Bug Type: DBM/DBA related
Operating System: linux redhat fedora 10
PHP Version: 5.2.9
New Comment:
.
Previous Comments:
------------------------------------------------------------------------
[2009-05-19 15:02:12] kalle@php.net
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);
------------------------------------------------------------------------
[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