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
64ed9d3a
Commit
64ed9d3a
authored
Jun 07, 2005
by
heikki@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
innodb.result, innodb.test:
Update Monty's tests for AUTO-INC bug #11080 and bug #11005
parent
8a3c1ae8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+11
-0
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+4
-9
No files found.
mysql-test/r/innodb.result
View file @
64ed9d3a
...
...
@@ -2457,6 +2457,17 @@ rowid val
1 1
2 2
drop table t1;
create table t1 (rowid int not null auto_increment, val int not null,primary
key (rowid), unique(val)) engine=innodb;
replace into t1 (val) values ('1'),('2');
replace into t1 (val) values ('1'),('2');
insert into t1 (val) values ('1'),('2');
ERROR 23000: Duplicate entry '1' for key 2
select * from t1;
rowid val
3 1
4 2
drop table t1;
create table t1 (a int not null auto_increment primary key, val int) engine=InnoDB;
insert into t1 (val) values (1);
update t1 set a=2 where a=1;
...
...
mysql-test/t/innodb.test
View file @
64ed9d3a
...
...
@@ -1350,16 +1350,12 @@ drop table t1;
CREATE
TABLE
t1
(
`a`
int
(
11
)
NOT
NULL
auto_increment
,
`b`
int
(
11
)
default
NULL
,
PRIMARY
KEY
(
`a`
),
UNIQUE
KEY
`b`
(
`b`
))
ENGINE
=
innodb
;
insert
into
t1
(
b
)
values
(
1
);
# We shouldn't get the following error
--
error
1062
replace
into
t1
(
b
)
values
(
2
),
(
1
),
(
3
);
select
*
from
t1
;
truncate
table
t1
;
insert
into
t1
(
b
)
values
(
1
);
replace
into
t1
(
b
)
values
(
2
);
replace
into
t1
(
b
)
values
(
1
);
# We shouldn't get the following error
--
error
1062
replace
into
t1
(
b
)
values
(
3
);
select
*
from
t1
;
drop
table
t1
;
...
...
@@ -1367,24 +1363,23 @@ drop table t1;
create
table
t1
(
rowid
int
not
null
auto_increment
,
val
int
not
null
,
primary
key
(
rowid
),
unique
(
val
))
engine
=
innodb
;
replace
into
t1
(
val
)
values
(
'1'
),(
'2'
);
# We shouldn't get the following error
--
error
1062
replace
into
t1
(
val
)
values
(
'1'
),(
'2'
);
--
error
1062
insert
into
t1
(
val
)
values
(
'1'
),(
'2'
);
--
error
1062
select
*
from
t1
;
drop
table
t1
;
#
# Test that update
changes
internal auto-increment value
# Test that update
does not change
internal auto-increment value
#
create
table
t1
(
a
int
not
null
auto_increment
primary
key
,
val
int
)
engine
=
InnoDB
;
insert
into
t1
(
val
)
values
(
1
);
update
t1
set
a
=
2
where
a
=
1
;
# We should
n't get the following erro
r
# We should
get the following error because InnoDB does not update the counte
r
--
error
1062
insert
into
t1
(
val
)
values
(
1
);
--
error
1062
select
*
from
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