From b6143be06536124f0bda0cdd0c96bde7c29d7e7d Mon Sep 17 00:00:00 2001 From: VirgilZhu <94546750@qq.com> Date: Sun, 5 Jan 2025 02:38:57 +0800 Subject: [PATCH] fix ParseInternalKey bug --- db/db_impl.h | 1 + db/dbformat.h | 2 +- db/fields.cpp | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/db/db_impl.h b/db/db_impl.h index f7a4a1d..14a9b82 100644 --- a/db/db_impl.h +++ b/db/db_impl.h @@ -20,6 +20,7 @@ #include "leveldb/env.h" #include "port/port.h" #include "port/thread_annotations.h" +#include "port/port_stdcxx.h" namespace leveldb { diff --git a/db/dbformat.h b/db/dbformat.h index 0b5e23f..394227d 100644 --- a/db/dbformat.h +++ b/db/dbformat.h @@ -54,7 +54,7 @@ class InternalKey; // Value types encoded as the last component of internal keys. // DO NOT CHANGE THESE ENUM VALUES: they are embedded in the on-disk // data structures. -enum ValueType { kTypeDeletion = 0x0, kTypeValue = 0x1, kTypeSeparation = 0x2}; +enum ValueType { kTypeDeletion = 0x0, kTypeValue = 0x2, kTypeSeparation = 0x1}; // kValueTypeForSeek defines the ValueType that should be passed when // constructing a ParsedInternalKey object for seeking to a particular // sequence number (since we sort sequence numbers in decreasing order diff --git a/db/fields.cpp b/db/fields.cpp index cd66004..35b5951 100644 --- a/db/fields.cpp +++ b/db/fields.cpp @@ -289,6 +289,4 @@ std::vector Fields::FindKeysByFields(leveldb::DB* db, const FieldAr return find_keys; } - - } // namespace leveldb