Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5857be9

Browse files
committed
Fix use of wrong datatype with sizeof().
OID and int are the same size, but they are not the same thing.David RowleyDiscussion:http://postgr.es/m/CAKJS1f_MhS++XngkTvWL9X1v8M5t-0N0B-R465yHQY=TmNV0Ew@mail.gmail.com
1 parent25ee705 commit5857be9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎src/backend/nodes/copyfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ _copyPartitionedRelPruneInfo(const PartitionedRelPruneInfo *from)
12041204
COPY_SCALAR_FIELD(nexprs);
12051205
COPY_POINTER_FIELD(subplan_map,from->nparts*sizeof(int));
12061206
COPY_POINTER_FIELD(subpart_map,from->nparts*sizeof(int));
1207-
COPY_POINTER_FIELD(relid_map,from->nparts*sizeof(int));
1207+
COPY_POINTER_FIELD(relid_map,from->nparts*sizeof(Oid));
12081208
COPY_POINTER_FIELD(hasexecparam,from->nexprs*sizeof(bool));
12091209
COPY_SCALAR_FIELD(do_initial_prune);
12101210
COPY_SCALAR_FIELD(do_exec_prune);

‎src/backend/partitioning/partprune.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ make_partitionedrel_pruneinfo(PlannerInfo *root, RelOptInfo *parentrel,
475475
*/
476476
subplan_map= (int*)palloc(nparts*sizeof(int));
477477
subpart_map= (int*)palloc(nparts*sizeof(int));
478-
relid_map= (Oid*)palloc(nparts*sizeof(int));
478+
relid_map= (Oid*)palloc(nparts*sizeof(Oid));
479479
present_parts=NULL;
480480

481481
for (i=0;i<nparts;i++)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp