Re: experimental pg_qcache patch
От
Neil Conway
Тема
Re: experimental pg_qcache patch
Дата
Msg-id
20020414174124.6ab7810c.nconway@klamath.dyndns.org
Ответ на
Re: experimental pg_qcache patch (Karel Zak)
Список
Дерево обсуждения
experimental pg_qcache patch Neil Conway <nconway@klamath.dyndns.org>
Re: experimental pg_qcache patch Bruce Momjian <pgman@candle.pha.pa.us>
Re: experimental pg_qcache patch Karel Zak <zakkr@zf.jcu.cz>
Re: experimental pg_qcache patch Karel Zak <zakkr@zf.jcu.cz>
Re: experimental pg_qcache patch Neil Conway <nconway@klamath.dyndns.org>
Re: experimental pg_qcache patch Jean-Paul ARGUDO <jean-paul.argudo@idealx.com>
Re: experimental pg_qcache patch Bruce Momjian <pgman@candle.pha.pa.us>
On Sun, 14 Apr 2002 22:39:32 +0200
"Karel Zak" 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
PGP Key ID: DB3C29FC
В списке pgsql-hackers по дате отправления