mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
Added tests for no latch specified.
This commit is contained in:
commit
83a23f31d2
2 changed files with 18 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue