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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
59b6b99c
Commit
59b6b99c
authored
Feb 28, 2015
by
Andrew McDonnell
Committed by
Sergey Vojtovich
Feb 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added regression test for MDEV_5871
parent
36ca65b7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
209 additions
and
1 deletion
+209
-1
storage/oqgraph/ha_oqgraph.cc
storage/oqgraph/ha_oqgraph.cc
+1
-0
storage/oqgraph/mysql-test/oqgraph/general.inc
storage/oqgraph/mysql-test/oqgraph/general.inc
+1
-1
storage/oqgraph/mysql-test/oqgraph/regression_mdev5871.result
...age/oqgraph/mysql-test/oqgraph/regression_mdev5871.result
+86
-0
storage/oqgraph/mysql-test/oqgraph/regression_mdev5871.test
storage/oqgraph/mysql-test/oqgraph/regression_mdev5871.test
+121
-0
No files found.
storage/oqgraph/ha_oqgraph.cc
View file @
59b6b99c
/* Copyright (C) 2007-2015 Arjen G Lentz & Antony T Curtis for Open Query
Copyright (C) 2013-2015 Andrew McDonnell
Copyright (C) 2014 Sergei Golubchik
Portions of this file copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
...
...
storage/oqgraph/mysql-test/oqgraph/general.inc
View file @
59b6b99c
...
...
@@ -14,7 +14,7 @@ eval CREATE TABLE graph_base (
INDEX
(
to_id
)
)
ENGINE
=
$oqgraph_use_table_type
;
# Since late June 2014 OQGraph supports 'assisted discovery' as per https://mariadb.atlassian.net/browse/MDEV-5871
CREATE
TABLE
graph
ENGINE
=
OQGRAPH
DATA_TABLE
=
'graph_base'
ORIGID
=
'from_id'
,
DESTID
=
'to_id'
;
# Regression for MDEV-5891
...
...
storage/oqgraph/mysql-test/oqgraph/regression_mdev5871.result
0 → 100644
View file @
59b6b99c
DROP TABLE IF EXISTS graph_base;
DROP TABLE IF EXISTS graph;
CREATE TABLE graph_base (
from_id INT UNSIGNED NOT NULL,
to_id INT UNSIGNED NOT NULL,
weight DOUBLE NOT NULL,
PRIMARY KEY (from_id,to_id),
INDEX (to_id)
) ENGINE=MyISAM;
CREATE TABLE graph ENGINE=OQGRAPH DATA_TABLE='graph_base' ORIGID='from_id' DESTID='to_id';
DESCRIBE graph;
Field Type Null Key Default Extra
latch varchar(32) YES MUL NULL
origid bigint(20) unsigned YES NULL
destid bigint(20) unsigned YES NULL
weight double YES NULL
seq bigint(20) unsigned YES NULL
linkid bigint(20) unsigned YES NULL
DROP TABLE IF EXISTS graph;
CREATE TABLE graph ENGINE=OQGRAPH DATA_TABLE='graph_base' ORIGID='from_id' DESTID='to_id' WEIGHT='weight';
DESCRIBE graph;
Field Type Null Key Default Extra
latch varchar(32) YES MUL NULL
origid bigint(20) unsigned YES NULL
destid bigint(20) unsigned YES NULL
weight double YES NULL
seq bigint(20) unsigned YES NULL
linkid bigint(20) unsigned YES NULL
DROP TABLE IF EXISTS graph;
CREATE TABLE graph ENGINE=OQGRAPH DATA_TABLE='graph_base_xxx' ORIGID='from_id' DESTID='to_id_xxx' WEIGHT='weight';
# Expect 'Table 'test.graph_base_xxx' doesn't exist'
DESCRIBE graph;
ERROR 42S02: Table 'test.graph_base_xxx' doesn't exist
DROP TABLE IF EXISTS graph;
CREATE TABLE graph ENGINE=OQGRAPH DATA_TABLE='graph_base' ORIGID='from_id' DESTID='to_id' WEIGHT='weight_xxx';
# Expect 'Invalid OQGRAPH backing store description ('graph.weight' attribute not set to a valid column of 'graph_base')'
DESCRIBE graph;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store ('graph.weight' attribute not set to a valid column of 'graph_base')' from OQGRAPH
DROP TABLE IF EXISTS graph;
CREATE TABLE graph ENGINE=OQGRAPH DATA_TABLE='graph_base' ORIGID='from_id' DESTID='to_id_xxx' WEIGHT='weight';
# Expect 'Invalid OQGRAPH backing store description ('graph.destid' attribute not set to a valid column of 'graph_base')'
DESCRIBE graph;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store ('graph.destid' attribute not set to a valid column of 'graph_base')' from OQGRAPH
DROP TABLE IF EXISTS graph;
CREATE TABLE graph ENGINE=OQGRAPH DATA_TABLE='graph_base' ORIGID='from_id_xxx' DESTID='to_id' WEIGHT='weight';
# Expect 'Invalid OQGRAPH backing store description ('graph.origid' attribute not set to a valid column of 'graph_base')'
DESCRIBE graph;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store ('graph.origid' attribute not set to a valid column of 'graph_base')' from OQGRAPH
DROP TABLE IF EXISTS graph;
CREATE TABLE graph ENGINE=OQGRAPH;
# Expect: 'Invalid OQGRAPH backing store description (unspecified or empty data_table attribute)'
DESCRIBE graph;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store description (unspecified or empty data_table attribute)' from OQGRAPH
DROP TABLE IF EXISTS graph;
CREATE TABLE graph ENGINE=OQGRAPH DATA_TABLE='graph_base';
# Expect: 'Invalid OQGRAPH backing store description (unspecified or empty origid attribute)'
DESCRIBE graph;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store description (unspecified or empty origid attribute)' from OQGRAPH
DROP TABLE IF EXISTS graph;
CREATE TABLE graph ENGINE=OQGRAPH DATA_TABLE='graph_base' ORIGID='from_id';
# Expect: 'Invalid OQGRAPH backing store description (unspecified or empty destid attribute)'
DESCRIBE graph;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store description (unspecified or empty destid attribute)' from OQGRAPH
DROP TABLE IF EXISTS graph;
CREATE TABLE graph ENGINE=OQGRAPH DATA_TABLE='graph_base' DESTID='to_id';
# Expect: 'Invalid OQGRAPH backing store description (unspecified or empty origid attribute)'
DESCRIBE graph;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store description (unspecified or empty origid attribute)' from OQGRAPH
DROP TABLE IF EXISTS graph;
CREATE TABLE graph ENGINE=OQGRAPH ORIGID='from_id';
# Expect: 'Invalid OQGRAPH backing store description (unspecified or empty data_table attribute)'
DESCRIBE graph;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store description (unspecified or empty data_table attribute)' from OQGRAPH
DROP TABLE IF EXISTS graph;
CREATE TABLE graph ENGINE=OQGRAPH DESTID='to_id';
# Expect: 'Invalid OQGRAPH backing store description (unspecified or empty data_table attribute)'
DESCRIBE graph;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store description (unspecified or empty data_table attribute)' from OQGRAPH
DROP TABLE IF EXISTS graph;
CREATE TABLE graph ENGINE=OQGRAPH ORIGID='from_id', DESTID='to_id';
# Expect: 'Invalid OQGRAPH backing store description (unspecified or empty data_table attribute)'
DESCRIBE graph;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store description (unspecified or empty data_table attribute)' from OQGRAPH
DROP TABLE IF EXISTS graph;
DROP TABLE IF EXISTS graph;
DROP TABLE IF EXISTS graph_base;
storage/oqgraph/mysql-test/oqgraph/regression_mdev5871.test
0 → 100644
View file @
59b6b99c
--
disable_warnings
DROP
TABLE
IF
EXISTS
graph_base
;
DROP
TABLE
IF
EXISTS
graph
;
--
enable_warnings
CREATE
TABLE
graph_base
(
from_id
INT
UNSIGNED
NOT
NULL
,
to_id
INT
UNSIGNED
NOT
NULL
,
weight
DOUBLE
NOT
NULL
,
PRIMARY
KEY
(
from_id
,
to_id
),
INDEX
(
to_id
)
)
ENGINE
=
MyISAM
;
# Since late June 2014 OQGraph supports 'assisted discovery' as per https://mariadb.atlassian.net/browse/MDEV-5871
CREATE
TABLE
graph
ENGINE
=
OQGRAPH
DATA_TABLE
=
'graph_base'
ORIGID
=
'from_id'
DESTID
=
'to_id'
;
DESCRIBE
graph
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
graph
;
--
enable_warnings
CREATE
TABLE
graph
ENGINE
=
OQGRAPH
DATA_TABLE
=
'graph_base'
ORIGID
=
'from_id'
DESTID
=
'to_id'
WEIGHT
=
'weight'
;
DESCRIBE
graph
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
graph
;
--
enable_warnings
CREATE
TABLE
graph
ENGINE
=
OQGRAPH
DATA_TABLE
=
'graph_base_xxx'
ORIGID
=
'from_id'
DESTID
=
'to_id_xxx'
WEIGHT
=
'weight'
;
--
echo
# Expect 'Table 'test.graph_base_xxx' doesn't exist'
--
error
1146
DESCRIBE
graph
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
graph
;
--
enable_warnings
CREATE
TABLE
graph
ENGINE
=
OQGRAPH
DATA_TABLE
=
'graph_base'
ORIGID
=
'from_id'
DESTID
=
'to_id'
WEIGHT
=
'weight_xxx'
;
--
echo
# Expect 'Invalid OQGRAPH backing store description ('graph.weight' attribute not set to a valid column of 'graph_base')'
--
error
1296
DESCRIBE
graph
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
graph
;
--
enable_warnings
CREATE
TABLE
graph
ENGINE
=
OQGRAPH
DATA_TABLE
=
'graph_base'
ORIGID
=
'from_id'
DESTID
=
'to_id_xxx'
WEIGHT
=
'weight'
;
--
echo
# Expect 'Invalid OQGRAPH backing store description ('graph.destid' attribute not set to a valid column of 'graph_base')'
--
error
1296
DESCRIBE
graph
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
graph
;
--
enable_warnings
CREATE
TABLE
graph
ENGINE
=
OQGRAPH
DATA_TABLE
=
'graph_base'
ORIGID
=
'from_id_xxx'
DESTID
=
'to_id'
WEIGHT
=
'weight'
;
--
echo
# Expect 'Invalid OQGRAPH backing store description ('graph.origid' attribute not set to a valid column of 'graph_base')'
--
error
1296
DESCRIBE
graph
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
graph
;
--
enable_warnings
# The following combinations should be invalid
CREATE
TABLE
graph
ENGINE
=
OQGRAPH
;
--
echo
# Expect: 'Invalid OQGRAPH backing store description (unspecified or empty data_table attribute)'
--
error
1296
DESCRIBE
graph
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
graph
;
--
enable_warnings
CREATE
TABLE
graph
ENGINE
=
OQGRAPH
DATA_TABLE
=
'graph_base'
;
--
echo
# Expect: 'Invalid OQGRAPH backing store description (unspecified or empty origid attribute)'
--
error
1296
DESCRIBE
graph
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
graph
;
--
enable_warnings
CREATE
TABLE
graph
ENGINE
=
OQGRAPH
DATA_TABLE
=
'graph_base'
ORIGID
=
'from_id'
;
--
echo
# Expect: 'Invalid OQGRAPH backing store description (unspecified or empty destid attribute)'
--
error
1296
DESCRIBE
graph
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
graph
;
--
enable_warnings
CREATE
TABLE
graph
ENGINE
=
OQGRAPH
DATA_TABLE
=
'graph_base'
DESTID
=
'to_id'
;
--
echo
# Expect: 'Invalid OQGRAPH backing store description (unspecified or empty origid attribute)'
--
error
1296
DESCRIBE
graph
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
graph
;
--
enable_warnings
CREATE
TABLE
graph
ENGINE
=
OQGRAPH
ORIGID
=
'from_id'
;
--
echo
# Expect: 'Invalid OQGRAPH backing store description (unspecified or empty data_table attribute)'
--
error
1296
DESCRIBE
graph
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
graph
;
--
enable_warnings
CREATE
TABLE
graph
ENGINE
=
OQGRAPH
DESTID
=
'to_id'
;
--
echo
# Expect: 'Invalid OQGRAPH backing store description (unspecified or empty data_table attribute)'
--
error
1296
DESCRIBE
graph
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
graph
;
--
enable_warnings
CREATE
TABLE
graph
ENGINE
=
OQGRAPH
ORIGID
=
'from_id'
,
DESTID
=
'to_id'
;
--
echo
# Expect: 'Invalid OQGRAPH backing store description (unspecified or empty data_table attribute)'
--
error
1296
DESCRIBE
graph
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
graph
;
--
enable_warnings
--
disable_warnings
DROP
TABLE
IF
EXISTS
graph
;
DROP
TABLE
IF
EXISTS
graph_base
;
--
enable_warnings
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