diff options
author | unknown <vva@eagle.mysql.r18.ru> | 2003-07-28 10:57:46 -0400 |
---|---|---|
committer | unknown <vva@eagle.mysql.r18.ru> | 2003-07-28 10:57:46 -0400 |
commit | a56959a5b6b5e04e86b03e33fd4eb664322f9342 (patch) | |
tree | 03a3f7dcd401f3a989010a618471f93548dceedc /mysql-test/t/auto_increment.test | |
parent | 9b675b8be0ab30ce9a4a0a16a0932f163d9f1d87 (diff) | |
download | mariadb-git-a56959a5b6b5e04e86b03e33fd4eb664322f9342.tar.gz |
changed for AUTO_VALUE_ON_ZERO
mysql-test/r/auto_increment.result:
added test for AUTO_VALUE_ON_ZERO
mysql-test/t/auto_increment.test:
added test for AUTO_VALUE_ON_ZERO
Diffstat (limited to 'mysql-test/t/auto_increment.test')
-rw-r--r-- | mysql-test/t/auto_increment.test | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/mysql-test/t/auto_increment.test b/mysql-test/t/auto_increment.test index e187d42625e..b46993ec6dd 100644 --- a/mysql-test/t/auto_increment.test +++ b/mysql-test/t/auto_increment.test @@ -106,17 +106,36 @@ select last_insert_id(); drop table t1; -drop table if exists t1; create table t1(a int auto_increment,b int null,primary key(a)); SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; insert into t1(a,b)values(NULL,1); insert into t1(a,b)values(200,2); insert into t1(a,b)values(0,3); insert into t1(b)values(4); +insert into t1(b)values(5); +insert into t1(b)values(6); +insert into t1(b)values(7); +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; +delete from t1 where a=0; +update t1 set a=NULL where b=6; +update t1 set a=300 where b=7; SET SQL_MODE=''; -insert into t1(a,b)values(NULL,5); -insert into t1(a,b)values(300,6); -insert into t1(a,b)values(0,7); -insert into t1(b)values(8); -select * from t1; +insert into t1(a,b)values(NULL,8); +insert into t1(a,b)values(400,9); +insert into t1(a,b)values(0,10); +insert into t1(b)values(11); +insert into t1(b)values(12); +insert into t1(b)values(13); +insert into t1(b)values(14); +select * from t1 order by b; +delete from t1 where a=0; +update t1 set a=0 where b=12; +select * from t1 order by b; +delete from t1 where a=0; +update t1 set a=NULL where b=13; +update t1 set a=500 where b=14; +select * from t1 order by b; drop table t1; |