Thanks for your reply! Very helpful.

Presumably, I can read about SET FOREIGN_KEY_CHECKS = 0; and it will only apply as long as the file is running, or I can turn it back on at the end of the whole process.

Out of curiosity, are you saying mysqldump of a whole DB does some sort of global lock and/or reads state at a given point in time?

Dan

Paul DuBois wrote:

At 8:37 -0500 8/18/03, Dan F wrote:

Folks,

I find it useful for browsing to dump each table of a DB, i.e. psuedo-code like

foreach table
 mysqldump --add-drop-table DB table > table

This produces a file per table, and that file has the DDL and data.

My question: does this per-table version capture all the information that doing a full-DB dump (as follows) would?

mysqldump --add-drop-table DB > DB


Not necessarily, because you may have updates occuring to other tables,
while a given table is being dumped.  If the database is being used in
read-only fashion during the dump, the information should be the same
in both cases.


I tested, and noticed that foreign key constraints and indexes (in my InnoDB database) are appearing nicely in the per-table version. Is anything missing?


Shouldn't be.  If you have problems reloading the table due to the order
in which the InnoDB tables appear in the dump files, add

SET FOREIGN_KEY_CHECKS = 0;

to the beginning of the file before reloading it.


I'm using mysql "Ver 12.18 Distrib 4.0.12" (I assume 4.0.12) for Linux. Thanks for any thoughts.


Dan

--
Dan Frankowski    [EMAIL PROTECTED]




-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to