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_partition_admin.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_partition_admin.cc')
| -rw-r--r-- | sql/sql_partition_admin.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc index 13547a0a8be..7822cab5ff0 100644 --- a/sql/sql_partition_admin.cc +++ b/sql/sql_partition_admin.cc @@ -600,8 +600,8 @@ bool Sql_cmd_alter_table_exchange_partition:: swap_table_list->db.str, swap_table_list->table_name.str, "", 0); - /* create a unique temp name #sqlx-nnnn_nnnn, x for eXchange */ - my_snprintf(temp_name, sizeof(temp_name), "%sx-%lx_%llx", + /* create a unique temp name */ + my_snprintf(temp_name, sizeof(temp_name), "%s-exchange-%lx-%llx", tmp_file_prefix, current_pid, thd->thread_id); if (lower_case_table_names) my_casedn_str(files_charset_info, temp_name); |
