You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 text was updated successfully, but these errors were encountered:
Thanks for the report! MicroPython doesn't currently support duplicate keys ("officially"), so looking into this would be of less priority. But please consider submitting a patch as a pull request here, and a testcase would be definitely needed to verify correctness of this change, so please post it to.
elfman2
added a commit
to elfman2/micropython
that referenced
this issue
Jul 1, 2017
Added a flag definition in modbtree
Added a test
modified btree.rst to describe duplicate key
The test actually triggers a coredump due to berkeleydb bt_delete design error
The issue is reported pfalcon/berkeley-db-1.xx#1
The correction will be provided in the next commit
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 text was updated successfully, but these errors were encountered: