From f68d72fae810d2d1fca88e9b0cc97e9374365b71 Mon Sep 17 00:00:00 2001 From: Andrew McDonnell Date: Sun, 22 Jun 2014 19:59:22 +0930 Subject: [PATCH 1/6] Minor cleanup of ha_table_option_struct (thanks Sergei) --- storage/oqgraph/ha_oqgraph.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/storage/oqgraph/ha_oqgraph.cc b/storage/oqgraph/ha_oqgraph.cc index 085fd3d73a045..947bbfb239441 100644 --- a/storage/oqgraph/ha_oqgraph.cc +++ b/storage/oqgraph/ha_oqgraph.cc @@ -124,7 +124,8 @@ const char *oqlatchToCode(int latch) { return "unknown"; } -struct oqgraph_table_option_struct + +struct ha_table_option_struct { const char *table_name; @@ -133,7 +134,6 @@ struct oqgraph_table_option_struct const char *weight; // name of the weight column (optional) }; -#define ha_table_option_struct oqgraph_table_option_struct static const ha_create_table_option oqgraph_table_option_list[]= { HA_TOPTION_STRING("data_table", table_name), @@ -509,8 +509,7 @@ int ha_oqgraph::open(const char *name, int mode, uint test_if_locked) DBUG_ASSERT(graph == NULL); THD* thd = current_thd; - oqgraph_table_option_struct *options= - reinterpret_cast(table->s->option_struct); + 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 @@ -1271,8 +1270,7 @@ ha_rows ha_oqgraph::records_in_range(uint inx, key_range *min_key, int ha_oqgraph::create(const char *name, TABLE *table_arg, HA_CREATE_INFO *create_info) { - oqgraph_table_option_struct *options= - reinterpret_cast(table_arg->s->option_struct); + ha_table_option_struct *options= table_arg->s->option_struct; DBUG_ENTER("ha_oqgraph::create"); DBUG_PRINT( "oq-debug", ("create(name=%s)", name)); From c50e1767fe979a081aaf9ec2f329921d5a3fcf0a Mon Sep 17 00:00:00 2001 From: Andrew McDonnell Date: Sun, 22 Jun 2014 19:59:42 +0930 Subject: [PATCH 2/6] Update 2014 (C) message --- storage/oqgraph/ha_oqgraph.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/oqgraph/ha_oqgraph.cc b/storage/oqgraph/ha_oqgraph.cc index 947bbfb239441..cda9353d41b87 100644 --- a/storage/oqgraph/ha_oqgraph.cc +++ b/storage/oqgraph/ha_oqgraph.cc @@ -1,4 +1,5 @@ -/* Copyright (C) 2007-2013 Arjen G Lentz & Antony T Curtis for Open Query +/* Copyright (C) 2007-2014 Arjen G Lentz & Antony T Curtis for Open Query + Copyright (C) 2013-2014 Andrew McDonnell Portions of this file copyright (C) 2000-2006 MySQL AB This program is free software; you can redistribute it and/or modify From 95ad8c985c58ee15067687cdb70f10a81e472095 Mon Sep 17 00:00:00 2001 From: Andrew McDonnell Date: Sun, 22 Jun 2014 20:00:01 +0930 Subject: [PATCH 3/6] Implement MDEV-5871 assisted table discovery (thanks Sergei) --- storage/oqgraph/ha_oqgraph.cc | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/storage/oqgraph/ha_oqgraph.cc b/storage/oqgraph/ha_oqgraph.cc index cda9353d41b87..11220ab5f9dc3 100644 --- a/storage/oqgraph/ha_oqgraph.cc +++ b/storage/oqgraph/ha_oqgraph.cc @@ -194,6 +194,41 @@ static handler* oqgraph_create_handler(handlerton *hton, TABLE_SHARE *table, return new (mem_root) ha_oqgraph(hton, table); } +#define OQGRAPH_CREATE_TABLE \ +" CREATE TABLE oq_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 "\ +" ) " + +#define append_opt(NAME,VAL) \ + if (share->option_struct->VAL) \ + { \ + sql.append(STRING_WITH_LEN(" " NAME "='")); \ + sql.append_for_single_quote(share->option_struct->VAL); \ + sql.append('\''); \ + } + +int oqgraph_discover_table_structure(handlerton *hton, THD* thd, + TABLE_SHARE *share, HA_CREATE_INFO *info) +{ + StringBuffer<1024> sql(system_charset_info); + sql.copy(STRING_WITH_LEN(OQGRAPH_CREATE_TABLE), system_charset_info); + + append_opt("data_table", table_name); + append_opt("origid", origid); + append_opt("destid", destid); + append_opt("weight", weight); + + return + share->init_from_sql_statement_string(thd, true, sql.ptr(), sql.length()); +} + #if MYSQL_VERSION_ID >= 50100 static int oqgraph_init(handlerton *hton) { @@ -218,6 +253,8 @@ static bool oqgraph_init() // HTON_NO_FLAGS; hton->table_options= (ha_create_table_option*)oqgraph_table_option_list; + + hton->discover_table_structure= oqgraph_discover_table_structure; oqgraph_init_done= TRUE; return 0; } From 03c3332ff3009ae6fb70dc474b1edffad8cac326 Mon Sep 17 00:00:00 2001 From: Andrew McDonnell Date: Sun, 22 Jun 2014 20:01:37 +0930 Subject: [PATCH 4/6] Update MTR tests for MDEV-5871 --- .../oqgraph/mysql-test/oqgraph/general-Aria.result | 11 +---------- .../mysql-test/oqgraph/general-MyISAM.result | 11 +---------- .../mysql-test/oqgraph/general-innodb.result | 11 +---------- storage/oqgraph/mysql-test/oqgraph/general.inc | 13 ++----------- 4 files changed, 5 insertions(+), 41 deletions(-) diff --git a/storage/oqgraph/mysql-test/oqgraph/general-Aria.result b/storage/oqgraph/mysql-test/oqgraph/general-Aria.result index f0c5b51a266a1..a35b5182611e3 100644 --- a/storage/oqgraph/mysql-test/oqgraph/general-Aria.result +++ b/storage/oqgraph/mysql-test/oqgraph/general-Aria.result @@ -8,16 +8,7 @@ to_id INT UNSIGNED NOT NULL, PRIMARY KEY (from_id,to_id), INDEX (to_id) ) ENGINE= Aria ; -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'; +CREATE TABLE graph 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); diff --git a/storage/oqgraph/mysql-test/oqgraph/general-MyISAM.result b/storage/oqgraph/mysql-test/oqgraph/general-MyISAM.result index c08e0c295d235..f12e160a2b704 100644 --- a/storage/oqgraph/mysql-test/oqgraph/general-MyISAM.result +++ b/storage/oqgraph/mysql-test/oqgraph/general-MyISAM.result @@ -8,16 +8,7 @@ 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'; +CREATE TABLE graph 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); diff --git a/storage/oqgraph/mysql-test/oqgraph/general-innodb.result b/storage/oqgraph/mysql-test/oqgraph/general-innodb.result index cf9c83144b865..b390dd38e34e1 100644 --- a/storage/oqgraph/mysql-test/oqgraph/general-innodb.result +++ b/storage/oqgraph/mysql-test/oqgraph/general-innodb.result @@ -8,16 +8,7 @@ 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'; +CREATE TABLE graph 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); diff --git a/storage/oqgraph/mysql-test/oqgraph/general.inc b/storage/oqgraph/mysql-test/oqgraph/general.inc index 7c49c72b4dede..a4afcd4efbd02 100644 --- a/storage/oqgraph/mysql-test/oqgraph/general.inc +++ b/storage/oqgraph/mysql-test/oqgraph/general.inc @@ -14,17 +14,8 @@ eval CREATE TABLE graph_base ( INDEX (to_id) ) ENGINE= $oqgraph_use_table_type ; - -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'; +# Since late June 2014 OQGraph supoprts '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 select * from graph; From b793dde27a44b51c662b322e28196474d78efdc1 Mon Sep 17 00:00:00 2001 From: Andrew McDonnell Date: Sun, 22 Jun 2014 20:02:06 +0930 Subject: [PATCH 5/6] Implement specific tests for MDEV-5871 edge cases --- .../mysql-test/oqgraph/create_attr.test | 1 - .../oqgraph/regression_mdev5871.result | 86 +++++++++++++ .../oqgraph/regression_mdev5871.test | 121 ++++++++++++++++++ 3 files changed, 207 insertions(+), 1 deletion(-) create mode 100644 storage/oqgraph/mysql-test/oqgraph/regression_mdev5871.result create mode 100644 storage/oqgraph/mysql-test/oqgraph/regression_mdev5871.test diff --git a/storage/oqgraph/mysql-test/oqgraph/create_attr.test b/storage/oqgraph/mysql-test/oqgraph/create_attr.test index d681d601faeff..6cf8bd16ca661 100644 --- a/storage/oqgraph/mysql-test/oqgraph/create_attr.test +++ b/storage/oqgraph/mysql-test/oqgraph/create_attr.test @@ -24,7 +24,6 @@ CREATE TABLE backing ( KEY name (info) ) DEFAULT CHARSET=latin1; - # 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)' diff --git a/storage/oqgraph/mysql-test/oqgraph/regression_mdev5871.result b/storage/oqgraph/mysql-test/oqgraph/regression_mdev5871.result new file mode 100644 index 0000000000000..7f64e0143ca57 --- /dev/null +++ b/storage/oqgraph/mysql-test/oqgraph/regression_mdev5871.result @@ -0,0 +1,86 @@ +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 ('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 ('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 ('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 (unspecified or empty data_table attribute)' +DESCRIBE graph; +ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (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 (unspecified or empty origid attribute)' +DESCRIBE graph; +ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (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 (unspecified or empty destid attribute)' +DESCRIBE graph; +ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (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 (unspecified or empty origid attribute)' +DESCRIBE graph; +ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (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 (unspecified or empty data_table attribute)' +DESCRIBE graph; +ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (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 (unspecified or empty data_table attribute)' +DESCRIBE graph; +ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (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 (unspecified or empty data_table attribute)' +DESCRIBE graph; +ERROR HY000: Got error -1 'Invalid OQGRAPH backing store (unspecified or empty data_table attribute)' from OQGRAPH +DROP TABLE IF EXISTS graph; +DROP TABLE IF EXISTS graph; +DROP TABLE IF EXISTS graph_base; diff --git a/storage/oqgraph/mysql-test/oqgraph/regression_mdev5871.test b/storage/oqgraph/mysql-test/oqgraph/regression_mdev5871.test new file mode 100644 index 0000000000000..b04bd6be1f643 --- /dev/null +++ b/storage/oqgraph/mysql-test/oqgraph/regression_mdev5871.test @@ -0,0 +1,121 @@ +--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 supoprts '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 ('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 ('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 ('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 (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 (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 (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 (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 (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 (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 (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 + From 57ba775e66063258b458037354fe68e835eea9d1 Mon Sep 17 00:00:00 2001 From: Andrew McDonnell Date: Sun, 22 Jun 2014 20:12:20 +0930 Subject: [PATCH 6/6] Update 2014 (C) message --- storage/oqgraph/ha_oqgraph.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/storage/oqgraph/ha_oqgraph.cc b/storage/oqgraph/ha_oqgraph.cc index 11220ab5f9dc3..8cbaa519907a9 100644 --- a/storage/oqgraph/ha_oqgraph.cc +++ b/storage/oqgraph/ha_oqgraph.cc @@ -1,5 +1,6 @@ /* Copyright (C) 2007-2014 Arjen G Lentz & Antony T Curtis for Open Query Copyright (C) 2013-2014 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