[MDEV-7372] OQGRAPH doesn't show proper error if underlying table has not indexes Created: 2014-12-25  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - OQGRAPH
Affects Version/s: 10.0.15
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Minor
Reporter: Federico Razzoli Assignee: Andrew McDonnell
Resolution: Unresolved Votes: 0
Labels: None


 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.


Generated at Thu Feb 08 07:19:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.