Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
f463c44f
Commit
f463c44f
authored
Jun 03, 1999
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure consistent results when FormSortKeys fails to find
all the expected keys (it was returning uninitialized memory).
parent
9b3e2dda
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/backend/executor/nodeSort.c
src/backend/executor/nodeSort.c
+4
-2
No files found.
src/backend/executor/nodeSort.c
View file @
f463c44f
...
...
@@ -7,11 +7,12 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.1
8 1999/02/13 23:15:27 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.1
9 1999/06/03 03:17:37 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include <string.h>
#include "executor/executor.h"
#include "executor/execdebug.h"
...
...
@@ -58,6 +59,7 @@ FormSortKeys(Sort *sortnode)
if
(
keycount
<=
0
)
elog
(
ERROR
,
"FormSortKeys: keycount <= 0"
);
sortkeys
=
(
ScanKey
)
palloc
(
keycount
*
sizeof
(
ScanKeyData
));
MemSet
((
char
*
)
sortkeys
,
0
,
keycount
*
sizeof
(
ScanKeyData
));
/* ----------------
* form each scan key from the resdom info in the target list
...
...
@@ -72,7 +74,7 @@ FormSortKeys(Sort *sortnode)
reskey
=
resdom
->
reskey
;
reskeyop
=
resdom
->
reskeyop
;
if
(
reskey
>
0
)
if
(
reskey
>
0
)
/* ignore TLEs that are not sort keys */
{
ScanKeyEntryInitialize
(
&
sortkeys
[
reskey
-
1
],
0
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment