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 <zakkr@zf.jcu.cz>)
Список pgsql-hackers
On Sun, 14 Apr 2002 22:39:32 +0200
"Karel Zak" <zakkr@zf.jcu.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@rogers.com>
PGP Key ID: DB3C29FC


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Rod Taylor"
Дата:
Сообщение: Re: command.c breakup
Следующее
От: John Gray
Дата:
Сообщение: Re: command.c breakup