Commit 61578756 authored by Michael Widenius's avatar Michael Widenius

Added test case to show that we get a warning from CHECK TABLE if we force...

Added test case to show that we get a warning from CHECK TABLE if we force auto_increment value to 0
parent 9f6f0436
...@@ -22,6 +22,17 @@ CHECK TABLE t1; ...@@ -22,6 +22,17 @@ CHECK TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
drop table t1; drop table t1;
create table t1 (a int primary key auto_increment) engine=aria;
insert into t1 values (1);
update t1 set a=0 where a=1;
check table t1;
Table Op Msg_type Msg_text
test.t1 check warning Found row where the auto_increment column has the value 0
test.t1 check status OK
select * from t1;
a
0
drop table t1;
create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a)); create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a));
check table t1; check table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
......
...@@ -41,6 +41,16 @@ INSERT INTO t1 VALUES ('WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW ...@@ -41,6 +41,16 @@ INSERT INTO t1 VALUES ('WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
CHECK TABLE t1; CHECK TABLE t1;
drop table t1; drop table t1;
#
# Test auto_increment warning
#
create table t1 (a int primary key auto_increment) engine=aria;
insert into t1 values (1);
update t1 set a=0 where a=1;
check table t1;
select * from t1;
drop table t1;
# #
# Test problem with rows that are 65517-65520 bytes long # Test problem with rows that are 65517-65520 bytes long
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment