Skip to content

getRange() missing entries. #339

@underflow00

Description

@underflow00

After inserting an entry with key = [0x0?, 0x??, 0x??, 0x??], the entry does not get returned by getRange and similar functions.

import lmdb from "lmdb";

const rootDb = lmdb.open({
    path: './lmdbtest1',
    encoding: 'binary',
    keyEncoding: 'binary',
});
const subDb = rootDb.openDB({ name: 'sub1' , encoding: 'binary', keyEncoding: 'binary'});

const buffer = Buffer.allocUnsafe(4);
buffer.writeUInt32BE(1, 0);

subDb.put(buffer, buffer);

console.log(Array.from(subDb.getRange())); // Empty.
console.log(subDb.get(buffer)); // Not empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions