1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Fix for sporadically failures of innodb.test on Darwin 7.3

which occured because we were not lowering case of file names 
for temporary tables altough handler assumes so if 
lower_case_table_names==2. Now we are lowering case for them.
This commit is contained in:
dlenev@brandersnatch.localdomain
2004-05-25 02:30:09 +04:00
parent 1b61cb6d0f
commit a5fab72bc4
2 changed files with 9 additions and 0 deletions

View File

@@ -4910,6 +4910,9 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
sprintf(path,"%s%s%lx_%lx_%x",mysql_tmpdir,tmp_file_prefix,current_pid, sprintf(path,"%s%s%lx_%lx_%x",mysql_tmpdir,tmp_file_prefix,current_pid,
thd->thread_id, thd->tmp_table++); thd->thread_id, thd->tmp_table++);
if (lower_case_table_names)
my_casedn_str(files_charset_info, path);
if (group) if (group)
{ {
if (!param->quick_group) if (!param->quick_group)

View File

@@ -1159,6 +1159,8 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
my_snprintf(path, sizeof(path), "%s%s%lx_%lx_%x%s", my_snprintf(path, sizeof(path), "%s%s%lx_%lx_%x%s",
mysql_tmpdir, tmp_file_prefix, current_pid, thd->thread_id, mysql_tmpdir, tmp_file_prefix, current_pid, thd->thread_id,
thd->tmp_table++, reg_ext); thd->tmp_table++, reg_ext);
if (lower_case_table_names)
my_casedn_str(files_charset_info, path);
create_info->table_options|=HA_CREATE_DELAY_KEY_WRITE; create_info->table_options|=HA_CREATE_DELAY_KEY_WRITE;
} }
else else
@@ -2086,6 +2088,8 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
my_snprintf(dst_path, sizeof(dst_path), "%s%s%lx_%lx_%x%s", my_snprintf(dst_path, sizeof(dst_path), "%s%s%lx_%lx_%x%s",
mysql_tmpdir, tmp_file_prefix, current_pid, mysql_tmpdir, tmp_file_prefix, current_pid,
thd->thread_id, thd->tmp_table++, reg_ext); thd->thread_id, thd->tmp_table++, reg_ext);
if (lower_case_table_names)
my_casedn_str(files_charset_info, dst_path);
create_info->table_options|= HA_CREATE_DELAY_KEY_WRITE; create_info->table_options|= HA_CREATE_DELAY_KEY_WRITE;
} }
else else
@@ -3044,6 +3048,8 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
thd->proc_info="rename result table"; thd->proc_info="rename result table";
my_snprintf(old_name, sizeof(old_name), "%s2-%lx-%lx", tmp_file_prefix, my_snprintf(old_name, sizeof(old_name), "%s2-%lx-%lx", tmp_file_prefix,
current_pid, thd->thread_id); current_pid, thd->thread_id);
if (lower_case_table_names)
my_casedn_str(files_charset_info, old_name);
if (new_name != table_name || new_db != db) if (new_name != table_name || new_db != db)
{ {
if (!access(new_name_buff,F_OK)) if (!access(new_name_buff,F_OK))