Hello!
mysql Ver 11.18 Distrib 3.23.53, for portbld-freebsd4.7 (i386)
I have a problem with dumping data into databases.
I dump the database with mysqldump into a SQL-File.
So, i delete the database. Now i want to redump the SQL-File into database.
SQL tells me an error. The Problem is MySQL doesn't sort table by
Constrains.
In the Test-Case you see what MySQL Dumps, but the problem is that 'a_table'
has references to 'b_table' and 'b_table' doesn't exist on an initial dump
from file into database.
Test-Case:
#
# Tabellenstruktur f�r Tabelle `a_table`
#
DROP TABLE IF EXISTS `a_table`;
CREATE TABLE `a_table` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`b_table_id` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `b_table_id` (`b_table_id`),
FOREIGN KEY (`b_table_id`) REFERENCES `b_table` (`id`) ON DELETE CASCADE
) TYPE=InnoDB;
#
# Tabellenstruktur f�r Tabelle `b_table`
#
DROP TABLE IF EXISTS `b_table`;
CREATE TABLE `b_table` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=InnoDB;
--
Mit freundlichen Gr��en
Enrico Stahn
---
Enrico Stahn Kaiserin-Augusta-Allee 10-11, 10553 Berlin, Germany
todo GmbH Tel: +49 30 726 192 0 Fax: +49 30 726 192 192
[EMAIL PROTECTED], http://www.todo.de
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php