summaryrefslogtreecommitdiff
path: root/storage/oqgraph/mysql-test
diff options
context:
space:
mode:
authorAndrew McDonnell <bugs@andrewmcdonnell.net>2014-10-25 21:36:55 +1030
committerAndrew McDonnell <bugs@andrewmcdonnell.net>2015-02-28 22:37:04 +1030
commit6ff6bf8aa3d5f4c635aa75f966160ccaeec34973 (patch)
tree320541deb45c6a24d6a65829ac96ef5345f82f05 /storage/oqgraph/mysql-test
parenta657abd63fdb77c20e5d5f91e77a3febb4cce5b2 (diff)
downloadmariadb-git-6ff6bf8aa3d5f4c635aa75f966160ccaeec34973.tar.gz
Added regression test for MDEV-6345
Diffstat (limited to 'storage/oqgraph/mysql-test')
-rw-r--r--storage/oqgraph/mysql-test/oqgraph/regression_mdev6345.result12
-rw-r--r--storage/oqgraph/mysql-test/oqgraph/regression_mdev6345.test19
2 files changed, 31 insertions, 0 deletions
diff --git a/storage/oqgraph/mysql-test/oqgraph/regression_mdev6345.result b/storage/oqgraph/mysql-test/oqgraph/regression_mdev6345.result
new file mode 100644
index 00000000000..8e680e15206
--- /dev/null
+++ b/storage/oqgraph/mysql-test/oqgraph/regression_mdev6345.result
@@ -0,0 +1,12 @@
+DROP TABLE IF EXISTS oq_backing;
+DROP TABLE IF EXISTS oq_graph;
+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;
+latch origid destid weight seq linkid
+breadth_first 1 6 NULL 0 1
+breadth_first 1 6 1 1 2
+breadth_first 1 6 1 2 6
+DROP TABLE IF EXISTS oq_backing;
+DROP TABLE IF EXISTS oq_graph;
diff --git a/storage/oqgraph/mysql-test/oqgraph/regression_mdev6345.test b/storage/oqgraph/mysql-test/oqgraph/regression_mdev6345.test
new file mode 100644
index 00000000000..72de926da2e
--- /dev/null
+++ b/storage/oqgraph/mysql-test/oqgraph/regression_mdev6345.test
@@ -0,0 +1,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;
+