Josh,

----- Original Message ----- From: "Josh Trutwin" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Wednesday, December 08, 2004 5:58 AM
Subject: Re: FOREIGN_KEY CHECKS



On Tue, 07 Dec 2004 16:51:10 -0700
Titus <[EMAIL PROTECTED]> wrote:


On page 822 of the pdf copy of the documentation that I have, it says:

"To make it easier to reload dump files for tables
that have foreign key relationships, mysql automatically
includes a statement in the dump output to set FOREIGN_
KEY_CHECKS to 0 as of MySQL 4.1.1."

I'm using MySQL 4.1.7 and the dumps do not appear to
include this line automatically.  I am having to add
it manually.  What am I overlooking?

I THINK you have to add it manually to your dump file. Personally I wish MySQL would add this as an option to mysqldump as I can never remember the syntax to this command when I do an import with InnoDB tables.

dumps do contain that setting in 4.1.7. Below is a start of a dump file.

[EMAIL PROTECTED]:~/mysql-4.1/client> ./mysqldump test > dump
[EMAIL PROTECTED]:~/mysql-4.1/client> cat dump | more
-- MySQL dump 10.9
--
-- Host: localhost    Database: test
-- ------------------------------------------------------
-- Server version       4.1.8-debug-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0
*/;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;


Josh

Best regards,

Heikki Tuuri
Innobase Oy
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM tables
http://www.innodb.com/order.php



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



Reply via email to