[
https://jira.jboss.org/jira/browse/TEIID-911?page=com.atlassian.jira.plug...
]
Steven Hawkins updated TEIID-911:
---------------------------------
Fix Version/s: 7.0
Prepared Batch Update against a view table fails with "Unable to
evaluate $param/pos0: No value was available"
--------------------------------------------------------------------------------------------------------------
Key: TEIID-911
URL:
https://jira.jboss.org/jira/browse/TEIID-911
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.0
Environment: teiid-engine revision 1662
Reporter: Larry O'Leary
Assignee: Steven Hawkins
Fix For: 7.0
Attachments: JBEDSP-1133_Teiid-Rev-1662_UnitTests_200912211050.patch
Attempting to execute a prepared batch update against a view table results in the
following stack trace:
[MetaMatrixComponentException] ERR.015.006.0033: Error Code:ERR.015.006.0033
Message:Unable to evaluate $param/pos0: No value was available
at
com.metamatrix.query.sql.util.VariableContext.getGlobalValue(VariableContext.java:68)
at
com.metamatrix.query.sql.util.VariableContext.getGlobalValue(VariableContext.java:64)
at com.metamatrix.query.eval.Evaluator.internalEvaluate(Evaluator.java:562)
at com.metamatrix.query.eval.Evaluator.evaluate(Evaluator.java:524)
at
com.metamatrix.query.processor.proc.ProcedurePlan.evaluateExpression(ProcedurePlan.java:648)
at com.metamatrix.query.processor.proc.ProcedurePlan.open(ProcedurePlan.java:187)
at
com.metamatrix.query.processor.relational.PlanExecutionNode.open(PlanExecutionNode.java:74)
at
com.metamatrix.query.processor.relational.RelationalNode.open(RelationalNode.java:236)
at
com.metamatrix.query.processor.relational.RelationalPlan.open(RelationalPlan.java:101)
at
com.metamatrix.query.processor.batch.BatchedUpdatePlan.open(BatchedUpdatePlan.java:114)
at com.metamatrix.query.processor.QueryProcessor.initialize(QueryProcessor.java:112)
at com.metamatrix.query.processor.QueryProcessor.process(QueryProcessor.java:152)
at com.metamatrix.query.processor.QueryProcessor.process(QueryProcessor.java:127)
at com.metamatrix.query.processor.TestProcessor.doProcess(TestProcessor.java:234)
at
org.teiid.dqp.internal.process.TestPreparedStatement.helpTestProcessing(TestPreparedStatement.java:121)
at
org.teiid.dqp.internal.process.TestPreparedStatementBatchedUpdate.testUpdateSameNumCmds_Virtual(TestPreparedStatementBatchedUpdate.java:246)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
at
org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
at
org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
This was produced using a UnitTest that simply creates a prepared statement similar to:
preparedSql = "UPDATE vm1.g1 SET vm1.g1.e2=? WHERE vm1.g1.e1=?"
values.add(new ArrayList<Object>(Arrays.asList(new Object[] { new Integer(0),
"a" })));
values.add(new ArrayList<Object>(Arrays.asList(new Object[] { new Integer(1),
"b" })));
Then execute the prepared statement.
Attached unit test patch includes the failing unit tests against a virtual and some
refactoring of the existing unit test methods to handle some unit test framework changes
from R050503.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira