Details
-
Bug
-
Resolution: Fixed
-
Medium
-
3.10.0, 3.10.1rc2, 3.9.4, 4.0.0, 4.0.1rc2
-
None
Description
eZContentObjectTreeNode::subTreeByNodeID generate slow mysql query.
when you do :
$param = array( 'Depth' => '1',
'AttributeFilter' => array(....)
);
eZContentObjectTreeNode::subTreeByNodeID($param, $nodeid);
the code will generate a SQL query like
SELECT .... WHERE ezcontentobject_tree.path_string like '/1/2/278926/286968/286972/%' and ezcontentobject_tree.depth <= 5 and ...
the SQL should be :
SELECT .... WHERE ezcontentobject_tree.parent_node_id =286972 and ...
In the function ezContentObjecttreenode::createPathConditionAndNotEqParentSQLStrings
setting the default value 'le' to $depthOperator should resolve the pb and won,'t change anything (the value le is set bug a bit later
01362 $sqlDepthOperator = '<='; )