FAQ
Hello,

I've got an innodb that I try to drop:

drop table markets;
ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key
constraint fails

Ok, I check with show innodb status :
050401 11:13:41 Cannot drop table `dabase/markets`
because it is referenced by `dabase/last`

then :
drop table last;
ERROR 1051 (42S02): Unknown table 'last'

I'm a bit lost there, how can I drop this table ? (I want to recreate it
with innodb_file_per_table option afterwards)

--
Philippe Poelvoorde
COS Trading Ltd.

Search Discussions

  • Gleb Paharenko at Apr 1, 2005 at 2:15 pm
    Hello.

    I think that SET FOREIGN_KEY_CHECKS = 0; could help you.



    Philippe Poelvoorde wrote:
    Hello,

    I've got an innodb that I try to drop:

    drop table markets;
    ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key
    constraint fails

    Ok, I check with show innodb status :
    050401 11:13:41 Cannot drop table `dabase/markets`
    because it is referenced by `dabase/last`

    then :
    drop table last;
    ERROR 1051 (42S02): Unknown table 'last'

    I'm a bit lost there, how can I drop this table ? (I want to recreate it
    with innodb_file_per_table option afterwards)

    --
    For technical support contracts, goto https://order.mysql.com/?ref=ensita
    This email is sponsored by Ensita.NET http://www.ensita.net/
    __ ___ ___ ____ __
    / |/ /_ __/ __/ __ \/ / Gleb Paharenko
    / /|_/ / // /\ \/ /_/ / /__ gleb.paharenko@ensita.net
    /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET
    <___/ www.mysql.com
  • Philippe Poelvoorde at Apr 1, 2005 at 3:34 pm

    Gleb Paharenko wrote:
    Hello.

    I think that SET FOREIGN_KEY_CHECKS = 0; could help you.
    Thanks, I didn't think about it. I've I dumped the DB and recreate it
    instead.


    Philippe Poelvoorde wrote:
    Hello,

    I've got an innodb that I try to drop:

    drop table markets;
    ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key
    constraint fails

    Ok, I check with show innodb status :
    050401 11:13:41 Cannot drop table `dabase/markets`
    because it is referenced by `dabase/last`

    then :
    drop table last;
    ERROR 1051 (42S02): Unknown table 'last'

    I'm a bit lost there, how can I drop this table ? (I want to recreate it
    with innodb_file_per_table option afterwards)

    --
    Philippe Poelvoorde
    COS Trading Ltd.
    +44.(0)20.7376.2401

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmysql @
categoriesmysql
postedApr 1, '05 at 10:15a
activeApr 1, '05 at 3:34p
posts3
users2
websitemysql.com
irc#mysql

People

Translate

site design / logo © 2021 Grokbase