Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Bug in new FOREIGN KEY checks in MySQLInnoDB/4.0.18: msg#00023

db.mysql.bugs

Subject: Re: Bug in new FOREIGN KEY checks in MySQLInnoDB/4.0.18

Sinisa Milivojevic wrote:

>Steve Hay writes:
>
>
>>Hi,
>>
>>I've just upgraded from MySQL 4.0.16 to 4.0.18 and now find that some
>>commands that used to work without error (dropping and re-creating a
>>database) no longer work.
>>
>>The error is:
>>
>> error: 'Cannot delete or update a parent row: a foreign key
>>constraint fails'
>>
>>which presumably relates to the first item in the InnoDB version history
>>(http://www.innodb.com/ibman.php#InnoDB.history). (All the tables in
>>the database concerned are InnoDB tables.)
>>
>>It appears that the foreign key constraint is being checked even when
>>dropping the database, which I assume is not intended.
>>
>>I tried a simple case of one table X referencing another table Y, and
>>"DROP DATABASE" works fine (even with data in it, so foreign key
>>constraints are not being checked here, which is as I would expect). I
>>tried another case with two tables X and Y referencing one table Z, but
>>still no error. Finally, I reproduced my problem by having table X
>>referencing table Y and table Y referencing table Z.
>>
>>The following DOS command-lines result in the error above:
>>
>>I'm running Windows XP SP1.
>>
>>Regards,
>>- Steve
>>
>>
>>
>
>Hi!
>
>Yes, the above is now the expected behaviour and it is documented in
>our Changelog.
>
>All you have to do is drop tables in the right order.
>
>
I understand that if I was issuing DROP TABLE statements then I would
need to put them in the right order, but I'm doing a DROP DATABASE.

Surely foreign key constraints should not be checked when the entire
database is being dropped.

If they /are/ supposed to be checked then the other cases that I
mentioned above (where DROP DATABASE worked fine) are not working properly!

- Steve



------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are
confidential and intended for the addressee(s) only. If you have received this
message in error or there are any problems, please notify the sender
immediately. The unauthorized use, disclosure, copying or alteration of this
message is strictly forbidden. Note that any views or opinions presented in
this email are solely those of the author and do not necessarily represent
those of Radan Computational Ltd. The recipient(s) of this message should
check it and any attached files for viruses: Radan Computational will accept no
liability for any damage caused by any virus transmitted by this email.


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qplus.devel/200...    network.jabber....    debian.qa-packa...    encryption.gpg....    python.dabo.dev...    uclinux.devel/2...    science.mathema...    recreation.pesc...    kernel.ck/2004-...    mozilla.devel.e...    tex.latex.prosp...    ietf.multi6/200...    bbc.cvs/2002-11...    xfree86.newbie/...    jakarta.taglibs...    altlinux.hardwa...    comedi/2002-05/...    horde.bugs/2004...    games.diplomacy...    finance.e-gold....    web.dom.test-su...    lang.ruby.rails...    os.netbsd.devel...    video.gstreamer...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation