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
1a72a3da
Commit
1a72a3da
authored
Mar 01, 2007
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test case for r1316 (Bug #25927).
parent
7b2e60e1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
mysql-test/innodb.result
mysql-test/innodb.result
+9
-0
mysql-test/innodb.test
mysql-test/innodb.test
+16
-0
No files found.
mysql-test/innodb.result
View file @
1a72a3da
...
...
@@ -3471,3 +3471,12 @@ t2 CREATE TABLE `t2` (
CONSTRAINT `t2_t1` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
)
ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t2, t1;
CREATE TABLE t1 (a INT, INDEX(a)) ENGINE=InnoDB;
CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL;
ALTER TABLE t2 MODIFY a INT NOT NULL;
ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150)
DELETE FROM t1;
DROP TABLE t2,t1;
mysql-test/innodb.test
View file @
1a72a3da
...
...
@@ -2513,6 +2513,22 @@ DELETE CASCADE ON UPDATE CASCADE;
SHOW
CREATE
TABLE
t2
;
DROP
TABLE
t2
,
t1
;
#
# Bug #25927: Prevent ALTER TABLE ... MODIFY ... NOT NULL on columns
# for which there is a foreign key constraint ON ... SET NULL.
#
CREATE
TABLE
t1
(
a
INT
,
INDEX
(
a
))
ENGINE
=
InnoDB
;
CREATE
TABLE
t2
(
a
INT
,
INDEX
(
a
))
ENGINE
=
InnoDB
;
INSERT
INTO
t1
VALUES
(
1
);
INSERT
INTO
t2
VALUES
(
1
);
ALTER
TABLE
t2
ADD
FOREIGN
KEY
(
a
)
REFERENCES
t1
(
a
)
ON
DELETE
SET
NULL
;
--
replace_regex
/
'\.\/test\/#sql-[0-9a-f_]*'
/
'#sql-temporary'
/
--
error
1025
ALTER
TABLE
t2
MODIFY
a
INT
NOT
NULL
;
DELETE
FROM
t1
;
DROP
TABLE
t2
,
t1
;
#######################################################################
# #
# Please, DO NOT TOUCH this file as well as the innodb.result file. #
...
...
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