Update of /cvsroot/monetdb/pathfinder/compiler/algebra
In directory 
sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv22834/compiler/algebra

Modified Files:
        planner.c 
Log Message:
propagated changes of Saturday Dec 05 2009 - Wednesday Dec 09 2009
from the Nov2009 branch to the development trunk

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/12/05 - tsheyar: compiler/algebra/planner.c,1.87.2.4
  -- Correctly handle circular dependencies in FD property check.
     (This fixes bug #2908615.)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: planner.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/planner.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- planner.c   19 Nov 2009 10:11:56 -0000      1.90
+++ planner.c   9 Dec 2009 12:47:24 -0000       1.91
@@ -1379,10 +1379,18 @@
 static bool
 dependent_col (const PFla_op_t *n, PFalg_col_t dependent)
 {
-    for (unsigned int i = 0; i < n->schema.count; i++)
+    for (unsigned int i = 0; i < n->schema.count; i++) {
+        /* Avoid problematic results in case of circular dependencies:
+           If the column @a dependent functionally describes a column
+           (before it appears as dependent column) we don't mark it 
+           as dependent. */ 
+        if (n->schema.items[i].name != dependent &&
+            PFprop_fd (n->prop, dependent, n->schema.items[i].name))
+            return false;
         if (n->schema.items[i].name != dependent &&
             PFprop_fd (n->prop, n->schema.items[i].name, dependent))
             return true;
+    }
     return false;
 }
 


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to