[teiid-commits] teiid SVN: r4269 - in trunk/engine/src: test/java/org/teiid/query/processor and 1 other directory.
teiid-commits at lists.jboss.org
teiid-commits at lists.jboss.org
Wed Jul 25 14:29:24 EDT 2012
Author: shawkins
Date: 2012-07-25 14:29:23 -0400 (Wed, 25 Jul 2012)
New Revision: 4269
Modified:
trunk/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java
trunk/engine/src/test/java/org/teiid/query/processor/TestSQLXMLProcessing.java
Log:
TEIID-2098 fixing a regression with streaming error handling
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java 2012-07-25 17:31:41 UTC (rev 4268)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java 2012-07-25 18:29:23 UTC (rev 4269)
@@ -233,7 +233,7 @@
asynchException = new TeiidRuntimeException(e);
} finally {
synchronized (XMLTableNode.this) {
- if (buffer != null) {
+ if (buffer != null && asynchException == null) {
try {
buffer.close();
} catch (TeiidComponentException e) {
Modified: trunk/engine/src/test/java/org/teiid/query/processor/TestSQLXMLProcessing.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/TestSQLXMLProcessing.java 2012-07-25 17:31:41 UTC (rev 4268)
+++ trunk/engine/src/test/java/org/teiid/query/processor/TestSQLXMLProcessing.java 2012-07-25 18:29:23 UTC (rev 4269)
@@ -37,6 +37,7 @@
import org.junit.BeforeClass;
import org.junit.Test;
import org.teiid.api.exception.query.ExpressionEvaluationException;
+import org.teiid.core.TeiidProcessingException;
import org.teiid.core.types.BlobImpl;
import org.teiid.core.types.BlobType;
import org.teiid.core.types.DataTypeManager;
@@ -194,6 +195,12 @@
process(sql, expected);
}
+ @Test(expected=TeiidProcessingException.class) public void testXmlTableAsynchError() throws Exception {
+ String sql = "select * from xmltable('/a/b' passing convert('<a><b>first</b><b x=\"attr\">second</b></a>', xml) columns x blob path '@x', val string path '/.') as x"; //$NON-NLS-1$
+
+ process(sql, null);
+ }
+
@Test public void testXmlTableDateTime() throws Exception {
String sql = "select * from xmltable('/a' passing convert('<a dt=\"2011-11-17T07:38:49\" dtz=\"2011-11-17T07:38:49Z\" t=\"13:23:14\" d=\"2010-04-05\" />', xml) columns x timestamp path '@dt', x1 timestamp path '@dtz', y date path '@d', z time path '@t') as x"; //$NON-NLS-1$
More information about the teiid-commits
mailing list