Re: jsonb failed assertions
От | Heikki Linnakangas |
---|---|
Тема | Re: jsonb failed assertions |
Дата | |
Msg-id | 53863DEC.8000405@vmware.com обсуждение исходный текст |
Ответ на | Re: jsonb failed assertions (Peter Geoghegan <pg@heroku.com>) |
Список | pgsql-hackers |
On 05/28/2014 04:13 AM, Peter Geoghegan wrote: > On Wed, May 21, 2014 at 4:53 AM, Heikki Linnakangas > <hlinnakangas@vmware.com> wrote: >> Hmm. The patch looks correct as far as it goes. But that function is still a >> bit funny. When it compares two identical arrays (or objects), and reaches >> the WJB_END_ARRAY token, it will still fall into the code that checks what >> the va and vb types are, and compares the last scalar values in that array >> again. That's wrong, and will fail if the compiler decides to clobber the >> local "va" or "vb" variables between iterations of the do-while loop, >> because JsonbIteratorNext() does not set the value when returning >> WJB_END_ARRAY. > > That's an obsolete assumption that once actually applied during development. > > Attached revision also adds handling for that case. Thanks, applied. - Heikki
В списке pgsql-hackers по дате отправления: