3773
3787
char cache_key[MAX_DBKEY_LENGTH], *saved_cache_key, *tmp_path;
3777
3791
table_list.db= (char*) db;
3778
3792
table_list.table_name= (char*) table_name;
3779
3793
/* Create the cache_key for temporary tables */
3780
3794
key_length= create_table_def_key(session, cache_key, &table_list, 1);
3782
3797
if (!(tmp_table= (Table*) my_malloc(sizeof(*tmp_table) + sizeof(*share) +
3785
3800
return(0); /* purecov: inspected */
3787
3802
share= (TABLE_SHARE*) (tmp_table+1);
3788
3803
tmp_path= (char*) (share+1);
3790
3805
memcpy(saved_cache_key, cache_key, key_length);
3792
3807
init_tmp_table_share(session, share, saved_cache_key, key_length,