summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorjimw@mysql.com <>2005-06-21 11:25:51 -0700
committerjimw@mysql.com <>2005-06-21 11:25:51 -0700
commitd11ef13ad990ac3d44e923b7b2ddebcb9e0128c7 (patch)
tree93099d081c832e58cf57109b04f2606bf5ae087f /sql
parent26dc9492c3b0bb1f9288c13cfdce3e6e7fd276c7 (diff)
downloadmariadb-git-d11ef13ad990ac3d44e923b7b2ddebcb9e0128c7.tar.gz
Restore creation of files for temporary tables in the tmpdir,
which was broken by an earlier bug fix. (Bug #11440)
Diffstat (limited to 'sql')
-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 e2e6ee23323..a7fd2a0a2bd 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -1339,14 +1339,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);