Below is the list of changes that have just been committed into a local
5.0 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1984 05/09/20 14:46:49 jonas@stripped +2 -0
BUG:
storage engine aliases didnt get initialized if running e.g. --skip-innodb
making "create table () engine=innobase" fail
sql/handler.h
1.153 05/09/20 14:46:47 jonas@stripped +1 -1
Put DB type in alias struct instead of pointer to real table struct
sql/handler.cc
1.190 05/09/20 14:46:47 jonas@stripped +8 -36
Put DB type in alias struct instead of pointer to real table struct
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/mysql-5.0-push
--- 1.189/sql/handler.cc 2005-09-20 07:08:16 +02:00
+++ 1.190/sql/handler.cc 2005-09-20 14:46:47 +02:00
@@ -119,12 +119,12 @@
struct show_table_alias_st sys_table_aliases[]=
{
- {"INNOBASE", "InnoDB", NULL },
- {"NDB", "NDBCLUSTER", NULL},
- {"BDB", "BERKELEYDB", NULL},
- {"HEAP", "MEMORY", NULL},
- {"MERGE", "MRG_MYISAM", NULL},
- {NullS, NullS, NULL}
+ {"INNOBASE", "InnoDB", DB_TYPE_INNODB },
+ {"NDB", "NDBCLUSTER", DB_TYPE_NDBCLUSTER },
+ {"BDB", "BERKELEYDB", DB_TYPE_BERKELEY_DB },
+ {"HEAP", "MEMORY", DB_TYPE_HEAP },
+ {"MERGE", "MRG_MYISAM", DB_TYPE_MRG_MYISAM },
+ {NullS, NullS, DB_TYPE_UNKNOWN }
};
const char *ha_row_type[] = {
@@ -161,8 +161,8 @@
*/
for (table_alias= sys_table_aliases; table_alias->type; table_alias++)
{
- if (!my_strcasecmp(&my_charset_latin1, name, table_alias->alias) &&
table_alias->st)
- return (enum db_type) table_alias->st->db_type;
+ if (!my_strcasecmp(&my_charset_latin1, name, table_alias->alias))
+ return (enum db_type) table_alias->db_type;
}
return DB_TYPE_UNKNOWN;
}
@@ -392,7 +392,6 @@
int error= 0;
handlerton **ht= handlertons;
show_table_type_st *types;
- show_table_alias_st *table_alias;
total_ha= savepoint_alloc_size= 0;
if (ha_init_errors())
@@ -403,24 +402,12 @@
switch (types->db_type) {
case DB_TYPE_HEAP:
types->ht= &heap_hton;
- for (table_alias= sys_table_aliases; table_alias->type; table_alias++)
- {
- if (!my_strcasecmp(&my_charset_latin1, types->ht->name,
- table_alias->type))
- table_alias->st= types;
- }
break;
case DB_TYPE_MYISAM:
types->ht= &myisam_hton;
break;
case DB_TYPE_MRG_MYISAM:
types->ht= &myisammrg_hton;
- for (table_alias= sys_table_aliases; table_alias->type; table_alias++)
- {
- if (!my_strcasecmp(&my_charset_latin1, types->ht->name,
- table_alias->type))
- table_alias->st= types;
- }
break;
#ifdef HAVE_BERKELEY_DB
case DB_TYPE_BERKELEY_DB:
@@ -434,11 +421,6 @@
else
{
types->ht= &berkeley_hton;
- for (table_alias= sys_table_aliases; table_alias->type; table_alias++)
- {
- if (!my_strcasecmp(&my_charset_latin1, types->ht->name,
table_alias->type))
- table_alias->st= types;
- }
ha_was_inited_ok(ht++);
}
}
@@ -457,11 +439,6 @@
{
ha_was_inited_ok(ht++);
types->ht= &innobase_hton;
- for (table_alias= sys_table_aliases; table_alias->type; table_alias++)
- {
- if (!my_strcasecmp(&my_charset_latin1, types->ht->name,
table_alias->type))
- table_alias->st= types;
- }
}
}
break;
@@ -479,11 +456,6 @@
{
ha_was_inited_ok(ht++);
types->ht= &ndbcluster_hton;
- for (table_alias= sys_table_aliases; table_alias->type; table_alias++)
- {
- if (!my_strcasecmp(&my_charset_latin1, types->ht->name,
table_alias->type))
- table_alias->st= types;
- }
}
}
break;
--- 1.152/sql/handler.h 2005-09-19 21:06:19 +02:00
+++ 1.153/sql/handler.h 2005-09-20 14:46:47 +02:00
@@ -367,7 +367,7 @@
struct show_table_alias_st {
const char *alias;
const char *type;
- show_table_type_st *st;
+ enum db_type db_type;
};
/* Possible flags of a handlerton */
| Thread |
|---|
| • bk commit into 5.0 tree (jonas:1.1984) | jonas | 20 Sep |