diff options
author | unknown <venu@myvenu.com> | 2003-05-21 00:14:56 -0700 |
---|---|---|
committer | unknown <venu@myvenu.com> | 2003-05-21 00:14:56 -0700 |
commit | 5c18a462d56bfd5b7a4a3f1eb70b792ef57a5253 (patch) | |
tree | ec940460124b40ae2878a8310fe6f1e1418146c4 /mysql-test/t/warnings.test | |
parent | a8e5dcb449cf6af8eb76b7cc8ad65e19663d8107 (diff) | |
download | mariadb-git-5c18a462d56bfd5b7a4a3f1eb70b792ef57a5253.tar.gz |
Resolve merge conflict
Diffstat (limited to 'mysql-test/t/warnings.test')
-rw-r--r-- | mysql-test/t/warnings.test | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test index ab8c0b99ca5..16a9b5d11e6 100644 --- a/mysql-test/t/warnings.test +++ b/mysql-test/t/warnings.test @@ -2,7 +2,7 @@ # Test some warnings # --disable-warnings -drop table if exists t1; +drop table if exists t1, t2; --enable-warnings create table t1 (a int); @@ -17,6 +17,7 @@ set SQL_WARNINGS=0; # # Test other warnings +# drop temporary table if exists not_exists; drop table if exists not_exists_table; @@ -28,6 +29,51 @@ create table if not exists t1(id int); select @@warning_count; drop table t1; +# +# Test warnings for LOAD DATA INFILE +# + +create table t1(a tinyint, b int not null, c date, d char(5)); +load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ','; +select @@warning_count; +drop table t1; + +# +# Warnings from basic INSERT, UPDATE and ALTER commands +# + +create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5)); +insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test'); +alter table t1 modify c char(4); +alter table t1 add d char(2); +update t1 set a=NULL where a=10; +update t1 set c='mysql ab' where c='test'; +update t1 set d=c; +create table t2(a tinyint NOT NULL, b char(3)); +insert into t2 select b,c from t1; +drop table t1, t2; + +# +# Test for max_error_count +# + +create table t1(a char(10)); +let $1=50; +disable_query_log; +while ($1) +{ + eval insert into t1 values('mysql ab'); + dec $1; +} +enable_query_log; +alter table t1 add b char; +set max_error_count=10; +update t1 set b=a; +select @@warning_count; + +# +# Test for handler type +# create table t1 (id int) type=isam; alter table t1 type=isam; drop table t1; |