From: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
---|---|
To: | Jan-Peter Seifert <Jan-Peter(dot)Seifert(at)gmx(dot)de>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-odbc(at)postgresql(dot)org> |
Subject: | Re: Crash when using 'Use Declare/Fetch' and the result set does contain one row only |
Date: | 2014-06-24 13:43:36 |
Message-ID: | 53A98088.3020301@vmware.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
On 06/24/2014 12:06 PM, Jan-Peter Seifert wrote:
> I've attached a zip file containing a Visual Studio 2010 project
> tested on a 'PostgreSQL Unicode' system-DSN named TestODBC and a dump
> of a test database named TestODBC. The line with the statement that
> returns one row is commented out. The other returns 5 rows in the
> release version - it skips the first line and returns the last row
> twice though. When using the debugger it crashes on the last row.
I committed the attached patch to fix this. I admit I don't understand
very well how the cursor and cached result set row counting is supposed
to work. But I think this is correct, so I'll commit it unless someone
sees a problem with it. This patch also includes a regression test for
this. I created it using your test case as reference; it's essentially
the same test, but using the common regression test facilities. (You'll
have to set UseDeclareFetch=1 in odbc.ini for it to exhibit the bug)
Thanks for the report!
- Heikki
Attachment | Content-Type | Size |
---|---|---|
fix-cursor-commit-1.patch | text/x-diff | 3.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2014-06-24 13:59:51 | Re: Bug when performing command SELECT without cast |
Previous Message | Desenvolvimento | 2014-06-24 11:40:58 | Re: Bug when performing command SELECT without cast |