Skip to content
Snippets Groups Projects
Commit 25114d3e authored by Tom Lane's avatar Tom Lane
Browse files

wups, took out one memset too many ...

parent b05d3ae1
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* *
* Copyright (c) 2001-2003, PostgreSQL Global Development Group * Copyright (c) 2001-2003, PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.38 2003/07/22 19:00:10 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.39 2003/07/22 19:13:19 tgl Exp $
* ---------- * ----------
*/ */
#include "postgres.h" #include "postgres.h"
...@@ -799,7 +799,7 @@ pgstat_ping(void) ...@@ -799,7 +799,7 @@ pgstat_ping(void)
void void
pgstat_initstats(PgStat_Info *stats, Relation rel) pgstat_initstats(PgStat_Info *stats, Relation rel)
{ {
PgStat_TableEntry *useent = NULL; PgStat_TableEntry *useent;
Oid rel_id = rel->rd_id; Oid rel_id = rel->rd_id;
int mb; int mb;
int i; int i;
...@@ -875,6 +875,7 @@ pgstat_initstats(PgStat_Info *stats, Relation rel) ...@@ -875,6 +875,7 @@ pgstat_initstats(PgStat_Info *stats, Relation rel)
*/ */
i = pgStatTabstatMessages[mb]->m_nentries++; i = pgStatTabstatMessages[mb]->m_nentries++;
useent = &pgStatTabstatMessages[mb]->m_entry[i]; useent = &pgStatTabstatMessages[mb]->m_entry[i];
MemSet(useent, 0, sizeof(PgStat_TableEntry));
useent->t_id = rel_id; useent->t_id = rel_id;
stats->tabentry = (void *) useent; stats->tabentry = (void *) useent;
return; return;
...@@ -922,6 +923,7 @@ pgstat_initstats(PgStat_Info *stats, Relation rel) ...@@ -922,6 +923,7 @@ pgstat_initstats(PgStat_Info *stats, Relation rel)
mb = pgStatTabstatUsed++; mb = pgStatTabstatUsed++;
pgStatTabstatMessages[mb]->m_nentries = 1; pgStatTabstatMessages[mb]->m_nentries = 1;
useent = &pgStatTabstatMessages[mb]->m_entry[0]; useent = &pgStatTabstatMessages[mb]->m_entry[0];
MemSet(useent, 0, sizeof(PgStat_TableEntry));
useent->t_id = rel_id; useent->t_id = rel_id;
stats->tabentry = (void *) useent; stats->tabentry = (void *) useent;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment