Skip to content

Range query correctness #4

@skyelves

Description

@skyelves

fkey = (uint8_t *)&key;

fkey can not work on the machine using little-endian. Although insert and search can work well on both machines with big-endian or little-endian, the range query can only report the correct results on machines with big-endian.

For example, if I want to scan(0x1, 0x100), on a little-endian machine, fkey[0] of key 0x1 equals to 1 while fkey[0] of key 0x100 equals to 0. Therefore, key_key_lt returns false.

To fix this bug, defining a MACRO to get the fkey from the key works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions