summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2020-04-09 16:52:59 +0300
committerMonty <monty@mariadb.org>2020-04-19 17:33:51 +0300
commitf40ca33bbc605af28492b58dde35bf2a97126b5f (patch)
tree43b4b60902d9cbd97cddc4b519e24decc5643d27 /sql/sql_select.cc
parenteca5c2c67ff1854b186b0e1b8dd342cb988e94d2 (diff)
downloadmariadb-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_select.cc')
-rw-r--r--sql/sql_select.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index da30fda40f7..638f044be77 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -18266,13 +18266,13 @@ TABLE *Create_tmp_table::start(THD *thd,
m_temp_pool_slot = bitmap_lock_set_next(&temp_pool);
if (m_temp_pool_slot != MY_BIT_NONE) // we got a slot
- sprintf(path, "%s-%lx-%i", tmp_file_prefix,
+ sprintf(path, "%s-temptable-%lx-%i", tmp_file_prefix,
current_pid, m_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,
- (ulong) thd->thread_id, thd->tmp_table++);
+ sprintf(path, "%s-temptable-%lx-%llx-%x", tmp_file_prefix,current_pid,
+ thd->thread_id, thd->tmp_table++);
}
/*