Update of /cvsroot/monetdb/pathfinder/compiler/algebra/opt
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19891/algebra/opt
Modified Files:
Tag: XQuery_0-24
opt_icol.c
Log Message:
-- Do not remove textnode constructors that are never used as an empty
input string may turn a singleton input sequence into an empty sequence.
U opt_icol.c
Index: opt_icol.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_icol.c,v
retrieving revision 1.23.2.1
retrieving revision 1.23.2.2
diff -u -d -r1.23.2.1 -r1.23.2.2
--- opt_icol.c 28 May 2008 11:37:23 -0000 1.23.2.1
+++ opt_icol.c 5 Jun 2008 21:29:15 -0000 1.23.2.2
@@ -384,7 +384,6 @@
break;
case la_element:
- case la_textnode:
case la_comment:
*p = *PFla_project (
LLL(p),
@@ -410,8 +409,11 @@
LL(p)->sem.iter_pos_item.iter));
break;
- default:
- assert (0);
+ case la_textnode:
+ /* As a textnode based on an empty string
+ has to result in an empty sequence we
+ are not allowed to throw away the textnode
+ constructor. */
break;
}
else if (L(p)->kind == la_doc_tbl &&
@@ -424,10 +426,12 @@
case la_frag_union:
if (L(p)->kind == la_fragment &&
LL(p)->kind == la_twig &&
+ LLL(p)->kind != la_textnode && /* retain textnodes */
!PFprop_icol (LL(p)->prop, LL(p)->sem.iter_item.item))
*p = *PFla_dummy (R(p));
else if (R(p)->kind == la_fragment &&
RL(p)->kind == la_twig &&
+ RLL(p)->kind != la_textnode && /* retain textnodes */
!PFprop_icol (RL(p)->prop, RL(p)->sem.iter_item.item))
*p = *PFla_dummy (L(p));
else if (L(p)->kind == la_fragment &&
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins