diff options
Diffstat (limited to 'storage/oqgraph')
6 files changed, 15 insertions, 12 deletions
diff --git a/storage/oqgraph/ha_oqgraph.cc b/storage/oqgraph/ha_oqgraph.cc index e0e81f7cddc..79cec499a77 100644 --- a/storage/oqgraph/ha_oqgraph.cc +++ b/storage/oqgraph/ha_oqgraph.cc @@ -179,7 +179,6 @@ static int oqgraph_init(void *p) handlerton *hton= (handlerton *)p; DBUG_PRINT( "oq-debug", ("oqgraph_init")); - hton->state= SHOW_OPTION_YES; hton->db_type= DB_TYPE_AUTOASSIGN; hton->create= oqgraph_create_handler; hton->flags= HTON_ALTER_NOT_SUPPORTED; @@ -193,6 +192,7 @@ static int oqgraph_init(void *p) hton->discover_table_structure= oqgraph_discover_table_structure; hton->close_connection = oqgraph_close_connection; + hton->drop_table= [](handlerton *, const char*) { return 0; }; oqgraph_init_done= TRUE; return 0; @@ -563,11 +563,11 @@ int ha_oqgraph::open(const char *name, int mode, uint test_if_locked) 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 - init_sql_alloc(&share->mem_root, "share", TABLE_ALLOC_BLOCK_SIZE, 0, MYF(0)); + init_sql_alloc(PSI_INSTRUMENT_ME, &share->mem_root, TABLE_ALLOC_BLOCK_SIZE, 0, MYF(0)); // What I think this code is doing: // * Our OQGRAPH table is `database_blah/name` - // * We point p --> /name (or if table happened to be simply `name`, to `name`, dont know if this is possible) + // * We point p --> /name (or if table happened to be simply `name`, to `name`, don't know if this is possible) // * plen seems to be then set to length of `database_blah/options_data_table_name` // * then we set share->normalized_path.str and share->path.str to `database_blah/options_data_table_name` // * I assume that this verbiage is needed so the memory used by share->path.str is set in the share mem root @@ -1186,8 +1186,10 @@ int ha_oqgraph::rename_table(const char *, const char *) } -ha_rows ha_oqgraph::records_in_range(uint inx, key_range *min_key, - key_range *max_key) +ha_rows ha_oqgraph::records_in_range(uint inx, + const key_range *min_key, + const key_range *max_key, + page_range *pages) { if (graph->get_thd() != current_thd) { DBUG_PRINT( "oq-debug", ("g->table->in_use: 0x%lx <-- current_thd 0x%lx", (long) graph->get_thd(), (long) current_thd)); diff --git a/storage/oqgraph/ha_oqgraph.h b/storage/oqgraph/ha_oqgraph.h index 0c0af6def97..c8e175df616 100644 --- a/storage/oqgraph/ha_oqgraph.h +++ b/storage/oqgraph/ha_oqgraph.h @@ -99,7 +99,8 @@ public: int extra(enum ha_extra_function operation); int external_lock(THD *thd, int lock_type); int delete_all_rows(void); - ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key); + ha_rows records_in_range(uint inx, const key_range *min_key, + const key_range *max_key, page_range *pages); int delete_table(const char *from); int rename_table(const char * from, const char * to); int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info); diff --git a/storage/oqgraph/mysql-test/oqgraph/boundary_conditions.result b/storage/oqgraph/mysql-test/oqgraph/boundary_conditions.result index 7cb65bc07ea..de8362c16c4 100644 --- a/storage/oqgraph/mysql-test/oqgraph/boundary_conditions.result +++ b/storage/oqgraph/mysql-test/oqgraph/boundary_conditions.result @@ -142,7 +142,7 @@ SELECT * FROM graph WHERE latch='-1' and origid is NULL; latch origid destid weight seq linkid Warnings: Warning 1210 Incorrect arguments to OQGRAPH latch -# Make sure we dont crash if someone passed in a UTF string +# Make sure we don't crash if someone passed in a UTF string SELECT * FROM graph WHERE latch='Ω Ohms Tennis Ball 〄'; latch origid destid weight seq linkid SELECT * FROM graph WHERE latch='Ω Ohms Tennis Ball 〄' and destid=2 and origid=1; diff --git a/storage/oqgraph/mysql-test/oqgraph/boundary_conditions.test b/storage/oqgraph/mysql-test/oqgraph/boundary_conditions.test index a6dae0e2678..9eea290c6b9 100644 --- a/storage/oqgraph/mysql-test/oqgraph/boundary_conditions.test +++ b/storage/oqgraph/mysql-test/oqgraph/boundary_conditions.test @@ -91,7 +91,7 @@ SELECT * FROM graph WHERE latch='-1' and destid=1; SELECT * FROM graph WHERE latch='-1' and origid=666; SELECT * FROM graph WHERE latch='-1' and origid is NULL; ---echo # Make sure we dont crash if someone passed in a UTF string +--echo # Make sure we don't crash if someone passed in a UTF string #-- Note the next line couter-intuitively produces no warning SELECT * FROM graph WHERE latch='Ω Ohms Tennis Ball 〄'; SELECT * FROM graph WHERE latch='Ω Ohms Tennis Ball 〄' and destid=2 and origid=1; @@ -125,7 +125,7 @@ FLUSH TABLES; TRUNCATE TABLE graph_base; #-- Uncomment the following after fixing https://bugs.launchpad.net/oqgraph/+bug/xxxxxxx - Causes the later select to not fail! -#-- For now dont report a separate bug as it may be a manifestation of https://bugs.launchpad.net/oqgraph/+bug/1195735 +#-- For now don't report a separate bug as it may be a manifestation of https://bugs.launchpad.net/oqgraph/+bug/1195735 SELECT * FROM graph; #-- Expect error if we pull the table out from under diff --git a/storage/oqgraph/mysql-test/oqgraph/create_attr_legacy.test b/storage/oqgraph/mysql-test/oqgraph/create_attr_legacy.test index ba1d9791367..7fe58d3e307 100644 --- a/storage/oqgraph/mysql-test/oqgraph/create_attr_legacy.test +++ b/storage/oqgraph/mysql-test/oqgraph/create_attr_legacy.test @@ -26,7 +26,7 @@ CREATE TABLE backing ( # Here we enable scaffolding to let us create a deprecated table # so we can check that the new code will still allow queries to be performed # on a legacy database -# It should still generate a warning (1287) - but I dont know how to test for that +# It should still generate a warning (1287) - but I don't know how to test for that # # latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future # release. Please use 'latch VARCHAR(32) NULL' instead diff --git a/storage/oqgraph/mysql-test/oqgraph/legacy_upgrade.test b/storage/oqgraph/mysql-test/oqgraph/legacy_upgrade.test index f7fc79340ce..ae548b5e440 100644 --- a/storage/oqgraph/mysql-test/oqgraph/legacy_upgrade.test +++ b/storage/oqgraph/mysql-test/oqgraph/legacy_upgrade.test @@ -13,7 +13,7 @@ CREATE TABLE graph_base ( # Backwards compatibility test # First we ensure the scaffolding is disabled (default situation) # and check we cant create a table with an integer latch -# Assume this is the default, so dont explicity set false yet: +# Assume this is the default, so don't explicity set false yet: # SET GLOBAL oqgraph_allow_create_integer_latch=false; --echo The next error 140 + 1005 is expected --error 140 @@ -32,7 +32,7 @@ CREATE TABLE graph ( # Here we enable scaffolding to let us create a deprecated table # so we can check that the new code will still allow queries to be performed # on a legacy database -# It should still generate a warning (1287) - but I dont know how to test for that +# It should still generate a warning (1287) - but I don't know how to test for that # # latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future # release. Please use 'latch VARCHAR(32) NULL' instead |