Re: [HACKERS] Open 6.4 items
От | Tom Ivar Helbekkmo |
---|---|
Тема | Re: [HACKERS] Open 6.4 items |
Дата | |
Msg-id | 86iuhsd22m.fsf@athene.nhh.no обсуждение исходный текст |
Ответ на | Re: [HACKERS] Open 6.4 items (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Tom Lane <tgl@sss.pgh.pa.us> writes: > Tom Ivar Helbekkmo <tih@nhh.no> writes: > > As far as I > > can tell, the only actual error in Paul Vixie's code is that the two > > lines you quote above should be: > > else if (--size > 0) > > *++dst = 0, dirty = 0; > > No, that's still wrong, because it will error out (jump to emsgsize) > one byte sooner than it should. The loop is fundamentally broken > because it wants to grab and zero a byte before it knows whether there > are any digits for the byte. Damn! You're right! I swear I tested that change at home, and found it to do what I wanted -- but now that I've put it into my production system at work, it doesn't work here. Heck, I even read the code very carefully to verify that it was all that was needed! I think I really need the holiday I'm taking next week! To keep this in sync with BIND, maybe Paul could take a look, and fix the code the way he wants it there? Whoops. It just hit me. When I tested my "quick fix" last night, I just looked at what happened to the data, and ignored the return value. Silly of me... -tih -- Popularity is the hallmark of mediocrity. --Niles Crane, "Frasier"
В списке pgsql-hackers по дате отправления: