summaryrefslogtreecommitdiff
path: root/storage/oqgraph/mysql-test/oqgraph/regression_mdev6345.test
blob: 72de926da2ec3b979aed6d7b721bc54b75a5f7f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#-- This test is probably not right, because the real bug manifested over a network connection on a busy server.

--disable_warnings
DROP TABLE IF EXISTS oq_backing;
DROP TABLE IF EXISTS oq_graph;
--enable_warnings


CREATE TABLE oq_backing (origid INT UNSIGNED NOT NULL, destid INT UNSIGNED NOT NULL, PRIMARY KEY (origid, destid), KEY (destid));

INSERT INTO oq_backing(origid, destid) VALUES (1,2), (2,3), (3,4), (4,5), (2,6), (5,6);

CREATE TABLE oq_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='oq_backing' origid='origid' destid='destid';

SELECT * FROM oq_graph WHERE latch='breadth_first' AND origid=1 AND destid=6;

DROP TABLE IF EXISTS oq_backing;
DROP TABLE IF EXISTS oq_graph;