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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
1d1040e1
Commit
1d1040e1
authored
Apr 14, 2006
by
cmiller@zippy.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hand-merged test.
parent
46716503
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 @
1d1040e1
This diff is collapsed.
Click to expand it.
mysql-test/t/innodb.test
View file @
1d1040e1
...
...
@@ -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