List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:August 29 1999 12:49am
Subject:Re: FLUSH TABLES (after LOCK TABLES) crashing mysqld ?
View as plain text  
On Mon, 1999-08-23 20:29:59 +0000, Yan Zhang Chen wrote:
> Interestingly, the following sequence, in which each LOCK TABLES
> statement takes only 1 table, seems to work without segfault:
> 
> USE <db1>
> LOCK TABLES <tab11> READ
> LOCK TABLES <tab12> READ
> ...
> LOCK TABLES <tab1N> READ
> FLUSH TABLES
> USE <db2>
> LOCK TABLES <tab21> READ
> LOCK TABLES <tab22> READ
> ...
> LOCK TABLES <tab2N> READ
> FLUSH TABLES

A small comment not regarding the bug with FLUSH TABLES but regarding
the semantics of LOCK TABLES:

   Please note, that each LOCK TABLES does unlock all previously
   locked tables!

Chapter "7.23 LOCK TABLES/UNLOCK TABLES syntax" of the MySQL manual
says:
| All tables that are locked by the current thread are automatically
| unlocked when the thread issues another LOCK TABLES, or when the
| connection to the server is closed.

So the sequence
  LOCK TABLES <tab11> READ;
  LOCK TABLES <tab12> READ;
is _not_ the same as
  LOCK TABLES <tab11> READ, <tab12> READ;

Regards,
  Martin
-- 
Martin Ramsch <m.ramsch@stripped> <URL: http://home.pages.de/~ramsch/ >
PGP KeyID=0xE8EF4F75 FiPr=52 44 5E F3 B0 B1 38 26  E4 EC 80 58 7B 31 3A D7
Thread
FLUSH TABLES (after LOCK TABLES) crashing mysqld ?Yan Zhang Chen23 Aug
  • Re: FLUSH TABLES (after LOCK TABLES) crashing mysqld ?Yan Zhang Chen23 Aug
    • Re: FLUSH TABLES (after LOCK TABLES) crashing mysqld ?Martin Ramsch29 Aug
      • Re: FLUSH TABLES (after LOCK TABLES) crashing mysqld ?Yan Zhang Chen30 Aug
        • Re: FLUSH TABLES (after LOCK TABLES) crashing mysqld ?Michael Widenius30 Aug
          • Re: FLUSH TABLES (after LOCK TABLES) crashing mysqld ?Yan Zhang Chen30 Aug
  • FLUSH TABLES (after LOCK TABLES) crashing mysqld ?Michael Widenius28 Aug