Re: ON UPDATE CASCADE

2004-01-10 Thread Heikki Tuuri
Morten, http://www.innodb.com/ibman.php#InnoDB_foreign_keys A deviation from SQL standards: if ON UPDATE CASCADE or ON UPDATE SET NULL recurses to update a table for which there already is an update operation in the stack of cascaded operations, it acts like RESTRICT. In plain English this means

ON UPDATE CASCADE

2004-01-09 Thread Morten Gulbrandsen
Hello, If I change the value of a reference a , for instance by means of updating or inserting values, I'd expect both updated values and inserted values to cascade, hence to change b, where FOREIGN KEY (b) REFERENCES A(a) ON UPDATE CASCADE In this example foreign key and reference

Re: auto_increment with FOREIGN KEY UPDATE CASCADE courses Lost connection to MySQL server

2003-10-28 Thread Victoria Reznichenko
) REFERENCES software (softwareID) ON DELETE CASCADE ON UPDATE CASCADE, KEY(id), PRIMARY KEY (softwareID, id) ) TYPE=INNODB; insert into software (softwareID,softwareName,softwareVers,installedDate,softwareSource) values (vim-1.1, vim, 1.1, NOW(), www.test.com.au); insert

Re: auto_increment with FOREIGN KEY UPDATE CASCADE courses Lost connection to MySQL server

2003-10-28 Thread Heikki Tuuri
Vinita, it is most probably this bug fixed in 4.1.14: Fixed a bug: if in a FOREIGN KEY with an UPDATE CASCADE clause the parent column was of a different internal storage length than the child column, then a cascaded update would make the column length wrong in the child table and corrupt

auto_increment with FOREIGN KEY UPDATE CASCADE courses Lost connection to MySQL server

2003-10-27 Thread vinita vigine MURUGIAH
), FOREIGN KEY (softwareID) REFERENCES software (softwareID) ON DELETE CASCADE ON UPDATE CASCADE, PRIMARY KEY (softwareID, osName) ) TYPE=INNODB; insert into software (softwareID,softwareName,softwareVers,installedDate,softwareSource) values (vim-1.1, vim, 1.1, NOW(), www.test.com.au

AW: AW: FOREIGN KEY() REFERENCES ON UPDATE CASCADE ON DELETE RESTRICT

2003-09-22 Thread Morten Gulbrandsen
values ); is not possible, for any variable or value. Is this true for PRODUCT_ORDER ? Pleas tell me, what is the purpose of ON UPDATE CASCADE ON DELETE RESTRICT ? Is that necessary ? Why ? Example please ? Yours Sincerely Morten Gulbrandsen -Ursprüngliche Nachricht- Von: Toro Hill

AW: FOREIGN KEY() REFERENCES ON UPDATE CASCADE ON DELETE RESTRICT

2003-09-16 Thread Morten Gulbrandsen
-Ursprüngliche Nachricht- Von: Toro Hill [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 16. September 2003 03:36 An: Morten Gulbrandsen Cc: [EMAIL PROTECTED] Betreff: Re: FOREIGN KEY() REFERENCES ON UPDATE CASCADE ON DELETE RESTRICT I believe that your ON UPDATE CASCADE clause should

Re: AW: FOREIGN KEY() REFERENCES ON UPDATE CASCADE ON DELETE RESTRICT

2003-09-16 Thread Toro Hill
INT NOT NULL, customer_id INT NOT NULL, PRIMARY KEY(no), INDEX (product_category, product_id), FOREIGN KEY (product_category, product_id) REFERENCES product(category, id) ON UPDATE CASCADE ON DELETE RESTRICT, INDEX (customer_id), FOREIGN KEY (customer_id

FOREIGN KEY() REFERENCES ON UPDATE CASCADE ON DELETE RESTRICT

2003-09-15 Thread Morten Gulbrandsen
PRODUCT_ORDER which is some kind of relationship between the two entity types CUSTOMER and PRODUCT. What do I please have to insert in order to achieve some evidence for the existence of referential integrity ? please ? ON UPDATE CASCADE I feel means something like that the actual data is propagated due

Re: FOREIGN KEY() REFERENCES ON UPDATE CASCADE ON DELETE RESTRICT

2003-09-15 Thread Toro Hill
I believe that your ON UPDATE CASCADE clause should be in the definition for the PRODUCT and CUSTOMER table rather than the PRODUCT_ORDER table. However, I don't think that it will work how you expect. ON UPDATE CASCADE means that everytime you update a row in this table then all rows in other

Re: ON UPDATE CASCADE fails

2003-08-14 Thread Heikki Tuuri
Fraser, - Original Message - From: Fraser Hanson [EMAIL PROTECTED] Newsgroups: mailing.database.mysql Sent: Wednesday, August 06, 2003 5:46 AM Subject: ON UPDATE CASCADE fails Hello, I have a table which has a foreign key relationship with itself. I want and expect my updates

ON UPDATE CASCADE fails

2003-08-05 Thread Fraser Hanson
CASCADE ON UPDATE CASCADE, PRIMARY KEY (name) ) TYPE=INNODB; # Insert some example data INSERT INTO person (name,parent) VALUES ('Grandpa', 'Grandpa'); INSERT INTO person (name,parent) VALUES ('John', 'Grandpa'); INSERT INTO person (name,parent) VALUES ('Baby Bob', 'John'); mysql select * from

Re: ON UPDATE CASCADE fails

2003-08-05 Thread Fraser Hanson
I forgot to mention that I am using mysql 4.0.14-nt on Windows 2000. --Fraser -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

ON DELETE CASCADE ON UPDATE CASCADE

2003-06-11 Thread vinita Vigine Murugiah
HI I'm not sure whether it's a bug or my configuration problem?? I have upgraded mysql from 3.23.53 to 4.0.12 so that the on update cascade will work! then the I got mysql crash when I did the update. Any idea?? mysql CREATE TABLE software ( - softwareID CHAR(20) NOT NULL

Re: ON DELETE CASCADE ON UPDATE CASCADE

2003-06-11 Thread Heikki Tuuri
Vinita, thank you for the bug report. The BLOB silently changes the CHAR(20) field to a VARCHAR(20) field in te parent table. But the field in the child stays CHAR(20). There is a bug in ON UPDATE CASCADE which forgets to pad the field in the child table with spaces. The child table becomes

on delete cascade works for self-referencing row but on update cascade isn't?

2003-06-03 Thread Jindo
NOT NULL default '0', `Lft` smallint(5) unsigned NOT NULL default '0', `Rgt` smallint(5) unsigned NOT NULL default '0', PRIMARY KEY (`ShopId`), KEY `Node` (`Node`), CONSTRAINT `0_2042` FOREIGN KEY (`Node`) REFERENCES `Shops` (`ShopId`) ON DELETE CASCADE ON UPDATE CASCADE ) TYPE=InnoDB

re: InnoDB on update cascade

2003-01-08 Thread Egor Egorov
On Monday 06 January 2003 14:51, Daniel Kiss wrote: Does anyone know why 'on update cascade' option does not work in InnoDB foreign keys? Is it supported anyway? It's supported since 4.0.8: http://www.mysql.com/doc/en/News-4.0.8.html -- For technical support contracts, goto https

InnoDB on update cascade

2003-01-06 Thread Daniel Kiss
Hi all, Does anyone know why 'on update cascade' option does not work in InnoDB foreign keys? Is it supported anyway? Thanks, Daniel mysql - Before posting, please check: http://www.mysql.com/manual.php (the manual

re: Re: INNODB still not working Re: Does mysql support foreign keyon delete cascade and on update cascade?

2002-12-12 Thread Victoria Reznichenko
on update cascade, - logDate DATE NOT NULL, - totalLic integer(5) NOT NULL, - requestLic integer(5) NOT NULL, - issuedLic integer(5) NOT NULL, - queuedLic integer(5) NOT NULL, - deniedLic integer(5) NOT NULL) TYPE=INNODB; Query OK, 0 rows affected (0.00 sec) mysql insert

Re: Does mysql support foreign key on delete cascade and on update cascade?

2002-12-11 Thread Jing Dai
licenseID is the primary key in license_info, and foreign key in license_data. But I tested it didn't work the way as like in Oracle delete cascade or update cascade. Did I do something incorrect? mysql create table samDB.license_info ( - licenseID integer(5) auto_increment primary key

Re: Does mysql support foreign key on delete cascade and on update cascade?

2002-12-11 Thread Jing Dai
it didn't work the way as like in Oracle delete cascade or update cascade. Did I do something incorrect? mysql create table samDB.license_info ( - licenseID integer(5) auto_increment primary key, - vendorName VARCHAR(30) NOT NULL, - featureName VARCHAR(30) NOT NULL

INNODB still not working Re: Does mysql support foreign key on delete cascade and on update cascade?

2002-12-11 Thread Jing Dai
(licenseID) match full on delete cascade on update cascade, - logDate DATE NOT NULL, - totalLic integer(5) NOT NULL, - requestLic integer(5) NOT NULL, - issuedLic integer(5) NOT NULL, - queuedLic integer(5) NOT NULL, - deniedLic integer(5) NOT NULL) TYPE=INNODB; Query OK, 0 rows

Re: INNODB still not working Re: Does mysql support foreign keyon delete cascade and on update cascade?

2002-12-11 Thread Paul DuBois
At 15:12 -0800 12/11/02, Jing Dai wrote: After install mysql-max 3.23.52 and enable innodb setting in /etc/my.cnf file, recreate table, this time show create table indicated it's innodb type, but tried update on cascade still not working. ON DELETE CASCADE is implemented, but ON UPDATE CASCADE

Does mysql support foreign key on delete cascade and on update cascade?

2002-12-10 Thread Jing Dai
I am just working on mySQL and create two tables, defined licenseID is the primary key in license_info, and foreign key in license_data. But I tested it didn't work the way as like in Oracle delete cascade or update cascade. Did I do something incorrect? mysql create table samDB.license_info

Re: Does mysql support foreign key on delete cascade and on update cascade?

2002-12-10 Thread Benjamin Pflugmann
Hello. On Tue 2002-12-10 at 16:05:05 -0800, [EMAIL PROTECTED] wrote: I am just working on mySQL and create two tables, defined licenseID is the primary key in license_info, and foreign key in license_data. But I tested it didn't work the way as like in Oracle delete cascade or update cascade

Re: InnoDB 3.23.52, foreign keys and update/cascade problem

2002-09-23 Thread j.random.programmer
NOT NULL AUTO_INCREMENT, AID INTEGER, name VARCHAR(20), PRIMARY KEY (id), INDEX(AID) , FOREIGN KEY (AID) REFERENCES A (id) ON UPDATE CASCADE ); mysql insert into A values (null, 'one'), (null, 'two'); mysql select * from A; ++--+ | id | name

Re: InnoDB 3.23.52, foreign keys and update/cascade problem

2002-09-23 Thread Paul DuBois
(id) ); CREATE TABLE B ( id INTEGER NOT NULL AUTO_INCREMENT, AID INTEGER, name VARCHAR(20), PRIMARY KEY (id), INDEX(AID) , FOREIGN KEY (AID) REFERENCES A (id) ON UPDATE CASCADE ); I believe that ON UPDATE CASCADE doesn't work yet

InnoDB 3.23.52, foreign keys and update/cascade problem

2002-09-21 Thread j.random.programmer
NOT NULL AUTO_INCREMENT, AID INTEGER, name VARCHAR(20), PRIMARY KEY (id), INDEX(AID) , FOREIGN KEY (AID) REFERENCES A (id) ON UPDATE CASCADE ); mysql insert into A values (null, 'one'), (null, 'two'); mysql select * from A; ++--+ | id | name

foreign key on update cascade in mysql doesn't work

2002-04-17 Thread bin cai
Hello, I create innoDB tables database in mysql3.23.49. i create foreign key constraints(On UPdate cascade) in one table. but it seems doesn't work. the system just refused to update. I am wondering the innodb in mysql doesn't support the feature like on update cascade or on delete cascade

Re: foreign key on update cascade in mysql doesn't work

2002-04-17 Thread Heikki Tuuri
Hi! The brand-new source prerelease 3.23.50b-pre which you can download from http://www.innodb.com supports ON DELETE CASCADE and ON DELETE SET NULL. But does not support ON UPDATE CASCADE. Typically a foreign key refers to the primary key of another table, and it is not that common a primary