From: Hiroshi Inoue <inoue@tpf.co.jp>
To: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: SQLExecute returns 0 rows with BoolsAsChar=1
Date: Sun, 24 Mar 2013 19:07:29 +0900
Message-ID: <514ED061.10906@tpf.co.jp> (raw)
In-Reply-To: <514B3870.2060208@vmware.com>
References: <51479445.7020905@vmware.com>
<514AFABC.7000808@tpf.co.jp>
<514B3870.2060208@vmware.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
(2013/03/22 1:42), Heikki Linnakangas wrote:
> On 21.03.2013 14:19, Hiroshi Inoue wrote:
>> (2013/03/19 7:25), Heikki Linnakangas wrote:
>>> If you SQLPrepare a query, and bind a VARCHAR parameter with column_size
>>> of exactly 5, and you have BoolsAsChar=1 (which is the default), the
>>> subsequent SQLExecute will return 0 rows.
>>
>> Hmm I can't reproduce it here.
>> Could you send me the Mylog output of the case?
>
> Sure. Here's a test program to reproduce it, and the mylog output from
> running it.
Thanks.
I can reproduce it now when I turn off the *Server side prepare* option
or turn on the *Use Declare/Fetch* option.
Attached is a patch to fix the bug.
regards,
Hiroshi Inoue
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbcAttachments:statement.c.patch (text/x-patch, 584B) downloaddiff --git a/statement.c b/statement.cindex 1b1980b..7e1cafd 100755--- a/statement.c+++ b/statement.c@@ -1835,7 +1835,8 @@ SC_execute(StatementClass *self)
{
QResultClass *curres = SC_get_Curres(self);
- if (NULL != curres)+ if (NULL != curres &&+ curres->dataFilled)
useCursor = (NULL != QR_get_cursor(curres));
}
/* issue BEGIN ? */
@@ -1904,6 +1905,7 @@ SC_execute(StatementClass *self)
break;
case PREPARING_TEMPORARILY:
case PREPARED_TEMPORARILY:
+ case ONCE_DESCRIBED:
if (!issue_begin)
{
switch (SC_get_prepare_method(self))
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: inoue@tpf.co.jp, hlinnakangas@vmware.com
Subject: Re: SQLExecute returns 0 rows with BoolsAsChar=1
In-Reply-To: <514ED061.10906@tpf.co.jp>
References: <51479445.7020905@vmware.com> <514AFABC.7000808@tpf.co.jp> <514B3870.2060208@vmware.com> <514ED061.10906@tpf.co.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox