summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorunknown <magnus@neptunus.(none)>2004-05-25 12:25:22 +0200
committerunknown <magnus@neptunus.(none)>2004-05-25 12:25:22 +0200
commit4cb7f4944d48d69e13138e196d3d5f55eb6a94df (patch)
tree53c45c9394c46d7f605d226266e85ee4fd30776f /sql/handler.cc
parentc94b1d606f15a2546f6cb05ea31797d306b09183 (diff)
parentf80e9e042ee33e1debdac1e46992470e495921c9 (diff)
downloadmariadb-git-4cb7f4944d48d69e13138e196d3d5f55eb6a94df.tar.gz
Merge msvensson@bk-internal.mysql.com:/home/bk/mysql-4.1
into neptunus.(none):/home/magnus/mysql-4.1 sql/handler.cc: Auto merged sql/sql_table.cc: Auto merged
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index bf5f870e8ff..4a2948e63f8 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -103,15 +103,16 @@ TYPELIB tx_isolation_typelib= {array_elements(tx_isolation_names)-1,"",
enum db_type ha_resolve_by_name(const char *name, uint namelen)
{
- if (!my_strcasecmp(&my_charset_latin1, name, "DEFAULT")) {
- return(enum db_type) current_thd->variables.table_type;
+ THD *thd=current_thd;
+ if (thd && !my_strcasecmp(&my_charset_latin1, name, "DEFAULT")) {
+ return (enum db_type) thd->variables.table_type;
}
show_table_type_st *types;
for (types= sys_table_types; types->type; types++)
{
if (!my_strcasecmp(&my_charset_latin1, name, types->type))
- return(enum db_type)types->db_type;
+ return (enum db_type) types->db_type;
}
return DB_TYPE_UNKNOWN;
}
@@ -742,7 +743,7 @@ int ha_delete_table(enum db_type table_type, const char *path)
{
/* Ensure that table handler get path in lower case */
strmov(tmp_path, path);
- my_casedn_str(system_charset_info, tmp_path);
+ my_casedn_str(files_charset_info, tmp_path);
path= tmp_path;
}
int error=file->delete_table(path);
@@ -1276,7 +1277,7 @@ int ha_create_table(const char *name, HA_CREATE_INFO *create_info,
{
/* Ensure that handler gets name in lower case */
strmov(name_buff, name);
- my_casedn_str(system_charset_info, name_buff);
+ my_casedn_str(files_charset_info, name_buff);
name= name_buff;
}