← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~zorba-coders/zorba/bug-914655 into lp:zorba

 

David Graf has proposed merging lp:~zorba-coders/zorba/bug-914655 into lp:zorba.

Requested reviews:
  David Graf (davidagraf)
  Matthias Brantner (matthias-brantner)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-914655/+merge/101922

Fix for bug #914655.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-914655/+merge/101922
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/runtime/eval/eval.cpp'
--- src/runtime/eval/eval.cpp	2012-04-08 21:39:25 +0000
+++ src/runtime/eval/eval.cpp	2012-04-13 15:36:25 +0000
@@ -62,6 +62,20 @@
 {
 }
 
+/****************************************************************************//**
+
+********************************************************************************/
+void
+EvalIteratorState::reset(PlanState& aPlanState) 
+{
+  PlanIteratorState::reset(aPlanState);
+  // When an exception is thrown during an EvalIterator::nextImpl invocation
+  // or when the EvalIterator doesn't return all resulting items of an other reason,
+  // the PlanWrapper is not properly destroyed. Therefore, we destroy it in the reset
+  // to prevent troubles the next time the EvalIterator is used.
+  thePlanWrapper = 0;
+}
+
 
 /****************************************************************************//**
 

=== modified file 'src/runtime/eval/eval.h'
--- src/runtime/eval/eval.h	2012-03-28 05:19:57 +0000
+++ src/runtime/eval/eval.h	2012-04-13 15:36:25 +0000
@@ -37,6 +37,8 @@
   EvalIteratorState();
 
   ~EvalIteratorState();
+
+  void reset(PlanState&);
 };
 
 


Follow ups