Hi!
On Jul 26, Konstantin Osipov wrote:
> * Sergei Golubchik <serg@stripped> [07/07/26 22:21]:
> >
> > > +/**
> > > + Try to find the table in the list of locked tables.
> > > + In case of success, unlock the table and remove it from this list.
> > > +
> > > + @note This function has a legacy side effect: the table is
> > > + unlocked even if it is not found in the locked list.
> >
> > Could that happen ?
>
> Yes, e.g. see mysql_rm_table_part2, where we call mysql_lock_remove.
> It would lead to redundant calls to ::store_lock(TL_UNLOCK), but
> otherwise no side effects, because, as I write below:
Hmm. DROP TABLE can be executed under LOCK TABLE and it could be used to
drop a table not locked by LOCK TABLE. I tend to consider it a bug. The
manual is clear: "When you use `LOCK TABLES', you must lock all tables
that you are going to use in your statements."
Do you agree ?
I have a feeling that if this is fixed, the argument you added will
never need to be TRUE.
Regards / Mit vielen Grüssen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Developer
/_/ /_/\_, /___/\___\_\___/ MySQL GmbH, Radlkoferstr. 2, D-81373 München
<___/ Geschäftsführer: Kaj Arnö - HRB
München 162140