diff options
author | unknown <monty@mashka.mysql.fi> | 2003-10-11 23:26:39 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-10-11 23:26:39 +0300 |
commit | 0cdddbf144de80d1c4da00ee681632bc0ac6c7c9 (patch) | |
tree | ef3d1cebc764d28840dd77ecb91ade0a6f1b593e /mysql-test | |
parent | 617e09abcf4d0b41283bd423f32415d7f4459e9e (diff) | |
download | mariadb-git-0cdddbf144de80d1c4da00ee681632bc0ac6c7c9.tar.gz |
Add warnings for single line inserts. To do this I had to convert count_cuted_fields to an enum (to be able to detect setting a NOT NULL field to NULL)
mysql-test/r/ctype_mb.result:
update results after adding more warnings
mysql-test/r/null.result:
update results after adding more warnings
mysql-test/r/select_found.result:
update results after adding more warnings
mysql-test/r/warnings.result:
update results after adding more warnings
mysql-test/t/ctype_mb.test:
Add missing drop table
mysql-test/t/myisam.test:
Disable some warnings
mysql-test/t/select_found.test:
update results after adding more warnings
sql/field_conv.cc:
Add warnings for single line inserts
sql/item_func.cc:
Remove compile warnings
sql/sql_class.cc:
Add warnings for single line inserts
sql/sql_class.h:
Add warnings for single line inserts
sql/sql_insert.cc:
Add warnings for single line inserts
sql/sql_load.cc:
Add warnings for single line inserts
sql/sql_select.cc:
Add warnings for single line inserts
sql/sql_table.cc:
Add warnings for single line inserts
sql/sql_update.cc:
Add warnings for single line inserts
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/ctype_mb.result | 5 | ||||
-rw-r--r-- | mysql-test/r/null.result | 2 | ||||
-rw-r--r-- | mysql-test/r/select_found.result | 2 | ||||
-rw-r--r-- | mysql-test/r/warnings.result | 2 | ||||
-rw-r--r-- | mysql-test/t/ctype_mb.test | 7 | ||||
-rw-r--r-- | mysql-test/t/myisam.test | 2 | ||||
-rw-r--r-- | mysql-test/t/select_found.test | 2 |
7 files changed, 20 insertions, 2 deletions
diff --git a/mysql-test/r/ctype_mb.result b/mysql-test/r/ctype_mb.result index 298e774186d..ce4a4f98b42 100644 --- a/mysql-test/r/ctype_mb.result +++ b/mysql-test/r/ctype_mb.result @@ -1,3 +1,4 @@ +drop table if exists t1; CREATE TABLE t1 SELECT _utf8'test' as c1, _utf8'тест' as c2; SHOW CREATE TABLE t1; Table Create Table @@ -15,6 +16,10 @@ t1 CREATE TABLE `t1` ( `c3` char(4) character set utf8 default NULL ) TYPE=MyISAM CHARSET=latin1 INSERT INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd'); +Warnings: +Warning 1264 Data truncated for column 'c1' at row 1 +Warning 1264 Data truncated for column 'c2' at row 1 +Warning 1264 Data truncated for column 'c3' at row 1 SELECT * FROM t1; c1 c2 c3 aaaabbbbcccc aaaabbbbcccc aaaabbbbcccc diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index 479a7f049d9..2ef1f0c86f9 100644 --- a/mysql-test/r/null.result +++ b/mysql-test/r/null.result @@ -75,6 +75,8 @@ NULL this is null drop table t1; CREATE TABLE t1 (a varchar(16) NOT NULL, b smallint(6) NOT NULL, c datetime NOT NULL, d smallint(6) NOT NULL); INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55"; +Warnings: +Warning 1264 Data truncated for column 'd' at row 1 UPDATE t1 SET d=1/NULL; Warnings: Warning 1264 Data truncated for column 'd' at row 1 diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index c8991696b5e..d79f45a9334 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -136,7 +136,7 @@ email104 email105 email106 email107 -INSERT INTO `t1` (`id`, `kid`) VALUES ('', '150'); +INSERT INTO `t1` (`id`, `kid`) VALUES ('0', '150'); SELECT SQL_CALC_FOUND_ROWS DISTINCT email FROM t2 LEFT JOIN t1 ON kid = t2.id WHERE t1.id IS NULL LIMIT 10; email email1 diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index 9d4710ff729..26353785733 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -92,6 +92,8 @@ Warning 1264 Data truncated for column 'b' at row 3 Warning 1262 Data truncated, NULL supplied to NOT NULL column 'a' at row 4 Warning 1264 Data truncated for column 'b' at row 4 insert into t2(b) values('mysqlab'); +Warnings: +Warning 1264 Data truncated for column 'b' at row 1 set sql_warnings=1; insert into t2(b) values('mysqlab'); Warnings: diff --git a/mysql-test/t/ctype_mb.test b/mysql-test/t/ctype_mb.test index 96bb634deb3..b0ccab8e345 100644 --- a/mysql-test/t/ctype_mb.test +++ b/mysql-test/t/ctype_mb.test @@ -1,3 +1,10 @@ +# +# Test of alter table +# +--disable_warnings +drop table if exists t1; +--enable_warnings + CREATE TABLE t1 SELECT _utf8'test' as c1, _utf8'тест' as c2; SHOW CREATE TABLE t1; DELETE FROM t1; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 8c43ce1937f..5dceb2b4598 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -34,6 +34,7 @@ create table t1 (a tinyint not null auto_increment, b blob not null, primary key let $1=100; disable_query_log; +--disable_warnings SET SQL_WARNINGS=0; while ($1) { @@ -41,6 +42,7 @@ while ($1) dec $1; } SET SQL_WARNINGS=1; +--enable_warnings enable_query_log; check table t1; repair table t1; diff --git a/mysql-test/t/select_found.test b/mysql-test/t/select_found.test index 06624d50a43..e8be902606c 100644 --- a/mysql-test/t/select_found.test +++ b/mysql-test/t/select_found.test @@ -64,7 +64,7 @@ SELECT FOUND_ROWS(); SELECT DISTINCT email FROM t2 LEFT JOIN t1 ON kid = t2.id WHERE t1.id IS NULL LIMIT 10; SELECT DISTINCT email FROM t2 LEFT JOIN t1 ON kid = t2.id WHERE t1.id IS NULL ORDER BY email LIMIT 10; -INSERT INTO `t1` (`id`, `kid`) VALUES ('', '150'); +INSERT INTO `t1` (`id`, `kid`) VALUES ('0', '150'); SELECT SQL_CALC_FOUND_ROWS DISTINCT email FROM t2 LEFT JOIN t1 ON kid = t2.id WHERE t1.id IS NULL LIMIT 10; SELECT FOUND_ROWS(); |