Hello.
What output does the following statement produce: show variables like 'have_innodb'; "Philipp Snizek" <[EMAIL PROTECTED]> wrote: > =20 >> You need to make *both* of your table definitions include=20 >> "Type=3DInnoDB"; *then*, the cascading delete should work fine. > > This is what I have done upon Keith's suggestion. I have changed all > my tables to Type=3Dinnodb. > Still nothing. Maybe mysqlcc or mysql administrator deliver wrong > information? > Deleteting the record in Table domains leaves the record in Table > users referencing domains untouched.=20 > Or is my sql script bad? I'm already spending hours on that. > > CREATE TABLE domains ( > ID_DOMAINS int(11) auto_increment, > active int(1) not null, > domain varchar(50) NOT NULL, > PRIMARY KEY (ID_DOMAINS) > ) type=3Dinnodb; > > Either this 'users' Table: > create table users ( > email varchar (80) primary key unique not null, > belongs_to integer not null references domains on delete cascade > ) type=3Dinnodb; =20 > > or this 'users' Table: > create table users ( > email varchar (80) primary key unique not null, > belongs_to integer not null, > foreign key (belongs_to) references domains on delete cascade > ) type=3Dinnodb; > > > Philipp=20 > =20 >> Rhino >>=20 >> ----- Original Message ----- >> From: "Philipp Snizek" <[EMAIL PROTECTED]> >> To: <[EMAIL PROTECTED]>; "Mysql List (E-mail)"=20 >> <mysql@lists.mysql.com> >> Sent: Tuesday, February 22, 2005 7:49 AM >> Subject: RE: referencial integrity problem >>=20 >>=20 >>=20 >> > Foreign keys are only supported within InnoDB tables (on both >> sides).. >>=20 >> so using a table 'users' like >>=20 >> create table users ( >> email varchar (80) primary key unique not null, >> belongs_to integer not null references domains on delete cascade >> ); >>=20 >> without foreign keys could help? >> I couldn't make it work that way either. >>=20 >> Philipp >>=20 >> > Hi >> > >> > I run a Postfix MTA attached to a mysql DB with various >> > domains on it. A >> > domain consists of email addresses. When I want to delete the >> > domain the >> > referenced email addresses should be deleted, too. But that >> > doesn't work >> > and I don't know why. >> > >> > here are the two tables domains and users: >> > >> > CREATE TABLE domains ( >> > ID_DOMAINS int(11) auto_increment, >> > active int(1) not null, >> > domain varchar(50) NOT NULL, >> > PRIMARY KEY (ID_DOMAINS) >> > ) TYPE=3DMyISAM; >> > >> > create table users ( >> > email varchar (80) primary key unique not null, belongs_to integer >> not >> > null, foreign key (belongs_to) references domains on delete > cascade >> ); >> > >> > if I use the delete command like "delete from domains where >> > id_domains=3D'1'" the dataset that belongs to id 1 in domains is >> deleted >> > while the email addresses belonging to this domain are left >> untouched. >> > >> > What am I missing? >> > >> > thanks >> > Philipp >> > >> > --=20 >> > MySQL General Mailing List >> > For list archives: http://lists.mysql.com/mysql >> > To unsubscribe: >> > http://lists.mysql.com/[EMAIL PROTECTED] >> > >> > --=20 >> > No virus found in this incoming message. >> > Checked by AVG Anti-Virus. >> > Version: 7.0.300 / Virus Database: 266.3.0 - Release Date: >> 21/02/2005 >> > >> > >> > --=20 >> > No virus found in this outgoing message. >> > Checked by AVG Anti-Virus. >> > Version: 7.0.300 / Virus Database: 266.3.0 - Release Date: >> 21/02/2005 >> > >> > >> > >> > --=20 >> > MySQL General Mailing List >> > For list archives: http://lists.mysql.com/mysql >> > To unsubscribe: >> > http://lists.mysql.com/[EMAIL PROTECTED] >> > >> > >>=20 >> --=20 >> MySQL General Mailing List >> For list archives: http://lists.mysql.com/mysql >> To unsubscribe: =20 >> http://lists.mysql.com/[EMAIL PROTECTED] >>=20 >>=20 >>=20 >> --=20 >> No virus found in this incoming message. >> Checked by AVG Anti-Virus. >> Version: 7.0.300 / Virus Database: 266.2.0 - Release Date: > 21/02/2005 >>=20 >>=20 >>=20 >>=20 >> --=20 >> No virus found in this outgoing message. >> Checked by AVG Anti-Virus. >> Version: 7.0.300 / Virus Database: 266.2.0 - Release Date: > 21/02/2005 >>=20 >>=20 > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]