Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-15006

OQGraph doesn't produce next step links

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • 10.0
    • N/A
    • None
    • Linux - Ubuntu 16.04

    Description

      Hi, I'm prototyping an accounting system based around OQGraph but I've hit a stop

      Here's my data:
      simple select on my graph table:
      latch, origid, destid, weight, seq, linkid
      ,0,1,1,,
      ,1,2,1,,
      ,2,3,1,,
      ,3,4,1,,
      ,4,5,1,,
      ,4,6,1,,
      ,2,7,1,,
      ,7,8,1,,
      ,8,9,1,,
      ,7,10,1,,
      ,10,11,1,,
      ,1,12,1,,
      ,12,13,1,,
      ,13,14,1,,
      ,13,15,1,,
      ,12,16,1,,
      ,16,17,1,,
      ,16,18,1,,
      ,16,19,1,,
      ,16,20,1,,
      ,16,21,1,,
      ,16,22,1,,

      SELECT linkid
      FROM sa_coa_graph
      WHERE latch = '1'
      AND linkid > 0
      AND destid = 22;

      gives me

      linkid
      1
      12
      16
      22

      which is expected and works. Perfect for updating all the parent accounts in one go.

      but

      select linkid from sa_coa_graph where latch = ''
      and origid = 0;

      gives nothing. Not what I'm expecting. In this case I'd expect a result containing linkid == 1 i.e. the first hop link. Setting origid to any other 'parent' gives no first hop links as described in docs at https://mariadb.com/kb/en/library/oqgraph-examples/

      In this case I want to use OQGraph to help me reconstruct the tree back into my parent program (PHP).As there is no functionality to get the linkage in any form of tree, I assumed you'd intended that this mechanism was a step towards doing so.

      Am I missing something?

      Kind regards

      Attachments

        Activity

          People

            andymc73 Andrew McDonnell
            chippyash Mr A Kitson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.