Fixed uninitialized entry point level - fixes #439 and closes #440

This commit is contained in:
Andrew Kane
2024-01-27 19:49:40 -08:00
parent 121f53b8ff
commit 705e71015f

View File

@@ -315,7 +315,10 @@ HnswGetMetaPageInfo(Relation index, int *m, HnswElement * entryPoint)
if (entryPoint != NULL) if (entryPoint != NULL)
{ {
if (BlockNumberIsValid(metap->entryBlkno)) if (BlockNumberIsValid(metap->entryBlkno))
{
*entryPoint = HnswInitElementFromBlock(metap->entryBlkno, metap->entryOffno); *entryPoint = HnswInitElementFromBlock(metap->entryBlkno, metap->entryOffno);
(*entryPoint)->level = metap->entryLevel;
}
else else
*entryPoint = NULL; *entryPoint = NULL;
} }