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

OQGRAPH doesn't show proper error if underlying table has not indexes

    XMLWordPrintable

    Details

      Description

      Consider the following example:

      CREATE OR REPLACE TABLE t (
      	a INT UNSIGNED NOT NULL, 
      	b INT UNSIGNED NOT NULL
      );
      INSERT INTO t (a, b) VALUES (1, 2), (2, 3), (3, 4);
      CREATE TABLE oq (
      	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 = 't'
      	ORIGID = 'a'
      	DESTID = 'b';
      SELECT *
      	FROM oq
      	WHERE latch = 'breadth_first'
      	AND origid = 1
      	AND destid = 3;

      Last query returns an empty set. The reason is that the underlying table (t) does not have the proper indexes required by OQGRAPH. The issue can be hard to debug, so I suggest that OQGRAPH returns a clear error.

        Attachments

          Activity

            People

            Assignee:
            andymc73 Andrew McDonnell
            Reporter:
            f_razzoli Federico Razzoli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: