Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
f90dca1a
Commit
f90dca1a
authored
May 05, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
MDEV-6014 Merge fixed OQGRAPH into 10.0 tree
parents
9c9aa62d
8bc1fa73
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
3408 additions
and
32 deletions
+3408
-32
storage/oqgraph/CMakeLists.txt
storage/oqgraph/CMakeLists.txt
+7
-5
storage/oqgraph/README
storage/oqgraph/README
+17
-4
storage/oqgraph/cmake/FindJudy.cmake
storage/oqgraph/cmake/FindJudy.cmake
+42
-8
storage/oqgraph/graphcore.cc
storage/oqgraph/graphcore.cc
+6
-1
storage/oqgraph/ha_oqgraph.cc
storage/oqgraph/ha_oqgraph.cc
+3
-1
storage/oqgraph/mysql-test/oqgraph/general-Aria.result
storage/oqgraph/mysql-test/oqgraph/general-Aria.result
+4
-1
storage/oqgraph/mysql-test/oqgraph/general-Aria.test
storage/oqgraph/mysql-test/oqgraph/general-Aria.test
+3
-0
storage/oqgraph/mysql-test/oqgraph/general-MyISAM.result
storage/oqgraph/mysql-test/oqgraph/general-MyISAM.result
+1441
-0
storage/oqgraph/mysql-test/oqgraph/general-MyISAM.test
storage/oqgraph/mysql-test/oqgraph/general-MyISAM.test
+3
-0
storage/oqgraph/mysql-test/oqgraph/general-innodb.result
storage/oqgraph/mysql-test/oqgraph/general-innodb.result
+1441
-0
storage/oqgraph/mysql-test/oqgraph/general-innodb.test
storage/oqgraph/mysql-test/oqgraph/general-innodb.test
+4
-0
storage/oqgraph/mysql-test/oqgraph/general.inc
storage/oqgraph/mysql-test/oqgraph/general.inc
+7
-2
storage/oqgraph/mysql-test/oqgraph/generate_backing_table_tests_suite.sh
.../mysql-test/oqgraph/generate_backing_table_tests_suite.sh
+52
-0
storage/oqgraph/mysql-test/oqgraph/maintainer-general-record.sh
...e/oqgraph/mysql-test/oqgraph/maintainer-general-record.sh
+5
-0
storage/oqgraph/mysql-test/oqgraph/regression_mdev5996.inc
storage/oqgraph/mysql-test/oqgraph/regression_mdev5996.inc
+53
-0
storage/oqgraph/mysql-test/oqgraph/regression_mdev5996.result
...age/oqgraph/mysql-test/oqgraph/regression_mdev5996.result
+283
-0
storage/oqgraph/mysql-test/oqgraph/regression_mdev5996.test
storage/oqgraph/mysql-test/oqgraph/regression_mdev5996.test
+33
-0
storage/oqgraph/oqgraph_shim.h
storage/oqgraph/oqgraph_shim.h
+4
-10
No files found.
storage/oqgraph/CMakeLists.txt
View file @
f90dca1a
...
...
@@ -16,12 +16,12 @@ ENDIF()
INCLUDE_DIRECTORIES
(
${
Judy_INCLUDE_DIR
}
)
IF
(
MSVC
)
# lp:756966 OQGRAPH on Win64 does not compile
IF
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
SET
(
BOOST_OK 0
)
ELSE
()
#
# lp:756966 OQGRAPH on Win64 does not compile
#
IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
#
SET(BOOST_OK 0)
#
ELSE()
SET
(
BOOST_OK 1
)
ENDIF
()
#
ENDIF()
ELSE
()
# See if that works. On old gcc it'll fail because of -fno-rtti
CHECK_CXX_SOURCE_COMPILES
(
...
...
@@ -38,6 +38,8 @@ IF(BOOST_OK)
ADD_DEFINITIONS
(
-DHAVE_OQGRAPH
)
IF
(
MSVC
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/EHsc"
)
# Fix problem with judy not finding inttypes.h on Windows:
ADD_DEFINITIONS
(
-DJU_WIN
)
ELSE
(
MSVC
)
# Fix lp bug 1221555 with -fpermissive, so that errors in gcc 4.7 become warnings for the time being
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-deprecated -fno-strict-aliasing -fpermissive"
)
...
...
storage/oqgraph/README
View file @
f90dca1a
OQGraph storage engine v3
Copyright (C) 2007-201
3 Arjen G Lentz & Antony T Curtis for Open Query
Copyright (C) 2007-201
4 Arjen G Lentz & Antony T Curtis for Open Query, & Andrew McDonnell
The Open Query GRAPH engine (OQGRAPH) is a computation engine allowing
hierarchies and more complex graph structures to be handled in a
...
...
@@ -12,9 +12,22 @@ v3 implementation by Antony Curtis, Arjen Lentz, Andrew McDonnell
For more information, documentation, support, enhancement engineering,
see http://openquery.com/graph or contact graph@openquery.com
INSTALLATION
OQGraph requires at least version 1.40.0 of the Boost library. To
OQGraph requires at least version 1.40.0 of the Boost
Graph
library. To
obtain a copy of the Boost library, see http://www.boost.org/
This can be obtained in Debian Wheezy by `apt-get install libboost-graph-dev`
OQGraph requires libjudy - http://judy.sourceforge.net/
This can be obtained in Debian Wheezy by `apt-get install libjudy-dev`
BUILD (example)
cd path/to/maria/source
mkdir build # use symlink to scratch
cd build
CONFIGURE="-DWITH_EXTRA_CHARSETS=complex -DWITH_PLUGIN_ARIA=1 -DWITH_READLINE=1 -DWITH_SSL=bundled -DWITH_MAX=1 -DWITH_EMBEDDED_SERVER=1"
cmake .. $CONFIGURE
make -j5
mysql-test-run --suite oqgraph
storage/oqgraph/cmake/FindJudy.cmake
View file @
f90dca1a
# - Try to find Judy
# - Try to find Judy.
#
# Additionally, on Windows, this module reads hints about search locations from variables:
# JUDY_ROOT - Preferred installation prefix
#
# To build Judy on Windows: (Tested with judy-1.0.5)
#
# * Download the sources tarball from http://sourceforge.net/projects/judy/
# * Extract the source
# * Win32: open the Visual Studio C++ Express 2010 command prompt and navigate to the src/ directory.
# Then execute: build.bat
# * Win64: open the Windows SDK 7.1 Command Prompt and navigate to the src/ directory
# Then execute: build.bat
# * Run the mariadb build with JUDY_ROOT=path\to\judy
#
# Once done this will define
#
# Judy_FOUND - system has Judy
...
...
@@ -6,17 +20,37 @@
# Judy_LIBRARIES - Link these to use Judy
# Judy_DEFINITIONS - Compiler switches required for using Judy
IF
(
Judy_INCLUDE_DIR AND Judy_LIBRARIES
)
SET
(
Judy_FIND_QUIETLY TRUE
)
ENDIF
(
Judy_INCLUDE_DIR AND Judy_LIBRARIES
)
IF
(
MSVC
)
# For now, assume Judy built according to the above instructions
if
(
NOT
"$ENV{JUDY_ROOT}"
STREQUAL
""
)
# Avoid passing backslashes to _Boost_FIND_LIBRARY due to macro re-parsing.
string
(
REPLACE
"
\\
"
"/"
Judy_INCLUDE_DIR_search $ENV{JUDY_ROOT}/src
)
string
(
REPLACE
"
\\
"
"/"
Judy_LIBRARIES_search $ENV{JUDY_ROOT}/src
)
endif
()
ELSE
(
MSVC
)
IF
(
Judy_INCLUDE_DIR AND Judy_LIBRARIES
)
SET
(
Judy_FIND_QUIETLY TRUE
)
ENDIF
(
Judy_INCLUDE_DIR AND Judy_LIBRARIES
)
ENDIF
(
MSVC
)
FIND_PATH
(
Judy_INCLUDE_DIR Judy.h
)
FIND_LIBRARY
(
Judy_LIBRARIES
NAMES Judy
)
FIND_PATH
(
Judy_INCLUDE_DIR Judy.h
PATHS
${
Judy_INCLUDE_DIR_search
}
)
FIND_LIBRARY
(
Judy_LIBRARIES
Judy PATHS
${
Judy_LIBRARIES_search
}
)
IF
(
Judy_INCLUDE_DIR AND Judy_LIBRARIES
)
SET
(
Judy_FOUND TRUE
)
SET
(
Judy_FOUND TRUE
)
ELSE
(
Judy_INCLUDE_DIR AND Judy_LIBRARIES
)
SET
(
Judy_FOUND FALSE
)
SET
(
Judy_FOUND FALSE
)
if
(
MSVC
)
MESSAGE
(
STATUS
"How to build Judy on Windows:"
)
MESSAGE
(
STATUS
"1. Download the source tarball from http://sourceforge.net/projects/judy/"
)
IF
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
MESSAGE
(
STATUS
"2. Extract the source, open the Visual Studio command prompt and navigate to the src/ directory."
)
ELSE
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
MESSAGE
(
STATUS
"2. Extract the source, open the Windows SDK 7.1 Command Prompt and navigate to the src/ directory."
)
ENDIF
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
MESSAGE
(
STATUS
"3. Execute the command: 'build'"
)
MESSAGE
(
STATUS
"4. Rerun this cmake with the environment variable: 'set JUDY_ROOT=x:
\\
path
\\
to
\\
judy'"
)
endif
(
MSVC
)
ENDIF
(
Judy_INCLUDE_DIR AND Judy_LIBRARIES
)
IF
(
Judy_FOUND
)
...
...
storage/oqgraph/graphcore.cc
View file @
f90dca1a
...
...
@@ -1122,7 +1122,12 @@ int edges_cursor::fetch_row(const row &row_info, row &result,
// but origid and destid can be -1 indicating no such record, NULL? but oqgraph3::vertex_id
// seems to resolve to VertexID (unsigned) in row
// in any case we should check for errors (-1) in origid... because all edges have at least one vertex by definition
assert
(
!
((
size_t
)
orig
==
(
size_t
)
-
1
&&
(
size_t
)
dest
==
(
size_t
)
-
1
));
// indicates we havent handle a HA_ERR_RECORD_DELETED somewhere
if
(
orig
==
(
oqgraph3
::
vertex_id
)
-
1
&&
dest
==
(
oqgraph3
::
vertex_id
)
-
1
)
{
// Select * from graph; -- when backing store is empty (bug MDEV-5891)
return
oqgraph
::
NO_MORE_DATA
;
}
// assert( ! ((size_t)orig == (size_t)-1 && (size_t)dest == (size_t)-1));
// indicates we havent handle a HA_ERR_RECORD_DELETED somewhere
result
.
orig
=
orig
;
result
.
dest
=
dest
;
...
...
storage/oqgraph/ha_oqgraph.cc
View file @
f90dca1a
...
...
@@ -557,9 +557,11 @@ int ha_oqgraph::open(const char *name, int mode, uint test_if_locked)
size_t
tlen
=
strlen
(
options
->
table_name
);
size_t
plen
=
(
int
)(
p
-
name
)
+
tlen
+
1
;
share
->
path
.
str
=
(
char
*
)
alloc_root
(
&
share
->
mem_root
,
plen
);
share
->
path
.
str
=
(
char
*
)
alloc_root
(
&
share
->
mem_root
,
plen
+
1
);
// MDEV-5996 space for trailing zero
// it seems there was a misunderstanding of why there is a separate length field in the String object
strmov
(
strnmov
(
share
->
path
.
str
,
name
,
(
int
)(
p
-
name
)
+
1
),
options
->
table_name
);
share
->
path
.
str
[
plen
]
=
0
;
// MDEV-5996 Make sure the pointer is zero terminated. I really think this needs refactoring, soon...
share
->
normalized_path
.
str
=
share
->
path
.
str
;
share
->
path
.
length
=
share
->
normalized_path
.
length
=
plen
;
...
...
storage/oqgraph/mysql-test/oqgraph/
basic
.result
→
storage/oqgraph/mysql-test/oqgraph/
general-Aria
.result
View file @
f90dca1a
DROP TABLE IF EXISTS graph_base;
DROP TABLE IF EXISTS graph;
DROP TABLE IF EXISTS graph2;
Performing OQGraph General test suite for ENGINE=Aria
CREATE TABLE graph_base (
from_id INT UNSIGNED NOT NULL,
to_id INT UNSIGNED NOT NULL,
PRIMARY KEY (from_id,to_id),
INDEX (to_id)
) ENGINE=
MyISAM
;
) ENGINE=
Aria
;
CREATE TABLE graph (
latch VARCHAR(32) NULL,
origid BIGINT UNSIGNED NULL,
...
...
@@ -17,6 +18,8 @@ linkid BIGINT UNSIGNED NULL,
KEY (latch, origid, destid) USING HASH,
KEY (latch, destid, origid) USING HASH
) ENGINE=OQGRAPH DATA_TABLE='graph_base' ORIGID='from_id', DESTID='to_id';
select * from graph;
latch origid destid weight seq linkid
INSERT INTO graph_base(from_id, to_id) VALUES (1,2), (2,1);
INSERT INTO graph_base(from_id, to_id) VALUES (1,3), (3,1);
INSERT INTO graph_base(from_id, to_id) VALUES (3,4), (4,3);
...
...
storage/oqgraph/mysql-test/oqgraph/general-Aria.test
0 → 100644
View file @
f90dca1a
# This is a maintainer generated file. Generated at Wednesday 5 February 22:26:12 CST 2014.
--
let
$oqgraph_use_table_type
=
Aria
--
source
general
.
inc
storage/oqgraph/mysql-test/oqgraph/general-MyISAM.result
0 → 100644
View file @
f90dca1a
DROP TABLE IF EXISTS graph_base;
DROP TABLE IF EXISTS graph;
DROP TABLE IF EXISTS graph2;
Performing OQGraph General test suite for ENGINE=MyISAM
CREATE TABLE graph_base (
from_id INT UNSIGNED NOT NULL,
to_id INT UNSIGNED NOT NULL,
PRIMARY KEY (from_id,to_id),
INDEX (to_id)
) ENGINE= MyISAM ;
CREATE TABLE 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='graph_base' ORIGID='from_id', DESTID='to_id';
select * from graph;
latch origid destid weight seq linkid
INSERT INTO graph_base(from_id, to_id) VALUES (1,2), (2,1);
INSERT INTO graph_base(from_id, to_id) VALUES (1,3), (3,1);
INSERT INTO graph_base(from_id, to_id) VALUES (3,4), (4,3);
INSERT INTO graph_base(from_id, to_id) VALUES (5,6), (6,5);
INSERT INTO graph_base(from_id, to_id) VALUES (5,7);
INSERT INTO graph_base(from_id, to_id) VALUES (9,9);
INSERT INTO graph_base(from_id, to_id) VALUES (10,11);
INSERT INTO graph_base(from_id, to_id) VALUES (11,12);
INSERT INTO graph_base(from_id, to_id) VALUES (12,10);
# Return all edges
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
NULL 5 7 1 NULL NULL
NULL 9 9 1 NULL NULL
NULL 10 11 1 NULL NULL
NULL 11 12 1 NULL NULL
NULL 12 10 1 NULL NULL
# Currently count should be 13
SELECT count(*) FROM graph;
count(*)
13
# Return all edges when latch is NULL - this is different to latch='' and same as no where clause
SELECT * FROM graph where latch is NULL;
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
NULL 5 7 1 NULL NULL
NULL 9 9 1 NULL NULL
NULL 10 11 1 NULL NULL
NULL 11 12 1 NULL NULL
NULL 12 10 1 NULL NULL
# Return all vertices, and subsets of vertices
SELECT * FROM graph where latch='';
latch origid destid weight seq linkid
NULL NULL NULL NULL 1
NULL NULL NULL NULL 2
NULL NULL NULL NULL 3
NULL NULL NULL NULL 4
NULL NULL NULL NULL 5
NULL NULL NULL NULL 6
NULL NULL NULL NULL 7
NULL NULL NULL NULL 9
NULL NULL NULL NULL 10
NULL NULL NULL NULL 11
NULL NULL NULL NULL 12
SELECT * FROM graph where latch='0';
latch origid destid weight seq linkid
0 NULL NULL NULL NULL 1
0 NULL NULL NULL NULL 2
0 NULL NULL NULL NULL 3
0 NULL NULL NULL NULL 4
0 NULL NULL NULL NULL 5
0 NULL NULL NULL NULL 6
0 NULL NULL NULL NULL 7
0 NULL NULL NULL NULL 9
0 NULL NULL NULL NULL 10
0 NULL NULL NULL NULL 11
0 NULL NULL NULL NULL 12
# Currently count should be 11
SELECT count(*) FROM graph where latch='';
count(*)
11
SELECT * FROM graph where latch='' and linkid = 2;
latch origid destid weight seq linkid
NULL NULL NULL NULL 2
SELECT * FROM graph where latch='' and (linkid > 2 and linkid < 6);
latch origid destid weight seq linkid
NULL NULL NULL NULL 3
NULL NULL NULL NULL 4
NULL NULL NULL NULL 5
SELECT * FROM graph where latch='' and linkid = NULL;
latch origid destid weight seq linkid
SELECT * FROM graph where latch='' and linkid = 666;
latch origid destid weight seq linkid
SELECT origid as `from`, linkid as `to` FROM graph where latch='' and origid = 1;
from to
1 3
1 2
SELECT origid as `from`, linkid as `to` FROM graph where latch='' and origid = 2;
from to
2 1
SELECT origid as `from`, linkid as `to` FROM graph where latch='' and origid = 4;
from to
4 3
SELECT origid as `from`, linkid as `to` FROM graph where latch='' and origid = 9;
from to
9 9
SELECT origid as `from`, linkid as `to` FROM graph where latch='' and origid = 10;
from to
10 11
SELECT origid as `from`, linkid as `to` FROM graph where latch='' and origid = NULL;
from to
SELECT origid as `from`, linkid as `to` FROM graph where latch='' and origid = 666;
from to
SELECT linkid as `from`, destid as `to` FROM graph where latch='' and destid = 1;
from to
3 1
2 1
SELECT linkid as `from`, destid as `to` FROM graph where latch='' and destid = 2;
from to
1 2
SELECT linkid as `from`, destid as `to` FROM graph where latch='' and destid = 4;
from to
3 4
SELECT linkid as `from`, destid as `to` FROM graph where latch='' and destid = 9;
from to
9 9
SELECT linkid as `from`, destid as `to` FROM graph where latch='' and destid = 10;
from to
12 10
SELECT linkid as `from`, destid as `to` FROM graph where latch='' and destid = NULL;
from to
SELECT linkid as `from`, destid as `to` FROM graph where latch='' and destid = 666;
from to
SELECT * FROM graph where latch='0';
latch origid destid weight seq linkid
0 NULL NULL NULL NULL 1
0 NULL NULL NULL NULL 2
0 NULL NULL NULL NULL 3
0 NULL NULL NULL NULL 4
0 NULL NULL NULL NULL 5
0 NULL NULL NULL NULL 6
0 NULL NULL NULL NULL 7
0 NULL NULL NULL NULL 9
0 NULL NULL NULL NULL 10
0 NULL NULL NULL NULL 11
0 NULL NULL NULL NULL 12
SELECT count(*) FROM graph where latch='0';
count(*)
11
SELECT * FROM graph where latch='0' and linkid = 2;
latch origid destid weight seq linkid
0 NULL NULL NULL NULL 2
SELECT * FROM graph where latch='0' and (linkid > 2 and linkid < 6);
latch origid destid weight seq linkid
0 NULL NULL NULL NULL 3
0 NULL NULL NULL NULL 4
0 NULL NULL NULL NULL 5
SELECT origid as `from`, linkid as `to` FROM graph where latch='0' and origid = 1;
from to
1 3
1 2
SELECT origid as `from`, linkid as `to` FROM graph where latch='0' and origid = 2;
from to
2 1
SELECT origid as `from`, linkid as `to` FROM graph where latch='0' and origid = 4;
from to
4 3
SELECT origid as `from`, linkid as `to` FROM graph where latch='0' and origid = 9;
from to
9 9
SELECT origid as `from`, linkid as `to` FROM graph where latch='0' and origid = 10;
from to
10 11
SELECT linkid as `from`, destid as `to` FROM graph where latch='0' and destid = 1;
from to
3 1
2 1
SELECT linkid as `from`, destid as `to` FROM graph where latch='0' and destid = 2;
from to
1 2
SELECT linkid as `from`, destid as `to` FROM graph where latch='0' and destid = 4;
from to
3 4
SELECT linkid as `from`, destid as `to` FROM graph where latch='0' and destid = 9;
from to
9 9
SELECT linkid as `from`, destid as `to` FROM graph where latch='0' and destid = 10;
from to
12 10
# Breadth-first search tests
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 1;
latch origid destid weight seq linkid
breadth_first 1 NULL 2 4 4
breadth_first 1 NULL 1 3 3
breadth_first 1 NULL 1 2 2
breadth_first 1 NULL 0 1 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 2;
latch origid destid weight seq linkid
breadth_first 2 NULL 3 4 4
breadth_first 2 NULL 2 3 3
breadth_first 2 NULL 1 2 1
breadth_first 2 NULL 0 1 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 3;
latch origid destid weight seq linkid
breadth_first 3 NULL 2 4 2
breadth_first 3 NULL 1 3 4
breadth_first 3 NULL 1 2 1
breadth_first 3 NULL 0 1 3
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 4;
latch origid destid weight seq linkid
breadth_first 4 NULL 3 4 2
breadth_first 4 NULL 2 3 1
breadth_first 4 NULL 1 2 3
breadth_first 4 NULL 0 1 4
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 5;
latch origid destid weight seq linkid
breadth_first 5 NULL 1 3 7
breadth_first 5 NULL 1 2 6
breadth_first 5 NULL 0 1 5
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 6;
latch origid destid weight seq linkid
breadth_first 6 NULL 2 3 7
breadth_first 6 NULL 1 2 5
breadth_first 6 NULL 0 1 6
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 7;
latch origid destid weight seq linkid
breadth_first 7 NULL 0 1 7
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 8;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 9;
latch origid destid weight seq linkid
breadth_first 9 NULL 0 1 9
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 10;
latch origid destid weight seq linkid
breadth_first 10 NULL 2 3 12
breadth_first 10 NULL 1 2 11
breadth_first 10 NULL 0 1 10
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 11;
latch origid destid weight seq linkid
breadth_first 11 NULL 2 3 10
breadth_first 11 NULL 1 2 12
breadth_first 11 NULL 0 1 11
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 12;
latch origid destid weight seq linkid
breadth_first 12 NULL 2 3 11
breadth_first 12 NULL 1 2 10
breadth_first 12 NULL 0 1 12
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 666;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 1 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 1 NULL 1 3 3
breadth_first 1 NULL 1 2 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 2 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 2 NULL 1 2 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 3 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 3 NULL 1 3 4
breadth_first 3 NULL 1 2 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 4 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 4 NULL 1 2 3
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 5 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 5 NULL 1 3 7
breadth_first 5 NULL 1 2 6
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 6 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 6 NULL 1 2 5
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 7 AND weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 8 AND weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 9 AND weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 10 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 10 NULL 1 2 11
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 11 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 11 NULL 1 2 12
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 12 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 12 NULL 1 2 10
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 1 AND weight = 1;
count(*)
2
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 2 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 3 AND weight = 1;
count(*)
2
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 4 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 5 AND weight = 1;
count(*)
2
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 6 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 7 AND weight = 1;
count(*)
0
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 8 AND weight = 1;
count(*)
0
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 9 AND weight = 1;
count(*)
0
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 10 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 11 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 12 AND weight = 1;
count(*)
1
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 1 AND weight = 2;
latch origid destid weight seq linkid
breadth_first 1 NULL 2 4 4
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 2 AND weight = 2;
latch origid destid weight seq linkid
breadth_first 2 NULL 2 3 3
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 3 AND weight = 2;
latch origid destid weight seq linkid
breadth_first 3 NULL 2 4 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 4 AND weight = 2;
latch origid destid weight seq linkid
breadth_first 4 NULL 2 3 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 5 AND weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 6 AND weight = 2;
latch origid destid weight seq linkid
breadth_first 6 NULL 2 3 7
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 7 AND weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 8 AND weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 9 AND weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 10 AND weight = 2;
latch origid destid weight seq linkid
breadth_first 10 NULL 2 3 12
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 11 AND weight = 2;
latch origid destid weight seq linkid
breadth_first 11 NULL 2 3 10
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 12 AND weight = 2;
latch origid destid weight seq linkid
breadth_first 12 NULL 2 3 11
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 1 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 2 AND weight = 3;
latch origid destid weight seq linkid
breadth_first 2 NULL 3 4 4
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 3 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 4 AND weight = 3;
latch origid destid weight seq linkid
breadth_first 4 NULL 3 4 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 5 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 6 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 7 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 8 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 9 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 10 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 11 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 12 AND weight = 3;
latch origid destid weight seq linkid
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
breadth_first 1 NULL 1 3 3
breadth_first 1 NULL 1 2 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 2 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
breadth_first 2 NULL 2 3 3
breadth_first 2 NULL 1 2 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 3 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
breadth_first 3 NULL 2 4 2
breadth_first 3 NULL 1 3 4
breadth_first 3 NULL 1 2 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 4 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
breadth_first 4 NULL 2 3 1
breadth_first 4 NULL 1 2 3
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 5 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
breadth_first 5 NULL 1 3 7
breadth_first 5 NULL 1 2 6
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 6 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
breadth_first 6 NULL 2 3 7
breadth_first 6 NULL 1 2 5
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 7 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 8 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 9 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 10 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
breadth_first 10 NULL 2 3 12
breadth_first 10 NULL 1 2 11
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 11 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
breadth_first 11 NULL 2 3 10
breadth_first 11 NULL 1 2 12
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 12 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
breadth_first 12 NULL 2 3 11
breadth_first 12 NULL 1 2 10
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 1;
latch origid destid weight seq linkid
breadth_first NULL 1 2 4 4
breadth_first NULL 1 1 3 3
breadth_first NULL 1 1 2 2
breadth_first NULL 1 0 1 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 2;
latch origid destid weight seq linkid
breadth_first NULL 2 3 4 4
breadth_first NULL 2 2 3 3
breadth_first NULL 2 1 2 1
breadth_first NULL 2 0 1 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 3;
latch origid destid weight seq linkid
breadth_first NULL 3 2 4 2
breadth_first NULL 3 1 3 4
breadth_first NULL 3 1 2 1
breadth_first NULL 3 0 1 3
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 4;
latch origid destid weight seq linkid
breadth_first NULL 4 3 4 2
breadth_first NULL 4 2 3 1
breadth_first NULL 4 1 2 3
breadth_first NULL 4 0 1 4
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 5;
latch origid destid weight seq linkid
breadth_first NULL 5 1 3 7
breadth_first NULL 5 1 2 6
breadth_first NULL 5 0 1 5
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 6;
latch origid destid weight seq linkid
breadth_first NULL 6 2 3 7
breadth_first NULL 6 1 2 5
breadth_first NULL 6 0 1 6
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 7;
latch origid destid weight seq linkid
breadth_first NULL 7 0 1 7
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 8;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 9;
latch origid destid weight seq linkid
breadth_first NULL 9 0 1 9
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 10;
latch origid destid weight seq linkid
breadth_first NULL 10 2 3 12
breadth_first NULL 10 1 2 11
breadth_first NULL 10 0 1 10
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 11;
latch origid destid weight seq linkid
breadth_first NULL 11 2 3 10
breadth_first NULL 11 1 2 12
breadth_first NULL 11 0 1 11
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 12;
latch origid destid weight seq linkid
breadth_first NULL 12 2 3 11
breadth_first NULL 12 1 2 10
breadth_first NULL 12 0 1 12
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 1 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 1 1 3 3
breadth_first NULL 1 1 2 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 2 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 2 1 2 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 3 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 3 1 3 4
breadth_first NULL 3 1 2 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 4 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 4 1 2 3
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 5 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 5 1 3 7
breadth_first NULL 5 1 2 6
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 6 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 6 1 2 5
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 7 and weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 8 and weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 9 and weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 10 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 10 1 2 11
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 11 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 11 1 2 12
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 12 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 12 1 2 10
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 1 and weight = 2;
latch origid destid weight seq linkid
breadth_first NULL 1 2 4 4
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 2 and weight = 2;
latch origid destid weight seq linkid
breadth_first NULL 2 2 3 3
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 3 and weight = 2;
latch origid destid weight seq linkid
breadth_first NULL 3 2 4 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 4 and weight = 2;
latch origid destid weight seq linkid
breadth_first NULL 4 2 3 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 5 and weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 6 and weight = 2;
latch origid destid weight seq linkid
breadth_first NULL 6 2 3 7
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 7 and weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 8 and weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 9 and weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 10 and weight = 2;
latch origid destid weight seq linkid
breadth_first NULL 10 2 3 12
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 11 and weight = 2;
latch origid destid weight seq linkid
breadth_first NULL 11 2 3 10
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 12 and weight = 2;
latch origid destid weight seq linkid
breadth_first NULL 12 2 3 11
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 1 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 2 and weight = 3;
latch origid destid weight seq linkid
breadth_first NULL 2 3 4 4
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 3 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 4 and weight = 3;
latch origid destid weight seq linkid
breadth_first NULL 4 3 4 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 5 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 6 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 7 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 8 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 9 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 10 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 11 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 12 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = NULL;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = NULL;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first';
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 1;
latch origid destid weight seq linkid
2 1 NULL 2 4 4
2 1 NULL 1 3 3
2 1 NULL 1 2 2
2 1 NULL 0 1 1
SELECT * FROM graph WHERE latch = '2' AND origid = 2;
latch origid destid weight seq linkid
2 2 NULL 3 4 4
2 2 NULL 2 3 3
2 2 NULL 1 2 1
2 2 NULL 0 1 2
SELECT * FROM graph WHERE latch = '2' AND origid = 3;
latch origid destid weight seq linkid
2 3 NULL 2 4 2
2 3 NULL 1 3 4
2 3 NULL 1 2 1
2 3 NULL 0 1 3
SELECT * FROM graph WHERE latch = '2' AND origid = 4;
latch origid destid weight seq linkid
2 4 NULL 3 4 2
2 4 NULL 2 3 1
2 4 NULL 1 2 3
2 4 NULL 0 1 4
SELECT * FROM graph WHERE latch = '2' AND origid = 5;
latch origid destid weight seq linkid
2 5 NULL 1 3 7
2 5 NULL 1 2 6
2 5 NULL 0 1 5
SELECT * FROM graph WHERE latch = '2' AND origid = 6;
latch origid destid weight seq linkid
2 6 NULL 2 3 7
2 6 NULL 1 2 5
2 6 NULL 0 1 6
SELECT * FROM graph WHERE latch = '2' AND origid = 7;
latch origid destid weight seq linkid
2 7 NULL 0 1 7
SELECT * FROM graph WHERE latch = '2' AND origid = 8;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 9;
latch origid destid weight seq linkid
2 9 NULL 0 1 9
SELECT * FROM graph WHERE latch = '2' AND origid = 10;
latch origid destid weight seq linkid
2 10 NULL 2 3 12
2 10 NULL 1 2 11
2 10 NULL 0 1 10
SELECT * FROM graph WHERE latch = '2' AND origid = 11;
latch origid destid weight seq linkid
2 11 NULL 2 3 10
2 11 NULL 1 2 12
2 11 NULL 0 1 11
SELECT * FROM graph WHERE latch = '2' AND origid = 12;
latch origid destid weight seq linkid
2 12 NULL 2 3 11
2 12 NULL 1 2 10
2 12 NULL 0 1 12
SELECT * FROM graph WHERE latch = '2' AND origid = 666;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 1 AND weight = 1;
latch origid destid weight seq linkid
2 1 NULL 1 3 3
2 1 NULL 1 2 2
SELECT * FROM graph WHERE latch = '2' AND origid = 2 AND weight = 1;
latch origid destid weight seq linkid
2 2 NULL 1 2 1
SELECT * FROM graph WHERE latch = '2' AND origid = 3 AND weight = 1;
latch origid destid weight seq linkid
2 3 NULL 1 3 4
2 3 NULL 1 2 1
SELECT * FROM graph WHERE latch = '2' AND origid = 4 AND weight = 1;
latch origid destid weight seq linkid
2 4 NULL 1 2 3
SELECT * FROM graph WHERE latch = '2' AND origid = 5 AND weight = 1;
latch origid destid weight seq linkid
2 5 NULL 1 3 7
2 5 NULL 1 2 6
SELECT * FROM graph WHERE latch = '2' AND origid = 6 AND weight = 1;
latch origid destid weight seq linkid
2 6 NULL 1 2 5
SELECT * FROM graph WHERE latch = '2' AND origid = 7 AND weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 8 AND weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 9 AND weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 10 AND weight = 1;
latch origid destid weight seq linkid
2 10 NULL 1 2 11
SELECT * FROM graph WHERE latch = '2' AND origid = 11 AND weight = 1;
latch origid destid weight seq linkid
2 11 NULL 1 2 12
SELECT * FROM graph WHERE latch = '2' AND origid = 12 AND weight = 1;
latch origid destid weight seq linkid
2 12 NULL 1 2 10
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 1 AND weight = 1;
count(*)
2
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 2 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 3 AND weight = 1;
count(*)
2
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 4 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 5 AND weight = 1;
count(*)
2
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 6 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 7 AND weight = 1;
count(*)
0
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 8 AND weight = 1;
count(*)
0
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 9 AND weight = 1;
count(*)
0
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 10 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 11 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 12 AND weight = 1;
count(*)
1
SELECT * FROM graph WHERE latch = '2' AND origid = 1 AND weight = 2;
latch origid destid weight seq linkid
2 1 NULL 2 4 4
SELECT * FROM graph WHERE latch = '2' AND origid = 2 AND weight = 2;
latch origid destid weight seq linkid
2 2 NULL 2 3 3
SELECT * FROM graph WHERE latch = '2' AND origid = 3 AND weight = 2;
latch origid destid weight seq linkid
2 3 NULL 2 4 2
SELECT * FROM graph WHERE latch = '2' AND origid = 4 AND weight = 2;
latch origid destid weight seq linkid
2 4 NULL 2 3 1
SELECT * FROM graph WHERE latch = '2' AND origid = 5 AND weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 6 AND weight = 2;
latch origid destid weight seq linkid
2 6 NULL 2 3 7
SELECT * FROM graph WHERE latch = '2' AND origid = 7 AND weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 8 AND weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 9 AND weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 10 AND weight = 2;
latch origid destid weight seq linkid
2 10 NULL 2 3 12
SELECT * FROM graph WHERE latch = '2' AND origid = 11 AND weight = 2;
latch origid destid weight seq linkid
2 11 NULL 2 3 10
SELECT * FROM graph WHERE latch = '2' AND origid = 12 AND weight = 2;
latch origid destid weight seq linkid
2 12 NULL 2 3 11
SELECT * FROM graph WHERE latch = '2' AND origid = 1 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 2 AND weight = 3;
latch origid destid weight seq linkid
2 2 NULL 3 4 4
SELECT * FROM graph WHERE latch = '2' AND origid = 3 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 4 AND weight = 3;
latch origid destid weight seq linkid
2 4 NULL 3 4 2
SELECT * FROM graph WHERE latch = '2' AND origid = 5 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 6 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 7 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 8 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 9 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 10 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 11 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 12 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 1 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 1 NULL 2 4 4
2 1 NULL 1 3 3
2 1 NULL 1 2 2
SELECT * FROM graph WHERE latch = '2' AND origid = 2 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 2 NULL 2 3 3
2 2 NULL 1 2 1
SELECT * FROM graph WHERE latch = '2' AND origid = 3 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 3 NULL 2 4 2
2 3 NULL 1 3 4
2 3 NULL 1 2 1
SELECT * FROM graph WHERE latch = '2' AND origid = 4 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 4 NULL 2 3 1
2 4 NULL 1 2 3
SELECT * FROM graph WHERE latch = '2' AND origid = 5 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 5 NULL 1 3 7
2 5 NULL 1 2 6
SELECT * FROM graph WHERE latch = '2' AND origid = 6 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 6 NULL 2 3 7
2 6 NULL 1 2 5
SELECT * FROM graph WHERE latch = '2' AND origid = 7 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 8 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 9 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 10 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 10 NULL 2 3 12
2 10 NULL 1 2 11
SELECT * FROM graph WHERE latch = '2' AND origid = 11 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 11 NULL 2 3 10
2 11 NULL 1 2 12
SELECT * FROM graph WHERE latch = '2' AND origid = 12 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 12 NULL 2 3 11
2 12 NULL 1 2 10
SELECT * FROM graph WHERE latch = '2' AND destid = 1;
latch origid destid weight seq linkid
2 NULL 1 2 4 4
2 NULL 1 1 3 3
2 NULL 1 1 2 2
2 NULL 1 0 1 1
SELECT * FROM graph WHERE latch = '2' AND destid = 2;
latch origid destid weight seq linkid
2 NULL 2 3 4 4
2 NULL 2 2 3 3
2 NULL 2 1 2 1
2 NULL 2 0 1 2
SELECT * FROM graph WHERE latch = '2' AND destid = 3;
latch origid destid weight seq linkid
2 NULL 3 2 4 2
2 NULL 3 1 3 4
2 NULL 3 1 2 1
2 NULL 3 0 1 3
SELECT * FROM graph WHERE latch = '2' AND destid = 4;
latch origid destid weight seq linkid
2 NULL 4 3 4 2
2 NULL 4 2 3 1
2 NULL 4 1 2 3
2 NULL 4 0 1 4
SELECT * FROM graph WHERE latch = '2' AND destid = 5;
latch origid destid weight seq linkid
2 NULL 5 1 3 7
2 NULL 5 1 2 6
2 NULL 5 0 1 5
SELECT * FROM graph WHERE latch = '2' AND destid = 6;
latch origid destid weight seq linkid
2 NULL 6 2 3 7
2 NULL 6 1 2 5
2 NULL 6 0 1 6
SELECT * FROM graph WHERE latch = '2' AND destid = 7;
latch origid destid weight seq linkid
2 NULL 7 0 1 7
SELECT * FROM graph WHERE latch = '2' AND destid = 8;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 9;
latch origid destid weight seq linkid
2 NULL 9 0 1 9
SELECT * FROM graph WHERE latch = '2' AND destid = 10;
latch origid destid weight seq linkid
2 NULL 10 2 3 12
2 NULL 10 1 2 11
2 NULL 10 0 1 10
SELECT * FROM graph WHERE latch = '2' AND destid = 11;
latch origid destid weight seq linkid
2 NULL 11 2 3 10
2 NULL 11 1 2 12
2 NULL 11 0 1 11
SELECT * FROM graph WHERE latch = '2' AND destid = 12;
latch origid destid weight seq linkid
2 NULL 12 2 3 11
2 NULL 12 1 2 10
2 NULL 12 0 1 12
SELECT * FROM graph WHERE latch = '2' AND destid = 1 and weight = 1;
latch origid destid weight seq linkid
2 NULL 1 1 3 3
2 NULL 1 1 2 2
SELECT * FROM graph WHERE latch = '2' AND destid = 2 and weight = 1;
latch origid destid weight seq linkid
2 NULL 2 1 2 1
SELECT * FROM graph WHERE latch = '2' AND destid = 3 and weight = 1;
latch origid destid weight seq linkid
2 NULL 3 1 3 4
2 NULL 3 1 2 1
SELECT * FROM graph WHERE latch = '2' AND destid = 4 and weight = 1;
latch origid destid weight seq linkid
2 NULL 4 1 2 3
SELECT * FROM graph WHERE latch = '2' AND destid = 5 and weight = 1;
latch origid destid weight seq linkid
2 NULL 5 1 3 7
2 NULL 5 1 2 6
SELECT * FROM graph WHERE latch = '2' AND destid = 6 and weight = 1;
latch origid destid weight seq linkid
2 NULL 6 1 2 5
SELECT * FROM graph WHERE latch = '2' AND destid = 7 and weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 8 and weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 9 and weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 10 and weight = 1;
latch origid destid weight seq linkid
2 NULL 10 1 2 11
SELECT * FROM graph WHERE latch = '2' AND destid = 11 and weight = 1;
latch origid destid weight seq linkid
2 NULL 11 1 2 12
SELECT * FROM graph WHERE latch = '2' AND destid = 12 and weight = 1;
latch origid destid weight seq linkid
2 NULL 12 1 2 10
SELECT * FROM graph WHERE latch = '2' AND destid = 1 and weight = 2;
latch origid destid weight seq linkid
2 NULL 1 2 4 4
SELECT * FROM graph WHERE latch = '2' AND destid = 2 and weight = 2;
latch origid destid weight seq linkid
2 NULL 2 2 3 3
SELECT * FROM graph WHERE latch = '2' AND destid = 3 and weight = 2;
latch origid destid weight seq linkid
2 NULL 3 2 4 2
SELECT * FROM graph WHERE latch = '2' AND destid = 4 and weight = 2;
latch origid destid weight seq linkid
2 NULL 4 2 3 1
SELECT * FROM graph WHERE latch = '2' AND destid = 5 and weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 6 and weight = 2;
latch origid destid weight seq linkid
2 NULL 6 2 3 7
SELECT * FROM graph WHERE latch = '2' AND destid = 7 and weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 8 and weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 9 and weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 10 and weight = 2;
latch origid destid weight seq linkid
2 NULL 10 2 3 12
SELECT * FROM graph WHERE latch = '2' AND destid = 11 and weight = 2;
latch origid destid weight seq linkid
2 NULL 11 2 3 10
SELECT * FROM graph WHERE latch = '2' AND destid = 12 and weight = 2;
latch origid destid weight seq linkid
2 NULL 12 2 3 11
SELECT * FROM graph WHERE latch = '2' AND destid = 1 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 2 and weight = 3;
latch origid destid weight seq linkid
2 NULL 2 3 4 4
SELECT * FROM graph WHERE latch = '2' AND destid = 3 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 4 and weight = 3;
latch origid destid weight seq linkid
2 NULL 4 3 4 2
SELECT * FROM graph WHERE latch = '2' AND destid = 5 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 6 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 7 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 8 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 9 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 10 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 11 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 12 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = NULL;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = NULL;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2';
latch origid destid weight seq linkid
# Dijkstras algorithm tests
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1 AND destid=1;
latch origid destid weight seq linkid
dijkstras 1 1 NULL 0 1
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1 AND destid=2;
latch origid destid weight seq linkid
dijkstras 1 2 NULL 0 1
dijkstras 1 2 1 1 2
SELECT * FROM graph WHERE latch='dijkstras' AND origid=2 AND destid=1;
latch origid destid weight seq linkid
dijkstras 2 1 NULL 0 2
dijkstras 2 1 1 1 1
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1 AND destid=4;
latch origid destid weight seq linkid
dijkstras 1 4 NULL 0 1
dijkstras 1 4 1 1 3
dijkstras 1 4 1 2 4
SELECT * FROM graph WHERE latch='dijkstras' AND origid=4 AND destid=1;
latch origid destid weight seq linkid
dijkstras 4 1 NULL 0 4
dijkstras 4 1 1 1 3
dijkstras 4 1 1 2 1
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1 AND destid=5;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1 AND destid=666;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='dijkstras' AND origid=5 AND destid=7;
latch origid destid weight seq linkid
dijkstras 5 7 NULL 0 5
dijkstras 5 7 1 1 7
SELECT * FROM graph WHERE latch='dijkstras' AND origid=7 AND destid=5;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='dijkstras' AND origid=10 AND destid=11;
latch origid destid weight seq linkid
dijkstras 10 11 NULL 0 10
dijkstras 10 11 1 1 11
SELECT * FROM graph WHERE latch='dijkstras' AND origid=10 AND destid=12;
latch origid destid weight seq linkid
dijkstras 10 12 NULL 0 10
dijkstras 10 12 1 1 11
dijkstras 10 12 1 2 12
SELECT * FROM graph WHERE latch='dijkstras' AND origid=11 AND destid=10;
latch origid destid weight seq linkid
dijkstras 11 10 NULL 0 11
dijkstras 11 10 1 1 12
dijkstras 11 10 1 2 10
SELECT * FROM graph WHERE latch='dijkstras' AND origid=11 AND destid=12;
latch origid destid weight seq linkid
dijkstras 11 12 NULL 0 11
dijkstras 11 12 1 1 12
SELECT * FROM graph WHERE latch='dijkstras' AND origid=12 AND destid=10;
latch origid destid weight seq linkid
dijkstras 12 10 NULL 0 12
dijkstras 12 10 1 1 10
SELECT * FROM graph WHERE latch='dijkstras' AND origid=12 AND destid=11;
latch origid destid weight seq linkid
dijkstras 12 11 NULL 0 12
dijkstras 12 11 1 1 10
dijkstras 12 11 1 2 11
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1;
latch origid destid weight seq linkid
dijkstras 1 NULL 2 4 4
dijkstras 1 NULL 1 3 3
dijkstras 1 NULL 1 2 2
dijkstras 1 NULL 0 1 1
SELECT * FROM graph WHERE latch='dijkstras' AND origid=2;
latch origid destid weight seq linkid
dijkstras 2 NULL 3 4 4
dijkstras 2 NULL 2 3 3
dijkstras 2 NULL 1 2 1
dijkstras 2 NULL 0 1 2
SELECT * FROM graph WHERE latch='dijkstras' AND origid=3;
latch origid destid weight seq linkid
dijkstras 3 NULL 2 4 2
dijkstras 3 NULL 1 3 4
dijkstras 3 NULL 1 2 1
dijkstras 3 NULL 0 1 3
SELECT * FROM graph WHERE latch='dijkstras' AND origid=4;
latch origid destid weight seq linkid
dijkstras 4 NULL 3 4 2
dijkstras 4 NULL 2 3 1
dijkstras 4 NULL 1 2 3
dijkstras 4 NULL 0 1 4
SELECT * FROM graph WHERE latch='dijkstras' AND origid=5;
latch origid destid weight seq linkid
dijkstras 5 NULL 1 3 7
dijkstras 5 NULL 1 2 6
dijkstras 5 NULL 0 1 5
SELECT * FROM graph WHERE latch='dijkstras' AND origid=6;
latch origid destid weight seq linkid
dijkstras 6 NULL 2 3 7
dijkstras 6 NULL 1 2 5
dijkstras 6 NULL 0 1 6
SELECT * FROM graph WHERE latch='dijkstras' AND origid=7;
latch origid destid weight seq linkid
dijkstras 7 NULL 0 1 7
SELECT * FROM graph WHERE latch='dijkstras' AND origid=8;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='dijkstras' AND origid=9;
latch origid destid weight seq linkid
dijkstras 9 NULL 0 1 9
SELECT * FROM graph WHERE latch='dijkstras' AND origid=10;
latch origid destid weight seq linkid
dijkstras 10 NULL 2 3 12
dijkstras 10 NULL 1 2 11
dijkstras 10 NULL 0 1 10
SELECT * FROM graph WHERE latch='dijkstras' AND origid=11;
latch origid destid weight seq linkid
dijkstras 11 NULL 2 3 10
dijkstras 11 NULL 1 2 12
dijkstras 11 NULL 0 1 11
SELECT * FROM graph WHERE latch='dijkstras' AND origid=12;
latch origid destid weight seq linkid
dijkstras 12 NULL 2 3 11
dijkstras 12 NULL 1 2 10
dijkstras 12 NULL 0 1 12
SELECT * FROM graph WHERE latch='dijkstras' AND origid=666;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='dijkstras' AND destid=1;
latch origid destid weight seq linkid
dijkstras NULL 1 2 4 4
dijkstras NULL 1 1 3 3
dijkstras NULL 1 1 2 2
dijkstras NULL 1 0 1 1
SELECT * FROM graph WHERE latch='dijkstras' AND destid=2;
latch origid destid weight seq linkid
dijkstras NULL 2 3 4 4
dijkstras NULL 2 2 3 3
dijkstras NULL 2 1 2 1
dijkstras NULL 2 0 1 2
SELECT * FROM graph WHERE latch='dijkstras' AND destid=3;
latch origid destid weight seq linkid
dijkstras NULL 3 2 4 2
dijkstras NULL 3 1 3 4
dijkstras NULL 3 1 2 1
dijkstras NULL 3 0 1 3
SELECT * FROM graph WHERE latch='dijkstras' AND destid=4;
latch origid destid weight seq linkid
dijkstras NULL 4 3 4 2
dijkstras NULL 4 2 3 1
dijkstras NULL 4 1 2 3
dijkstras NULL 4 0 1 4
SELECT * FROM graph WHERE latch='dijkstras' AND destid=5;
latch origid destid weight seq linkid
dijkstras NULL 5 1 3 7
dijkstras NULL 5 1 2 6
dijkstras NULL 5 0 1 5
SELECT * FROM graph WHERE latch='dijkstras' AND destid=6;
latch origid destid weight seq linkid
dijkstras NULL 6 2 3 7
dijkstras NULL 6 1 2 5
dijkstras NULL 6 0 1 6
SELECT * FROM graph WHERE latch='dijkstras' AND destid=7;
latch origid destid weight seq linkid
dijkstras NULL 7 0 1 7
SELECT * FROM graph WHERE latch='dijkstras' AND destid=8;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='dijkstras' AND destid=9;
latch origid destid weight seq linkid
dijkstras NULL 9 0 1 9
SELECT * FROM graph WHERE latch='dijkstras' AND destid=10;
latch origid destid weight seq linkid
dijkstras NULL 10 2 3 12
dijkstras NULL 10 1 2 11
dijkstras NULL 10 0 1 10
SELECT * FROM graph WHERE latch='dijkstras' AND destid=11;
latch origid destid weight seq linkid
dijkstras NULL 11 2 3 10
dijkstras NULL 11 1 2 12
dijkstras NULL 11 0 1 11
SELECT * FROM graph WHERE latch='dijkstras' AND destid=12;
latch origid destid weight seq linkid
dijkstras NULL 12 2 3 11
dijkstras NULL 12 1 2 10
dijkstras NULL 12 0 1 12
# legacy string number
SELECT * FROM graph WHERE latch='1' AND origid=1 AND destid=1;
latch origid destid weight seq linkid
1 1 1 NULL 0 1
SELECT * FROM graph WHERE latch='1' AND origid=1 AND destid=2;
latch origid destid weight seq linkid
1 1 2 NULL 0 1
1 1 2 1 1 2
SELECT * FROM graph WHERE latch='1' AND origid=2 AND destid=1;
latch origid destid weight seq linkid
1 2 1 NULL 0 2
1 2 1 1 1 1
SELECT * FROM graph WHERE latch='1' AND origid=1 AND destid=4;
latch origid destid weight seq linkid
1 1 4 NULL 0 1
1 1 4 1 1 3
1 1 4 1 2 4
SELECT * FROM graph WHERE latch='1' AND origid=4 AND destid=1;
latch origid destid weight seq linkid
1 4 1 NULL 0 4
1 4 1 1 1 3
1 4 1 1 2 1
SELECT * FROM graph WHERE latch='1' AND origid=1 AND destid=5;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='1' AND origid=1 AND destid=666;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='1' AND origid=5 AND destid=7;
latch origid destid weight seq linkid
1 5 7 NULL 0 5
1 5 7 1 1 7
SELECT * FROM graph WHERE latch='1' AND origid=7 AND destid=5;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='1' AND origid=10 AND destid=11;
latch origid destid weight seq linkid
1 10 11 NULL 0 10
1 10 11 1 1 11
SELECT * FROM graph WHERE latch='1' AND origid=10 AND destid=12;
latch origid destid weight seq linkid
1 10 12 NULL 0 10
1 10 12 1 1 11
1 10 12 1 2 12
SELECT * FROM graph WHERE latch='1' AND origid=11 AND destid=10;
latch origid destid weight seq linkid
1 11 10 NULL 0 11
1 11 10 1 1 12
1 11 10 1 2 10
SELECT * FROM graph WHERE latch='1' AND origid=11 AND destid=12;
latch origid destid weight seq linkid
1 11 12 NULL 0 11
1 11 12 1 1 12
SELECT * FROM graph WHERE latch='1' AND origid=12 AND destid=10;
latch origid destid weight seq linkid
1 12 10 NULL 0 12
1 12 10 1 1 10
SELECT * FROM graph WHERE latch='1' AND origid=12 AND destid=11;
latch origid destid weight seq linkid
1 12 11 NULL 0 12
1 12 11 1 1 10
1 12 11 1 2 11
SELECT * FROM graph WHERE latch='1' AND origid=1;
latch origid destid weight seq linkid
1 1 NULL 2 4 4
1 1 NULL 1 3 3
1 1 NULL 1 2 2
1 1 NULL 0 1 1
SELECT * FROM graph WHERE latch='1' AND origid=2;
latch origid destid weight seq linkid
1 2 NULL 3 4 4
1 2 NULL 2 3 3
1 2 NULL 1 2 1
1 2 NULL 0 1 2
SELECT * FROM graph WHERE latch='1' AND origid=3;
latch origid destid weight seq linkid
1 3 NULL 2 4 2
1 3 NULL 1 3 4
1 3 NULL 1 2 1
1 3 NULL 0 1 3
SELECT * FROM graph WHERE latch='1' AND origid=4;
latch origid destid weight seq linkid
1 4 NULL 3 4 2
1 4 NULL 2 3 1
1 4 NULL 1 2 3
1 4 NULL 0 1 4
SELECT * FROM graph WHERE latch='1' AND origid=5;
latch origid destid weight seq linkid
1 5 NULL 1 3 7
1 5 NULL 1 2 6
1 5 NULL 0 1 5
SELECT * FROM graph WHERE latch='1' AND origid=6;
latch origid destid weight seq linkid
1 6 NULL 2 3 7
1 6 NULL 1 2 5
1 6 NULL 0 1 6
SELECT * FROM graph WHERE latch='1' AND origid=7;
latch origid destid weight seq linkid
1 7 NULL 0 1 7
SELECT * FROM graph WHERE latch='1' AND origid=8;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='1' AND origid=9;
latch origid destid weight seq linkid
1 9 NULL 0 1 9
SELECT * FROM graph WHERE latch='1' AND origid=10;
latch origid destid weight seq linkid
1 10 NULL 2 3 12
1 10 NULL 1 2 11
1 10 NULL 0 1 10
SELECT * FROM graph WHERE latch='1' AND origid=11;
latch origid destid weight seq linkid
1 11 NULL 2 3 10
1 11 NULL 1 2 12
1 11 NULL 0 1 11
SELECT * FROM graph WHERE latch='1' AND origid=12;
latch origid destid weight seq linkid
1 12 NULL 2 3 11
1 12 NULL 1 2 10
1 12 NULL 0 1 12
SELECT * FROM graph WHERE latch='1' AND origid=666;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='1' AND destid=1;
latch origid destid weight seq linkid
1 NULL 1 2 4 4
1 NULL 1 1 3 3
1 NULL 1 1 2 2
1 NULL 1 0 1 1
SELECT * FROM graph WHERE latch='1' AND destid=2;
latch origid destid weight seq linkid
1 NULL 2 3 4 4
1 NULL 2 2 3 3
1 NULL 2 1 2 1
1 NULL 2 0 1 2
SELECT * FROM graph WHERE latch='1' AND destid=3;
latch origid destid weight seq linkid
1 NULL 3 2 4 2
1 NULL 3 1 3 4
1 NULL 3 1 2 1
1 NULL 3 0 1 3
SELECT * FROM graph WHERE latch='1' AND destid=4;
latch origid destid weight seq linkid
1 NULL 4 3 4 2
1 NULL 4 2 3 1
1 NULL 4 1 2 3
1 NULL 4 0 1 4
SELECT * FROM graph WHERE latch='1' AND destid=5;
latch origid destid weight seq linkid
1 NULL 5 1 3 7
1 NULL 5 1 2 6
1 NULL 5 0 1 5
SELECT * FROM graph WHERE latch='1' AND destid=6;
latch origid destid weight seq linkid
1 NULL 6 2 3 7
1 NULL 6 1 2 5
1 NULL 6 0 1 6
SELECT * FROM graph WHERE latch='1' AND destid=7;
latch origid destid weight seq linkid
1 NULL 7 0 1 7
SELECT * FROM graph WHERE latch='1' AND destid=8;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='1' AND destid=9;
latch origid destid weight seq linkid
1 NULL 9 0 1 9
SELECT * FROM graph WHERE latch='1' AND destid=10;
latch origid destid weight seq linkid
1 NULL 10 2 3 12
1 NULL 10 1 2 11
1 NULL 10 0 1 10
SELECT * FROM graph WHERE latch='1' AND destid=11;
latch origid destid weight seq linkid
1 NULL 11 2 3 10
1 NULL 11 1 2 12
1 NULL 11 0 1 11
SELECT * FROM graph WHERE latch='1' AND destid=12;
latch origid destid weight seq linkid
1 NULL 12 2 3 11
1 NULL 12 1 2 10
1 NULL 12 0 1 12
INSERT INTO graph_base(from_id, to_id) VALUES (11,13);
INSERT INTO graph_base(from_id, to_id) VALUES (10,14);
INSERT INTO graph_base(from_id, to_id) VALUES (14,13);
SELECT * FROM graph WHERE latch='dijkstras' AND origid=10 AND destid=13;
latch origid destid weight seq linkid
dijkstras 10 13 NULL 0 10
dijkstras 10 13 1 1 11
dijkstras 10 13 1 2 13
DELETE FROM graph_base where from_id=10 and to_id=11;
INSERT INTO graph_base(from_id, to_id) VALUES (10,15);
INSERT INTO graph_base(from_id, to_id) VALUES (15,13);
SELECT * FROM graph WHERE latch='dijkstras' AND origid=10 AND destid=13;
latch origid destid weight seq linkid
dijkstras 10 13 NULL 0 10
dijkstras 10 13 1 1 14
dijkstras 10 13 1 2 13
INSERT INTO graph_base(from_id, to_id) VALUES (10,11);
SELECT * FROM graph WHERE latch='dijkstras' AND origid=10 AND destid=13;
latch origid destid weight seq linkid
dijkstras 10 13 NULL 0 10
dijkstras 10 13 1 1 11
dijkstras 10 13 1 2 13
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1;
latch origid destid weight seq linkid
dijkstras 1 NULL 2 4 4
dijkstras 1 NULL 1 3 3
dijkstras 1 NULL 1 2 2
dijkstras 1 NULL 0 1 1
INSERT INTO graph_base(from_id, to_id) VALUES (21,22);
SELECT * FROM graph WHERE latch='dijkstras' AND origid=21;
latch origid destid weight seq linkid
dijkstras 21 NULL 1 2 22
dijkstras 21 NULL 0 1 21
SELECT * FROM graph WHERE latch='dijkstras' AND origid=22;
latch origid destid weight seq linkid
dijkstras 22 NULL 0 1 22
INSERT INTO graph_base(from_id, to_id) VALUES (4,17);
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1;
latch origid destid weight seq linkid
dijkstras 1 NULL 3 5 17
dijkstras 1 NULL 2 4 4
dijkstras 1 NULL 1 3 3
dijkstras 1 NULL 1 2 2
dijkstras 1 NULL 0 1 1
INSERT INTO graph_base(from_id, to_id) VALUES (4,16);
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1;
latch origid destid weight seq linkid
dijkstras 1 NULL 3 6 17
dijkstras 1 NULL 3 5 16
dijkstras 1 NULL 2 4 4
dijkstras 1 NULL 1 3 3
dijkstras 1 NULL 1 2 2
dijkstras 1 NULL 0 1 1
INSERT INTO graph_base(from_id, to_id) VALUES (17,18);
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1;
latch origid destid weight seq linkid
dijkstras 1 NULL 4 7 18
dijkstras 1 NULL 3 6 17
dijkstras 1 NULL 3 5 16
dijkstras 1 NULL 2 4 4
dijkstras 1 NULL 1 3 3
dijkstras 1 NULL 1 2 2
dijkstras 1 NULL 0 1 1
SELECT * FROM graph WHERE latch='dijkstras' AND destid=1;
latch origid destid weight seq linkid
dijkstras NULL 1 4 7 18
dijkstras NULL 1 3 6 17
dijkstras NULL 1 3 5 16
dijkstras NULL 1 2 4 4
dijkstras NULL 1 1 3 3
dijkstras NULL 1 1 2 2
dijkstras NULL 1 0 1 1
# Now we add a connection from 4->6
INSERT INTO graph_base (from_id,to_id) VALUES (4,6);
# And delete all references to node 5
DELETE FROM graph_base WHERE from_id=5;
DELETE FROM graph_base WHERE from_id=3 AND to_id=5;
# which means there is a path in one direction only 1>3>4>6
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1 AND destid=6;
latch origid destid weight seq linkid
dijkstras 1 6 NULL 0 1
dijkstras 1 6 1 1 3
dijkstras 1 6 1 2 4
dijkstras 1 6 1 3 6
# but not 6>4>3>1 (so no result)
SELECT * FROM graph WHERE latch='dijkstras' AND origid=6 AND destid=1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='1' AND origid=1 AND destid=6;
latch origid destid weight seq linkid
1 1 6 NULL 0 1
1 1 6 1 1 3
1 1 6 1 2 4
1 1 6 1 3 6
SELECT * FROM graph WHERE latch='1' AND origid=6 AND destid=1;
latch origid destid weight seq linkid
DELETE FROM graph_base;
FLUSH TABLES;
TRUNCATE TABLE graph_base;
DROP TABLE graph_base;
DROP TABLE graph;
storage/oqgraph/mysql-test/oqgraph/general-MyISAM.test
0 → 100644
View file @
f90dca1a
# This is a maintainer generated file. Generated at Wednesday 5 February 22:26:12 CST 2014.
--
let
$oqgraph_use_table_type
=
MyISAM
--
source
general
.
inc
storage/oqgraph/mysql-test/oqgraph/general-innodb.result
0 → 100644
View file @
f90dca1a
DROP TABLE IF EXISTS graph_base;
DROP TABLE IF EXISTS graph;
DROP TABLE IF EXISTS graph2;
Performing OQGraph General test suite for ENGINE=innodb
CREATE TABLE graph_base (
from_id INT UNSIGNED NOT NULL,
to_id INT UNSIGNED NOT NULL,
PRIMARY KEY (from_id,to_id),
INDEX (to_id)
) ENGINE= innodb ;
CREATE TABLE 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='graph_base' ORIGID='from_id', DESTID='to_id';
select * from graph;
latch origid destid weight seq linkid
INSERT INTO graph_base(from_id, to_id) VALUES (1,2), (2,1);
INSERT INTO graph_base(from_id, to_id) VALUES (1,3), (3,1);
INSERT INTO graph_base(from_id, to_id) VALUES (3,4), (4,3);
INSERT INTO graph_base(from_id, to_id) VALUES (5,6), (6,5);
INSERT INTO graph_base(from_id, to_id) VALUES (5,7);
INSERT INTO graph_base(from_id, to_id) VALUES (9,9);
INSERT INTO graph_base(from_id, to_id) VALUES (10,11);
INSERT INTO graph_base(from_id, to_id) VALUES (11,12);
INSERT INTO graph_base(from_id, to_id) VALUES (12,10);
# Return all edges
SELECT * FROM graph;
latch origid destid weight seq linkid
NULL 1 2 1 NULL NULL
NULL 1 3 1 NULL NULL
NULL 2 1 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 5 7 1 NULL NULL
NULL 6 5 1 NULL NULL
NULL 9 9 1 NULL NULL
NULL 10 11 1 NULL NULL
NULL 11 12 1 NULL NULL
NULL 12 10 1 NULL NULL
# Currently count should be 13
SELECT count(*) FROM graph;
count(*)
13
# Return all edges when latch is NULL - this is different to latch='' and same as no where clause
SELECT * FROM graph where latch is NULL;
latch origid destid weight seq linkid
NULL 1 2 1 NULL NULL
NULL 1 3 1 NULL NULL
NULL 2 1 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 5 7 1 NULL NULL
NULL 6 5 1 NULL NULL
NULL 9 9 1 NULL NULL
NULL 10 11 1 NULL NULL
NULL 11 12 1 NULL NULL
NULL 12 10 1 NULL NULL
# Return all vertices, and subsets of vertices
SELECT * FROM graph where latch='';
latch origid destid weight seq linkid
NULL NULL NULL NULL 1
NULL NULL NULL NULL 2
NULL NULL NULL NULL 3
NULL NULL NULL NULL 4
NULL NULL NULL NULL 5
NULL NULL NULL NULL 6
NULL NULL NULL NULL 7
NULL NULL NULL NULL 9
NULL NULL NULL NULL 10
NULL NULL NULL NULL 11
NULL NULL NULL NULL 12
SELECT * FROM graph where latch='0';
latch origid destid weight seq linkid
0 NULL NULL NULL NULL 1
0 NULL NULL NULL NULL 2
0 NULL NULL NULL NULL 3
0 NULL NULL NULL NULL 4
0 NULL NULL NULL NULL 5
0 NULL NULL NULL NULL 6
0 NULL NULL NULL NULL 7
0 NULL NULL NULL NULL 9
0 NULL NULL NULL NULL 10
0 NULL NULL NULL NULL 11
0 NULL NULL NULL NULL 12
# Currently count should be 11
SELECT count(*) FROM graph where latch='';
count(*)
11
SELECT * FROM graph where latch='' and linkid = 2;
latch origid destid weight seq linkid
NULL NULL NULL NULL 2
SELECT * FROM graph where latch='' and (linkid > 2 and linkid < 6);
latch origid destid weight seq linkid
NULL NULL NULL NULL 3
NULL NULL NULL NULL 4
NULL NULL NULL NULL 5
SELECT * FROM graph where latch='' and linkid = NULL;
latch origid destid weight seq linkid
SELECT * FROM graph where latch='' and linkid = 666;
latch origid destid weight seq linkid
SELECT origid as `from`, linkid as `to` FROM graph where latch='' and origid = 1;
from to
1 3
1 2
SELECT origid as `from`, linkid as `to` FROM graph where latch='' and origid = 2;
from to
2 1
SELECT origid as `from`, linkid as `to` FROM graph where latch='' and origid = 4;
from to
4 3
SELECT origid as `from`, linkid as `to` FROM graph where latch='' and origid = 9;
from to
9 9
SELECT origid as `from`, linkid as `to` FROM graph where latch='' and origid = 10;
from to
10 11
SELECT origid as `from`, linkid as `to` FROM graph where latch='' and origid = NULL;
from to
SELECT origid as `from`, linkid as `to` FROM graph where latch='' and origid = 666;
from to
SELECT linkid as `from`, destid as `to` FROM graph where latch='' and destid = 1;
from to
3 1
2 1
SELECT linkid as `from`, destid as `to` FROM graph where latch='' and destid = 2;
from to
1 2
SELECT linkid as `from`, destid as `to` FROM graph where latch='' and destid = 4;
from to
3 4
SELECT linkid as `from`, destid as `to` FROM graph where latch='' and destid = 9;
from to
9 9
SELECT linkid as `from`, destid as `to` FROM graph where latch='' and destid = 10;
from to
12 10
SELECT linkid as `from`, destid as `to` FROM graph where latch='' and destid = NULL;
from to
SELECT linkid as `from`, destid as `to` FROM graph where latch='' and destid = 666;
from to
SELECT * FROM graph where latch='0';
latch origid destid weight seq linkid
0 NULL NULL NULL NULL 1
0 NULL NULL NULL NULL 2
0 NULL NULL NULL NULL 3
0 NULL NULL NULL NULL 4
0 NULL NULL NULL NULL 5
0 NULL NULL NULL NULL 6
0 NULL NULL NULL NULL 7
0 NULL NULL NULL NULL 9
0 NULL NULL NULL NULL 10
0 NULL NULL NULL NULL 11
0 NULL NULL NULL NULL 12
SELECT count(*) FROM graph where latch='0';
count(*)
11
SELECT * FROM graph where latch='0' and linkid = 2;
latch origid destid weight seq linkid
0 NULL NULL NULL NULL 2
SELECT * FROM graph where latch='0' and (linkid > 2 and linkid < 6);
latch origid destid weight seq linkid
0 NULL NULL NULL NULL 3
0 NULL NULL NULL NULL 4
0 NULL NULL NULL NULL 5
SELECT origid as `from`, linkid as `to` FROM graph where latch='0' and origid = 1;
from to
1 3
1 2
SELECT origid as `from`, linkid as `to` FROM graph where latch='0' and origid = 2;
from to
2 1
SELECT origid as `from`, linkid as `to` FROM graph where latch='0' and origid = 4;
from to
4 3
SELECT origid as `from`, linkid as `to` FROM graph where latch='0' and origid = 9;
from to
9 9
SELECT origid as `from`, linkid as `to` FROM graph where latch='0' and origid = 10;
from to
10 11
SELECT linkid as `from`, destid as `to` FROM graph where latch='0' and destid = 1;
from to
3 1
2 1
SELECT linkid as `from`, destid as `to` FROM graph where latch='0' and destid = 2;
from to
1 2
SELECT linkid as `from`, destid as `to` FROM graph where latch='0' and destid = 4;
from to
3 4
SELECT linkid as `from`, destid as `to` FROM graph where latch='0' and destid = 9;
from to
9 9
SELECT linkid as `from`, destid as `to` FROM graph where latch='0' and destid = 10;
from to
12 10
# Breadth-first search tests
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 1;
latch origid destid weight seq linkid
breadth_first 1 NULL 2 4 4
breadth_first 1 NULL 1 3 3
breadth_first 1 NULL 1 2 2
breadth_first 1 NULL 0 1 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 2;
latch origid destid weight seq linkid
breadth_first 2 NULL 3 4 4
breadth_first 2 NULL 2 3 3
breadth_first 2 NULL 1 2 1
breadth_first 2 NULL 0 1 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 3;
latch origid destid weight seq linkid
breadth_first 3 NULL 2 4 2
breadth_first 3 NULL 1 3 4
breadth_first 3 NULL 1 2 1
breadth_first 3 NULL 0 1 3
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 4;
latch origid destid weight seq linkid
breadth_first 4 NULL 3 4 2
breadth_first 4 NULL 2 3 1
breadth_first 4 NULL 1 2 3
breadth_first 4 NULL 0 1 4
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 5;
latch origid destid weight seq linkid
breadth_first 5 NULL 1 3 7
breadth_first 5 NULL 1 2 6
breadth_first 5 NULL 0 1 5
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 6;
latch origid destid weight seq linkid
breadth_first 6 NULL 2 3 7
breadth_first 6 NULL 1 2 5
breadth_first 6 NULL 0 1 6
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 7;
latch origid destid weight seq linkid
breadth_first 7 NULL 0 1 7
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 8;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 9;
latch origid destid weight seq linkid
breadth_first 9 NULL 0 1 9
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 10;
latch origid destid weight seq linkid
breadth_first 10 NULL 2 3 12
breadth_first 10 NULL 1 2 11
breadth_first 10 NULL 0 1 10
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 11;
latch origid destid weight seq linkid
breadth_first 11 NULL 2 3 10
breadth_first 11 NULL 1 2 12
breadth_first 11 NULL 0 1 11
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 12;
latch origid destid weight seq linkid
breadth_first 12 NULL 2 3 11
breadth_first 12 NULL 1 2 10
breadth_first 12 NULL 0 1 12
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 666;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 1 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 1 NULL 1 3 3
breadth_first 1 NULL 1 2 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 2 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 2 NULL 1 2 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 3 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 3 NULL 1 3 4
breadth_first 3 NULL 1 2 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 4 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 4 NULL 1 2 3
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 5 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 5 NULL 1 3 7
breadth_first 5 NULL 1 2 6
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 6 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 6 NULL 1 2 5
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 7 AND weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 8 AND weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 9 AND weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 10 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 10 NULL 1 2 11
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 11 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 11 NULL 1 2 12
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 12 AND weight = 1;
latch origid destid weight seq linkid
breadth_first 12 NULL 1 2 10
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 1 AND weight = 1;
count(*)
2
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 2 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 3 AND weight = 1;
count(*)
2
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 4 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 5 AND weight = 1;
count(*)
2
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 6 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 7 AND weight = 1;
count(*)
0
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 8 AND weight = 1;
count(*)
0
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 9 AND weight = 1;
count(*)
0
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 10 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 11 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = 'breadth_first' AND origid = 12 AND weight = 1;
count(*)
1
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 1 AND weight = 2;
latch origid destid weight seq linkid
breadth_first 1 NULL 2 4 4
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 2 AND weight = 2;
latch origid destid weight seq linkid
breadth_first 2 NULL 2 3 3
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 3 AND weight = 2;
latch origid destid weight seq linkid
breadth_first 3 NULL 2 4 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 4 AND weight = 2;
latch origid destid weight seq linkid
breadth_first 4 NULL 2 3 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 5 AND weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 6 AND weight = 2;
latch origid destid weight seq linkid
breadth_first 6 NULL 2 3 7
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 7 AND weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 8 AND weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 9 AND weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 10 AND weight = 2;
latch origid destid weight seq linkid
breadth_first 10 NULL 2 3 12
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 11 AND weight = 2;
latch origid destid weight seq linkid
breadth_first 11 NULL 2 3 10
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 12 AND weight = 2;
latch origid destid weight seq linkid
breadth_first 12 NULL 2 3 11
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 1 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 2 AND weight = 3;
latch origid destid weight seq linkid
breadth_first 2 NULL 3 4 4
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 3 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 4 AND weight = 3;
latch origid destid weight seq linkid
breadth_first 4 NULL 3 4 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 5 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 6 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 7 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 8 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 9 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 10 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 11 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 12 AND weight = 3;
latch origid destid weight seq linkid
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
breadth_first 1 NULL 1 3 3
breadth_first 1 NULL 1 2 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 2 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
breadth_first 2 NULL 2 3 3
breadth_first 2 NULL 1 2 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 3 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
breadth_first 3 NULL 2 4 2
breadth_first 3 NULL 1 3 4
breadth_first 3 NULL 1 2 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 4 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
breadth_first 4 NULL 2 3 1
breadth_first 4 NULL 1 2 3
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 5 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
breadth_first 5 NULL 1 3 7
breadth_first 5 NULL 1 2 6
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 6 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
breadth_first 6 NULL 2 3 7
breadth_first 6 NULL 1 2 5
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 7 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 8 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 9 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 10 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
breadth_first 10 NULL 2 3 12
breadth_first 10 NULL 1 2 11
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 11 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
breadth_first 11 NULL 2 3 10
breadth_first 11 NULL 1 2 12
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = 12 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
breadth_first 12 NULL 2 3 11
breadth_first 12 NULL 1 2 10
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 1;
latch origid destid weight seq linkid
breadth_first NULL 1 2 4 4
breadth_first NULL 1 1 3 3
breadth_first NULL 1 1 2 2
breadth_first NULL 1 0 1 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 2;
latch origid destid weight seq linkid
breadth_first NULL 2 3 4 4
breadth_first NULL 2 2 3 3
breadth_first NULL 2 1 2 1
breadth_first NULL 2 0 1 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 3;
latch origid destid weight seq linkid
breadth_first NULL 3 2 4 2
breadth_first NULL 3 1 3 4
breadth_first NULL 3 1 2 1
breadth_first NULL 3 0 1 3
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 4;
latch origid destid weight seq linkid
breadth_first NULL 4 3 4 2
breadth_first NULL 4 2 3 1
breadth_first NULL 4 1 2 3
breadth_first NULL 4 0 1 4
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 5;
latch origid destid weight seq linkid
breadth_first NULL 5 1 3 7
breadth_first NULL 5 1 2 6
breadth_first NULL 5 0 1 5
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 6;
latch origid destid weight seq linkid
breadth_first NULL 6 2 3 7
breadth_first NULL 6 1 2 5
breadth_first NULL 6 0 1 6
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 7;
latch origid destid weight seq linkid
breadth_first NULL 7 0 1 7
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 8;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 9;
latch origid destid weight seq linkid
breadth_first NULL 9 0 1 9
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 10;
latch origid destid weight seq linkid
breadth_first NULL 10 2 3 12
breadth_first NULL 10 1 2 11
breadth_first NULL 10 0 1 10
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 11;
latch origid destid weight seq linkid
breadth_first NULL 11 2 3 10
breadth_first NULL 11 1 2 12
breadth_first NULL 11 0 1 11
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 12;
latch origid destid weight seq linkid
breadth_first NULL 12 2 3 11
breadth_first NULL 12 1 2 10
breadth_first NULL 12 0 1 12
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 1 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 1 1 3 3
breadth_first NULL 1 1 2 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 2 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 2 1 2 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 3 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 3 1 3 4
breadth_first NULL 3 1 2 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 4 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 4 1 2 3
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 5 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 5 1 3 7
breadth_first NULL 5 1 2 6
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 6 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 6 1 2 5
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 7 and weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 8 and weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 9 and weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 10 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 10 1 2 11
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 11 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 11 1 2 12
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 12 and weight = 1;
latch origid destid weight seq linkid
breadth_first NULL 12 1 2 10
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 1 and weight = 2;
latch origid destid weight seq linkid
breadth_first NULL 1 2 4 4
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 2 and weight = 2;
latch origid destid weight seq linkid
breadth_first NULL 2 2 3 3
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 3 and weight = 2;
latch origid destid weight seq linkid
breadth_first NULL 3 2 4 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 4 and weight = 2;
latch origid destid weight seq linkid
breadth_first NULL 4 2 3 1
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 5 and weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 6 and weight = 2;
latch origid destid weight seq linkid
breadth_first NULL 6 2 3 7
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 7 and weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 8 and weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 9 and weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 10 and weight = 2;
latch origid destid weight seq linkid
breadth_first NULL 10 2 3 12
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 11 and weight = 2;
latch origid destid weight seq linkid
breadth_first NULL 11 2 3 10
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 12 and weight = 2;
latch origid destid weight seq linkid
breadth_first NULL 12 2 3 11
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 1 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 2 and weight = 3;
latch origid destid weight seq linkid
breadth_first NULL 2 3 4 4
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 3 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 4 and weight = 3;
latch origid destid weight seq linkid
breadth_first NULL 4 3 4 2
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 5 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 6 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 7 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 8 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 9 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 10 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 11 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = 12 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND origid = NULL;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND destid = NULL;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first' AND weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = 'breadth_first';
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 1;
latch origid destid weight seq linkid
2 1 NULL 2 4 4
2 1 NULL 1 3 3
2 1 NULL 1 2 2
2 1 NULL 0 1 1
SELECT * FROM graph WHERE latch = '2' AND origid = 2;
latch origid destid weight seq linkid
2 2 NULL 3 4 4
2 2 NULL 2 3 3
2 2 NULL 1 2 1
2 2 NULL 0 1 2
SELECT * FROM graph WHERE latch = '2' AND origid = 3;
latch origid destid weight seq linkid
2 3 NULL 2 4 2
2 3 NULL 1 3 4
2 3 NULL 1 2 1
2 3 NULL 0 1 3
SELECT * FROM graph WHERE latch = '2' AND origid = 4;
latch origid destid weight seq linkid
2 4 NULL 3 4 2
2 4 NULL 2 3 1
2 4 NULL 1 2 3
2 4 NULL 0 1 4
SELECT * FROM graph WHERE latch = '2' AND origid = 5;
latch origid destid weight seq linkid
2 5 NULL 1 3 7
2 5 NULL 1 2 6
2 5 NULL 0 1 5
SELECT * FROM graph WHERE latch = '2' AND origid = 6;
latch origid destid weight seq linkid
2 6 NULL 2 3 7
2 6 NULL 1 2 5
2 6 NULL 0 1 6
SELECT * FROM graph WHERE latch = '2' AND origid = 7;
latch origid destid weight seq linkid
2 7 NULL 0 1 7
SELECT * FROM graph WHERE latch = '2' AND origid = 8;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 9;
latch origid destid weight seq linkid
2 9 NULL 0 1 9
SELECT * FROM graph WHERE latch = '2' AND origid = 10;
latch origid destid weight seq linkid
2 10 NULL 2 3 12
2 10 NULL 1 2 11
2 10 NULL 0 1 10
SELECT * FROM graph WHERE latch = '2' AND origid = 11;
latch origid destid weight seq linkid
2 11 NULL 2 3 10
2 11 NULL 1 2 12
2 11 NULL 0 1 11
SELECT * FROM graph WHERE latch = '2' AND origid = 12;
latch origid destid weight seq linkid
2 12 NULL 2 3 11
2 12 NULL 1 2 10
2 12 NULL 0 1 12
SELECT * FROM graph WHERE latch = '2' AND origid = 666;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 1 AND weight = 1;
latch origid destid weight seq linkid
2 1 NULL 1 3 3
2 1 NULL 1 2 2
SELECT * FROM graph WHERE latch = '2' AND origid = 2 AND weight = 1;
latch origid destid weight seq linkid
2 2 NULL 1 2 1
SELECT * FROM graph WHERE latch = '2' AND origid = 3 AND weight = 1;
latch origid destid weight seq linkid
2 3 NULL 1 3 4
2 3 NULL 1 2 1
SELECT * FROM graph WHERE latch = '2' AND origid = 4 AND weight = 1;
latch origid destid weight seq linkid
2 4 NULL 1 2 3
SELECT * FROM graph WHERE latch = '2' AND origid = 5 AND weight = 1;
latch origid destid weight seq linkid
2 5 NULL 1 3 7
2 5 NULL 1 2 6
SELECT * FROM graph WHERE latch = '2' AND origid = 6 AND weight = 1;
latch origid destid weight seq linkid
2 6 NULL 1 2 5
SELECT * FROM graph WHERE latch = '2' AND origid = 7 AND weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 8 AND weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 9 AND weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 10 AND weight = 1;
latch origid destid weight seq linkid
2 10 NULL 1 2 11
SELECT * FROM graph WHERE latch = '2' AND origid = 11 AND weight = 1;
latch origid destid weight seq linkid
2 11 NULL 1 2 12
SELECT * FROM graph WHERE latch = '2' AND origid = 12 AND weight = 1;
latch origid destid weight seq linkid
2 12 NULL 1 2 10
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 1 AND weight = 1;
count(*)
2
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 2 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 3 AND weight = 1;
count(*)
2
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 4 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 5 AND weight = 1;
count(*)
2
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 6 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 7 AND weight = 1;
count(*)
0
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 8 AND weight = 1;
count(*)
0
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 9 AND weight = 1;
count(*)
0
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 10 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 11 AND weight = 1;
count(*)
1
SELECT count(*) FROM graph WHERE latch = '2' AND origid = 12 AND weight = 1;
count(*)
1
SELECT * FROM graph WHERE latch = '2' AND origid = 1 AND weight = 2;
latch origid destid weight seq linkid
2 1 NULL 2 4 4
SELECT * FROM graph WHERE latch = '2' AND origid = 2 AND weight = 2;
latch origid destid weight seq linkid
2 2 NULL 2 3 3
SELECT * FROM graph WHERE latch = '2' AND origid = 3 AND weight = 2;
latch origid destid weight seq linkid
2 3 NULL 2 4 2
SELECT * FROM graph WHERE latch = '2' AND origid = 4 AND weight = 2;
latch origid destid weight seq linkid
2 4 NULL 2 3 1
SELECT * FROM graph WHERE latch = '2' AND origid = 5 AND weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 6 AND weight = 2;
latch origid destid weight seq linkid
2 6 NULL 2 3 7
SELECT * FROM graph WHERE latch = '2' AND origid = 7 AND weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 8 AND weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 9 AND weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 10 AND weight = 2;
latch origid destid weight seq linkid
2 10 NULL 2 3 12
SELECT * FROM graph WHERE latch = '2' AND origid = 11 AND weight = 2;
latch origid destid weight seq linkid
2 11 NULL 2 3 10
SELECT * FROM graph WHERE latch = '2' AND origid = 12 AND weight = 2;
latch origid destid weight seq linkid
2 12 NULL 2 3 11
SELECT * FROM graph WHERE latch = '2' AND origid = 1 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 2 AND weight = 3;
latch origid destid weight seq linkid
2 2 NULL 3 4 4
SELECT * FROM graph WHERE latch = '2' AND origid = 3 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 4 AND weight = 3;
latch origid destid weight seq linkid
2 4 NULL 3 4 2
SELECT * FROM graph WHERE latch = '2' AND origid = 5 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 6 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 7 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 8 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 9 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 10 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 11 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 12 AND weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 1 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 1 NULL 2 4 4
2 1 NULL 1 3 3
2 1 NULL 1 2 2
SELECT * FROM graph WHERE latch = '2' AND origid = 2 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 2 NULL 2 3 3
2 2 NULL 1 2 1
SELECT * FROM graph WHERE latch = '2' AND origid = 3 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 3 NULL 2 4 2
2 3 NULL 1 3 4
2 3 NULL 1 2 1
SELECT * FROM graph WHERE latch = '2' AND origid = 4 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 4 NULL 2 3 1
2 4 NULL 1 2 3
SELECT * FROM graph WHERE latch = '2' AND origid = 5 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 5 NULL 1 3 7
2 5 NULL 1 2 6
SELECT * FROM graph WHERE latch = '2' AND origid = 6 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 6 NULL 2 3 7
2 6 NULL 1 2 5
SELECT * FROM graph WHERE latch = '2' AND origid = 7 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 8 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 9 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = 10 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 10 NULL 2 3 12
2 10 NULL 1 2 11
SELECT * FROM graph WHERE latch = '2' AND origid = 11 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 11 NULL 2 3 10
2 11 NULL 1 2 12
SELECT * FROM graph WHERE latch = '2' AND origid = 12 AND (weight = 1 or weight = 2);
latch origid destid weight seq linkid
2 12 NULL 2 3 11
2 12 NULL 1 2 10
SELECT * FROM graph WHERE latch = '2' AND destid = 1;
latch origid destid weight seq linkid
2 NULL 1 2 4 4
2 NULL 1 1 3 3
2 NULL 1 1 2 2
2 NULL 1 0 1 1
SELECT * FROM graph WHERE latch = '2' AND destid = 2;
latch origid destid weight seq linkid
2 NULL 2 3 4 4
2 NULL 2 2 3 3
2 NULL 2 1 2 1
2 NULL 2 0 1 2
SELECT * FROM graph WHERE latch = '2' AND destid = 3;
latch origid destid weight seq linkid
2 NULL 3 2 4 2
2 NULL 3 1 3 4
2 NULL 3 1 2 1
2 NULL 3 0 1 3
SELECT * FROM graph WHERE latch = '2' AND destid = 4;
latch origid destid weight seq linkid
2 NULL 4 3 4 2
2 NULL 4 2 3 1
2 NULL 4 1 2 3
2 NULL 4 0 1 4
SELECT * FROM graph WHERE latch = '2' AND destid = 5;
latch origid destid weight seq linkid
2 NULL 5 1 3 7
2 NULL 5 1 2 6
2 NULL 5 0 1 5
SELECT * FROM graph WHERE latch = '2' AND destid = 6;
latch origid destid weight seq linkid
2 NULL 6 2 3 7
2 NULL 6 1 2 5
2 NULL 6 0 1 6
SELECT * FROM graph WHERE latch = '2' AND destid = 7;
latch origid destid weight seq linkid
2 NULL 7 0 1 7
SELECT * FROM graph WHERE latch = '2' AND destid = 8;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 9;
latch origid destid weight seq linkid
2 NULL 9 0 1 9
SELECT * FROM graph WHERE latch = '2' AND destid = 10;
latch origid destid weight seq linkid
2 NULL 10 2 3 12
2 NULL 10 1 2 11
2 NULL 10 0 1 10
SELECT * FROM graph WHERE latch = '2' AND destid = 11;
latch origid destid weight seq linkid
2 NULL 11 2 3 10
2 NULL 11 1 2 12
2 NULL 11 0 1 11
SELECT * FROM graph WHERE latch = '2' AND destid = 12;
latch origid destid weight seq linkid
2 NULL 12 2 3 11
2 NULL 12 1 2 10
2 NULL 12 0 1 12
SELECT * FROM graph WHERE latch = '2' AND destid = 1 and weight = 1;
latch origid destid weight seq linkid
2 NULL 1 1 3 3
2 NULL 1 1 2 2
SELECT * FROM graph WHERE latch = '2' AND destid = 2 and weight = 1;
latch origid destid weight seq linkid
2 NULL 2 1 2 1
SELECT * FROM graph WHERE latch = '2' AND destid = 3 and weight = 1;
latch origid destid weight seq linkid
2 NULL 3 1 3 4
2 NULL 3 1 2 1
SELECT * FROM graph WHERE latch = '2' AND destid = 4 and weight = 1;
latch origid destid weight seq linkid
2 NULL 4 1 2 3
SELECT * FROM graph WHERE latch = '2' AND destid = 5 and weight = 1;
latch origid destid weight seq linkid
2 NULL 5 1 3 7
2 NULL 5 1 2 6
SELECT * FROM graph WHERE latch = '2' AND destid = 6 and weight = 1;
latch origid destid weight seq linkid
2 NULL 6 1 2 5
SELECT * FROM graph WHERE latch = '2' AND destid = 7 and weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 8 and weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 9 and weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 10 and weight = 1;
latch origid destid weight seq linkid
2 NULL 10 1 2 11
SELECT * FROM graph WHERE latch = '2' AND destid = 11 and weight = 1;
latch origid destid weight seq linkid
2 NULL 11 1 2 12
SELECT * FROM graph WHERE latch = '2' AND destid = 12 and weight = 1;
latch origid destid weight seq linkid
2 NULL 12 1 2 10
SELECT * FROM graph WHERE latch = '2' AND destid = 1 and weight = 2;
latch origid destid weight seq linkid
2 NULL 1 2 4 4
SELECT * FROM graph WHERE latch = '2' AND destid = 2 and weight = 2;
latch origid destid weight seq linkid
2 NULL 2 2 3 3
SELECT * FROM graph WHERE latch = '2' AND destid = 3 and weight = 2;
latch origid destid weight seq linkid
2 NULL 3 2 4 2
SELECT * FROM graph WHERE latch = '2' AND destid = 4 and weight = 2;
latch origid destid weight seq linkid
2 NULL 4 2 3 1
SELECT * FROM graph WHERE latch = '2' AND destid = 5 and weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 6 and weight = 2;
latch origid destid weight seq linkid
2 NULL 6 2 3 7
SELECT * FROM graph WHERE latch = '2' AND destid = 7 and weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 8 and weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 9 and weight = 2;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 10 and weight = 2;
latch origid destid weight seq linkid
2 NULL 10 2 3 12
SELECT * FROM graph WHERE latch = '2' AND destid = 11 and weight = 2;
latch origid destid weight seq linkid
2 NULL 11 2 3 10
SELECT * FROM graph WHERE latch = '2' AND destid = 12 and weight = 2;
latch origid destid weight seq linkid
2 NULL 12 2 3 11
SELECT * FROM graph WHERE latch = '2' AND destid = 1 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 2 and weight = 3;
latch origid destid weight seq linkid
2 NULL 2 3 4 4
SELECT * FROM graph WHERE latch = '2' AND destid = 3 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 4 and weight = 3;
latch origid destid weight seq linkid
2 NULL 4 3 4 2
SELECT * FROM graph WHERE latch = '2' AND destid = 5 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 6 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 7 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 8 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 9 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 10 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 11 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = 12 and weight = 3;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND origid = NULL;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND destid = NULL;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2' AND weight = 1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch = '2';
latch origid destid weight seq linkid
# Dijkstras algorithm tests
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1 AND destid=1;
latch origid destid weight seq linkid
dijkstras 1 1 NULL 0 1
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1 AND destid=2;
latch origid destid weight seq linkid
dijkstras 1 2 NULL 0 1
dijkstras 1 2 1 1 2
SELECT * FROM graph WHERE latch='dijkstras' AND origid=2 AND destid=1;
latch origid destid weight seq linkid
dijkstras 2 1 NULL 0 2
dijkstras 2 1 1 1 1
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1 AND destid=4;
latch origid destid weight seq linkid
dijkstras 1 4 NULL 0 1
dijkstras 1 4 1 1 3
dijkstras 1 4 1 2 4
SELECT * FROM graph WHERE latch='dijkstras' AND origid=4 AND destid=1;
latch origid destid weight seq linkid
dijkstras 4 1 NULL 0 4
dijkstras 4 1 1 1 3
dijkstras 4 1 1 2 1
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1 AND destid=5;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1 AND destid=666;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='dijkstras' AND origid=5 AND destid=7;
latch origid destid weight seq linkid
dijkstras 5 7 NULL 0 5
dijkstras 5 7 1 1 7
SELECT * FROM graph WHERE latch='dijkstras' AND origid=7 AND destid=5;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='dijkstras' AND origid=10 AND destid=11;
latch origid destid weight seq linkid
dijkstras 10 11 NULL 0 10
dijkstras 10 11 1 1 11
SELECT * FROM graph WHERE latch='dijkstras' AND origid=10 AND destid=12;
latch origid destid weight seq linkid
dijkstras 10 12 NULL 0 10
dijkstras 10 12 1 1 11
dijkstras 10 12 1 2 12
SELECT * FROM graph WHERE latch='dijkstras' AND origid=11 AND destid=10;
latch origid destid weight seq linkid
dijkstras 11 10 NULL 0 11
dijkstras 11 10 1 1 12
dijkstras 11 10 1 2 10
SELECT * FROM graph WHERE latch='dijkstras' AND origid=11 AND destid=12;
latch origid destid weight seq linkid
dijkstras 11 12 NULL 0 11
dijkstras 11 12 1 1 12
SELECT * FROM graph WHERE latch='dijkstras' AND origid=12 AND destid=10;
latch origid destid weight seq linkid
dijkstras 12 10 NULL 0 12
dijkstras 12 10 1 1 10
SELECT * FROM graph WHERE latch='dijkstras' AND origid=12 AND destid=11;
latch origid destid weight seq linkid
dijkstras 12 11 NULL 0 12
dijkstras 12 11 1 1 10
dijkstras 12 11 1 2 11
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1;
latch origid destid weight seq linkid
dijkstras 1 NULL 2 4 4
dijkstras 1 NULL 1 3 3
dijkstras 1 NULL 1 2 2
dijkstras 1 NULL 0 1 1
SELECT * FROM graph WHERE latch='dijkstras' AND origid=2;
latch origid destid weight seq linkid
dijkstras 2 NULL 3 4 4
dijkstras 2 NULL 2 3 3
dijkstras 2 NULL 1 2 1
dijkstras 2 NULL 0 1 2
SELECT * FROM graph WHERE latch='dijkstras' AND origid=3;
latch origid destid weight seq linkid
dijkstras 3 NULL 2 4 2
dijkstras 3 NULL 1 3 4
dijkstras 3 NULL 1 2 1
dijkstras 3 NULL 0 1 3
SELECT * FROM graph WHERE latch='dijkstras' AND origid=4;
latch origid destid weight seq linkid
dijkstras 4 NULL 3 4 2
dijkstras 4 NULL 2 3 1
dijkstras 4 NULL 1 2 3
dijkstras 4 NULL 0 1 4
SELECT * FROM graph WHERE latch='dijkstras' AND origid=5;
latch origid destid weight seq linkid
dijkstras 5 NULL 1 3 7
dijkstras 5 NULL 1 2 6
dijkstras 5 NULL 0 1 5
SELECT * FROM graph WHERE latch='dijkstras' AND origid=6;
latch origid destid weight seq linkid
dijkstras 6 NULL 2 3 7
dijkstras 6 NULL 1 2 5
dijkstras 6 NULL 0 1 6
SELECT * FROM graph WHERE latch='dijkstras' AND origid=7;
latch origid destid weight seq linkid
dijkstras 7 NULL 0 1 7
SELECT * FROM graph WHERE latch='dijkstras' AND origid=8;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='dijkstras' AND origid=9;
latch origid destid weight seq linkid
dijkstras 9 NULL 0 1 9
SELECT * FROM graph WHERE latch='dijkstras' AND origid=10;
latch origid destid weight seq linkid
dijkstras 10 NULL 2 3 12
dijkstras 10 NULL 1 2 11
dijkstras 10 NULL 0 1 10
SELECT * FROM graph WHERE latch='dijkstras' AND origid=11;
latch origid destid weight seq linkid
dijkstras 11 NULL 2 3 10
dijkstras 11 NULL 1 2 12
dijkstras 11 NULL 0 1 11
SELECT * FROM graph WHERE latch='dijkstras' AND origid=12;
latch origid destid weight seq linkid
dijkstras 12 NULL 2 3 11
dijkstras 12 NULL 1 2 10
dijkstras 12 NULL 0 1 12
SELECT * FROM graph WHERE latch='dijkstras' AND origid=666;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='dijkstras' AND destid=1;
latch origid destid weight seq linkid
dijkstras NULL 1 2 4 4
dijkstras NULL 1 1 3 3
dijkstras NULL 1 1 2 2
dijkstras NULL 1 0 1 1
SELECT * FROM graph WHERE latch='dijkstras' AND destid=2;
latch origid destid weight seq linkid
dijkstras NULL 2 3 4 4
dijkstras NULL 2 2 3 3
dijkstras NULL 2 1 2 1
dijkstras NULL 2 0 1 2
SELECT * FROM graph WHERE latch='dijkstras' AND destid=3;
latch origid destid weight seq linkid
dijkstras NULL 3 2 4 2
dijkstras NULL 3 1 3 4
dijkstras NULL 3 1 2 1
dijkstras NULL 3 0 1 3
SELECT * FROM graph WHERE latch='dijkstras' AND destid=4;
latch origid destid weight seq linkid
dijkstras NULL 4 3 4 2
dijkstras NULL 4 2 3 1
dijkstras NULL 4 1 2 3
dijkstras NULL 4 0 1 4
SELECT * FROM graph WHERE latch='dijkstras' AND destid=5;
latch origid destid weight seq linkid
dijkstras NULL 5 1 3 7
dijkstras NULL 5 1 2 6
dijkstras NULL 5 0 1 5
SELECT * FROM graph WHERE latch='dijkstras' AND destid=6;
latch origid destid weight seq linkid
dijkstras NULL 6 2 3 7
dijkstras NULL 6 1 2 5
dijkstras NULL 6 0 1 6
SELECT * FROM graph WHERE latch='dijkstras' AND destid=7;
latch origid destid weight seq linkid
dijkstras NULL 7 0 1 7
SELECT * FROM graph WHERE latch='dijkstras' AND destid=8;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='dijkstras' AND destid=9;
latch origid destid weight seq linkid
dijkstras NULL 9 0 1 9
SELECT * FROM graph WHERE latch='dijkstras' AND destid=10;
latch origid destid weight seq linkid
dijkstras NULL 10 2 3 12
dijkstras NULL 10 1 2 11
dijkstras NULL 10 0 1 10
SELECT * FROM graph WHERE latch='dijkstras' AND destid=11;
latch origid destid weight seq linkid
dijkstras NULL 11 2 3 10
dijkstras NULL 11 1 2 12
dijkstras NULL 11 0 1 11
SELECT * FROM graph WHERE latch='dijkstras' AND destid=12;
latch origid destid weight seq linkid
dijkstras NULL 12 2 3 11
dijkstras NULL 12 1 2 10
dijkstras NULL 12 0 1 12
# legacy string number
SELECT * FROM graph WHERE latch='1' AND origid=1 AND destid=1;
latch origid destid weight seq linkid
1 1 1 NULL 0 1
SELECT * FROM graph WHERE latch='1' AND origid=1 AND destid=2;
latch origid destid weight seq linkid
1 1 2 NULL 0 1
1 1 2 1 1 2
SELECT * FROM graph WHERE latch='1' AND origid=2 AND destid=1;
latch origid destid weight seq linkid
1 2 1 NULL 0 2
1 2 1 1 1 1
SELECT * FROM graph WHERE latch='1' AND origid=1 AND destid=4;
latch origid destid weight seq linkid
1 1 4 NULL 0 1
1 1 4 1 1 3
1 1 4 1 2 4
SELECT * FROM graph WHERE latch='1' AND origid=4 AND destid=1;
latch origid destid weight seq linkid
1 4 1 NULL 0 4
1 4 1 1 1 3
1 4 1 1 2 1
SELECT * FROM graph WHERE latch='1' AND origid=1 AND destid=5;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='1' AND origid=1 AND destid=666;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='1' AND origid=5 AND destid=7;
latch origid destid weight seq linkid
1 5 7 NULL 0 5
1 5 7 1 1 7
SELECT * FROM graph WHERE latch='1' AND origid=7 AND destid=5;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='1' AND origid=10 AND destid=11;
latch origid destid weight seq linkid
1 10 11 NULL 0 10
1 10 11 1 1 11
SELECT * FROM graph WHERE latch='1' AND origid=10 AND destid=12;
latch origid destid weight seq linkid
1 10 12 NULL 0 10
1 10 12 1 1 11
1 10 12 1 2 12
SELECT * FROM graph WHERE latch='1' AND origid=11 AND destid=10;
latch origid destid weight seq linkid
1 11 10 NULL 0 11
1 11 10 1 1 12
1 11 10 1 2 10
SELECT * FROM graph WHERE latch='1' AND origid=11 AND destid=12;
latch origid destid weight seq linkid
1 11 12 NULL 0 11
1 11 12 1 1 12
SELECT * FROM graph WHERE latch='1' AND origid=12 AND destid=10;
latch origid destid weight seq linkid
1 12 10 NULL 0 12
1 12 10 1 1 10
SELECT * FROM graph WHERE latch='1' AND origid=12 AND destid=11;
latch origid destid weight seq linkid
1 12 11 NULL 0 12
1 12 11 1 1 10
1 12 11 1 2 11
SELECT * FROM graph WHERE latch='1' AND origid=1;
latch origid destid weight seq linkid
1 1 NULL 2 4 4
1 1 NULL 1 3 3
1 1 NULL 1 2 2
1 1 NULL 0 1 1
SELECT * FROM graph WHERE latch='1' AND origid=2;
latch origid destid weight seq linkid
1 2 NULL 3 4 4
1 2 NULL 2 3 3
1 2 NULL 1 2 1
1 2 NULL 0 1 2
SELECT * FROM graph WHERE latch='1' AND origid=3;
latch origid destid weight seq linkid
1 3 NULL 2 4 2
1 3 NULL 1 3 4
1 3 NULL 1 2 1
1 3 NULL 0 1 3
SELECT * FROM graph WHERE latch='1' AND origid=4;
latch origid destid weight seq linkid
1 4 NULL 3 4 2
1 4 NULL 2 3 1
1 4 NULL 1 2 3
1 4 NULL 0 1 4
SELECT * FROM graph WHERE latch='1' AND origid=5;
latch origid destid weight seq linkid
1 5 NULL 1 3 7
1 5 NULL 1 2 6
1 5 NULL 0 1 5
SELECT * FROM graph WHERE latch='1' AND origid=6;
latch origid destid weight seq linkid
1 6 NULL 2 3 7
1 6 NULL 1 2 5
1 6 NULL 0 1 6
SELECT * FROM graph WHERE latch='1' AND origid=7;
latch origid destid weight seq linkid
1 7 NULL 0 1 7
SELECT * FROM graph WHERE latch='1' AND origid=8;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='1' AND origid=9;
latch origid destid weight seq linkid
1 9 NULL 0 1 9
SELECT * FROM graph WHERE latch='1' AND origid=10;
latch origid destid weight seq linkid
1 10 NULL 2 3 12
1 10 NULL 1 2 11
1 10 NULL 0 1 10
SELECT * FROM graph WHERE latch='1' AND origid=11;
latch origid destid weight seq linkid
1 11 NULL 2 3 10
1 11 NULL 1 2 12
1 11 NULL 0 1 11
SELECT * FROM graph WHERE latch='1' AND origid=12;
latch origid destid weight seq linkid
1 12 NULL 2 3 11
1 12 NULL 1 2 10
1 12 NULL 0 1 12
SELECT * FROM graph WHERE latch='1' AND origid=666;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='1' AND destid=1;
latch origid destid weight seq linkid
1 NULL 1 2 4 4
1 NULL 1 1 3 3
1 NULL 1 1 2 2
1 NULL 1 0 1 1
SELECT * FROM graph WHERE latch='1' AND destid=2;
latch origid destid weight seq linkid
1 NULL 2 3 4 4
1 NULL 2 2 3 3
1 NULL 2 1 2 1
1 NULL 2 0 1 2
SELECT * FROM graph WHERE latch='1' AND destid=3;
latch origid destid weight seq linkid
1 NULL 3 2 4 2
1 NULL 3 1 3 4
1 NULL 3 1 2 1
1 NULL 3 0 1 3
SELECT * FROM graph WHERE latch='1' AND destid=4;
latch origid destid weight seq linkid
1 NULL 4 3 4 2
1 NULL 4 2 3 1
1 NULL 4 1 2 3
1 NULL 4 0 1 4
SELECT * FROM graph WHERE latch='1' AND destid=5;
latch origid destid weight seq linkid
1 NULL 5 1 3 7
1 NULL 5 1 2 6
1 NULL 5 0 1 5
SELECT * FROM graph WHERE latch='1' AND destid=6;
latch origid destid weight seq linkid
1 NULL 6 2 3 7
1 NULL 6 1 2 5
1 NULL 6 0 1 6
SELECT * FROM graph WHERE latch='1' AND destid=7;
latch origid destid weight seq linkid
1 NULL 7 0 1 7
SELECT * FROM graph WHERE latch='1' AND destid=8;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='1' AND destid=9;
latch origid destid weight seq linkid
1 NULL 9 0 1 9
SELECT * FROM graph WHERE latch='1' AND destid=10;
latch origid destid weight seq linkid
1 NULL 10 2 3 12
1 NULL 10 1 2 11
1 NULL 10 0 1 10
SELECT * FROM graph WHERE latch='1' AND destid=11;
latch origid destid weight seq linkid
1 NULL 11 2 3 10
1 NULL 11 1 2 12
1 NULL 11 0 1 11
SELECT * FROM graph WHERE latch='1' AND destid=12;
latch origid destid weight seq linkid
1 NULL 12 2 3 11
1 NULL 12 1 2 10
1 NULL 12 0 1 12
INSERT INTO graph_base(from_id, to_id) VALUES (11,13);
INSERT INTO graph_base(from_id, to_id) VALUES (10,14);
INSERT INTO graph_base(from_id, to_id) VALUES (14,13);
SELECT * FROM graph WHERE latch='dijkstras' AND origid=10 AND destid=13;
latch origid destid weight seq linkid
dijkstras 10 13 NULL 0 10
dijkstras 10 13 1 1 11
dijkstras 10 13 1 2 13
DELETE FROM graph_base where from_id=10 and to_id=11;
INSERT INTO graph_base(from_id, to_id) VALUES (10,15);
INSERT INTO graph_base(from_id, to_id) VALUES (15,13);
SELECT * FROM graph WHERE latch='dijkstras' AND origid=10 AND destid=13;
latch origid destid weight seq linkid
dijkstras 10 13 NULL 0 10
dijkstras 10 13 1 1 14
dijkstras 10 13 1 2 13
INSERT INTO graph_base(from_id, to_id) VALUES (10,11);
SELECT * FROM graph WHERE latch='dijkstras' AND origid=10 AND destid=13;
latch origid destid weight seq linkid
dijkstras 10 13 NULL 0 10
dijkstras 10 13 1 1 11
dijkstras 10 13 1 2 13
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1;
latch origid destid weight seq linkid
dijkstras 1 NULL 2 4 4
dijkstras 1 NULL 1 3 3
dijkstras 1 NULL 1 2 2
dijkstras 1 NULL 0 1 1
INSERT INTO graph_base(from_id, to_id) VALUES (21,22);
SELECT * FROM graph WHERE latch='dijkstras' AND origid=21;
latch origid destid weight seq linkid
dijkstras 21 NULL 1 2 22
dijkstras 21 NULL 0 1 21
SELECT * FROM graph WHERE latch='dijkstras' AND origid=22;
latch origid destid weight seq linkid
dijkstras 22 NULL 0 1 22
INSERT INTO graph_base(from_id, to_id) VALUES (4,17);
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1;
latch origid destid weight seq linkid
dijkstras 1 NULL 3 5 17
dijkstras 1 NULL 2 4 4
dijkstras 1 NULL 1 3 3
dijkstras 1 NULL 1 2 2
dijkstras 1 NULL 0 1 1
INSERT INTO graph_base(from_id, to_id) VALUES (4,16);
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1;
latch origid destid weight seq linkid
dijkstras 1 NULL 3 6 17
dijkstras 1 NULL 3 5 16
dijkstras 1 NULL 2 4 4
dijkstras 1 NULL 1 3 3
dijkstras 1 NULL 1 2 2
dijkstras 1 NULL 0 1 1
INSERT INTO graph_base(from_id, to_id) VALUES (17,18);
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1;
latch origid destid weight seq linkid
dijkstras 1 NULL 4 7 18
dijkstras 1 NULL 3 6 17
dijkstras 1 NULL 3 5 16
dijkstras 1 NULL 2 4 4
dijkstras 1 NULL 1 3 3
dijkstras 1 NULL 1 2 2
dijkstras 1 NULL 0 1 1
SELECT * FROM graph WHERE latch='dijkstras' AND destid=1;
latch origid destid weight seq linkid
dijkstras NULL 1 4 7 18
dijkstras NULL 1 3 6 17
dijkstras NULL 1 3 5 16
dijkstras NULL 1 2 4 4
dijkstras NULL 1 1 3 3
dijkstras NULL 1 1 2 2
dijkstras NULL 1 0 1 1
# Now we add a connection from 4->6
INSERT INTO graph_base (from_id,to_id) VALUES (4,6);
# And delete all references to node 5
DELETE FROM graph_base WHERE from_id=5;
DELETE FROM graph_base WHERE from_id=3 AND to_id=5;
# which means there is a path in one direction only 1>3>4>6
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1 AND destid=6;
latch origid destid weight seq linkid
dijkstras 1 6 NULL 0 1
dijkstras 1 6 1 1 3
dijkstras 1 6 1 2 4
dijkstras 1 6 1 3 6
# but not 6>4>3>1 (so no result)
SELECT * FROM graph WHERE latch='dijkstras' AND origid=6 AND destid=1;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch='1' AND origid=1 AND destid=6;
latch origid destid weight seq linkid
1 1 6 NULL 0 1
1 1 6 1 1 3
1 1 6 1 2 4
1 1 6 1 3 6
SELECT * FROM graph WHERE latch='1' AND origid=6 AND destid=1;
latch origid destid weight seq linkid
DELETE FROM graph_base;
FLUSH TABLES;
TRUNCATE TABLE graph_base;
DROP TABLE graph_base;
DROP TABLE graph;
storage/oqgraph/mysql-test/oqgraph/general-innodb.test
0 → 100644
View file @
f90dca1a
# This is a maintainer generated file. Generated at Wednesday 5 February 22:26:12 CST 2014.
--
source
include
/
have_innodb
.
inc
--
let
$oqgraph_use_table_type
=
innodb
--
source
general
.
inc
storage/oqgraph/mysql-test/oqgraph/
basic.test
→
storage/oqgraph/mysql-test/oqgraph/
general.inc
View file @
f90dca1a
...
...
@@ -4,13 +4,15 @@ DROP TABLE IF EXISTS graph;
DROP
TABLE
IF
EXISTS
graph2
;
--
enable_warnings
--
echo
Performing
OQGraph
General
test
suite
for
ENGINE
=
$oqgraph_use_table_type
# Create the backing store
CREATE
TABLE
graph_base
(
eval
CREATE
TABLE
graph_base
(
from_id
INT
UNSIGNED
NOT
NULL
,
to_id
INT
UNSIGNED
NOT
NULL
,
PRIMARY
KEY
(
from_id
,
to_id
),
INDEX
(
to_id
)
)
ENGINE
=
MyISAM
;
)
ENGINE
=
$oqgraph_use_table_type
;
CREATE
TABLE
graph
(
...
...
@@ -24,6 +26,9 @@ CREATE TABLE graph (
KEY
(
latch
,
destid
,
origid
)
USING
HASH
)
ENGINE
=
OQGRAPH
DATA_TABLE
=
'graph_base'
ORIGID
=
'from_id'
,
DESTID
=
'to_id'
;
# Regression for MDEV-5891
select
*
from
graph
;
#--
#-- ASCII art graph of this test data
#-- +-->(2)
...
...
storage/oqgraph/mysql-test/oqgraph/generate_backing_table_tests_suite.sh
0 → 100755
View file @
f90dca1a
#!/bin/bash
# This is a template fgenerator or repeating an identical suite of tests for each backing table storage engine
# It generates a set of .test files for the following, for example:
# general-myisam.test
# general-memory.test
# general-innodb.test
# (etc)
#
# We generate these files, because as a general rule the coverage should be identical per backing table engine
# but we might want to pick out and re-reun for an individual backing table engine
# otherwise we could use an MTR loop instead.
# This is intended to be used by a maintainer; i.e. the resulting .test files are still committed to git.
# Note on known storage engines:
# See https://mariadb.com/kb/en/information-schema-engines-table/ for a full list
# CSV - doesn't work with OQGraph, attempting to create backing table gives 'failed: 1069: Too many keys specified; max 0 keys allowed'
# BLACKHOLE - makes no sense... but we should make sure it doesnt crash
# FEDERATED, ARCHIVE - consider later
ENGINES
=
"MyISAM MEMORY Aria"
for
ENGINE
in
$ENGINES
;
do
cat
>
general-
$ENGINE
.test
<<
EOF
# This is a maintainer generated file. Generated at `date`.
--let
\$
oqgraph_use_table_type=
$ENGINE
--source general.inc
EOF
done
# These engines need an extra check to see if thy are compiled
# Note, including innodb will also test xtradb
ENGINES2
=
"innodb"
for
ENGINE
in
$ENGINES2
;
do
cat
>
general-
$ENGINE
.test
<<
EOF
# This is a maintainer generated file. Generated at `date`.
-- source include/have_
$ENGINE
.inc
--let
\$
oqgraph_use_table_type=
$ENGINE
--source general.inc
EOF
done
# Generate a script to rerun the test suite as well
# Intended to be run from build as ../storage/oqgraph/mysql-test/oqgraph/maintainer-general-record.sh
MGFILE
=
maintainer-general-record.sh
echo
'# This is a maintainer generated file. Generated at '
`
date
`
'.'
>
$MGFILE
for
ENGINE
in
$ENGINES
$ENGINES2
;
do
echo
mysql-test/mysql-test-run
--record
oqgraph.general-
$ENGINE
>>
$MGFILE
done
storage/oqgraph/mysql-test/oqgraph/maintainer-general-record.sh
0 → 100755
View file @
f90dca1a
# This is a maintainer generated file. Generated at Wednesday 5 February 22:26:12 CST 2014.
mysql-test/mysql-test-run
--record
oqgraph.general-MyISAM
mysql-test/mysql-test-run
--record
oqgraph.general-MEMORY
mysql-test/mysql-test-run
--record
oqgraph.general-Aria
mysql-test/mysql-test-run
--record
oqgraph.general-innodb
storage/oqgraph/mysql-test/oqgraph/regression_mdev5996.inc
0 → 100644
View file @
f90dca1a
# Regression test for https://mariadb.atlassian.net/browse/MDEV-5996
--
echo
Performing
OQGraph
regression
test
mdev5996
-
using
db
=
`$oqgraph_database_name`
,
table
=
`$oqgraph_table_name`
--
disable_warnings
use
test
;
if
(
$oqgraph_database_name
)
{
eval
drop
database
if
exists
`$oqgraph_database_name`
;
eval
create
database
`$oqgraph_database_name`
;
eval
use
`$oqgraph_database_name`
;
}
eval
drop
table
if
exists
`$oqgraph_table_name`
;
drop
table
if
exists
vvvvvvv_hhhhhhh
;
--
enable_warnings
eval
CREATE
TABLE
`$oqgraph_table_name`
(
`version`
varchar
(
10
)
NOT
NULL
,
`updateJSON`
mediumtext
,
`prevVersion`
varchar
(
10
)
NOT
NULL
,
`nodeID`
bigint
(
20
)
unsigned
NOT
NULL
DEFAULT
'0'
,
`prevNodeID`
bigint
(
20
)
unsigned
NOT
NULL
DEFAULT
'0'
,
PRIMARY
KEY
(
`prevNodeID`
,
`nodeID`
),
KEY
`prevVersion`
(
`prevVersion`
)
USING
BTREE
,
KEY
`version`
(
`version`
)
USING
BTREE
,
KEY
`nodeID`
(
`nodeID`
)
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
utf8
;
eval
insert
into
`$oqgraph_table_name`
values
(
'x'
,
'y'
,
'z'
,
0
,
0
);
eval
select
*
from
`$oqgraph_table_name`
;
eval
CREATE
TABLE
IF
NOT
EXISTS
vvvvvvv_hhhhhhh
(
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
=
'$oqgraph_table_name'
origid
=
'prevNodeID'
destid
=
'nodeID'
;
select
*
from
vvvvvvv_hhhhhhh
;
eval
drop
table
if
exists
`$oqgraph_table_name`
;
drop
table
if
exists
vvvvvvv_hhhhhhh
;
if
(
$oqgraph_database_name
)
{
eval
drop
database
if
exists
`$oqgraph_database_name`
;
}
storage/oqgraph/mysql-test/oqgraph/regression_mdev5996.result
0 → 100644
View file @
f90dca1a
Performing OQGraph regression test mdev5996 - using db=``, table=`999999999`
use test;
drop table if exists `999999999` ;
drop table if exists vvvvvvv_hhhhhhh;
CREATE TABLE `999999999` (
`version` varchar(10) NOT NULL,
`updateJSON` mediumtext,
`prevVersion` varchar(10) NOT NULL,
`nodeID` bigint(20) unsigned NOT NULL DEFAULT '0',
`prevNodeID` bigint(20) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`prevNodeID`,`nodeID`),
KEY `prevVersion` (`prevVersion`) USING BTREE,
KEY `version` (`version`) USING BTREE,
KEY `nodeID` (`nodeID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
insert into `999999999` values ( 'x', 'y', 'z', 0, 0);
select * from `999999999`;
version updateJSON prevVersion nodeID prevNodeID
x y z 0 0
CREATE TABLE IF NOT EXISTS vvvvvvv_hhhhhhh (
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='999999999'
origid='prevNodeID'
destid='nodeID';
select * from vvvvvvv_hhhhhhh;
latch origid destid weight seq linkid
NULL 0 0 1 NULL NULL
drop table if exists `999999999`;
drop table if exists vvvvvvv_hhhhhhh;
Performing OQGraph regression test mdev5996 - using db=`1`, table=`999999999`
use test;
drop database if exists `1` ;
create database `1` ;
use `1` ;
drop table if exists `999999999` ;
drop table if exists vvvvvvv_hhhhhhh;
CREATE TABLE `999999999` (
`version` varchar(10) NOT NULL,
`updateJSON` mediumtext,
`prevVersion` varchar(10) NOT NULL,
`nodeID` bigint(20) unsigned NOT NULL DEFAULT '0',
`prevNodeID` bigint(20) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`prevNodeID`,`nodeID`),
KEY `prevVersion` (`prevVersion`) USING BTREE,
KEY `version` (`version`) USING BTREE,
KEY `nodeID` (`nodeID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
insert into `999999999` values ( 'x', 'y', 'z', 0, 0);
select * from `999999999`;
version updateJSON prevVersion nodeID prevNodeID
x y z 0 0
CREATE TABLE IF NOT EXISTS vvvvvvv_hhhhhhh (
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='999999999'
origid='prevNodeID'
destid='nodeID';
select * from vvvvvvv_hhhhhhh;
latch origid destid weight seq linkid
NULL 0 0 1 NULL NULL
drop table if exists `999999999`;
drop table if exists vvvvvvv_hhhhhhh;
drop database if exists `1`;
Performing OQGraph regression test mdev5996 - using db=`1112222233_4444444`, table=`999999999`
use test;
drop database if exists `1112222233_4444444` ;
create database `1112222233_4444444` ;
use `1112222233_4444444` ;
drop table if exists `999999999` ;
drop table if exists vvvvvvv_hhhhhhh;
CREATE TABLE `999999999` (
`version` varchar(10) NOT NULL,
`updateJSON` mediumtext,
`prevVersion` varchar(10) NOT NULL,
`nodeID` bigint(20) unsigned NOT NULL DEFAULT '0',
`prevNodeID` bigint(20) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`prevNodeID`,`nodeID`),
KEY `prevVersion` (`prevVersion`) USING BTREE,
KEY `version` (`version`) USING BTREE,
KEY `nodeID` (`nodeID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
insert into `999999999` values ( 'x', 'y', 'z', 0, 0);
select * from `999999999`;
version updateJSON prevVersion nodeID prevNodeID
x y z 0 0
CREATE TABLE IF NOT EXISTS vvvvvvv_hhhhhhh (
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='999999999'
origid='prevNodeID'
destid='nodeID';
select * from vvvvvvv_hhhhhhh;
latch origid destid weight seq linkid
NULL 0 0 1 NULL NULL
drop table if exists `999999999`;
drop table if exists vvvvvvv_hhhhhhh;
drop database if exists `1112222233_4444444`;
Performing OQGraph regression test mdev5996 - using db=`1112222233_44444444`, table=`999999999`
use test;
drop database if exists `1112222233_44444444` ;
create database `1112222233_44444444` ;
use `1112222233_44444444` ;
drop table if exists `999999999` ;
drop table if exists vvvvvvv_hhhhhhh;
CREATE TABLE `999999999` (
`version` varchar(10) NOT NULL,
`updateJSON` mediumtext,
`prevVersion` varchar(10) NOT NULL,
`nodeID` bigint(20) unsigned NOT NULL DEFAULT '0',
`prevNodeID` bigint(20) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`prevNodeID`,`nodeID`),
KEY `prevVersion` (`prevVersion`) USING BTREE,
KEY `version` (`version`) USING BTREE,
KEY `nodeID` (`nodeID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
insert into `999999999` values ( 'x', 'y', 'z', 0, 0);
select * from `999999999`;
version updateJSON prevVersion nodeID prevNodeID
x y z 0 0
CREATE TABLE IF NOT EXISTS vvvvvvv_hhhhhhh (
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='999999999'
origid='prevNodeID'
destid='nodeID';
select * from vvvvvvv_hhhhhhh;
latch origid destid weight seq linkid
NULL 0 0 1 NULL NULL
drop table if exists `999999999`;
drop table if exists vvvvvvv_hhhhhhh;
drop database if exists `1112222233_44444444`;
Performing OQGraph regression test mdev5996 - using db=`1112222233_444444444`, table=`999999999`
use test;
drop database if exists `1112222233_444444444` ;
create database `1112222233_444444444` ;
use `1112222233_444444444` ;
drop table if exists `999999999` ;
drop table if exists vvvvvvv_hhhhhhh;
CREATE TABLE `999999999` (
`version` varchar(10) NOT NULL,
`updateJSON` mediumtext,
`prevVersion` varchar(10) NOT NULL,
`nodeID` bigint(20) unsigned NOT NULL DEFAULT '0',
`prevNodeID` bigint(20) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`prevNodeID`,`nodeID`),
KEY `prevVersion` (`prevVersion`) USING BTREE,
KEY `version` (`version`) USING BTREE,
KEY `nodeID` (`nodeID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
insert into `999999999` values ( 'x', 'y', 'z', 0, 0);
select * from `999999999`;
version updateJSON prevVersion nodeID prevNodeID
x y z 0 0
CREATE TABLE IF NOT EXISTS vvvvvvv_hhhhhhh (
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='999999999'
origid='prevNodeID'
destid='nodeID';
select * from vvvvvvv_hhhhhhh;
latch origid destid weight seq linkid
NULL 0 0 1 NULL NULL
drop table if exists `999999999`;
drop table if exists vvvvvvv_hhhhhhh;
drop database if exists `1112222233_444444444`;
Performing OQGraph regression test mdev5996 - using db=`1112222233_444444444`, table=`99999999`
use test;
drop database if exists `1112222233_444444444` ;
create database `1112222233_444444444` ;
use `1112222233_444444444` ;
drop table if exists `99999999` ;
drop table if exists vvvvvvv_hhhhhhh;
CREATE TABLE `99999999` (
`version` varchar(10) NOT NULL,
`updateJSON` mediumtext,
`prevVersion` varchar(10) NOT NULL,
`nodeID` bigint(20) unsigned NOT NULL DEFAULT '0',
`prevNodeID` bigint(20) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`prevNodeID`,`nodeID`),
KEY `prevVersion` (`prevVersion`) USING BTREE,
KEY `version` (`version`) USING BTREE,
KEY `nodeID` (`nodeID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
insert into `99999999` values ( 'x', 'y', 'z', 0, 0);
select * from `99999999`;
version updateJSON prevVersion nodeID prevNodeID
x y z 0 0
CREATE TABLE IF NOT EXISTS vvvvvvv_hhhhhhh (
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='99999999'
origid='prevNodeID'
destid='nodeID';
select * from vvvvvvv_hhhhhhh;
latch origid destid weight seq linkid
NULL 0 0 1 NULL NULL
drop table if exists `99999999`;
drop table if exists vvvvvvv_hhhhhhh;
drop database if exists `1112222233_444444444`;
Performing OQGraph regression test mdev5996 - using db=`1112222233_444444444`, table=`9999999999`
use test;
drop database if exists `1112222233_444444444` ;
create database `1112222233_444444444` ;
use `1112222233_444444444` ;
drop table if exists `9999999999` ;
drop table if exists vvvvvvv_hhhhhhh;
CREATE TABLE `9999999999` (
`version` varchar(10) NOT NULL,
`updateJSON` mediumtext,
`prevVersion` varchar(10) NOT NULL,
`nodeID` bigint(20) unsigned NOT NULL DEFAULT '0',
`prevNodeID` bigint(20) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`prevNodeID`,`nodeID`),
KEY `prevVersion` (`prevVersion`) USING BTREE,
KEY `version` (`version`) USING BTREE,
KEY `nodeID` (`nodeID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
insert into `9999999999` values ( 'x', 'y', 'z', 0, 0);
select * from `9999999999`;
version updateJSON prevVersion nodeID prevNodeID
x y z 0 0
CREATE TABLE IF NOT EXISTS vvvvvvv_hhhhhhh (
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='9999999999'
origid='prevNodeID'
destid='nodeID';
select * from vvvvvvv_hhhhhhh;
latch origid destid weight seq linkid
NULL 0 0 1 NULL NULL
drop table if exists `9999999999`;
drop table if exists vvvvvvv_hhhhhhh;
drop database if exists `1112222233_444444444`;
storage/oqgraph/mysql-test/oqgraph/regression_mdev5996.test
0 → 100644
View file @
f90dca1a
# Regression test for https://mariadb.atlassian.net/browse/MDEV-5996
# MidSchipDB_unstable
--
let
$oqgraph_table_name
=
999999999
--
let
$oqgraph_database_name
=
--
source
regression_mdev5996
.
inc
--
let
$oqgraph_database_name
=
1
--
source
regression_mdev5996
.
inc
# Various cases - although actual bug was a broken zero termination
# name of backing store shorter, same and longer than table
--
let
$oqgraph_database_name
=
1112222233_4444444
--
source
regression_mdev5996
.
inc
--
let
$oqgraph_database_name
=
1112222233_44444444
--
source
regression_mdev5996
.
inc
--
let
$oqgraph_database_name
=
1112222233_444444444
--
source
regression_mdev5996
.
inc
--
let
$oqgraph_table_name
=
99999999
--
source
regression_mdev5996
.
inc
--
let
$oqgraph_table_name
=
9999999999
--
source
regression_mdev5996
.
inc
# Fails:
# 1/9999
# test/99999999
# 1112222233_444444444/999999999
storage/oqgraph/oqgraph_shim.h
View file @
f90dca1a
...
...
@@ -184,6 +184,10 @@ namespace oqgraph3
typedef
edge_info
key_type
;
typedef
boost
::
readable_property_map_tag
category
;
edge_weight_property_map
(
const
graph
&
g
)
:
_g
(
g
)
{
}
friend
inline
reference
get
(
const
edge_weight_property_map
&
p
,
const
key_type
&
key
)
{
return
key
.
weight
();
}
const
graph
&
_g
;
};
...
...
@@ -436,16 +440,6 @@ namespace boost
const
oqgraph3
::
graph
&
g
)
{
return
property_map
<
oqgraph3
::
graph
,
edge_weight_t
>::
const_type
(
g
);
}
inline
property_map
<
oqgraph3
::
graph
,
edge_weight_t
>::
const_type
::
reference
get
(
const
property_map
<
oqgraph3
::
graph
,
edge_weight_t
>::
const_type
&
p
,
const
property_map
<
oqgraph3
::
graph
,
edge_weight_t
>::
const_type
::
key_type
&
key
)
{
return
key
.
weight
();
}
inline
property_map
<
oqgraph3
::
graph
,
edge_index_t
>::
const_type
::
reference
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment