Aside, of course, from the fact that I’m up at 1AM, with a cold no less, trying to debug this crap:
- You need to specify some magic arrangement of flags to a
DbEnv, or elseDb::openfails for no good reason. DbEnvsquirts files everywhere.- You try to: (1) create a new database; (2) write a thousand or so objects to it; (3) close the database; (4) open the database again; (5) read out all those objects again. It crashes with a SIGSEGV at stage 4, in
Db::open. I get recompile the debs again, with debug info just to find out what the hell is going wrong. - If you tried to create a database with the
DB_DIRECT_DBflag, but passed that toDb::set_flagsby mistake (which will actually setDB_DUP, meaning when you put records you actually put new versions of records), then every single database you create from then on has theDB_DUPflag set. This is with brand-new files, and without an associated DbEnv. Switching your DB type from HASH to BTREE then back to HASH fixes this. - You apparently can’t set potentially useful options like
DB_DIRECT_DBwithout using an environment.
And lastly, working with padded structures makes using structs for keys an extra special headache. That’s a C complaint, of course, but I’ve included it at no additional cost.

Loading...
Post a Comment