[CP] fix ObLobDataOutRowCtx bytes aligned padding byte init
This commit is contained in:
parent
478006eb5e
commit
b5f1d56b0c
7
deps/oblib/src/common/object/ob_object.h
vendored
7
deps/oblib/src/common/object/ob_object.h
vendored
@ -554,10 +554,10 @@ struct ObLobDataOutRowCtx
|
||||
};
|
||||
ObLobDataOutRowCtx()
|
||||
: is_full_(0), op_(0), offset_(0), check_sum_(0), seq_no_st_(0), seq_no_cnt_(0),
|
||||
del_seq_no_cnt_(0), modified_len_(0), first_meta_offset_(0), chunk_size_(0)
|
||||
del_seq_no_cnt_(0), modified_len_(0), first_meta_offset_(0), chunk_size_(0), reserved_(0)
|
||||
{}
|
||||
TO_STRING_KV(K_(is_full), K_(op), K_(offset), K_(check_sum), K_(seq_no_st), K_(seq_no_cnt),
|
||||
K_(del_seq_no_cnt), K_(modified_len), K_(first_meta_offset), K_(chunk_size));
|
||||
K_(del_seq_no_cnt), K_(modified_len), K_(first_meta_offset), K_(chunk_size), K_(reserved));
|
||||
uint64_t is_full_ : 1;
|
||||
uint64_t op_ : 8;
|
||||
uint64_t offset_ : 55;
|
||||
@ -568,6 +568,9 @@ struct ObLobDataOutRowCtx
|
||||
uint64_t modified_len_;
|
||||
uint32_t first_meta_offset_ : 24;
|
||||
uint32_t chunk_size_ : 8; // unit is kb
|
||||
// this is 8 bytes aligned, so left 4 byte
|
||||
// and this field is added later when bug is found, and may be a random value
|
||||
uint32_t reserved_;
|
||||
|
||||
bool is_diff() const { return OpType::DIFF == op_; }
|
||||
int64_t get_real_chunk_size() const;
|
||||
|
@ -233,6 +233,11 @@ TEST_F(TestLobSeqId, test_chunk_size_v1_to_v0)
|
||||
ASSERT_EQ(ctx_v0.first_meta_offset_ & 0xffffff, ctx_v1.first_meta_offset_ );
|
||||
}
|
||||
|
||||
TEST_F(TestLobSeqId, test_lob_outrow_locator_size)
|
||||
{
|
||||
ASSERT_EQ(84, sizeof(ObLobCommon) + sizeof(ObLobData) + sizeof(ObLobDataOutRowCtx) + sizeof(uint64_t));
|
||||
}
|
||||
|
||||
|
||||
} // end namespace unittest
|
||||
} // end namespace oceanbase
|
||||
|
Loading…
x
Reference in New Issue
Block a user