Skip to content

Commit

Permalink
Remove invalid memcpy
Browse files Browse the repository at this point in the history
f3b3e55 introduces sorted paths for
compressed chunks. However, it uses an unneeded and invalid memcpy call,
which can cause crashes. This PR removes the memcpy call.
  • Loading branch information
jnidzwetzki committed Oct 28, 2023
1 parent f3b3e55 commit 70b4942
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tsl/src/nodes/decompress_chunk/decompress_chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,6 @@ add_chunk_sorted_paths(PlannerInfo *root, RelOptInfo *chunk_rel, Hypertable *ht,
if (!IsA(child_path, Path))
return;

DecompressChunkPath *dcpath =
copy_decompress_chunk_path((DecompressChunkPath *) decompress_chunk_path);

/* Iterate over the sort_pathkeys and generate all possible useful sortings */
List *useful_pathkeys = NIL;
ListCell *lc;
Expand Down Expand Up @@ -595,7 +592,7 @@ add_chunk_sorted_paths(PlannerInfo *root, RelOptInfo *chunk_rel, Hypertable *ht,
Path *sorted_path =
(Path *) create_sort_path(root,
chunk_rel,
&dcpath->custom_path.path,
decompress_chunk_path,
list_copy(useful_pathkeys), /* useful_pathkeys is modified
in each iteration */
root->limit_tuples);
Expand Down

0 comments on commit 70b4942

Please sign in to comment.