Commit 83a23f31 authored by Andrew McDonnell's avatar Andrew McDonnell

Added tests for no latch specified.

parents f8d91216 7032a3cf
......@@ -83,6 +83,20 @@ latch origid destid weight seq linkid
# Expect no result, because of NULL latch
SELECT * FROM graph WHERE latch=NULL and destid=2 and origid=1;
latch origid destid weight seq linkid
# With no latch, original data, filtered by destid, etc if present
SELECT * FROM graph;
latch origid destid weight seq linkid
NULL 1 2 1 NULL NULL
NULL 2 1 1 NULL NULL
NULL 1 3 1 NULL NULL
NULL 3 1 1 NULL NULL
NULL 3 4 1 NULL NULL
NULL 4 3 1 NULL NULL
NULL 5 6 1 NULL NULL
NULL 6 5 1 NULL NULL
SELECT * FROM graph WHERE destid=2 and origid=1;
latch origid destid weight seq linkid
NULL 1 2 1 NULL NULL
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 1 AND (weight = 1 OR weight = 2);
latch origid destid weight seq linkid
breadth_first 1 NULL 2 4 4
......
......@@ -90,6 +90,10 @@ SELECT * FROM graph WHERE latch=0 and destid=2 and origid=1;
--echo # Expect no result, because of NULL latch
SELECT * FROM graph WHERE latch=NULL and destid=2 and origid=1;
--echo # With no latch, original data, filtered by destid, etc if present
SELECT * FROM graph;
SELECT * FROM graph WHERE destid=2 and origid=1;
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 1 AND (weight = 1 OR weight = 2);
--echo # Now we add a connection from 4->6
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment