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

OQGRAPH backing table changes not reflected in OQGRAPH table

    XMLWordPrintable

Details

    Description

      An update to the backing OQGRAPH table does not reflect when querying the OQGRAPH table. The change reflects after a server restart.

      Running Ubuntu 12.04 32-bit. MariaDB 10.0.7 installed from standard package, 3.2.0-58-gerneric-pae kernel, dual CPU

      How to repeat:

      CREATE TABLE oq2_backing (
        origid INT UNSIGNED NOT NULL,
        destid INT UNSIGNED NOT NULL,
        weight DOUBLE NOT NULL,
        PRIMARY KEY (origid, destid),
        KEY (destid)
      );
       
      INSERT INTO oq2_backing(origid, destid, weight)
       VALUES (1,2,1), (2,3,1), (3,4,3), (4,5,1), (2,6,10), (5,6,2);

      CREATE TABLE oq2_graph (
        latch VARCHAR(32) NULL,
        origid BIGINT UNSIGNED NULL,
        destid BIGINT UNSIGNED NULL,
        weight DOUBLE NULL,
        seq BIGINT UNSIGNED NULL,
        linkid BIGINT UNSIGNED NULL,
        KEY (latch, origid, destid) USING HASH,
        KEY (latch, destid, origid) USING HASH
      )
      ENGINE=OQGRAPH
      data_table='oq2_backing' origid='origid' destid='destid' weight='weight';
       
      UPDATE oq2_backing SET weight=4 WHERE origid=2 AND destid=6;

      SELECT * FROM oq2_backing;
      +--------+--------+--------+
      | origid | destid | weight |
      +--------+--------+--------+
      | 1 | 2 | 1 |
      | 2 | 3 | 1 |
      | 2 | 6 | 4 |
      | 3 | 4 | 3 |
      | 4 | 5 | 1 |
      | 5 | 6 | 2 |
      +--------+--------+--------+

      SELECT * FROM oq2_graph;
      +-------+--------+--------+--------+------+--------+
      | latch | origid | destid | weight | seq | linkid |
      +-------+--------+--------+--------+------+--------+
      | NULL | 1 | 2 | 1 | NULL | NULL |
      | NULL | 2 | 3 | 1 | NULL | NULL |
      | NULL | 2 | 6 | 10 | NULL | NULL |
      | NULL | 3 | 4 | 3 | NULL | NULL |
      | NULL | 4 | 5 | 1 | NULL | NULL |
      | NULL | 5 | 6 | 2 | NULL | NULL |
      +-------+--------+--------+--------+------+--------+

      I have repeated the bug on another machine, Ubuntu 12.04 64-bit, both fairly standard my.cnf settings. The problem persists on 10.0.8.

      I have reported this bug upstream at https://bugs.launchpad.net/oqgraph/+bug/1279246 but there has been no activity.

      The problem also appears to affect others - see https://mariadb.com/kb/en/how-do-i-keep-the-graph-table-and-data-table-in-sync/#comment_1055

      Attachments

        Issue Links

          There are no Sub-Tasks for this issue.

          Activity

            People

              elenst Elena Stepanova
              greenman Ian Gilfillan
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.