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

Commite56dd7c

Browse files
committed
Fix uninitialized-variable bug.
map_partition_varattnos() failed to set its found_whole_row outputparameter if the given expression list was NIL. This seems to bea pre-existing bug that chanced to be exposed by commit6f6b99d.It might be unreachable in v10, but I have little faith in thatproposition, so back-patch.Per buildfarm.
1 parentf25000c commite56dd7c

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

‎src/backend/catalog/partition.c

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,21 +1120,23 @@ map_partition_varattnos(List *expr, int target_varno,
11201120
Relationpartrel,Relationparent,
11211121
bool*found_whole_row)
11221122
{
1123-
AttrNumber*part_attnos;
1124-
boolmy_found_whole_row;
1123+
boolmy_found_whole_row= false;
11251124

1126-
if (expr==NIL)
1127-
returnNIL;
1125+
if (expr!=NIL)
1126+
{
1127+
AttrNumber*part_attnos;
1128+
1129+
part_attnos=convert_tuples_by_name_map(RelationGetDescr(partrel),
1130+
RelationGetDescr(parent),
1131+
gettext_noop("could not convert row type"));
1132+
expr= (List*)map_variable_attnos((Node*)expr,
1133+
target_varno,0,
1134+
part_attnos,
1135+
RelationGetDescr(parent)->natts,
1136+
RelationGetForm(partrel)->reltype,
1137+
&my_found_whole_row);
1138+
}
11281139

1129-
part_attnos=convert_tuples_by_name_map(RelationGetDescr(partrel),
1130-
RelationGetDescr(parent),
1131-
gettext_noop("could not convert row type"));
1132-
expr= (List*)map_variable_attnos((Node*)expr,
1133-
target_varno,0,
1134-
part_attnos,
1135-
RelationGetDescr(parent)->natts,
1136-
RelationGetForm(partrel)->reltype,
1137-
&my_found_whole_row);
11381140
if (found_whole_row)
11391141
*found_whole_row=my_found_whole_row;
11401142

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp