Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aMxX5-0002HY-SP for pgsql-odbc@arkaria.postgresql.org; Sat, 23 Jan 2016 12:43:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aMxX4-0006Cq-RH for pgsql-odbc@arkaria.postgresql.org; Sat, 23 Jan 2016 12:43:10 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aMxX3-0006Ch-AE for pgsql-odbc@postgresql.org; Sat, 23 Jan 2016 12:43:09 +0000 Received: from mail2.asahi-net.or.jp ([202.224.39.198]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1aMxWu-0007Ds-LT for pgsql-odbc@postgresql.org; Sat, 23 Jan 2016 12:43:07 +0000 Received: from [192.168.1.3] (ab063014.dynamic.ppp.asahi-net.or.jp [183.76.63.14]) by mail2.asahi-net.or.jp (Postfix) with ESMTP id 2EF6870C4; Sat, 23 Jan 2016 21:42:56 +0900 (JST) Subject: Re: Re: 9.0.5 issue - duplicate rows returned when using SQL_ATTR_ROW_ARRAY_SIZE attribute To: John Kew References: <569F699C.5090209@dream.email.ne.jp> <569F7C94.6010203@dream.email.ne.jp> <56A21BA7.3050900@dream.email.ne.jp> Cc: "pgsql-odbc@postgresql.org" From: "Inoue, Hiroshi" Message-ID: <56A3755D.6050702@dream.email.ne.jp> Date: Sat, 23 Jan 2016 21:43:09 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------040601070905090401080900" X-Pg-Spam-Score: -2.6 (--) 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. --------------040601070905090401080900 Content-Type: multipart/alternative; boundary="------------010408030704070903030907" --------------010408030704070903030907 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Hi, Please try the attached patch. Or please try the drivers on testing for 9.5.0101 at http://www.ne.jp/asahi/inocchichichi/entrance/psqlodbc/ . regards, Hiroshi Inoue On 2016/01/23 1:40, John Kew wrote: > > We would be happy to. > > > -John > > > > ------------------------------------------------------------------------ > *From:* Inoue, Hiroshi > *Sent:* Friday, January 22, 2016 4:08 AM > *To:* John Kew > *Cc:* pgsql-odbc@postgresql.org > *Subject:* Re: [ODBC] Re: 9.0.5 issue - duplicate rows returned when > using SQL_ATTR_ROW_ARRAY_SIZE attribute > Hi John, > > I can reproduce the case now and have a trial patch. > Could you test it? > > regards, > Hiroshi Inoue > > On 2016/01/20 21:24, Inoue, Hiroshi wrote: >> >>> >> > --------------010408030704070903030907 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit Hi,

Please try the attached patch.
Or please try the drivers on testing for 9.5.0101 at
 http://www.ne.jp/asahi/inocchichichi/entrance/psqlodbc/
.

regards,
Hiroshi Inoue

On 2016/01/23 1:40, John Kew wrote:

We would be happy to.


-John




From: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
Sent: Friday, January 22, 2016 4:08 AM
To: John Kew
Cc: pgsql-odbc@postgresql.org
Subject: Re: [ODBC] Re: 9.0.5 issue - duplicate rows returned when using SQL_ATTR_ROW_ARRAY_SIZE attribute
 
Hi John,

I can reproduce the case now and have a trial patch.
Could you test it?

regards,
Hiroshi Inoue

On 2016/01/20 21:24, Inoue, Hiroshi wrote:





--------------010408030704070903030907-- --------------040601070905090401080900 Content-Type: text/x-diff; name="row_array_size.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="row_array_size.patch" diff --git a/connection.c b/connection.c index 8d2d7e7..86d7da7 100644 --- a/connection.c +++ b/connection.c @@ -1886,7 +1886,7 @@ inolog("Discarded the first SAVEPOINT\n"); * called from QR_next_tuple and must return * immediately. */ - if (!CC_from_PGresult(res, stmt, self, cursor, &pgres)) + if (!CC_from_PGresult(res, stmt, NULL, cursor, &pgres)) { retres = NULL; break; diff --git a/qresult.c b/qresult.c index 7f3445b..5848959 100644 --- a/qresult.c +++ b/qresult.c @@ -592,6 +592,8 @@ QR_from_PGresult(QResultClass *self, StatementClass *stmt, ConnectionClass *conn Int2 dummy1, dummy2; int cidx; +if (NULL != conn) +{ /* First, get column information */ QR_set_conn(self, conn); @@ -660,6 +662,7 @@ inolog("!![%d].PGType %u->%u\n", i, PIC_get_pgtype(ipdopts->parameters[i]), CI_g } } } +} /* Then, get the data itself */ @@ -670,10 +673,13 @@ inolog("!!%p->cursTup=%d total_read=%d\n", self, self->cursTuple, self->num_tota if (!QR_once_reached_eof(self) && self->cursTuple >= (Int4) self->num_total_read) self->num_total_read = self->cursTuple + 1; +if (NULL != conn) +{ /* Force a read to occur in next_tuple */ QR_set_next_in_cache(self, 0); QR_set_rowstart_in_cache(self, 0); self->key_base = 0; +} /* * Also fill in command tag. (Typically, it's SELECT, but can also be --------------040601070905090401080900 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 --------------040601070905090401080900--