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/opt_subselect.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/opt_subselect.cc')
-rw-r--r-- | sql/opt_subselect.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 38779619b82..1e0a5398f6a 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -4459,12 +4459,12 @@ SJ_TMP_TABLE::create_sj_weedout_tmp_table(THD *thd) temp_pool_slot = bitmap_lock_set_next(&temp_pool); if (temp_pool_slot != MY_BIT_NONE) // we got a slot - sprintf(path, "%s_%lx_%i", tmp_file_prefix, + sprintf(path, "%s-subquery-%lx-%i", tmp_file_prefix, current_pid, temp_pool_slot); else { /* if we run out of slots or we are not using tempool */ - sprintf(path,"%s%lx_%lx_%x", tmp_file_prefix,current_pid, + sprintf(path,"%s-subquery-%lx-%lx-%x", tmp_file_prefix,current_pid, (ulong) thd->thread_id, thd->tmp_table++); } fn_format(path, path, mysql_tmpdir, "", MY_REPLACE_EXT|MY_UNPACK_FILENAME); |