diff options
author | unknown <heikki@hundin.mysql.fi> | 2002-05-02 11:12:49 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2002-05-02 11:12:49 +0300 |
commit | 61c979a06c5e0fde16237f367ab6f01bff3921ee (patch) | |
tree | 5eef499183a80220c54fe0313599a9882354c12d /innobase/row/row0ins.c | |
parent | c3703e5568c76669c8277e98206a00e6f652b5fd (diff) | |
download | mariadb-git-61c979a06c5e0fde16237f367ab6f01bff3921ee.tar.gz |
row0ins.c:
Fix an assertion failure in row0ins.c line 511 in case of a cascading delete caused by circularly referencing rows, when foreign keys are used
innobase/row/row0ins.c:
Fix an assertion failure in row0ins.c line 511 in case of a cascading delete caused by circularly referencing rows, when foreign keys are used
Diffstat (limited to 'innobase/row/row0ins.c')
-rw-r--r-- | innobase/row/row0ins.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/innobase/row/row0ins.c b/innobase/row/row0ins.c index 0ba6db39e2a..b28be55347c 100644 --- a/innobase/row/row0ins.c +++ b/innobase/row/row0ins.c @@ -456,7 +456,8 @@ row_ins_foreign_delete_or_set_null( } if (!page_rec_is_user_rec(clust_rec)) { - fprintf(stderr, "InnoDB: error in cascade of a foreign key op\n" + fprintf(stderr, + "InnoDB: error in cascade of a foreign key op\n" "InnoDB: index %s table %s\n", index->name, index->table->name); @@ -490,9 +491,10 @@ row_ins_foreign_delete_or_set_null( } if (rec_get_deleted_flag(clust_rec)) { - /* This should never happen since we already have an S-lock - on non-delete-marked clust_rec or secondary index record! */ - + /* This can happen if there is a circular reference of + rows such that cascading delete comes to delete a row + already in the process of being delete marked */ +/* fprintf(stderr, "InnoDB: error 2 in cascade of a foreign key op\n" "InnoDB: index %s table %s\n", index->name, @@ -509,6 +511,8 @@ row_ins_foreign_delete_or_set_null( fprintf(stderr, "InnoDB: to mysql@lists.mysql.com\n"); ut_a(0); +*/ + err = DB_SUCCESS; goto nonstandard_exit_func; } |