From bbc9c23d8884095cb2e33b1bbddc0648fc8d16e8 Mon Sep 17 00:00:00 2001 From: zhangmazi Date: Mon, 4 Sep 2023 11:15:38 +0800 Subject: [PATCH] fix: remove redundant check --- .../storage/access/ubtree/ubtsplitloc_insertpt.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gausskernel/storage/access/ubtree/ubtsplitloc_insertpt.cpp b/src/gausskernel/storage/access/ubtree/ubtsplitloc_insertpt.cpp index 9e6a20d8c..2eb871a55 100644 --- a/src/gausskernel/storage/access/ubtree/ubtsplitloc_insertpt.cpp +++ b/src/gausskernel/storage/access/ubtree/ubtsplitloc_insertpt.cpp @@ -466,9 +466,7 @@ static void UBTreeRecsplitloc(FindSplitData *state, OffsetNumber firstoldonright * data from the first item that winds up on the right page. */ if (!state->is_leaf) { - int indexTupleDataSize = state->is_leaf ? - MAXALIGN(sizeof(IndexTupleData)) : - (MAXALIGN(sizeof(IndexTupleData)) - TXNINFOSIZE); + int indexTupleDataSize = (MAXALIGN(sizeof(IndexTupleData)) - TXNINFOSIZE); rightfree += (int16)firstrightitemsz - (int16)(indexTupleDataSize + sizeof(ItemIdData)); }