Foreign keys / Transactions in MySQL.. WTF?

Luis Motta Campos luismottacampos at yahoo.co.uk
Tue Jul 31 09:45:09 BST 2007


On Jul 31, 2007, at 8:07 AM, Toby Corkindale wrote:
> Luis Motta Campos wrote:
>>   DDL (Data Definition Language) statement: implicitly committing  
>> an empty
>> transaction, creating table as defined.
>
> Oh, OK, so DDL statements are not meant to occur within transactions?
> Perhaps this is an oddity of PostgreSQL then, where they ARE managed
> within transactions.. which gives me a lot more confidence when  
> making a
> series of changes and verifying them before committing the results.

   Depends a lot on the implementation. Oracle (up to 8i, at least)  
also didn't control DDL using transactions.

>>   I need to confirm this in the manuals, but it seems to me that  
>> MySQL 4.1 has
>> no support for foreign keys. If you're looking for a Relational  
>> Database
>> Management System, look another way ;-)
>
> Yeah, and that happens on MySQL 5.0 as well. The MySQL advocates  
> seem to
> suggest that MySQL *is* a RDMS. Silly me for believing them :)

   Devil's advocates, you mean?

> Well, as I said at the top of my original message - I normally DO use
> RDMSes, but am merely using MySQL due to the contract requirements.  
> If I
> regularly used MySQL then I probably wouldn't even be attempting to  
> use
> these sql features! ;)

   Very sorry for you... ;-) Maybe you should argue against using  
something as bad as this...
   []'z
--
Luis Motta Campos (a.k.a. Monsieur Champs) is a software engineer,
Perl fanatic evangelist, and amateur {cook, photographer}




More information about the london.pm mailing list