1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Add a test case for Bug#21704: Renaming column does not update

FK definition.


mysql-test/r/innodb_mysql.result:
  Updated result file.
This commit is contained in:
unknown
2008-02-15 14:14:09 +03:00
parent 5704c7fe2c
commit ea34b5e7aa
2 changed files with 42 additions and 0 deletions

View File

@ -1410,4 +1410,33 @@ SELECT * FROM t1 WHERE tid = 1 AND vid = 3 ORDER BY idx DESC;
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