[HACKERS] Suspicious place in heap_prepare_freeze_tuple()

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема [HACKERS] Suspicious place in heap_prepare_freeze_tuple()
Дата
Msg-id 1a53572f-a489-7cd7-f5bf-4db05102f141@sigaev.ru
обсуждение исходный текст
Ответы Re: [HACKERS] Suspicious place in heap_prepare_freeze_tuple()  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Hi!

Playing around freezing tuple I found suspicious piece of code:

heap_prepare_freeze_tuple():
...
frz->t_infomask = tuple->t_infomask;
...
             frz->t_infomask &= ~HEAP_XMAX_BITS;
             frz->xmax = newxmax;
             if (flags & FRM_MARK_COMMITTED)
                 frz->t_infomask &= HEAP_XMAX_COMMITTED;

Seems, in last line it should be a bitwise OR instead of AND. Now this line 
cleans all bits in t_infomask which later will be copied directly in tuple.
-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Dang Minh Huong
Дата:
Сообщение: Re: [HACKERS] Extra Vietnamese unaccent rules
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] Suspicious place in heap_prepare_freeze_tuple()