From 794932c0a173161ac7781d10804d17589b64f6a6 Mon Sep 17 00:00:00 2001 From: Artur Zakirov Date: Tue, 4 Jun 2024 00:24:30 +0900 Subject: [PATCH] Issue #84: MemSet ParquetFdwPlanState before using (#85) --- src/parquet_impl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/parquet_impl.cpp b/src/parquet_impl.cpp index 8cdda9c..2e34589 100644 --- a/src/parquet_impl.cpp +++ b/src/parquet_impl.cpp @@ -986,6 +986,8 @@ get_table_options(Oid relid, ParquetFdwPlanState *fdw_private) char *funcname = NULL; char *funcarg = NULL; + fdw_private->filenames = NIL; + fdw_private->attrs_sorted = NIL; fdw_private->use_mmap = false; fdw_private->use_threads = false; fdw_private->max_open_files = 0; @@ -1677,6 +1679,7 @@ parquetAcquireSampleRowsFunc(Relation relation, int /* elevel */, ListCell *lc; std::string error; + MemSet(&fdw_private, 0, sizeof(fdw_private)); get_table_options(RelationGetRelid(relation), &fdw_private); for (int i = 0; i < tupleDesc->natts; ++i)