From: | Neil Conway <nconway(at)klamath(dot)dyndns(dot)org> |
---|---|
To: | "Karel Zak" <zakkr(at)zf(dot)jcu(dot)cz> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: experimental pg_qcache patch |
Date: | 2002-04-14 21:41:24 |
Message-ID: | 20020414174124.6ab7810c.nconway@klamath.dyndns.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, 14 Apr 2002 22:39:32 +0200
"Karel Zak" <zakkr(at)zf(dot)jcu(dot)cz> wrote:
> - PREPARE_KEY_PREFIX_SIZE is 4 not 3
>
> - in the PrepareKey() is needful fix:
>
>
> + if (store == PREPARE_STORE_SHARE) { /* shared between same DB */
> + *flag |= QCF_SHARE_NOTREMOVEABLE;
> + key = (char *) palloc(strlen(name) + PREPARE_KEY_PREFIX_SIZE
> + + strlen(DatabaseName) +1);
> ^^^^^^^
> must be 3
>
> + sprintf(key, "%s_%s_", DatabaseName, PREPARE_KEY_PREFIX);
> ^^^^^^
> the space for '_' is not allocated :-(
>
> It's my bug probably, I good knew why we need leak detection :-)
Thanks Karel! I made the changes you suggest and the warning (and
the accompanying memory leak) have gone away.
Cheers,
Neil
--
Neil Conway <neilconway(at)rogers(dot)com>
PGP Key ID: DB3C29FC
From | Date | Subject | |
---|---|---|---|
Next Message | John Gray | 2002-04-14 23:08:26 | Re: command.c breakup |
Previous Message | Rod Taylor | 2002-04-14 20:58:40 | Re: command.c breakup |