* Sergei Golubchik <serg@stripped> [10/09/16 00:40]:
> > 2. FLUSH TABLES WITH READ LOCK FOR DATABASE dbname;
> > (I just added an optional 'FOR DATABASE dbname' to the already
> > existing command--which still works, BTW. Is this a misuse of the word
> > "FOR"?)
> > This is the command that locks the tables before someone (some
> > program) dumps/copies the tables that will be moved to another server.
> > It flushes and locks only one database.
> This would be difficult to implement.
> FLUSH TABLES WITH READ LOCK is not implemented in a way that can be
> generalized to support per-database locks :(
Actually, in 5.5 we added schema locks and now all DDL
takes a schema lock on the affected schema. A reliable RENAME
DATABASE is now possible.