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
f8e0f1a8
Commit
f8e0f1a8
authored
Oct 28, 2014
by
Andrew McDonnell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor code cleanup: validation of options to member function.
parent
fbcabb24
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
107 additions
and
70 deletions
+107
-70
storage/oqgraph/ha_oqgraph.cc
storage/oqgraph/ha_oqgraph.cc
+64
-29
storage/oqgraph/ha_oqgraph.h
storage/oqgraph/ha_oqgraph.h
+3
-1
storage/oqgraph/mysql-test/oqgraph/create_attr.result
storage/oqgraph/mysql-test/oqgraph/create_attr.result
+20
-20
storage/oqgraph/mysql-test/oqgraph/create_attr.test
storage/oqgraph/mysql-test/oqgraph/create_attr.test
+10
-10
storage/oqgraph/mysql-test/oqgraph/create_attr_legacy.result
storage/oqgraph/mysql-test/oqgraph/create_attr_legacy.result
+10
-10
No files found.
storage/oqgraph/ha_oqgraph.cc
View file @
f8e0f1a8
...
...
@@ -434,56 +434,91 @@ void ha_oqgraph::fprint_error(const char* fmt, ...)
va_end
(
ap
);
}
/**
* Check that the currently referenced OQGRAPH table definition, on entry to open(), has sane OQGRAPH options.
* (This does not check the backing store, but the OQGRAPH virtual table options)
*
* @return true if OK, or false if an option is invalid.
*/
bool
ha_oqgraph
::
validate_oqgraph_table_options
()
{
// Note when called from open(), we should not expect this method to fail except in the case of bugs; the fact that it does is
// could be construed as a bug. I think in practice however, this is because CREATE TABLE calls both create() and open(),
// and it is possible to do something like ALTER TABLE x DESTID='y' to _change_ the options.
// Thus we need to sanity check from open() until and unless we get around to extending ha_oqgraph to properly handle ALTER TABLE,
// after which we could change things to call this method from create() and the ALTER TABLE handling code instead.
// It may still be sensible to call this from open() anyway, in case someone somewhere upgrades from a broken table definition...
ha_table_option_struct
*
options
=
table
->
s
->
option_struct
;
// Catch cases where table was not constructed properly
// Note - need to return -1 so our error text gets reported
if
(
!
options
)
{
// This should only happen if there is a bug elsewhere in the storage engine, because ENGINE itself is an attribute
fprint_error
(
"Invalid OQGRAPH backing store (null attributes)"
);
}
else
if
(
!
options
->
table_name
||
!*
options
->
table_name
)
{
// The first condition indicates no DATA_TABLE option, the second if the user specified DATA_TABLE=''
fprint_error
(
"Invalid OQGRAPH backing store description (unspecified or empty data_table attribute)"
);
// if table_name option is present but doesn't actually exist, we will fail later
}
else
if
(
!
options
->
origid
||
!*
options
->
origid
)
{
// The first condition indicates no ORIGID option, the second if the user specified ORIGID=''
fprint_error
(
"Invalid OQGRAPH backing store description (unspecified or empty origid attribute)"
);
// if ORIGID option is present but doesn't actually exist, we will fail later
}
else
if
(
!
options
->
destid
||
!*
options
->
destid
)
{
// The first condition indicates no DESTID option, the second if the user specified DESTID=''
fprint_error
(
"Invalid OQGRAPH backing store description (unspecified or empty destid attribute)"
);
// if DESTID option is present but doesn't actually exist, we will fail later
}
else
{
// weight is optional...
return
true
;
}
// Fault
return
false
;
}
/**
* Open the OQGRAPH engine 'table'.
*
* An OQGRAPH table is effectively similar to a view over the underlying backing table,
* attribute 'data_table', but where the result returned by a query depends on the
* value of the 'latch' column specified to the query. Therefore,
* when mysqld opens us, we need to open the corresponding backing table 'data_table'
* An OQGRAPH table is effectively similar to a view over the underlying backing table, attribute 'data_table', but where the
* result returned by a query depends on the value of the 'latch' column specified to the query.
* Therefore, when mysqld opens us, we need to open the corresponding backing table 'data_table'.
*
* Conceptually, the backing store could be any kind of object having queryable semantics, including a SQL VIEW.
* However, for that to work in practice would require us to hook into the right level of the MYSQL API.
* Presently, only objects that can be opened using the internal mechanisms can be used: INNODB, MYISAM, etc.
* The intention is to borrow from ha_connect and use the mysql client library to access the backing store.
*
*/
int
ha_oqgraph
::
open
(
const
char
*
name
,
int
mode
,
uint
test_if_locked
)
{
DBUG_ENTER
(
"ha_oqgraph::open"
);
DBUG_PRINT
(
"oq-debug"
,
(
"thd: 0x%lx; open(name=%s,mode=%d,test_if_locked=%u)"
,
(
long
)
current_thd
,
name
,
mode
,
test_if_locked
));
// So, we took a peek inside handler::ha_open() and learned a few things:
// * this->table is set by handler::ha_open() before calling open().
// Note that from this we can only assume that MariaDB knows what it is doing and wont call open() other anything else
// relying on this-0>table, re-entrantly...
// * this->table_share should never be set back to NULL, an assertion checks for this in ha_open() after open()
// * this->table_share is initialised in the constructor of handler
// * this->table_share is only otherwise changed by this->change_table_ptr())
// We also discovered that an assertion is raised if table->s is not table_share before calling open())
DBUG_ASSERT
(
!
have_table_share
);
DBUG_ASSERT
(
graph
==
NULL
);
THD
*
thd
=
current_thd
;
thd_set_ha_data
(
thd
,
ht
,
(
void
*
)
1
);
// Before doing anything, make sure we have DATA_TABLE, ORIGID and DESTID not empty
if
(
!
validate_oqgraph_table_options
())
{
DBUG_RETURN
(
-
1
);
}
ha_table_option_struct
*
options
=
table
->
s
->
option_struct
;
// Catch cases where table was not constructed properly
// Note - need to return -1 so our error text gets reported
if
(
!
options
)
{
fprint_error
(
"Invalid OQGRAPH backing store (null attributes)"
);
DBUG_RETURN
(
-
1
);
}
if
(
!
options
->
table_name
||
!*
options
->
table_name
)
{
fprint_error
(
"Invalid OQGRAPH backing store (unspecified or empty data_table attribute)"
);
// if table_name if present but doesnt actually exist, we will fail out below
// when we call open_table_def(). same probably applies for the id fields
DBUG_RETURN
(
-
1
);
}
if
(
!
options
->
origid
||
!*
options
->
origid
)
{
fprint_error
(
"Invalid OQGRAPH backing store (unspecified or empty origid attribute)"
);
DBUG_RETURN
(
-
1
);
}
if
(
!
options
->
destid
||
!*
options
->
destid
)
{
fprint_error
(
"Invalid OQGRAPH backing store (unspecified or empty destid attribute)"
);
DBUG_RETURN
(
-
1
);
}
// weight is optional
error_message
.
length
(
0
);
origid
=
destid
=
weight
=
0
;
// Here we're abusing init_tmp_table_share() which is normally only works for thread-local shares.
THD
*
thd
=
current_thd
;
init_tmp_table_share
(
thd
,
share
,
table
->
s
->
db
.
str
,
table
->
s
->
db
.
length
,
options
->
table_name
,
""
);
// because of that, we need to reinitialize the memroot (to reset MY_THREAD_SPECIFIC flag)
DBUG_ASSERT
(
share
->
mem_root
.
used
==
NULL
);
// it's still empty
...
...
storage/oqgraph/ha_oqgraph.h
View file @
f8e0f1a8
...
...
@@ -133,8 +133,10 @@ public:
}
private:
int
oqgraph_check_table_structure
(
TABLE
*
table_arg
);
// Various helper functions
int
oqgraph_check_table_structure
(
TABLE
*
table_arg
);
bool
validate_oqgraph_table_options
();
void
update_key_stats
();
String
error_message
;
};
storage/oqgraph/mysql-test/oqgraph/create_attr.result
View file @
f8e0f1a8
...
...
@@ -19,29 +19,29 @@ PRIMARY KEY (id),
KEY name (info)
) DEFAULT CHARSET=latin1;
CREATE TABLE oqtable ( 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;
# Expect: 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)'
# Expect: 'Invalid OQGRAPH backing store
description
(unspecified or empty data_table attribute)'
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty data_table attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( 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, ORIGID='id', DESTID='id2';
# Expect: 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)'
# Expect: 'Invalid OQGRAPH backing store
description
(unspecified or empty data_table attribute)'
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty data_table attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( 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='', ORIGID='id', DESTID='id2';
# Expect: 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)'
# Expect: 'Invalid OQGRAPH backing store
description
(unspecified or empty data_table attribute)'
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty data_table attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( 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='', ORIGID='id';
# Expect: 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)'
# Expect: 'Invalid OQGRAPH backing store
description
(unspecified or empty data_table attribute)'
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty data_table attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( 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='', DESTID='id2';
# Expect: 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)'
# Expect: 'Invalid OQGRAPH backing store
description
(unspecified or empty data_table attribute)'
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty data_table attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( 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='bogus', ORIGID='id', DESTID='id2';
# Expect: 'Table 'test.bogus' doesn't exist''
...
...
@@ -49,19 +49,19 @@ DESCRIBE oqtable;
ERROR 42S02: Table 'test.bogus' doesn't exist
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( 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='not_backing';
# Expect 'Invalid OQGRAPH backing store (unspecified or empty origid attribute)'
# Expect 'Invalid OQGRAPH backing store
description
(unspecified or empty origid attribute)'
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty origid attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty origid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( 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='backing', DESTID='id2';
# Expect 'Invalid OQGRAPH backing store (unspecified or empty origid attribute)'
# Expect 'Invalid OQGRAPH backing store
description
(unspecified or empty origid attribute)'
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty origid attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty origid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( 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='backing',ORIGID='', DESTID='id2';
# Expect 'Invalid OQGRAPH backing store (unspecified or empty origid attribute)'
# Expect 'Invalid OQGRAPH backing store
description
(unspecified or empty origid attribute)'
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty origid attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty origid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( 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='backing',ORIGID='bogus', DESTID='id2';
# Expect Invalid OQGRAPH backing store ('/oqtable'.origid attribute not set to a valid column of 'backing')'
...
...
@@ -74,14 +74,14 @@ DESCRIBE oqtable;
ERROR HY000: Got error -1 'Column 'backing.not_id_type' (origid) is not a not-null integer type' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( 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='backing',ORIGID='id';
# Expect 'Invalid OQGRAPH backing store (unspecified or empty destid attribute)'
# Expect 'Invalid OQGRAPH backing store
description
(unspecified or empty destid attribute)'
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty destid attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty destid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( 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='backing',ORIGID='id',DESTID='';
# Expect 'Invalid OQGRAPH backing store (unspecified or empty destid attribute)'
# Expect 'Invalid OQGRAPH backing store
description
(unspecified or empty destid attribute)'
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty destid attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty destid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( 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='backing',ORIGID='id',DESTID='bogus';
# Expect Invalid OQGRAPH backing store ('/oqtable'.destid attribute not set to a valid column of 'backing')'
...
...
storage/oqgraph/mysql-test/oqgraph/create_attr.test
View file @
f8e0f1a8
...
...
@@ -27,7 +27,7 @@ CREATE TABLE backing (
# oqgraph v2 create table should fail (missing attributes)
CREATE
TABLE
oqtable
(
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
;
--
echo
# Expect: 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)'
--
echo
# Expect: 'Invalid OQGRAPH backing store
description
(unspecified or empty data_table attribute)'
--
error
1296
DESCRIBE
oqtable
;
...
...
@@ -37,7 +37,7 @@ DESCRIBE oqtable;
DROP
TABLE
IF
EXISTS
oqtable
;
--
enable_warnings
CREATE
TABLE
oqtable
(
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
,
ORIGID
=
'id'
,
DESTID
=
'id2'
;
--
echo
# Expect: 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)'
--
echo
# Expect: 'Invalid OQGRAPH backing store
description
(unspecified or empty data_table attribute)'
--
error
1296
DESCRIBE
oqtable
;
...
...
@@ -46,7 +46,7 @@ DESCRIBE oqtable;
DROP
TABLE
IF
EXISTS
oqtable
;
--
enable_warnings
CREATE
TABLE
oqtable
(
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
=
''
,
ORIGID
=
'id'
,
DESTID
=
'id2'
;
--
echo
# Expect: 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)'
--
echo
# Expect: 'Invalid OQGRAPH backing store
description
(unspecified or empty data_table attribute)'
--
error
1296
DESCRIBE
oqtable
;
...
...
@@ -55,7 +55,7 @@ DESCRIBE oqtable;
DROP
TABLE
IF
EXISTS
oqtable
;
--
enable_warnings
CREATE
TABLE
oqtable
(
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
=
''
,
ORIGID
=
'id'
;
--
echo
# Expect: 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)'
--
echo
# Expect: 'Invalid OQGRAPH backing store
description
(unspecified or empty data_table attribute)'
--
error
1296
DESCRIBE
oqtable
;
...
...
@@ -65,7 +65,7 @@ DESCRIBE oqtable;
DROP
TABLE
IF
EXISTS
oqtable
;
--
enable_warnings
CREATE
TABLE
oqtable
(
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
=
''
,
DESTID
=
'id2'
;
--
echo
# Expect: 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)'
--
echo
# Expect: 'Invalid OQGRAPH backing store
description
(unspecified or empty data_table attribute)'
--
error
1296
DESCRIBE
oqtable
;
...
...
@@ -85,7 +85,7 @@ DESCRIBE oqtable;
DROP
TABLE
IF
EXISTS
oqtable
;
--
enable_warnings
CREATE
TABLE
oqtable
(
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
=
'not_backing'
;
--
echo
# Expect 'Invalid OQGRAPH backing store (unspecified or empty origid attribute)'
--
echo
# Expect 'Invalid OQGRAPH backing store
description
(unspecified or empty origid attribute)'
--
error
1296
DESCRIBE
oqtable
;
...
...
@@ -94,7 +94,7 @@ DESCRIBE oqtable;
DROP
TABLE
IF
EXISTS
oqtable
;
--
enable_warnings
CREATE
TABLE
oqtable
(
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
=
'backing'
,
DESTID
=
'id2'
;
--
echo
# Expect 'Invalid OQGRAPH backing store (unspecified or empty origid attribute)'
--
echo
# Expect 'Invalid OQGRAPH backing store
description
(unspecified or empty origid attribute)'
--
error
1296
DESCRIBE
oqtable
;
...
...
@@ -103,7 +103,7 @@ DESCRIBE oqtable;
DROP
TABLE
IF
EXISTS
oqtable
;
--
enable_warnings
CREATE
TABLE
oqtable
(
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
=
'backing'
,
ORIGID
=
''
,
DESTID
=
'id2'
;
--
echo
# Expect 'Invalid OQGRAPH backing store (unspecified or empty origid attribute)'
--
echo
# Expect 'Invalid OQGRAPH backing store
description
(unspecified or empty origid attribute)'
--
error
1296
DESCRIBE
oqtable
;
...
...
@@ -130,7 +130,7 @@ DESCRIBE oqtable;
DROP
TABLE
IF
EXISTS
oqtable
;
--
enable_warnings
CREATE
TABLE
oqtable
(
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
=
'backing'
,
ORIGID
=
'id'
;
--
echo
# Expect 'Invalid OQGRAPH backing store (unspecified or empty destid attribute)'
--
echo
# Expect 'Invalid OQGRAPH backing store
description
(unspecified or empty destid attribute)'
--
error
1296
DESCRIBE
oqtable
;
...
...
@@ -139,7 +139,7 @@ DESCRIBE oqtable;
DROP
TABLE
IF
EXISTS
oqtable
;
--
enable_warnings
CREATE
TABLE
oqtable
(
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
=
'backing'
,
ORIGID
=
'id'
,
DESTID
=
''
;
--
echo
# Expect 'Invalid OQGRAPH backing store (unspecified or empty destid attribute)'
--
echo
# Expect 'Invalid OQGRAPH backing store
description
(unspecified or empty destid attribute)'
--
error
1296
DESCRIBE
oqtable
;
...
...
storage/oqgraph/mysql-test/oqgraph/create_attr_legacy.result
View file @
f8e0f1a8
...
...
@@ -23,61 +23,61 @@ CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty data_table attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED 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='';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty data_table attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED 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='bogus';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty origid attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty origid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED 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='Ω Ohms Tennis Ball 〄';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty origid attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty origid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED 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='not_backing', ORIGID='id';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty destid attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty destid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED 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='backing',ORIGID='';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty origid attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty origid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED 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='backing',ORIGID='bogus';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty destid attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty destid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED 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='backing',ORIGID='not_id_type';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty destid attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty destid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED 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='backing',ORIGID='id';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty destid attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty destid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED 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='backing',ORIGID='id',DESTID='';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty destid attribute)' from OQGRAPH
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store
description
(unspecified or empty destid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED 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='backing',ORIGID='id',DESTID='bogus';
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