pfalcon / berkeley-db-1.xx Goto Github PK
View Code? Open in Web Editor NEWBerkeley DB 1.85 with patches and fixes applied
Berkeley DB 1.85 with patches and fixes applied
Hello,
To enable duplicate key in btree, one can call
btree.open(flags=1)
after some tests we detected a coredump in bt_delete.c
You will find attached the patch:
bt_delete.patch.txt
When some duplicated keys are searched, the first loop scans left to right, the second loop scans right to left.
In the case where the btree leef h->upper == t->psize
, i.e. when the free space is up to the right page limit, the first do while loop shall not be entered. Only the second loop is necessary to remove from right to left.
The test program uses a dbm module that could be in micropython-lib, if you need it i could provide it.
The include/db.h file includes sys/cdefs.h which is an internal glibc header that may not exist in other libc implementations and thus should not be used.
Compilation with musl libc fails:
In file included from ../../lib/berkeley-db-1.xx/btree/bt_seq.c:48:0:
../../lib/berkeley-db-1.xx/PORT/include/db.h:40:23: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.
In file included from ../../lib/berkeley-db-1.xx/btree/bt_split.c:48:0:
../../lib/berkeley-db-1.xx/PORT/include/db.h:40:23: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.
In file included from ../../lib/berkeley-db-1.xx/btree/bt_utils.c:47:0:
../../lib/berkeley-db-1.xx/PORT/include/db.h:40:23: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.
In file included from ../../lib/berkeley-db-1.xx/mpool/mpool.c:46:0:
../../lib/berkeley-db-1.xx/PORT/include/db.h:40:23: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.
[...other files of berkeley-db include db.h too...]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.