Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-13489

subTreeByNodeID - missing depthOperator -> generate slow mysql query

    XMLWordPrintable

Details

    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 = '<='; )

      Attachments

        Activity

          People

            cyberwolf cyberwolf
            scouzinier scouzinier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: