mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-24 18:55:04 +08:00
Fix for palloc(0) in new code
This commit is contained in:
parent
f5f366e188
commit
ead219384f
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.6 1997/08/06 03:41:55 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.7 1997/08/06 04:45:39 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Sorts the first relation into the second relation.
|
||||
@ -570,7 +570,7 @@ dumptuples(Sort *node)
|
||||
HeapTuple tup;
|
||||
int memtupindex = 0;
|
||||
|
||||
if (! PS(node)->using_tape_files) {
|
||||
if (! PS(node)->using_tape_files && PS(node)->tupcount) {
|
||||
Assert(PS(node)->memtuples == NULL);
|
||||
PS(node)->memtuples = palloc(PS(node)->tupcount * sizeof(HeapTuple));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user