Update of /cvsroot/monetdb/pathfinder/compiler/algebra
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16247/algebra
Modified Files:
Tag: Nov2009
planner.c
Log Message:
-- 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.87.2.3
retrieving revision 1.87.2.4
diff -u -d -r1.87.2.3 -r1.87.2.4
--- planner.c 18 Nov 2009 15:56:55 -0000 1.87.2.3
+++ planner.c 5 Dec 2009 23:08:22 -0000 1.87.2.4
@@ -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;
}
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins