Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ffe356b

Browse files
author
Dave Cramer
committed
backed out changes for cancel, no need to look for two 'Z' responses
1 parent 29ea8ff commit ffe356b

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/interfaces/jdbc/org/postgresql/core/QueryExecutor.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* <p>The lifetime of a QueryExecutor object is from sending the query
1414
* until the response has been received from the backend.
1515
*
16-
* $Id: QueryExecutor.java,v 1.7 2002/03/05 18:01:27 davec Exp $
16+
* $Id: QueryExecutor.java,v 1.8 2002/03/05 20:11:57 davec Exp $
1717
*/
1818

1919
public class QueryExecutor
@@ -57,7 +57,6 @@ public java.sql.ResultSet execute() throws SQLException
5757

5858
int fqp = 0;
5959
boolean hfr = false;
60-
int lastMessage = 0;
6160

6261
synchronized (pg_stream)
6362
{
@@ -113,26 +112,11 @@ public java.sql.ResultSet execute() throws SQLException
113112
receiveFields();
114113
break;
115114
case 'Z': // backend ready for query, ignore for now :-)
116-
if ( lastMessage == 'Z' )
117-
{
118-
try
119-
{
120-
pg_stream.SendChar('Q');
121-
pg_stream.SendChar(' ');
122-
pg_stream.SendChar(0);
123-
pg_stream.flush();
124-
} catch (IOException e) {
125-
throw new PSQLException("postgresql.con.ioerror",e);
126-
}
127-
fqp++;
128-
}
129-
130115
break;
131116
default:
132117
throw new PSQLException("postgresql.con.type",
133118
new Character((char) c));
134119
}
135-
lastMessage = c;
136120
}
137121
return connection.getResultSet(connection, statement, fields, tuples, status, update_count, insert_oid, binaryCursor);
138122
}

0 commit comments

Comments
 (0)