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
3e21b9d0
Commit
3e21b9d0
authored
Apr 14, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hand-merged test.
parent
c0b172f0
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
169 additions
and
66 deletions
+169
-66
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+115
-66
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+54
-0
No files found.
mysql-test/r/innodb.result
View file @
3e21b9d0
This diff is collapsed.
Click to expand it.
mysql-test/t/innodb.test
View file @
3e21b9d0
...
...
@@ -2128,6 +2128,60 @@ connection default;
disconnect
a
;
disconnect
b
;
#
# Test that cascading updates leading to duplicate keys give the correct
# error message (bug #9680)
#
CREATE
TABLE
t1
(
field1
varchar
(
8
)
NOT
NULL
DEFAULT
''
,
field2
varchar
(
8
)
NOT
NULL
DEFAULT
''
,
PRIMARY
KEY
(
field1
,
field2
)
)
ENGINE
=
InnoDB
;
CREATE
TABLE
t2
(
field1
varchar
(
8
)
NOT
NULL
DEFAULT
''
PRIMARY
KEY
,
FOREIGN
KEY
(
field1
)
REFERENCES
t1
(
field1
)
ON
DELETE
CASCADE
ON
UPDATE
CASCADE
)
ENGINE
=
InnoDB
;
INSERT
INTO
t1
VALUES
(
'old'
,
'somevalu'
);
INSERT
INTO
t1
VALUES
(
'other'
,
'anyvalue'
);
INSERT
INTO
t2
VALUES
(
'old'
);
INSERT
INTO
t2
VALUES
(
'other'
);
--
error
ER_FOREIGN_DUPLICATE_KEY
UPDATE
t1
SET
field1
=
'other'
WHERE
field2
=
'somevalu'
;
DROP
TABLE
t2
;
DROP
TABLE
t1
;
#
# Bug#18477 - MySQL/InnoDB Ignoring Foreign Keys in ALTER TABLE
#
create
table
t1
(
c1
bigint
not
null
,
c2
bigint
not
null
,
primary
key
(
c1
),
unique
key
(
c2
)
)
engine
=
innodb
;
#
create
table
t2
(
c1
bigint
not
null
,
primary
key
(
c1
)
)
engine
=
innodb
;
#
alter
table
t1
add
constraint
c2_fk
foreign
key
(
c2
)
references
t2
(
c1
)
on
delete
cascade
;
show
create
table
t1
;
#
alter
table
t1
drop
foreign
key
c2_fk
;
show
create
table
t1
;
#
drop
table
t1
,
t2
;
#
# Bug #14360: problem with intervals
#
...
...
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