Commit ead21938 authored by Bruce Momjian's avatar Bruce Momjian

Fix for palloc(0) in new code

parent f5f366e1
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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 * NOTES
* Sorts the first relation into the second relation. * Sorts the first relation into the second relation.
...@@ -570,7 +570,7 @@ dumptuples(Sort *node) ...@@ -570,7 +570,7 @@ dumptuples(Sort *node)
HeapTuple tup; HeapTuple tup;
int memtupindex = 0; int memtupindex = 0;
if (! PS(node)->using_tape_files) { if (! PS(node)->using_tape_files && PS(node)->tupcount) {
Assert(PS(node)->memtuples == NULL); Assert(PS(node)->memtuples == NULL);
PS(node)->memtuples = palloc(PS(node)->tupcount * sizeof(HeapTuple)); PS(node)->memtuples = palloc(PS(node)->tupcount * sizeof(HeapTuple));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment