At 08:13 2002-03-13, Heikki Tuuri wrote: >Tomasz, > >InnoDB in 3.23 and 4.0 is the same codebase. InnoDB versions are best >counted from the 3.23 series, because they appear more frequently. I am >sorry that this is confusing. > >MySQL/InnoDB-3.23.50 has not been released yet. It will probably be out at >the end of March.
OK, so I can just hang up my hat till then. > >From section 16 of http://www.innodb.com/ibman.html you find detailed >information about every InnoDB version. For example, 4.0.1 == 3.23.47. > >Foreign keys should work in 4.0.1. Hmmm... That's what I read, too. And after several unsuccesful attempts to create my own tables, I did those contained on Your site, verbatim (as I put in my original message). Still, no effect. I guess the question then becomes: is 4.0.1 really able to keep track of constraints but unable to show them? In which case, how can one find out what they are (if extant)? >" >Starting from version 3.23.50 InnoDB returns the foreign key definitions of >a table when you call And which MySQL uses it? Can it be "plugged into" existing MySQL? >SHOW CREATE TABLE yourtablename > >You can also list the foreign key constraints for a table T with > >SHOW TABLE STATUS FROM yourdatabasename LIKE 'T' >The foreign key constraints are listed in the table comment of the output. >" > >Best regards, Thanks a lot, hopefully You helped not just me >Heikki Tuuri >Innobase Oy >--- >Order technical MySQL/InnoDB support at https://order.mysql.com/ >Speed up adding of features to MySQL/InnoDB through support contracts >See http://www.innodb.com for the online manual and latest news on InnoDB > > >-----Original Message----- >From: Tomasz Korycki <[EMAIL PROTECTED]> >Newsgroups: mailing.database.mysql >Date: Wednesday, March 13, 2002 1:05 AM >Subject: constraints in InnoDB, or is 3.23.43b _really_ < 4.0.1? > > > > Here is an excerpt from http://www.innodb.com/ibman.html#InnoDB_distros, > >section 4.2: > >"Starting from version 3.23.43b InnoDB features foreign key constraints. > >InnoDB is the first MySQL table type which allows you to define foreign key > >constraints..." > > > > Now, I assumed the version number above was suspiciously similar to > >MySQL one - and since I use 4.0.1, I thought I was OK (I need them > >references... ON DELETE and friends would be great, but plain references > >save most of the hassle). > > After trying to (and failing to) create my own tables, I did tables as > >in the example on InnoDB site: > >CREATE TABLE parent(id INT NOT NULL, PRIMARY KEY (id)) TYPE=InnoDB; > >CREATE TABLE child(id INT, parent_id INT, INDEX par_ind (parent_id), > > FOREIGN KEY (parent_id) REFERENCES parent(id)) >TYPE=InnoDB; > > > > > > And what do I see? I see indices in the tables, but no FK! Yes, tables > >_are_ InnoDB. I have proper indices - so on to the next step (there was no > >error return), just in case - it says: > >"Starting from version 3.23.50 InnoDB allows you to add a new foreign key > >constraint to a table..." > > > >So, here I go: > >ALTER TABLE child ADD CONSTRAINT FOREIGN KEY (parent_id) REFERENCES >parent(id); > > > >No error. No effect, either... > > > >So, here comes the big question: What am I doing wrong? > >-------------------------------------------------- > >sql, query > >Tomasz Korycki [EMAIL PROTECTED] >-------------------------------------------------- sql, query Tomasz Korycki [EMAIL PROTECTED] --------------------------------------------------------------------- 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