GithubHelp home page GithubHelp logo

pfalcon / berkeley-db-1.xx Goto Github PK

View Code? Open in Web Editor NEW
23.0 23.0 18.0 332 KB

Berkeley DB 1.85 with patches and fixes applied

Makefile 7.21% C 90.21% Shell 2.58%
embedded-database key-value-database key-value-store nosql-database

berkeley-db-1.xx's Issues

sys/cdefs.h is an internal glibc header and should not be used

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...]

duplicate key enablement

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.