summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 134449fd20a..afff01e9a16 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1508,8 +1508,9 @@ TABLE *open_temporary_table(THD *thd, const char *path, const char *db,
tmp_table->reginfo.lock_type=TL_WRITE; // Simulate locked
tmp_table->tmp_table = 1;
tmp_table->table_cache_key=(char*) (tmp_table+1);
- tmp_table->key_length= (uint) (strmov(strmov(tmp_table->table_cache_key,db)
- +1, table_name)
+ tmp_table->key_length= (uint) (strmov((tmp_table->real_name=
+ strmov(tmp_table->table_cache_key,db)
+ +1), table_name)
- tmp_table->table_cache_key)+1;
int4store(tmp_table->table_cache_key + tmp_table->key_length,
thd->slave_proxy_id);