|From:||Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>|
|To:||Boszormenyi Zoltan <zb(at)cybertec(dot)at>|
|Cc:||Michael Meskes <meskes(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org, Hans-Juergen Schoenig <hs(at)cybertec(dot)at>|
|Subject:||Re: Fix auto-prepare #2|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
Hi, I'm reviewing your patch and have a couple of comments.
Boszormenyi Zoltan <zb(at)cybertec(dot)at> wrote:
> we have found that auto-prepare causes a problem if the connection
> is closed and re-opened and the previously prepared query is issued
You didn't attach actual test cases for the bug, so I verified it
by executing the routines twice in ecpg/test/preproc/autoprep.pgc.
The attached "6-pg85-fix-auto-prepare-multiconn-3-test.patch"
is an additional regression test for it. Is it enough for your case?
> This fix is that after looking up the query and having it found in the cache
> we also have to check whether this query was prepared in the current
> connection. The attached patch implements this fix and solves the problem
> described above. Also, the missing "return false;" is also added to ECPGdo()
> in execute.c.
In addition to the two issues, I found memory leaks by careless calls
of ecpg_strdup() in ecpg_auto_prepare(). Prepared stetements also might
leak in a error path. I tryd to fix both of them in the attached
"6-pg85-fix-auto-prepare-multiconn-3.patch", but please recheck the issues.
NTT Open Source Software Center
|Next Message||Brad T. Sliger||2010-01-19 05:41:47||Re: Pretty printed trigger in psql|
|Previous Message||Greg Smith||2010-01-19 04:17:16||Re: Table size does not include toast size|