Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
b25de633
Commit
b25de633
authored
Feb 15, 2008
by
anozdrin/alik@quad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test case for Bug#21704: Renaming column does not update
FK definition.
parent
6bf1306b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
+42
-0
mysql-test/include/mix1.inc
mysql-test/include/mix1.inc
+29
-0
mysql-test/r/innodb_mysql.result
mysql-test/r/innodb_mysql.result
+13
-0
No files found.
mysql-test/include/mix1.inc
View file @
b25de633
...
...
@@ -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
mysql-test/r/innodb_mysql.result
View file @
b25de633
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment