summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <dlenev@brandersnatch.localdomain>2004-05-22 23:41:58 +0400
committerunknown <dlenev@brandersnatch.localdomain>2004-05-22 23:41:58 +0400
commit0e86cf8aba3c7d067dd28efd78f138d467ec7e7b (patch)
tree396b746d77b997977420c7bc8c1903ab26a53a21 /sql/sql_table.cc
parent11ee33b181f20b3d746da871918c96890480a1ae (diff)
downloadmariadb-git-0e86cf8aba3c7d067dd28efd78f138d467ec7e7b.tar.gz
Fix for bug which caused grant.test fail on darwin7.3. We were converting db and table
names to lower case using latin1 instead of utf-8 in sql_acl.cc if lower_case_table_names was on. Also replaced in other such places system_charset_info with files_charset_info for consistency. sql/handler.cc: Replaced system_charset_info with files_charset_info in places where we are converting names to lower case because of lower_case_table_names for consistency. sql/sql_acl.cc: We should use files_charset_info when converting db/table names to lower case because they could be in utf-8 and not in latin1! sql/sql_cache.cc: Added clarifying comments in tricky place after discussion with Sanja. Replaced system_charset_info with files_charset_info in places where we are converting names to lower case because of lower_case_table_names for consistency. sql/sql_db.cc: Replaced system_charset_info with files_charset_info in places where we are converting names to lower case because of lower_case_table_names for consistency. sql/sql_show.cc: Replaced system_charset_info with files_charset_info in places where we are converting names to lower case because of lower_case_table_names for consistency. sql/sql_table.cc: Replaced system_charset_info with files_charset_info in places where we are converting names to lower case because of lower_case_table_names for consistency.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index e017bc7e6b5..383165824d7 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -1395,11 +1395,11 @@ mysql_rename_table(enum db_type base,
{
/* Table handler expects to get all file names as lower case */
strmov(tmp_from, old_name);
- my_casedn_str(system_charset_info, tmp_from);
+ my_casedn_str(files_charset_info, tmp_from);
old_name= tmp_from;
strmov(tmp_to, new_name);
- my_casedn_str(system_charset_info, tmp_to);
+ my_casedn_str(files_charset_info, tmp_to);
new_name= tmp_to;
}
my_snprintf(from, sizeof(from), "%s/%s/%s",
@@ -2514,10 +2514,10 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
{
if (lower_case_table_names != 2)
{
- my_casedn_str(system_charset_info, new_name_buff);
+ my_casedn_str(files_charset_info, new_name_buff);
new_alias= new_name; // Create lower case table name
}
- my_casedn_str(system_charset_info, new_name);
+ my_casedn_str(files_charset_info, new_name);
}
if (new_db == db &&
!my_strcasecmp(table_alias_charset, new_name_buff, table_name))
@@ -2880,7 +2880,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
current_pid, thd->thread_id);
/* Safety fix for innodb */
if (lower_case_table_names)
- my_casedn_str(system_charset_info, tmp_name);
+ my_casedn_str(files_charset_info, tmp_name);
create_info->db_type=new_db_type;
if (!create_info->comment)
create_info->comment=table->comment;