diff options
author | brian@zim.(none) <> | 2006-09-30 18:31:13 -0700 |
---|---|---|
committer | brian@zim.(none) <> | 2006-09-30 18:31:13 -0700 |
commit | 56505c01f911d788edc13f099ac99193b92a26c6 (patch) | |
tree | 15d38e4ee1d3d583b3ac0f1d863fed3c925d3d95 | |
parent | 46ae2113ba8a0d240469ba304b51ebebdd34942c (diff) | |
download | mariadb-git-56505c01f911d788edc13f099ac99193b92a26c6.tar.gz |
This patch updates to remove most global hton needs. Cleans up wrong message in partition.
-rw-r--r-- | mysql-test/r/partition.result | 6 | ||||
-rw-r--r-- | sql/ha_ndbcluster.cc | 2 | ||||
-rw-r--r-- | sql/ha_partition.cc | 2 | ||||
-rw-r--r-- | sql/handler.cc | 8 | ||||
-rw-r--r-- | sql/mysql_priv.h | 4 | ||||
-rw-r--r-- | sql/mysqld.cc | 3 | ||||
-rw-r--r-- | sql/partition_info.cc | 3 | ||||
-rw-r--r-- | sql/share/errmsg.txt | 6 | ||||
-rw-r--r-- | sql/sql_cache.cc | 4 |
9 files changed, 15 insertions, 23 deletions
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index d8d433ef216..6c37f0834e9 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -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'; diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 0d57f3decec..fffa87daf64 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -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, diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index d2b05df5ffc..0da0094d92e 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -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; diff --git a/sql/handler.cc b/sql/handler.cc index bbb2cab5af2..ccf1a1ef8d9 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -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; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 9cd8e36c996..0a858246420 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -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; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index d820e2f4192..ba7db6aaf82 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -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; diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 3210eb0675e..b3c7c1b80e7 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -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); diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index ccbdd3586a2..1d0e9e9ab79 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -5960,9 +5960,9 @@ ER_EVENT_SET_VAR_ERROR eng "Error during starting/stopping of the scheduler. Error code %u" ger "Fehler während 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 användas i en partitionerad tabell" + eng "Engine cannot be used in partitioned tables" + ger "Engine kann in partitionierten Tabellen nicht verwendet werden" + swe "Engine inte användas i en partitionerad tabell" ER_CANT_ACTIVATE_LOG eng "Cannot activate '%-.64s' log" ger "Kann Logdatei '%-.64s' nicht aktivieren" diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index e0831b0f8ee..ee3b8aa79fe 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -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(); |