summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-07-05 12:54:12 -0700
committerunknown <jimw@mysql.com>2005-07-05 12:54:12 -0700
commit128712c04a4d721d7533a1c7ab91a0140ab91f57 (patch)
tree6fb134b4e540043c9924f3b82a0e4c65d8ba3de0 /sql/sql_table.cc
parent83d9aa144110ec65e537f148cd9d242d55523c46 (diff)
parentbedb96f2aaad4abba9ceca86f2b61ed16e7aa858 (diff)
downloadmariadb-git-128712c04a4d721d7533a1c7ab91a0140ab91f57.tar.gz
Merge mysql.com:/home/jimw/my/mysql-4.1-11440
into mysql.com:/home/jimw/my/mysql-4.1-clean sql/sql_table.cc: Auto merged
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index b68b20c32a3..d4dcfdd6759 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -1341,14 +1341,12 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
/* Check if table exists */
if (create_info->options & HA_LEX_CREATE_TMP_TABLE)
{
- char tmp_table_name[tmp_file_prefix_length+22+22+22+3];
- my_snprintf(tmp_table_name, sizeof(tmp_table_name), "%s%lx_%lx_%x",
- tmp_file_prefix, current_pid, thd->thread_id,
- thd->tmp_table++);
+ my_snprintf(path, sizeof(path), "%s%s%lx_%lx_%x%s",
+ mysql_tmpdir, tmp_file_prefix, current_pid, thd->thread_id,
+ thd->tmp_table++, reg_ext);
if (lower_case_table_names)
- my_casedn_str(files_charset_info, tmp_table_name);
+ my_casedn_str(files_charset_info, path);
create_info->table_options|=HA_CREATE_DELAY_KEY_WRITE;
- build_table_path(path, sizeof(path), db, tmp_table_name, reg_ext);
}
else
build_table_path(path, sizeof(path), db, alias, reg_ext);