Thread: backups
View Single Post

   
  #4 (permalink)  
Old 02-28-2008, 07:57 AM
Bill Karwin
 
Posts: n/a
Default Re: backups

Antoine Junod wrote:
> The solution is the option --lock-all-tables. But I read in "The
> definitive guide to MySQL 5, Apress", page 354, that this options
> solves nothing for innodb tables (why?).


One doesn't need to lock tables to get a consistent read, if the tables
support transaction isolation.

Read about REPEATABLE READ here:
http://dev.mysql.com/doc/refman/5.0/...isolation.html

> My current backup
> script has a list of myisam tables and another list for innodb
> tables. These lists are hand made. I would be able to build them
> automaticaly. Is there a way to do that?


The following query should get you the information you need (assuming
you using MySQL 5.0):

SELECT t.table_schema, t.table_name, t.table_type, t.engine
FROM INFORMATION_SCHEMA.tables t;

The `engine` column has values 'InnoDB', 'MyISAM', 'MEMORY'. For views,
the column is NULL.

See http://dev.mysql.com/doc/refman/5.0/...les-table.html

Regards,
Bill K.
Reply With Quote