Re: Crash in BRIN minmax-multi indexes

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: Crash in BRIN minmax-multi indexes
Дата
Msg-id c1a363f8-da2e-6a50-85e4-d10c929c8db2@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Crash in BRIN minmax-multi indexes  (Zhihong Yu <zyu@yugabyte.com>)
Список pgsql-hackers
On 4/1/21 12:53 AM, Zhihong Yu wrote:
> Hi,
> For inet data type fix:
> 
> +       unsigned char a = addra[i];
> +       unsigned char b = addrb[i];
> +
> +       if (i >= lena)
> +           a = 0;
> +
> +       if (i >= lenb)
> +           b = 0;
> 
> Should the length check precede the addra[i] ?
> Something like:
> 
>        unsigned char a;
>        if (i >= lena) a = 0;
>        else a = addra[i];
> 

I don't think that makes any difference. We know the bytes are there, we
just want to ignore / reset them in some cases.


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Zhihong Yu
Дата:
Сообщение: Re: Crash in BRIN minmax-multi indexes
Следующее
От: Jaime Casanova
Дата:
Сообщение: Re: Crash in BRIN minmax-multi indexes