Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id D7B33B5DC70 for ; Wed, 21 Sep 2011 19:23:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 61480-08 for ; Wed, 21 Sep 2011 22:22:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from auth-smtp.nebula.fi (auth-smtp.nebula.fi [217.30.180.105]) by mail.postgresql.org (Postfix) with ESMTP id 0E63BB5DC5F for ; Wed, 21 Sep 2011 19:22:52 -0300 (ADT) Received: from quadvadis.localdomain (gw.nitor.fi [83.145.228.24]) (authenticated bits=0) by auth-smtp.nebula.fi (8.13.4/8.13.4) with ESMTP id p8LMMnb0031722 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 22 Sep 2011 01:22:50 +0300 Message-ID: <4E7A63BA.1020505@nitorcreations.com> Date: Thu, 22 Sep 2011 01:22:50 +0300 From: Mikko Tiihonen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Binary transfer patches v15 Content-Type: multipart/mixed; boundary="------------080300000906010608010106" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-10 required=5 tests=BAYES_50=0.8 X-Spam-Level: X-Archive-Number: 201109/82 X-Sequence-Number: 22200 This is a multi-part message in MIME format. --------------080300000906010608010106 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I believe these are now ready for merging to cvs head. The patch set now passes all tests on jdk7u2 + postgres 9.1.0. Changes from last week: - Rebased to latest cvs - Fixed connection leak in jdbc3/DatabaseMetaDataTest.java => now it is possible to run the unit tests with max_connections=2 in postgresql.conf - Fixed ForceBinaryTransfer bug in DatabaseEncodingTest => Required a new field to Jdbc2ResultSet to keep the real statement alive (Thanks to Oliver for the good analysis on the problem) - Fixed UpdateableResultTest.testUpdateStreams with binary transfers => now ResultSet.refreshRow() informs lower level code that the results are for updateable result set and should not use binary transfer Any comments on what still needs to be done before this is accepted? -Mikko --------------080300000906010608010106 Content-Type: text/plain; name="1-bugfixes.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="1-bugfixes.patch" Index: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java =================================================================== --- pgjdbc.orig/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java +++ pgjdbc/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java @@ -2510,7 +2510,7 @@ public abstract class AbstractJdbc2Datab tuple[13] = null; // sql data type (unused) tuple[14] = null; // sql datetime sub (unused) tuple[15] = tuple[6]; // char octet length - tuple[16] = rs.getBytes("attnum"); // ordinal position + tuple[16] = connection.encodeString(String.valueOf(rs.getInt("attnum"))); // ordinal position tuple[17] = connection.encodeString(rs.getBoolean("attnotnull") ? "NO" : "YES"); // Is nullable if (jdbcVersion >= 3) { Index: pgjdbc/org/postgresql/test/jdbc3/DatabaseMetaDataTest.java =================================================================== --- pgjdbc.orig/org/postgresql/test/jdbc3/DatabaseMetaDataTest.java +++ pgjdbc/org/postgresql/test/jdbc3/DatabaseMetaDataTest.java @@ -40,6 +40,7 @@ public class DatabaseMetaDataTest extend stmt.execute("DROP TABLE domtab"); stmt.execute("DROP DOMAIN mydom"); } + TestUtil.closeDB(_conn); } public void testGetColumnsForDomain() throws Exception --------------080300000906010608010106 Content-Type: text/plain; name="2-binarytransfer-core.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="2-binarytransfer-core.patch" Index: pgjdbc/build.xml =================================================================== --- pgjdbc.orig/build.xml +++ pgjdbc/build.xml @@ -369,6 +369,8 @@ + +