Below is the list of changes that have just been committed into a local
5.1 repository of anozdrin. When anozdrin 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, 2008-02-15 14:14:09+03:00, anozdrin@quad. +2 -0
Add a test case for Bug#21704: Renaming column does not update
FK definition.
mysql-test/include/mix1.inc@stripped, 2008-02-15 14:14:07+03:00, anozdrin@quad. +29 -0
Add a test case for Bug#21704: Renaming column does not update
FK definition.
mysql-test/r/innodb_mysql.result@stripped, 2008-02-15 14:14:07+03:00, anozdrin@quad. +13 -0
Updated result file.
diff -Nrup a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc
--- a/mysql-test/include/mix1.inc 2008-01-11 21:05:31 +03:00
+++ b/mysql-test/include/mix1.inc 2008-02-15 14:14:07 +03:00
@@ -1410,4 +1410,33 @@ SELECT * FROM t1 WHERE tid = 1 AND vid =
DROP TABLE t1;
+#
+# Bug#21704: Renaming column does not update FK definition.
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+--enable_warnings
+
+CREATE TABLE t1(id INT PRIMARY KEY)
+ ENGINE=innodb;
+
+CREATE TABLE t2(
+ t1_id INT PRIMARY KEY,
+ CONSTRAINT fk1 FOREIGN KEY (t1_id) REFERENCES t1(id))
+ ENGINE=innodb;
+
+--echo
+
+--disable_result_log
+--error ER_ERROR_ON_RENAME
+ALTER TABLE t1 CHANGE id id2 INT;
+--enable_result_log
+
+--echo
+
+DROP TABLE t2;
+DROP TABLE t1;
+
--echo End of 5.1 tests
diff -Nrup a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result
--- a/mysql-test/r/innodb_mysql.result 2008-01-24 17:40:13 +03:00
+++ b/mysql-test/r/innodb_mysql.result 2008-02-15 14:14:07 +03:00
@@ -1634,4 +1634,17 @@ vid tid idx name type
3 1 2 c1 NULL
3 1 1 pk NULL
DROP TABLE t1;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+CREATE TABLE t1(id INT PRIMARY KEY)
+ENGINE=innodb;
+CREATE TABLE t2(
+t1_id INT PRIMARY KEY,
+CONSTRAINT fk1 FOREIGN KEY (t1_id) REFERENCES t1(id))
+ENGINE=innodb;
+
+ALTER TABLE t1 CHANGE id id2 INT;
+
+DROP TABLE t2;
+DROP TABLE t1;
End of 5.1 tests
| Thread |
|---|
| • bk commit into 5.1 tree (anozdrin:1.2552) BUG#21704 | Alexander Nozdrin | 15 Feb |