On Saturday 08 March 2003 03:06, Daevid Vincent wrote: > If I create a table that uses REFERENCES in it, then mysqldump it, the > REFERENCES isn't there > > > Notice the `contact_dept_table_id` field in both of the below outputs: > > CREATE TABLE `contact_table` ( > `contact_id` mediumint(8) unsigned NOT NULL auto_increment, > `contact_timestamp` timestamp(14) NOT NULL, > `contact_dept_table_id` mediumint(8) unsigned NOT NULL default '0' > REFERENCES dept_table(dept_id), > `contact_fname` varchar(255) NOT NULL default '', > `contact_lname` varchar(255) NOT NULL default '', > `contact_title` varchar(50) NOT NULL default '', > `contact_email` varchar(255) NOT NULL default '', > `contact_incept` date NOT NULL default '0000-00-00', > `contact_phone` varchar(20) NOT NULL default '', > `contact_address1` varchar(70) NOT NULL default '', > `contact_address2` varchar(70) NOT NULL default '', > `contact_city` varchar(50) NOT NULL default '', > `contact_state` varchar(50) NOT NULL default '', > `contact_zip` varchar(50) NOT NULL default '', > `contact_country` varchar(50) NOT NULL default '', > `contact_notes` longtext NOT NULL, > PRIMARY KEY (`contact_id`), > KEY `contact_dept_table_id` (`contact_dept_table_id`), > KEY `contact_lname` (`contact_lname`), > KEY `contact_fname` (`contact_fname`), > FOREIGN KEY (contact_dept_table_id) REFERENCES dept_table(dept_id) ON > DELETE CASCADE > ) TYPE=InnoDB; > > Then execute: > [daevid=pts/1]5:01pm:{/home/daevid}> mysqldump -a crm > -- MySQL dump 8.22
It's Ok. REFERENCES are just parsed in the CREATE TABLE statement and they are ignored for all table types except InnoDB (which supports foreign key constraints). -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- 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