From: Date: September 6 2007 9:28pm Subject: Connector/J commit: r6571 - trunk/connector-j/src/com/mysql/jdbc List-Archive: http://lists.mysql.com/commits/33861 Message-Id: <200709061928.l86JSVox010732@bk-internal.mysql.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modified: trunk/connector-j/src/com/mysql/jdbc/Statement.java trunk/connector-j/src/com/mysql/jdbc/StatementImpl.java Log: Post-merge fixups. Too bad svnmerge requires pristine trees, doesn't play well with an Eclipse workspace :( Modified: trunk/connector-j/src/com/mysql/jdbc/Statement.java =================================================================== --- trunk/connector-j/src/com/mysql/jdbc/Statement.java 2007-09-06 19:01:57 UTC (rev 6570) +++ trunk/connector-j/src/com/mysql/jdbc/Statement.java 2007-09-06 19:28:31 UTC (rev 6571) @@ -83,4 +83,6 @@ * via setLocalInfileInputStream(). */ public abstract InputStream getLocalInfileInputStream(); + + public void setPingTarget(PingTarget pingTarget); } \ No newline at end of file Modified: trunk/connector-j/src/com/mysql/jdbc/StatementImpl.java =================================================================== --- trunk/connector-j/src/com/mysql/jdbc/StatementImpl.java 2007-09-06 19:01:57 UTC (rev 6570) +++ trunk/connector-j/src/com/mysql/jdbc/StatementImpl.java 2007-09-06 19:28:31 UTC (rev 6571) @@ -1443,20 +1443,28 @@ this.connection.ping(); } - ResultSet fakeSelectOneResultSet = generatePingResultSet(); + ResultSetInternalMethods fakeSelectOneResultSet = generatePingResultSet(); this.results = fakeSelectOneResultSet; } - protected ResultSet generatePingResultSet() throws SQLException { + protected ResultSetInternalMethods generatePingResultSet() throws SQLException { Field[] fields = { new Field(null, "1", Types.BIGINT, 1) }; ArrayList rows = new ArrayList(); byte[] colVal = new byte[] { (byte) '1' }; - rows.add(new byte[][] { colVal }); + rows.add(new ByteArrayRow(new byte[][] { colVal })); - return (ResultSet) DatabaseMetaData.buildResultSet(fields, rows, + return (ResultSetInternalMethods) DatabaseMetaData.buildResultSet(fields, rows, this.connection); } + + protected void executeSimpleNonQuery(ConnectionImpl c, String nonQuery) + throws SQLException { + c.execSQL(this, nonQuery, + -1, null, ResultSet.TYPE_FORWARD_ONLY, + ResultSet.CONCUR_READ_ONLY, false, this.currentCatalog, + null, false).close(); + } /** * Execute a SQL INSERT, UPDATE or DELETE statement. In addition SQL @@ -2243,6 +2251,7 @@ this.openResults = null; this.batchedGeneratedKeys = null; this.cancelTimeoutMutex = null; + this.localInfileInputStream = null; this.pingTarget = null; } @@ -2593,4 +2602,8 @@ public synchronized void setLocalInfileInputStream(InputStream stream) { this.localInfileInputStream = stream; } + + public synchronized void setPingTarget(PingTarget pingTarget) { + this.pingTarget = pingTarget; + } }