From: | TAKATSUKA Haruka <harukat(at)sraoss(dot)co(dot)jp> |
---|---|
To: | pgsql-odbc(at)postgresql(dot)org |
Subject: | Silent MALLOC/REALLOC error |
Date: | 2018-02-27 09:33:15 |
Message-ID: | 20180227183315.ba3f4b32cacd40549a4bc035@sraoss.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Hello, psqlODBC team.
When we fetch large data via psqlodbc, we sometimes fail to
get all rows completely without any API's error responses;
SQLExecDirect returns SQL_SUCCESS and SQLFetch returns just SQL_NODATA.
But there are QR_REALLOC_error reported in mylog at that time.
I reproduced it by tweaking QR_REALLOC_return_with_error macro
to intentionally fail to allocate memory frequently.
I propose the patch attached.
It makes the code in CC_send_query_append() go out the while-loop immediately
after CC_from_PGresult() at the case PORES_BAD_RESPONSE, PORES_FATAL_ERROR or PORES_NO_MEMORY_ERROR.
Thanks,
Haruka Takatsuka
Attachment | Content-Type | Size |
---|---|---|
connection.c.diff | text/plain | 487 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Clemens Ladisch | 2018-02-27 13:54:33 | Re: SQLError SqlState wrong when postgres backend dies |
Previous Message | TAKATSUKA Haruka | 2018-02-27 09:33:13 | Re: [ODBC] SQL literal with SJIS hankaku-kana character cause missing escape |