Below is the list of changes that have just been committed into a local
5.0 repository of tomash. When tomash does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-10-25 20:00:51+04:00, kroki@stripped +3 -0
Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug18819
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug18819
MERGE: 1.1616.2144.202
mysql-test/r/innodb_mysql.result@stripped, 2006-10-25 20:00:49+04:00,
kroki@stripped +17 -16
Manual merge.
MERGE: 1.3.1.3
mysql-test/t/innodb_mysql.test@stripped, 2006-10-25 20:00:49+04:00, kroki@stripped
+30 -29
Manual merge.
MERGE: 1.3.1.3
sql/sql_delete.cc@stripped, 2006-10-25 20:00:49+04:00, kroki@stripped +1 -3
Manual merge.
MERGE: 1.99.2.41
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: kroki
# Host: moonlight.intranet
# Root: /home/tomash/src/mysql_ab/mysql-5.0-bug18819/RESYNC
--- 1.179/sql/sql_delete.cc 2006-10-25 20:00:58 +04:00
+++ 1.180/sql/sql_delete.cc 2006-10-25 20:00:58 +04:00
@@ -317,7 +317,7 @@ cleanup:
mysql_unlock_tables(thd, thd->lock);
thd->lock=0;
}
- if (error < 0)
+ if (error < 0 || (thd->lex->ignore && !thd->is_fatal_error))
{
thd->row_count_func= deleted;
send_ok(thd,deleted);
--- 1.9/mysql-test/r/innodb_mysql.result 2006-10-25 20:00:58 +04:00
+++ 1.10/mysql-test/r/innodb_mysql.result 2006-10-25 20:00:58 +04:00
@@ -295,6 +295,23 @@ b
c
d
drop table t1,t4;
+
+DROP TABLE IF EXISTS t2, t1;
+CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE= InnoDB;
+CREATE TABLE t2 (
+i INT NOT NULL,
+FOREIGN KEY (i) REFERENCES t1 (i) ON DELETE NO ACTION
+) ENGINE= InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+DELETE IGNORE FROM t1 WHERE i = 1;
+Warnings:
+Error 1217 Cannot delete or update a parent row: a foreign key constraint fails
+SELECT * FROM t1, t2;
+i i
+1 1
+DROP TABLE t2, t1;
+End of 4.1 tests.
create table t1 (
a varchar(30), b varchar(30), primary key(a), key(b)
) engine=innodb;
--- 1.8/mysql-test/t/innodb_mysql.test 2006-10-25 20:00:58 +04:00
+++ 1.9/mysql-test/t/innodb_mysql.test 2006-10-25 20:00:58 +04:00
@@ -246,6 +246,36 @@ select distinct a1 from t4 where pk_col
drop table t1,t4;
+
+#
+# BUG#18819: DELETE IGNORE hangs on foreign key parent delete
+#
+# The bug itself does not relate to InnoDB, but we have to use foreign
+# keys to reproduce it.
+#
+--disable_warnings
+DROP TABLE IF EXISTS t2, t1;
+--enable_warnings
+
+CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE= InnoDB;
+CREATE TABLE t2 (
+ i INT NOT NULL,
+ FOREIGN KEY (i) REFERENCES t1 (i) ON DELETE NO ACTION
+) ENGINE= InnoDB;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+
+DELETE IGNORE FROM t1 WHERE i = 1;
+
+SELECT * FROM t1, t2;
+
+DROP TABLE t2, t1;
+
+
+--echo End of 4.1 tests.
+
+
#
# Bug #6142: a problem with the empty innodb table
# (was part of group_min_max.test)
| Thread |
|---|
| • bk commit into 5.0 tree (kroki:1.2270) | kroki | 25 Oct |