NULL Page error during cursor get operation!!! -
03-12-2006
, 02:26 AM
Hi all,
I have encountered an internal BD problen when trying to retrieve a
certain record by cursor
the action schema is as follows:
1. open a cursor using
Db::cursor(0,&cursorPtr,0)
2. seting cursor position on first group of duplicate keys
cursor->get(&tmpKey,&data,DB_SET)
3. and finally getting the record
cursor->get(&key,&data,DB_NEXT_NODUP) <---- here
the crash happens
few important facts:
these operations work just fine in most cases, but when the secondary
DB reaches 45 records (each one with size of 132 bytes, and using
default page size of 4096 byte) these set of action causes Berkeley DB
to crash, stating NULL internal page error... after briff look at the
crash code area in the Berkeley's code, I've found that the crash
happens when performing "type = TYPE(bdc->internal->page);" in
db_cam.c:801 source code, also, the dbc parameter has `internal` member
and it's `page` and `opd` are both set to NULL at the crash moment.
it's unclear to me how such error could occur, and if so, is it because
of missuse or a BUG in Berkeley's code???
(P.S : additional code will be supplied on demand)
Regards,
Ron Herman |