At 1:13 +1000 9/24/02, Chris Barnes wrote:
>hi people,
>just a quick question.
>
>is there a way i can use the "lock tables" statement to lock all the tables
>in a database which out having to specify all tables individually?
>
>i dont really want to use a statement like:
>lock tables table1 read, table2 read table3 read, table4 read, table5 read,
>table6 read, table7 read, table8 read, table9 read, table10 read;
>
>something like lock tables * read; or lock * write; would be nice but i cant
>find anything about that in the mysql documentation.

FLUSH TABLES WITH READ LOCK places a read lock on all tables.  This prevents
any updates to the tables.

However, note that this does not work for InnoDB tables, because the InnoDB
handler performs its own locking at a lower level so it doesn't see the
effect of the statement.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to