From:             marc-bennewitz at arcor dot de
Operating system: openSUSE 11.3 (x86_64)
PHP version:      5.4.4
Package:          DBM/DBA related
Bug Type:         Bug
Bug description:dba_insert not working as expected

Description:
------------
The function "dba_insert" doesn't work as expected with most handlers.
On calling "dba_insert" on an already existing key the function should
return false and do not trigger a warning but that's not the case on most
tested handlers.

Test script:
---------------
$dba = dba_open(sys_get_temp_dir() . DIRECTORY_SEPARATOR . uniqid('dba_'),
'c', 'qdbm');

var_dump(dba_insert('key', 'test1', $dba));
var_dump(dba_insert('key', 'test2', $dba));
var_dump(dba_fetch('key', $dba));

Expected result:
----------------
bool(true)
bool(false)
string(5) "test1"

Actual result:
--------------
           RETURN1  RETURN2  WRANING    
flatfile   true     false    YES
inifile    true     true     NO
gdbm       true     false    YES
qdbm       true     false    YES
db4        true     false    NO
-> Didn't test not listed handlers !

-- 
Edit bug report at https://bugs.php.net/bug.php?id=62489&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=62489&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=62489&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=62489&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=62489&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62489&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=62489&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=62489&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=62489&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=62489&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=62489&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=62489&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=62489&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=62489&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=62489&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=62489&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=62489&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=62489&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=62489&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=62489&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=62489&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=62489&r=mysqlcfg

Reply via email to