summaryrefslogtreecommitdiff
path: root/storage/oqgraph
diff options
context:
space:
mode:
authorAndrew McDonnell <bugs@andrewmcdonnell.net>2014-10-28 21:50:34 +1030
committerAndrew McDonnell <bugs@andrewmcdonnell.net>2015-02-28 22:37:05 +1030
commitf8e0f1a823a32266572bfe12363db68ab67f08ee (patch)
treec08121cf77c2d4ad21005324243b1e8f2cbfc741 /storage/oqgraph
parentfbcabb24ce145f2e413007b8f515d3b9b811cf34 (diff)
downloadmariadb-git-f8e0f1a823a32266572bfe12363db68ab67f08ee.tar.gz
Minor code cleanup: validation of options to member function.
Diffstat (limited to 'storage/oqgraph')
-rw-r--r--storage/oqgraph/ha_oqgraph.cc93
-rw-r--r--storage/oqgraph/ha_oqgraph.h4
-rw-r--r--storage/oqgraph/mysql-test/oqgraph/create_attr.result40
-rw-r--r--storage/oqgraph/mysql-test/oqgraph/create_attr.test20
-rw-r--r--storage/oqgraph/mysql-test/oqgraph/create_attr_legacy.result20
5 files changed, 107 insertions, 70 deletions
diff --git a/storage/oqgraph/ha_oqgraph.cc b/storage/oqgraph/ha_oqgraph.cc
index 1352d5d8545..833143dd57c 100644
--- a/storage/oqgraph/ha_oqgraph.cc
+++ b/storage/oqgraph/ha_oqgraph.cc
@@ -435,55 +435,90 @@ void ha_oqgraph::fprint_error(const char* fmt, ...)
}
/**
+ * 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
diff --git a/storage/oqgraph/ha_oqgraph.h b/storage/oqgraph/ha_oqgraph.h
index 110416831ab..6013df43e6b 100644
--- a/storage/oqgraph/ha_oqgraph.h
+++ b/storage/oqgraph/ha_oqgraph.h
@@ -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;
};
diff --git a/storage/oqgraph/mysql-test/oqgraph/create_attr.result b/storage/oqgraph/mysql-test/oqgraph/create_attr.result
index e9499cb7d21..c7c4b068dbe 100644
--- a/storage/oqgraph/mysql-test/oqgraph/create_attr.result
+++ b/storage/oqgraph/mysql-test/oqgraph/create_attr.result
@@ -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')'
diff --git a/storage/oqgraph/mysql-test/oqgraph/create_attr.test b/storage/oqgraph/mysql-test/oqgraph/create_attr.test
index d681d601fae..c2ca4816d09 100644
--- a/storage/oqgraph/mysql-test/oqgraph/create_attr.test
+++ b/storage/oqgraph/mysql-test/oqgraph/create_attr.test
@@ -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;
diff --git a/storage/oqgraph/mysql-test/oqgraph/create_attr_legacy.result b/storage/oqgraph/mysql-test/oqgraph/create_attr_legacy.result
index 47777b0f0a7..d3e22b4f668 100644
--- a/storage/oqgraph/mysql-test/oqgraph/create_attr_legacy.result
+++ b/storage/oqgraph/mysql-test/oqgraph/create_attr_legacy.result
@@ -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: