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

Commitead2193

Browse files
committed
Fix for palloc(0) in new code
1 parentf5f366e commitead2193

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/utils/sort/psort.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.6 1997/08/0603:41:55 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.7 1997/08/0604:45:39 momjian Exp $
1111
*
1212
* NOTES
1313
* Sorts the first relation into the second relation.
@@ -570,7 +570,7 @@ dumptuples(Sort *node)
570570
HeapTupletup;
571571
intmemtupindex=0;
572572

573-
if (!PS(node)->using_tape_files) {
573+
if (!PS(node)->using_tape_files&&PS(node)->tupcount) {
574574
Assert(PS(node)->memtuples==NULL);
575575
PS(node)->memtuples=palloc(PS(node)->tupcount*sizeof(HeapTuple));
576576
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp