diff options
author | unknown <gluh@eagle.intranet.mysql.r18.ru> | 2005-12-01 15:30:11 +0400 |
---|---|---|
committer | unknown <gluh@eagle.intranet.mysql.r18.ru> | 2005-12-01 15:30:11 +0400 |
commit | d8647be1d9f40bc9557d10dbc2b7f6fa9eef1f11 (patch) | |
tree | a4c4c8f31f5f4da6f1e120861d4711514587f19b /mysql-test | |
parent | e1973fd2f73064682cdc7d3fe84c2f53674bfd90 (diff) | |
download | mariadb-git-d8647be1d9f40bc9557d10dbc2b7f6fa9eef1f11.tar.gz |
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
Message is chenged from 'ER_WARN_NULL_TO_NOTNULL' to 'ER_BAD_NULL_ERROR'
mysql-test/r/auto_increment.result:
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
result change
mysql-test/r/create.result:
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
result change
mysql-test/r/insert.result:
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
result change
mysql-test/r/insert_select.result:
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
result change
mysql-test/r/key.result:
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
result change
mysql-test/r/null.result:
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
result change
mysql-test/r/null_key.result:
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
result change
mysql-test/r/ps_2myisam.result:
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
result change
mysql-test/r/ps_3innodb.result:
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
result change
mysql-test/r/ps_4heap.result:
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
result change
mysql-test/r/ps_5merge.result:
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
result change
mysql-test/r/ps_6bdb.result:
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
result change
mysql-test/r/ps_7ndb.result:
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
result change
mysql-test/r/strict.result:
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
result change
mysql-test/r/view.result:
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
result change
mysql-test/r/warnings.result:
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
result change
mysql-test/t/strict.test:
Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
test change
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/auto_increment.result | 4 | ||||
-rw-r--r-- | mysql-test/r/create.result | 2 | ||||
-rw-r--r-- | mysql-test/r/insert.result | 2 | ||||
-rw-r--r-- | mysql-test/r/insert_select.result | 4 | ||||
-rw-r--r-- | mysql-test/r/key.result | 4 | ||||
-rw-r--r-- | mysql-test/r/null.result | 18 | ||||
-rw-r--r-- | mysql-test/r/null_key.result | 2 | ||||
-rw-r--r-- | mysql-test/r/ps_2myisam.result | 2 | ||||
-rw-r--r-- | mysql-test/r/ps_3innodb.result | 2 | ||||
-rw-r--r-- | mysql-test/r/ps_4heap.result | 2 | ||||
-rw-r--r-- | mysql-test/r/ps_5merge.result | 4 | ||||
-rw-r--r-- | mysql-test/r/ps_6bdb.result | 2 | ||||
-rw-r--r-- | mysql-test/r/ps_7ndb.result | 2 | ||||
-rw-r--r-- | mysql-test/r/strict.result | 18 | ||||
-rw-r--r-- | mysql-test/r/view.result | 2 | ||||
-rw-r--r-- | mysql-test/r/warnings.result | 6 | ||||
-rw-r--r-- | mysql-test/t/strict.test | 8 |
17 files changed, 42 insertions, 42 deletions
diff --git a/mysql-test/r/auto_increment.result b/mysql-test/r/auto_increment.result index 61a42b004a9..3c1f61f87dd 100644 --- a/mysql-test/r/auto_increment.result +++ b/mysql-test/r/auto_increment.result @@ -232,7 +232,7 @@ a b delete from t1 where a=0; update t1 set a=NULL where b=6; Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 4 +Warning 1048 Column 'a' cannot be null update t1 set a=300 where b=7; SET SQL_MODE=''; insert into t1(a,b)values(NULL,8); @@ -274,7 +274,7 @@ a b delete from t1 where a=0; update t1 set a=NULL where b=13; Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 9 +Warning 1048 Column 'a' cannot be null update t1 set a=500 where b=14; select * from t1 order by b; a b diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index c981d3092a7..f73d891e7f0 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -13,7 +13,7 @@ Warnings: Note 1050 Table 't1' already exists insert into t1 values (""),(null); Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2 +Warning 1048 Column 'b' cannot be null select * from t1; b diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index f788576f824..7ffd2de9582 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -63,7 +63,7 @@ insert into t1 values(NULL); ERROR 23000: Column 'id' cannot be null insert into t1 values (1), (NULL), (2); Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'id' at row 2 +Warning 1048 Column 'id' cannot be null select * from t1; id 1 diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index 434dddb3049..fa8c3f8a2b8 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -606,8 +606,8 @@ NULL 2 100 create table t2(No int not null, Field int not null, Count int not null); insert into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2; Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'No' at row 1 -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'No' at row 2 +Warning 1048 Column 'No' cannot be null +Warning 1048 Column 'No' cannot be null select * from t2; No Field Count 0 1 100 diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result index bc9d3935bc4..095c8798b29 100644 --- a/mysql-test/r/key.result +++ b/mysql-test/r/key.result @@ -159,8 +159,8 @@ CREATE TABLE t1 (c CHAR(10) NOT NULL,i INT NOT NULL AUTO_INCREMENT, UNIQUE (c,i)); INSERT INTO t1 (c) VALUES (NULL),(NULL); Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 2 +Warning 1048 Column 'c' cannot be null +Warning 1048 Column 'c' cannot be null SELECT * FROM t1; c i 1 diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index 1425b2a7f89..35c8abf07a4 100644 --- a/mysql-test/r/null.result +++ b/mysql-test/r/null.result @@ -97,39 +97,39 @@ Warnings: Warning 1265 Data truncated for column 'd' at row 1 UPDATE t1 SET d=NULL; Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'd' at row 1 +Warning 1048 Column 'd' cannot be null INSERT INTO t1 (a) values (null); ERROR 23000: Column 'a' cannot be null INSERT INTO t1 (a) values (1/null); ERROR 23000: Column 'a' cannot be null INSERT INTO t1 (a) values (null),(null); Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 2 +Warning 1048 Column 'a' cannot be null +Warning 1048 Column 'a' cannot be null INSERT INTO t1 (b) values (null); ERROR 23000: Column 'b' cannot be null INSERT INTO t1 (b) values (1/null); ERROR 23000: Column 'b' cannot be null INSERT INTO t1 (b) values (null),(null); Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 1 -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2 +Warning 1048 Column 'b' cannot be null +Warning 1048 Column 'b' cannot be null INSERT INTO t1 (c) values (null); ERROR 23000: Column 'c' cannot be null INSERT INTO t1 (c) values (1/null); ERROR 23000: Column 'c' cannot be null INSERT INTO t1 (c) values (null),(null); Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 2 +Warning 1048 Column 'c' cannot be null +Warning 1048 Column 'c' cannot be null INSERT INTO t1 (d) values (null); ERROR 23000: Column 'd' cannot be null INSERT INTO t1 (d) values (1/null); ERROR 23000: Column 'd' cannot be null INSERT INTO t1 (d) values (null),(null); Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'd' at row 1 -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'd' at row 2 +Warning 1048 Column 'd' cannot be null +Warning 1048 Column 'd' cannot be null select * from t1; a b c d 0 0000-00-00 00:00:00 0 diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result index 7f746a3dbd8..15ca73dd7c9 100644 --- a/mysql-test/r/null_key.result +++ b/mysql-test/r/null_key.result @@ -342,7 +342,7 @@ index (id2) ); insert into t1 values(null,null),(1,1); Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'id2' at row 1 +Warning 1048 Column 'id2' cannot be null select * from t1; id id2 NULL 0 diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result index c839c8a65b9..b331aaab64b 100644 --- a/mysql-test/r/ps_2myisam.result +++ b/mysql-test/r/ps_2myisam.result @@ -1302,7 +1302,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1048 Column 'a' cannot be null select a,b from t1 order by a; a b 0 two diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index 81d6180e41f..46c61b72c19 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.result @@ -1285,7 +1285,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1048 Column 'a' cannot be null select a,b from t1 order by a; a b 0 two diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result index 931e6b7c86c..f024db29633 100644 --- a/mysql-test/r/ps_4heap.result +++ b/mysql-test/r/ps_4heap.result @@ -1286,7 +1286,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1048 Column 'a' cannot be null select a,b from t1 order by a; a b 0 two diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index 3b9244c251f..1e8af26591c 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -1328,7 +1328,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1048 Column 'a' cannot be null select a,b from t1 order by a; a b 0 two @@ -4340,7 +4340,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1048 Column 'a' cannot be null select a,b from t1 order by a; a b 0 two diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result index 643e12f7e2d..02b15bf993c 100644 --- a/mysql-test/r/ps_6bdb.result +++ b/mysql-test/r/ps_6bdb.result @@ -1285,7 +1285,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1048 Column 'a' cannot be null select a,b from t1 order by a; a b 0 two diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result index 9fbe67f581b..c585cedc195 100644 --- a/mysql-test/r/ps_7ndb.result +++ b/mysql-test/r/ps_7ndb.result @@ -1285,7 +1285,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1048 Column 'a' cannot be null select a,b from t1 order by a; a b 0 two diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 2b1a47ed337..6a228b97373 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -989,16 +989,16 @@ ERROR 23000: Column 'col2' cannot be null INSERT INTO t1 VALUES (103,'',NULL); ERROR 23000: Column 'col3' cannot be null UPDATE t1 SET col1=NULL WHERE col1 =100; -ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col1' at row 1 +ERROR 23000: Column 'col1' cannot be null UPDATE t1 SET col2 =NULL WHERE col2 ='hello'; -ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1 +ERROR 23000: Column 'col2' cannot be null UPDATE t1 SET col2 =NULL where col3 IS NOT NULL; -ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1 +ERROR 23000: Column 'col2' cannot be null INSERT IGNORE INTO t1 values (NULL,NULL,NULL); Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col1' at row 1 -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1 -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col3' at row 1 +Warning 1048 Column 'col1' cannot be null +Warning 1048 Column 'col2' cannot be null +Warning 1048 Column 'col3' cannot be null SELECT * FROM t1; col1 col2 col3 100 hello 2004-08-20 @@ -1023,11 +1023,11 @@ ERROR HY000: Field 'col2' doesn't have a default value INSERT INTO t1 (col1) SELECT 1; ERROR HY000: Field 'col2' doesn't have a default value INSERT INTO t1 SELECT 1,NULL; -ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1 +ERROR 23000: Column 'col2' cannot be null INSERT IGNORE INTO t1 values (NULL,NULL); Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col1' at row 1 -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1 +Warning 1048 Column 'col1' cannot be null +Warning 1048 Column 'col2' cannot be null INSERT IGNORE INTO t1 (col1) values (3); Warnings: Warning 1364 Field 'col2' doesn't have a default value diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index ebb2c190eb1..585cb730947 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -1495,7 +1495,7 @@ insert into v3(b) values (10); insert into v3(a) select a from t2; insert into v3(b) select b from t2; Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 2 +Warning 1048 Column 'a' cannot be null insert into v3(a) values (1) on duplicate key update a=a+10000+VALUES(a); select * from t1; a b diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index 46f05399ba9..0a5c339200a 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -86,7 +86,7 @@ drop table t1; 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'); Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1048 Column 'a' cannot be null Warning 1264 Out of range value adjusted for column 'b' at row 2 Warning 1265 Data truncated for column 'c' at row 2 Warning 1264 Out of range value adjusted for column 'a' at row 3 @@ -99,7 +99,7 @@ Warning 1265 Data truncated for column 'c' at row 2 alter table t1 add d char(2); update t1 set a=NULL where a=10; Warnings: -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 2 +Warning 1048 Column 'a' cannot be null update t1 set c='mysql ab' where c='test'; Warnings: Warning 1265 Data truncated for column 'c' at row 4 @@ -115,7 +115,7 @@ Warnings: Warning 1265 Data truncated for column 'b' at row 1 Warning 1265 Data truncated for column 'b' at row 2 Warning 1265 Data truncated for column 'b' at row 3 -Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 4 +Warning 1048 Column 'a' cannot be null Warning 1265 Data truncated for column 'b' at row 4 insert into t2(b) values('mysqlab'); Warnings: diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test index d3b36cbc2a8..54260b09331 100644 --- a/mysql-test/t/strict.test +++ b/mysql-test/t/strict.test @@ -884,11 +884,11 @@ INSERT INTO t1 (col1,col2,col3) VALUES (NULL, '', '2004-01-01'); INSERT INTO t1 (col1,col2,col3) VALUES (102, NULL, '2004-01-01'); --error 1048 INSERT INTO t1 VALUES (103,'',NULL); ---error 1263 +--error 1048 UPDATE t1 SET col1=NULL WHERE col1 =100; ---error 1263 +--error 1048 UPDATE t1 SET col2 =NULL WHERE col2 ='hello'; ---error 1263 +--error 1048 UPDATE t1 SET col2 =NULL where col3 IS NOT NULL; INSERT IGNORE INTO t1 values (NULL,NULL,NULL); SELECT * FROM t1; @@ -908,7 +908,7 @@ INSERT INTO t1 (col1) VALUES (2); INSERT INTO t1 VALUES(default(col1),default(col2)); --error 1364 INSERT INTO t1 (col1) SELECT 1; ---error 1263 +--error 1048 INSERT INTO t1 SELECT 1,NULL; INSERT IGNORE INTO t1 values (NULL,NULL); INSERT IGNORE INTO t1 (col1) values (3); |