Update of /cvsroot/monetdb/pathfinder/compiler/algebra/prop
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1643/algebra/prop

Modified Files:
      Tag: XQuery_0-24
        prop_ori_names.c 
Log Message:
-- circumvent bugs #1981491 and #1908822 for the release.

   This 'hack' does not fix the real problem (that we have to get rid
   of bit-encoded column names), but just disables some optimizations
   in case we might get into trouble. Thus we can apply less rewrites
   and get 'suboptimal' plans.

   THIS IS A RELEASE ONLY CHECKIN --- PLEASE DO NOT PROPAGATE!


U prop_ori_names.c
Index: prop_ori_names.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_ori_names.c,v
retrieving revision 1.33.2.1
retrieving revision 1.33.2.2
diff -u -d -r1.33.2.1 -r1.33.2.2
--- prop_ori_names.c    28 May 2008 11:37:32 -0000      1.33.2.1
+++ prop_ori_names.c    2 Jun 2008 08:44:29 -0000       1.33.2.2
@@ -60,6 +60,8 @@
 /* initial value for lists that encode free variables */
 #define ALL (~att_NULL)
 
+static bool out_of_names;
+
 /* worker for PFprop_ori_name* */
 static PFalg_att_t
 find_ori_name (PFarray_t *np_list, PFalg_att_t attr)
@@ -227,8 +229,18 @@
             PFalg_att_t ori = PFalg_ori_name (unq, FREE(n));
             add_name_pair (np_list, ori, unq);
             FREE(n) = diff (FREE(n), ori);
+            /* check if we run out of names */
+            if (!FREE(n)) {
+                out_of_names = true;
+                return np_list;
+            }
         }
     }
+    /* check if we run out of names */
+    if (!FREE(n)) {
+        out_of_names = true;
+        return np_list;
+    }
 
     /* create name pair lists for the child operators */
     switch (n->kind) {
@@ -710,9 +722,12 @@
 /**
  * Infer original names for a DAG rooted in root
  */
-void
+bool
 PFprop_infer_ori_names (PFla_op_t *root)
 {
+    /* reset out_of_names flag */
+    out_of_names = false;
+    
     /* collect number of incoming edges (parents) */
     PFprop_infer_refctr (root);
 
@@ -722,6 +737,8 @@
     /* infer new original names property */
     infer_ori_names (root,
                      PFarray (sizeof (name_pair_t), 0));
+
+    return out_of_names;
 }
 
 /* vim:set shiftwidth=4 expandtab: */


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to