summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-07-30 09:47:56 +0200
committerunknown <serg@serg.mylan>2004-07-30 09:47:56 +0200
commite4525483524b701cf669b0adb75b392123870bf5 (patch)
tree23ce9bbd22f08095037ed99e535093dedaeeb1be /mysql-test
parentb66a13eeb8f4a9bef7bda5a9d035328860fb7718 (diff)
downloadmariadb-git-e4525483524b701cf669b0adb75b392123870bf5.tar.gz
auto_value_on_zero bug test
mysql-test/r/auto_increment.result: bug test mysql-test/t/auto_increment.test: bug test sql/sql_base.cc: cleanup
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/auto_increment.result18
-rw-r--r--mysql-test/t/auto_increment.test2
2 files changed, 18 insertions, 2 deletions
diff --git a/mysql-test/r/auto_increment.result b/mysql-test/r/auto_increment.result
index 6bc59d4771f..79bcff06f68 100644
--- a/mysql-test/r/auto_increment.result
+++ b/mysql-test/r/auto_increment.result
@@ -201,12 +201,23 @@ a b
202 5
203 6
204 7
+alter table t1 modify b mediumint;
+select * from t1 order by b;
+a b
+1 1
+200 2
+205 3
+201 4
+202 5
+203 6
+204 7
delete from t1 where a=0;
update t1 set a=0 where b=5;
select * from t1 order by b;
a b
1 1
200 2
+205 3
201 4
0 5
203 6
@@ -214,7 +225,7 @@ a b
delete from t1 where a=0;
update t1 set a=NULL where b=6;
Warnings:
-Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 4
+Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 5
update t1 set a=300 where b=7;
SET SQL_MODE='';
insert into t1(a,b)values(NULL,8);
@@ -228,6 +239,7 @@ select * from t1 order by b;
a b
1 1
200 2
+205 3
201 4
0 6
300 7
@@ -244,6 +256,7 @@ select * from t1 order by b;
a b
1 1
200 2
+205 3
201 4
300 7
301 8
@@ -256,12 +269,13 @@ a b
delete from t1 where a=0;
update t1 set a=NULL where b=13;
Warnings:
-Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 9
+Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 10
update t1 set a=500 where b=14;
select * from t1 order by b;
a b
1 1
200 2
+205 3
201 4
300 7
301 8
diff --git a/mysql-test/t/auto_increment.test b/mysql-test/t/auto_increment.test
index 73588a91aac..65770f32476 100644
--- a/mysql-test/t/auto_increment.test
+++ b/mysql-test/t/auto_increment.test
@@ -138,6 +138,8 @@ insert into t1(b)values(5);
insert into t1(b)values(6);
insert into t1(b)values(7);
select * from t1 order by b;
+alter table t1 modify b mediumint;
+select * from t1 order by b;
delete from t1 where a=0;
update t1 set a=0 where b=5;
select * from t1 order by b;