At 1:13 +1000 9/24/02, Chris Barnes wrote:
>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.
|• lock statement||Chris Barnes||23 Sep|
| • Re: lock statement||Paul DuBois||23 Sep|