From: | 高增琦 <pgf00a(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, 高增琦 <pgf00a(at)gmail(dot)com> |
Subject: | Try to fix endless loop in ecpg with informix mode |
Date: | 2017-10-26 08:03:50 |
Message-ID: | CAFmBtr3eusXV8Fk_sEh32GWhTU4a6bBTCyaq5qpsjx0OoKV2wg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I tried some tests with ecpg informix mode.
When trying to store float data into a integer var, I got endless loop.
The reason is:
In informix mode, ecpg can accept
string form of float number when processing query result.
During checking the string form of float number, it seems
that ecpg forgot to skip characters after '.'.
Then outer loop will never stop because it hopes to see '\0'.
The first patch will reproduce the problem in ecpg's regress test.
The second patch tries to fix it in simple way.
--
GaoZengqi
pgf00a(at)gmail(dot)com
zengqigao(at)gmail(dot)com
Attachment | Content-Type | Size |
---|---|---|
0001-Edit-ecpg-regress-test-to-trigger-endless-loop.patch | application/octet-stream | 1.2 KB |
0002-Fix-endless-loop-in-ecpg-with-informix-mode.patch | application/octet-stream | 5.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro HORIGUCHI | 2017-10-26 08:18:56 | Re: show "aggressive" or not in autovacuum logs |
Previous Message | Etsuro Fujita | 2017-10-26 07:40:37 | Re: Add support for tuple routing to foreign partitions |