Author: shawkins
Date: 2011-08-30 10:31:06 -0400 (Tue, 30 Aug 2011)
New Revision: 3435
Modified:
branches/7.4.x/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java
Log:
TEIID-1732 refining empty handling
Modified: branches/7.4.x/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java
===================================================================
---
branches/7.4.x/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java 2011-08-30
14:16:43 UTC (rev 3434)
+++
branches/7.4.x/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java 2011-08-30
14:31:06 UTC (rev 3435)
@@ -592,7 +592,7 @@
}
@Override
- public void executeQuery(final String query) {
+ public void executeQuery(String query) {
if (beginExecution()) {
errorOccurred("Awaiting asynch result"); //$NON-NLS-1$
ready();
@@ -601,6 +601,11 @@
//46.2.3 Note that a simple Query message also destroys the unnamed portal.
this.portalMap.remove(UNNAMED);
this.preparedMap.remove(UNNAMED);
+ query = query.trim();
+ if (query.length() == 0) {
+ client.emptyQueryReceived();
+ ready();
+ }
QueryWorkItem r = new QueryWorkItem(query);
r.run();
@@ -848,11 +853,6 @@
sql = reader.readStatement();
}
while (sql != null) {
- if (sql.trim().length() == 0) {
- sql = reader.readStatement();
- client.emptyQueryReceived();
- continue;
- }
try {
ResultsFuture<Integer> results = new
ResultsFuture<Integer>();
Show replies by date