List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:August 30 1999 9:58am
Subject:Re: FLUSH TABLES (after LOCK TABLES) crashing mysqld ?
View as plain text  
<cut>


Yan> Thanks so much for pointing that out, Martin! 

Yan> I wasn't aware of this "semantics"! Now I got another challenge:
Yan> how do I lock up all the databases at the same time??
Yan> (I need this so that I can snapshot all the databases for a file-level backup;
Yan> I also rotate update log after such a snapshot, so that this backup plus
Yan> the next update log equals the up-to-date state of the databases)

Yan> I tried the following statement as an attempt to lock 2 tables in 2 different
Yan> databases:
Yan>   LOCK TABLES <db1>.<tab11> READ, <db2>.<tab21> READ;
Yan> but it didn't work (syntax error).

Yan> Is any way around? (I wish MySQL had something that locks several
Yan> DATABASES in one statement)

Which MySQL version are you using?

In MySQL 3.22, this works:

mysql> lock tables test.t1 READ, test2.blocked READ;
Query OK, 0 rows affected (0.03 sec)

Regards,
Monty
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