Re: BUG #5748: Invalid oidvector data during binary recv

Поиск
Список
Период
Сортировка
От Yeb Havinga
Тема Re: BUG #5748: Invalid oidvector data during binary recv
Дата
Msg-id 4CDC0754.2030503@gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hello list,

Sorry for not replying to the bug list, but I didn't receive that 
message. It's about
http://archives.postgresql.org/pgsql-bugs/2010-11/msg00065.php

The test case there with remark about LBOUND is incorrect; we first 
found the bug on a different result. In the process of finding the most 
simple test case we apparantly found one where another check failed 
(ARR_NDIM(result) > 1)

The following testcase has a value for ndim that passes the check, but 
an lbound value of 0 right after the call of array_recv in oidvectorrecv:

postgres=# copy (select '{"1"}'::oidvector[]) to '/tmp/test' with binary;
COPY 1
postgres=# copy a from '/tmp/test' with binary;

(gdb) p *result
$6 = {vl_len_ = 112, ndim = 1, dataoffset = 0, elemtype = 26, dim1 = 1, 
lbound1 = 0, values = {1}}

The same behaviour is also seen in int2vectorrecv.

regards,
Yeb Havinga



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

Предыдущее
От: Itagaki Takahiro
Дата:
Сообщение: MULTISET and additional functions for ARRAY
Следующее
От: Tom Lane
Дата:
Сообщение: Re: B-tree parent pointer and checkpoints