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
7e62ee83
Commit
7e62ee83
authored
Jan 04, 2008
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: innodb-index.test: Test duplicate key failures for different
indexes.
parent
051ee491
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
mysql-test/innodb-index.result
mysql-test/innodb-index.result
+3
-3
mysql-test/innodb-index.test
mysql-test/innodb-index.test
+2
-2
No files found.
mysql-test/innodb-index.result
View file @
7e62ee83
...
...
@@ -627,10 +627,10 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb;
insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,3,'ac','ac'),(4,4,'afe','afe');
insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,3,'ac','ac'),(4,4,'afe','afe')
,(5,4,'affe','affe')
;
alter table t1 add unique index (b), add unique index (c), add unique index (d);
ERROR 23000: Duplicate entry '
ac' for key 'c
'
alter table t1 add unique index (
b), add index (d), add unique index (c
);
ERROR 23000: Duplicate entry '
4' for key 'b
'
alter table t1 add unique index (
c), add unique index (b), add index (d
);
ERROR 23000: Duplicate entry 'ac' for key 'c'
show create table t1;
Table Create Table
...
...
mysql-test/innodb-index.test
View file @
7e62ee83
...
...
@@ -181,11 +181,11 @@ show create table t1;
drop
table
t1
;
create
table
t1
(
a
int
not
null
,
b
int
,
c
char
(
10
),
d
varchar
(
20
),
primary
key
(
a
))
engine
=
innodb
;
insert
into
t1
values
(
1
,
1
,
'ab'
,
'ab'
),(
2
,
2
,
'ac'
,
'ac'
),(
3
,
3
,
'ac'
,
'ac'
),(
4
,
4
,
'afe'
,
'afe'
);
insert
into
t1
values
(
1
,
1
,
'ab'
,
'ab'
),(
2
,
2
,
'ac'
,
'ac'
),(
3
,
3
,
'ac'
,
'ac'
),(
4
,
4
,
'afe'
,
'afe'
)
,(
5
,
4
,
'affe'
,
'affe'
)
;
--
error
ER_DUP_ENTRY
alter
table
t1
add
unique
index
(
b
),
add
unique
index
(
c
),
add
unique
index
(
d
);
--
error
ER_DUP_ENTRY
alter
table
t1
add
unique
index
(
b
),
add
index
(
d
),
add
unique
index
(
c
);
alter
table
t1
add
unique
index
(
c
),
add
unique
index
(
b
),
add
index
(
d
);
show
create
table
t1
;
drop
table
t1
;
...
...
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