Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UJhqD-00032W-OG for pgsql-odbc@arkaria.postgresql.org; Sun, 24 Mar 2013 10:07:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UJhqC-00055N-OO for pgsql-odbc@arkaria.postgresql.org; Sun, 24 Mar 2013 10:07:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UJhqB-00055F-03 for pgsql-odbc@postgresql.org; Sun, 24 Mar 2013 10:07:51 +0000 Received: from sd.tpf.co.jp ([210.161.239.34]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UJhpy-0007AD-9C for pgsql-odbc@postgresql.org; Sun, 24 Mar 2013 10:07:50 +0000 Received: (qmail 24662 invoked by uid 512); 24 Mar 2013 10:07:33 -0000 X-Authentication: inoue was authenticated by sd.tpf.co.jp at 24 Mar 2013 10:07:33 -0000 Received: from unknown (HELO ?192.168.1.4?) (183.76.63.59) by sd.tpf.co.jp with SMTP; 24 Mar 2013 10:07:33 -0000 Message-ID: <514ED061.10906@tpf.co.jp> Date: Sun, 24 Mar 2013 19:07:29 +0900 From: Hiroshi Inoue User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 To: Heikki Linnakangas CC: pgsql-odbc@postgresql.org Subject: Re: SQLExecute returns 0 rows with BoolsAsChar=1 References: <51479445.7020905@vmware.com> <514AFABC.7000808@tpf.co.jp> <514B3870.2060208@vmware.com> In-Reply-To: <514B3870.2060208@vmware.com> Content-Type: multipart/mixed; boundary="------------080602040003070809040701" X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org This is a multi-part message in MIME format. --------------080602040003070809040701 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit (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 --------------080602040003070809040701 Content-Type: text/x-patch; name="statement.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="statement.c.patch" diff --git a/statement.c b/statement.c index 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)) --------------080602040003070809040701 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc --------------080602040003070809040701--