diff options
author | Monty <monty@mariadb.org> | 2020-04-09 16:52:59 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-04-19 17:33:51 +0300 |
commit | f40ca33bbc605af28492b58dde35bf2a97126b5f (patch) | |
tree | 43b4b60902d9cbd97cddc4b519e24decc5643d27 /sql/sql_alter.cc | |
parent | eca5c2c67ff1854b186b0e1b8dd342cb988e94d2 (diff) | |
download | mariadb-git-f40ca33bbc605af28492b58dde35bf2a97126b5f.tar.gz |
Make all #sql temporary table names uniform
The reason for this is to make all temporary file names similar and
also to be able to figure out from where a #sql-xxx name orginates.
New format is for most cases:
'#sql-name-current_pid-thread_id[-increment]'
Where name is one of subselect, alter, exchange, temptable or backup
The exceptions are:
ALTER PARTITION shadow files:
'#sql-shadow-thread_id-'original_table_name'
Names used with temp pool:
'#sql-name-current_pid-pool_number'
Diffstat (limited to 'sql/sql_alter.cc')
-rw-r--r-- | sql/sql_alter.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_alter.cc b/sql/sql_alter.cc index 131f74c2753..2cbbd83ec36 100644 --- a/sql/sql_alter.cc +++ b/sql/sql_alter.cc @@ -322,7 +322,8 @@ Alter_table_ctx::Alter_table_ctx(THD *thd, TABLE_LIST *table_list, } tmp_name.str= tmp_name_buff; - tmp_name.length= my_snprintf(tmp_name_buff, sizeof(tmp_name_buff), "%s-%lx_%llx", + tmp_name.length= my_snprintf(tmp_name_buff, sizeof(tmp_name_buff), + "%s-alter-%lx-%llx", tmp_file_prefix, current_pid, thd->thread_id); /* Safety fix for InnoDB */ if (lower_case_table_names) |