← Back to team overview

maria-developers team mailing list archive

Re: 9243921c84b: Make all #sql temporary table names uniform

 

Hi, Michael!

On Apr 16, Michael Widenius wrote:
> > > ALTER PARTITION shadow files:
> > > #sql-shadow-'original_table_name'
> >
> > Please, add a thread_id here at the end. normally MDL should ensure
> > that no two threads can have a shadow for the same table at the same
> > time, but we have enough bugs as it is to introduce another vector
> > when two threads can overwrite each other temp files.
> 
> That would make the file name even longer and I am not sure what
> happens if we table names goes much over NAME_LEN.  I don't have time
> just now to check for possible name overruns (I think it should be
> save as most engines are using FN_REFLEN, but better safe than sorry.

Well, I'm certain that absolutely all temporary tables must have unique
names. If you're concerned about name overruns use the pattern

  #sql-shadow-<thread_id>-<original_name>

then any truncation will only affect the "original_name" part and it'll
be fine.

Regards,
Sergei
VP of MariaDB Server Engineering
and security@xxxxxxxxxxx


References