Commit 56505c01 authored by brian@zim.(none)'s avatar brian@zim.(none)

This patch updates to remove most global hton needs. Cleans up wrong message in partition.

parent 46ae2113
......@@ -68,7 +68,7 @@ create table t1 (a int)
engine = csv
partition by list (a)
(partition p0 values in (null));
ERROR HY000: CSV handler cannot be used in partitioned tables
ERROR HY000: Engine cannot be used in partitioned tables
create table t1 (a bigint)
partition by range (a)
(partition p0 values less than (0xFFFFFFFFFFFFFFFF),
......@@ -102,7 +102,7 @@ create table t1 (a int)
engine = csv
partition by list (a)
(partition p0 values in (null));
ERROR HY000: CSV handler cannot be used in partitioned tables
ERROR HY000: Engine cannot be used in partitioned tables
create table t1 (a int)
partition by key(a)
(partition p0 engine = MEMORY);
......@@ -1054,7 +1054,7 @@ drop table t1;
create table t1 (a int)
partition by key (a)
(partition p0 engine = MERGE);
ERROR HY000: MyISAM Merge handler cannot be used in partitioned tables
ERROR HY000: Engine cannot be used in partitioned tables
create table t1 (a varchar(1))
partition by key (a)
as select 'a';
......
......@@ -87,7 +87,7 @@ static int ndbcluster_fill_files_table(handlerton *hton,
TABLE_LIST *tables,
COND *cond);
handlerton *ndbcluster_hton;
static handlerton *ndbcluster_hton;
static handler *ndbcluster_create_handler(handlerton *hton,
TABLE_SHARE *table,
......
......@@ -75,11 +75,11 @@ static handler *partition_create_handler(handlerton *hton,
static uint partition_flags();
static uint alter_table_flags(uint flags);
handlerton *partition_hton;
static int partition_initialize(void *p)
{
handlerton *partition_hton;
partition_hton= (handlerton *)p;
partition_hton->state= SHOW_OPTION_YES;
......
......@@ -467,13 +467,11 @@ int ha_initialize_handlerton(st_plugin_int *plugin)
}
/*
This is entirely for legacy. We will create a new "disk based" hton and a "memory" hton
which will be configurable longterm.
This is entirely for legacy. We will create a new "disk based" hton and a
"memory" hton which will be configurable longterm. We should be able to
remove partition and myisammrg.
*/
switch (hton->db_type) {
case DB_TYPE_MRG_ISAM:
myisammrg_hton= hton;
break;
case DB_TYPE_HEAP:
heap_hton= hton;
break;
......
......@@ -1638,11 +1638,7 @@ extern SHOW_COMP_OPTION have_ndbcluster;
extern SHOW_COMP_OPTION have_partition_db;
extern SHOW_COMP_OPTION have_merge_db;
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
extern handlerton *ndbcluster_hton;
#endif
extern handlerton *partition_hton;
extern handlerton *myisammrg_hton;
extern handlerton *myisam_hton;
extern handlerton *heap_hton;
......
......@@ -358,10 +358,9 @@ my_bool opt_innodb;
/*
Legacy global handlerton. These will be removed (please do not add more).
*/
handlerton *ndbclusert_hton;
handlerton *myisammrg_hton;
handlerton *heap_hton;
handlerton *myisam_hton;
handlerton *partition_hton;
#ifdef WITH_INNOBASE_STORAGE_ENGINE
extern ulong innobase_fast_shutdown;
......
......@@ -445,8 +445,7 @@ bool partition_info::check_engine_mix(handlerton **engine_array, uint no_parts)
} while (++i < no_parts);
if (engine_array[0]->flags & HTON_NO_PARTITION)
{
my_error(ER_PARTITION_MERGE_ERROR, MYF(0),
engine_array[0] == myisammrg_hton ? "MyISAM Merge" : "CSV");
my_error(ER_PARTITION_MERGE_ERROR, MYF(0));
DBUG_RETURN(TRUE);
}
DBUG_RETURN(FALSE);
......
......@@ -5960,9 +5960,9 @@ ER_EVENT_SET_VAR_ERROR
eng "Error during starting/stopping of the scheduler. Error code %u"
ger "Fehler whrend des Startens oder Anhalten des Schedulers. Fehlercode %u"
ER_PARTITION_MERGE_ERROR
eng "%s handler cannot be used in partitioned tables"
ger "%s-Handler kann in partitionierten Tabellen nicht verwendet werden"
swe "%s kan inte anvndas i en partitionerad tabell"
eng "Engine cannot be used in partitioned tables"
ger "Engine kann in partitionierten Tabellen nicht verwendet werden"
swe "Engine inte anvndas i en partitionerad tabell"
ER_CANT_ACTIVATE_LOG
eng "Cannot activate '%-.64s' log"
ger "Kann Logdatei '%-.64s' nicht aktivieren"
......
......@@ -2389,7 +2389,7 @@ Query_cache::register_tables_from_list(TABLE_LIST *tables_used,
tables_used->engine_data))
DBUG_RETURN(0);
if (tables_used->table->s->db_type == myisammrg_hton)
if (tables_used->table->s->db_type->db_type == DB_TYPE_MRG_MYISAM)
{
ha_myisammrg *handler = (ha_myisammrg *) tables_used->table->file;
MYRG_INFO *file = handler->myrg_info();
......@@ -3013,7 +3013,7 @@ static TABLE_COUNTER_TYPE process_and_count_tables(TABLE_LIST *tables_used,
"other non-cacheable table(s)"));
DBUG_RETURN(0);
}
if (tables_used->table->s->db_type == myisammrg_hton)
if (tables_used->table->s->db_type->db_type == DB_TYPE_MRG_MYISAM)
{
ha_myisammrg *handler = (ha_myisammrg *)tables_used->table->file;
MYRG_INFO *file = handler->myrg_info();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment