--- dbxml-2.3.10-original/dbxml/src/dbxml/optimizer/QueryPlanGenerator.cpp 2007-04-18 10:05:24.000000000 +0100 +++ dbxml-2.3.10/dbxml/src/dbxml/optimizer/QueryPlanGenerator.cpp 2007-08-08 11:32:10.000000000 +0100 @@ -1566,11 +1572,12 @@ else if(name == Or::name) { UnionQP *unionOp = new (&memMgr_) UnionQP(&memMgr_); + result.operation = unionOp; for(VectorOfASTNodes::iterator i = args.begin(); i != args.end(); ++i) { PathResult ret = generate(*i, ids); unionOp->addArg(ret.operation); + if(ret.operation == 0) result.operation = 0; } - result.operation = unionOp; } // These operators use the presence of the node arguments, not their value