php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15664 dba_firstkey() isn't returning the first key
Submitted: 2002-02-21 14:18 UTC Modified: 2002-09-30 20:41 UTC
From: caperry at webofficenow dot com Assigned:
Status: Not a bug Package: DBM/DBA related
PHP Version: 4.1.1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: caperry at webofficenow dot com
New email:
PHP Version: OS:

 

 [2002-02-21 14:18 UTC] caperry at webofficenow dot com
Using dba with the gdbm backend.  Creating a new database and inserting 10 values.  When I go to look at that database using a dba_firstkey() followed by a series of dba_nextkey() calls, I do not get back all the data.  If I ask for specific  keys that did not show up, they exist and have data.  Any ideas?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-21 14:23 UTC] mrobinso@php.net
Can you attach a short, concise snippet of code I
can use to reproduce this please?
 [2002-02-21 16:06 UTC] caperry at webofficenow dot com
Well, it figures that after I open a bug I can't reproduce it.  8^) It does appear to be random, as we never see it in testing, but when the code is being pounded on by a few people at once, it's more frequent.  All the code I have is rather large and complicated.  I can give some senarios:

We use a GDBM file as a log for file transfers.  When clearing the log, we do a dba_firstkey and check if it's OKay to be deleted.  If it is, we delete the key and do a dba_firstkey again.  A lot of times the first few items are skipped this way.

We have another piece of code the pulls "big" (greater than 100 chars) values out of a database and puts 10 of them in a GDBM file.  Again, it occasionally skips the first one or two.  I have some example code, but as I said - it seems to work right now.
 [2002-09-30 20:41 UTC] iliaa@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Mar 22 14:01:26 2019 UTC