Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitef7d791

Browse files
author
Barry Lind
committed
Changed QueryExecutor.java to correctly read responses from the backend.
Fixed NPE when database name was not passed on the jdbc connection URLFixed Connection.isClosed() to not hit the DB for every call
1 parentaf3c380 commitef7d791

File tree

6 files changed

+694
-1005
lines changed

6 files changed

+694
-1005
lines changed

‎src/interfaces/jdbc/org/postgresql/Connection.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
importorg.postgresql.core.*;
1212

1313
/*
14-
* $Id: Connection.java,v 1.44 2002/03/21 02:39:06 davec Exp $
14+
* $Id: Connection.java,v 1.45 2002/03/26 05:52:48 barry Exp $
1515
*
1616
* This abstract class is used by org.postgresql.Driver to open either the JDBC1 or
1717
* JDBC2 versions of the Connection class.
@@ -59,10 +59,6 @@ public abstract class Connection
5959
privatestaticfinalintAUTH_REQ_CRYPT =4;
6060
privatestaticfinalintAUTH_REQ_MD5 =5;
6161

62-
publicfinalstaticintPGASYNC_IDLE =0;/* nothing's happening, dude */
63-
publicfinalstaticintPGASYNC_BUSY =1;/* query in progress */
64-
publicfinalstaticintPGASYNC_READY =2;/* result ready for PQgetResult */
65-
6662

6763
// These are used to cache oids, PGTypes and SQLTypes
6864
privatestaticHashtablesqlTypeCache =newHashtable();// oid -> SQLType
@@ -81,7 +77,6 @@ public abstract class Connection
8177
publicintpid;
8278
publicintckey;
8379

84-
publicintasyncStatus =PGASYNC_READY;
8580
/*
8681
* This is called by Class.forName() from within org.postgresql.Driver
8782
*/
@@ -427,7 +422,7 @@ public java.sql.ResultSet ExecSQL(String sql) throws SQLException
427422
*/
428423
publicjava.sql.ResultSetExecSQL(Stringsql,java.sql.Statementstat)throwsSQLException
429424
{
430-
returnnewQueryExecutor2(sql,stat,pg_stream,this).execute();
425+
returnnewQueryExecutor(sql,stat,pg_stream,this).execute();
431426
}
432427

433428
/*

‎src/interfaces/jdbc/org/postgresql/Driver.java.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ public class Driver implements java.sql.Driver
419419
*/
420420
public String database()
421421
{
422-
return props.getProperty("PGDBNAME");
422+
return props.getProperty("PGDBNAME", "");
423423
}
424424

425425
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp