diff options
Diffstat (limited to 'mysql-test/r/strict.result')
-rw-r--r-- | mysql-test/r/strict.result | 378 |
1 files changed, 190 insertions, 188 deletions
diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index eecdc545be7..3b2fda4248a 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -206,6 +206,8 @@ INSERT INTO t1 (col1) VALUES (STR_TO_DATE('15.10.2004','%d.%m.%Y')); INSERT INTO t1 (col2) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i')); INSERT INTO t1 (col3) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i')); INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); +Warnings: +Note 1265 Data truncated for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i')); ERROR 22007: Incorrect date value: '2004-00-31 15:30:00' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i')); @@ -262,14 +264,14 @@ ERROR 22007: Incorrect date value: '2004-10-00' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(CAST('2004-0-10' AS DATE)); ERROR 22007: Incorrect date value: '2004-00-10' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(CAST('0000-00-00' AS DATE)); -ERROR 22007: Truncated incorrect datetime value: '0000-00-00' +ERROR 22007: Incorrect datetime value: '0000-00-00' INSERT INTO t1 (col2) VALUES(CAST('0000-10-31 15:30' AS DATETIME)); INSERT INTO t1 (col2) VALUES(CAST('2004-10-0 15:30' AS DATETIME)); ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(CAST('2004-0-10 15:30' AS DATETIME)); ERROR 22007: Incorrect datetime value: '2004-00-10 15:30:00' for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(CAST('0000-00-00' AS DATETIME)); -ERROR 22007: Truncated incorrect datetime value: '0000-00-00' +ERROR 22007: Incorrect datetime value: '0000-00-00' INSERT INTO t1 (col3) VALUES(CAST('0000-10-31 15:30' AS DATETIME)); ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col3' at row 1 INSERT INTO t1 (col3) VALUES(CAST('2004-10-0 15:30' AS DATETIME)); @@ -277,7 +279,7 @@ ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col3' a INSERT INTO t1 (col3) VALUES(CAST('2004-0-10 15:30' AS DATETIME)); ERROR 22007: Incorrect datetime value: '2004-00-10 15:30:00' for column 'col3' at row 1 INSERT INTO t1 (col3) VALUES(CAST('0000-00-00' AS DATETIME)); -ERROR 22007: Truncated incorrect datetime value: '0000-00-00' +ERROR 22007: Incorrect datetime value: '0000-00-00' drop table t1; CREATE TABLE t1 (col1 date, col2 datetime, col3 timestamp); INSERT INTO t1 (col1) VALUES (CONVERT('2004-10-15',DATE)); @@ -289,14 +291,14 @@ ERROR 22007: Incorrect date value: '2004-10-00' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(CONVERT('2004-0-10' , DATE)); ERROR 22007: Incorrect date value: '2004-00-10' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(CONVERT('0000-00-00',DATE)); -ERROR 22007: Truncated incorrect datetime value: '0000-00-00' +ERROR 22007: Incorrect datetime value: '0000-00-00' INSERT INTO t1 (col2) VALUES(CONVERT('0000-10-31 15:30',DATETIME)); INSERT INTO t1 (col2) VALUES(CONVERT('2004-10-0 15:30',DATETIME)); ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(CONVERT('2004-0-10 15:30',DATETIME)); ERROR 22007: Incorrect datetime value: '2004-00-10 15:30:00' for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(CONVERT('0000-00-00',DATETIME)); -ERROR 22007: Truncated incorrect datetime value: '0000-00-00' +ERROR 22007: Incorrect datetime value: '0000-00-00' INSERT INTO t1 (col3) VALUES(CONVERT('0000-10-31 15:30',DATETIME)); ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col3' at row 1 INSERT INTO t1 (col3) VALUES(CONVERT('2004-10-0 15:30',DATETIME)); @@ -304,7 +306,7 @@ ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col3' a INSERT INTO t1 (col3) VALUES(CONVERT('2004-0-10 15:30',DATETIME)); ERROR 22007: Incorrect datetime value: '2004-00-10 15:30:00' for column 'col3' at row 1 INSERT INTO t1 (col3) VALUES(CONVERT('0000-00-00',DATETIME)); -ERROR 22007: Truncated incorrect datetime value: '0000-00-00' +ERROR 22007: Incorrect datetime value: '0000-00-00' drop table t1; CREATE TABLE t1(col1 TINYINT, col2 TINYINT UNSIGNED); INSERT INTO t1 VALUES(-128,0),(0,0),(127,255),('-128','0'),('0','0'),('127','255'),(-128.0,0.0),(0.0,0.0),(127.0,255.0); @@ -316,36 +318,36 @@ Warnings: Error 1365 Division by 0 Error 1365 Division by 0 INSERT INTO t1 (col1) VALUES(-129); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(128); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES(-1); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(256); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col1) VALUES('-129'); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES('128'); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES('-1'); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES('256'); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col1) VALUES(128.0); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES(-1.0); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(256.0); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 SELECT MOD(col1,0) FROM t1 WHERE col1 > 0 LIMIT 1; MOD(col1,0) NULL Warnings: Error 1365 Division by 0 UPDATE t1 SET col1 = col1 - 50 WHERE col1 < 0; -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 UPDATE t1 SET col2=col2 + 50 WHERE col2 > 0; -ERROR 22003: Out of range value adjusted for column 'col2' at row 3 +ERROR 22003: Out of range value for column 'col2' at row 3 UPDATE t1 SET col1=col1 / 0 WHERE col1 > 0; ERROR 22012: Division by 0 set @@sql_mode='ERROR_FOR_DIVISION_BY_ZERO'; @@ -379,16 +381,16 @@ INSERT INTO t1 values (1/0,1/0); set @@sql_mode='ansi,traditional'; INSERT IGNORE INTO t1 VALUES('-129','-1'),('128','256'); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 -Warning 1264 Out of range value adjusted for column 'col2' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col2' at row 2 INSERT IGNORE INTO t1 VALUES(-129.0,-1.0),(128.0,256.0); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 -Warning 1264 Out of range value adjusted for column 'col2' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col2' at row 2 UPDATE IGNORE t1 SET col2=1/NULL where col1=0; SELECT * FROM t1; col1 col2 @@ -413,33 +415,33 @@ DROP TABLE t1; CREATE TABLE t1(col1 SMALLINT, col2 SMALLINT UNSIGNED); INSERT INTO t1 VALUES(-32768,0),(0,0),(32767,65535),('-32768','0'),('32767','65535'),(-32768.0,0.0),(32767.0,65535.0); INSERT INTO t1 (col1) VALUES(-32769); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(32768); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES(-1); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(65536); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col1) VALUES('-32769'); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES('32768'); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES('-1'); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES('65536'); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col1) VALUES(-32769.0); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(32768.0); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES(-1.0); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(65536.0); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 UPDATE t1 SET col1 = col1 - 50 WHERE col1 < 0; -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 UPDATE t1 SET col2 = col2 + 50 WHERE col2 > 0; -ERROR 22003: Out of range value adjusted for column 'col2' at row 3 +ERROR 22003: Out of range value for column 'col2' at row 3 UPDATE t1 SET col1 = col1 / 0 WHERE col1 > 0; ERROR 22012: Division by 0 UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0; @@ -459,22 +461,22 @@ Error 1365 Division by 0 Error 1365 Division by 0 INSERT IGNORE INTO t1 VALUES(-32769,-1),(32768,65536); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 -Warning 1264 Out of range value adjusted for column 'col2' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col2' at row 2 INSERT IGNORE INTO t1 VALUES('-32769','-1'),('32768','65536'); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 -Warning 1264 Out of range value adjusted for column 'col2' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col2' at row 2 INSERT IGNORE INTO t1 VALUES(-32769,-1.0),(32768.0,65536.0); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 -Warning 1264 Out of range value adjusted for column 'col2' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col2' at row 2 UPDATE IGNORE t1 SET col2=1/NULL where col1=0; SELECT * FROM t1; col1 col2 @@ -497,33 +499,33 @@ DROP TABLE t1; CREATE TABLE t1 (col1 MEDIUMINT, col2 MEDIUMINT UNSIGNED); INSERT INTO t1 VALUES(-8388608,0),(0,0),(8388607,16777215),('-8388608','0'),('8388607','16777215'),(-8388608.0,0.0),(8388607.0,16777215.0); INSERT INTO t1 (col1) VALUES(-8388609); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(8388608); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES(-1); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(16777216); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col1) VALUES('-8388609'); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES('8388608'); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES('-1'); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES('16777216'); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col1) VALUES(-8388609.0); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(8388608.0); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES(-1.0); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(16777216.0); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 UPDATE t1 SET col1 = col1 - 50 WHERE col1 < 0; -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 UPDATE t1 SET col2 = col2 + 50 WHERE col2 > 0; -ERROR 22003: Out of range value adjusted for column 'col2' at row 3 +ERROR 22003: Out of range value for column 'col2' at row 3 UPDATE t1 SET col1 =col1 / 0 WHERE col1 > 0; ERROR 22012: Division by 0 UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0; @@ -543,22 +545,22 @@ Error 1365 Division by 0 Error 1365 Division by 0 INSERT IGNORE INTO t1 VALUES(-8388609,-1),(8388608,16777216); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 -Warning 1264 Out of range value adjusted for column 'col2' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col2' at row 2 INSERT IGNORE INTO t1 VALUES('-8388609','-1'),('8388608','16777216'); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 -Warning 1264 Out of range value adjusted for column 'col2' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col2' at row 2 INSERT IGNORE INTO t1 VALUES(-8388609.0,-1.0),(8388608.0,16777216.0); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 -Warning 1264 Out of range value adjusted for column 'col2' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col2' at row 2 UPDATE IGNORE t1 SET col2=1/NULL where col1=0; SELECT * FROM t1; col1 col2 @@ -581,33 +583,33 @@ DROP TABLE t1; CREATE TABLE t1 (col1 INT, col2 INT UNSIGNED); INSERT INTO t1 VALUES(-2147483648,0),(0,0),(2147483647,4294967295),('-2147483648','0'),('2147483647','4294967295'),(-2147483648.0,0.0),(2147483647.0,4294967295.0); INSERT INTO t1 (col1) VALUES(-2147483649); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(2147643648); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES(-1); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(4294967296); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col1) VALUES('-2147483649'); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES('2147643648'); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES('-1'); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES('4294967296'); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col1) VALUES(-2147483649.0); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(2147643648.0); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES(-1.0); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(4294967296.0); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 UPDATE t1 SET col1 = col1 - 50 WHERE col1 < 0; -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 UPDATE t1 SET col2 =col2 + 50 WHERE col2 > 0; -ERROR 22003: Out of range value adjusted for column 'col2' at row 3 +ERROR 22003: Out of range value for column 'col2' at row 3 UPDATE t1 SET col1 =col1 / 0 WHERE col1 > 0; ERROR 22012: Division by 0 UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0; @@ -627,22 +629,22 @@ Error 1365 Division by 0 Error 1365 Division by 0 INSERT IGNORE INTO t1 values (-2147483649, -1),(2147643648,4294967296); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 -Warning 1264 Out of range value adjusted for column 'col2' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col2' at row 2 INSERT IGNORE INTO t1 values ('-2147483649', '-1'),('2147643648','4294967296'); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 -Warning 1264 Out of range value adjusted for column 'col2' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col2' at row 2 INSERT IGNORE INTO t1 values (-2147483649.0, -1.0),(2147643648.0,4294967296.0); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 -Warning 1264 Out of range value adjusted for column 'col2' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col2' at row 2 UPDATE IGNORE t1 SET col2=1/NULL where col1=0; SELECT * FROM t1; col1 col2 @@ -667,29 +669,29 @@ INSERT INTO t1 VALUES(-9223372036854775808,0),(0,0),(9223372036854775807,1844674 INSERT INTO t1 VALUES('-9223372036854775808','0'),('9223372036854775807','18446744073709551615'); INSERT INTO t1 VALUES(-9223372036854774000.0,0.0),(9223372036854775700.0,1844674407370954000.0); INSERT INTO t1 (col1) VALUES(-9223372036854775809); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(9223372036854775808); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES(-1); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(18446744073709551616); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col1) VALUES('-9223372036854775809'); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES('9223372036854775808'); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES('-1'); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES('18446744073709551616'); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col1) VALUES(-9223372036854785809.0); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(9223372036854785808.0); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES(-1.0); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(18446744073709551616.0); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 UPDATE t1 SET col1 =col1 / 0 WHERE col1 > 0; ERROR 22012: Division by 0 UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0; @@ -709,22 +711,22 @@ Error 1365 Division by 0 Error 1365 Division by 0 INSERT IGNORE INTO t1 VALUES(-9223372036854775809,-1),(9223372036854775808,18446744073709551616); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 -Warning 1264 Out of range value adjusted for column 'col2' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col2' at row 2 INSERT IGNORE INTO t1 VALUES('-9223372036854775809','-1'),('9223372036854775808','18446744073709551616'); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 -Warning 1264 Out of range value adjusted for column 'col2' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col2' at row 2 INSERT IGNORE INTO t1 VALUES(-9223372036854785809.0,-1.0),(9223372036854785808.0,18446744073709551616.0); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 -Warning 1264 Out of range value adjusted for column 'col2' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col2' at row 2 UPDATE IGNORE t1 SET col2=1/NULL where col1=0; SELECT * FROM t1; col1 col2 @@ -754,29 +756,29 @@ Warnings: Note 1265 Data truncated for column 'col1' at row 2 Note 1265 Data truncated for column 'col1' at row 4 INSERT INTO t1 VALUES (101.55); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 VALUES (101); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 VALUES (-101.55); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 VALUES (1010.55); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 VALUES (1010); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 VALUES ('101.55'); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 VALUES ('101'); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 VALUES ('-101.55'); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 VALUES ('-1010.55'); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 VALUES ('-100E+1'); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 VALUES ('-100E'); ERROR HY000: Incorrect decimal value: '-100E' for column 'col1' at row 1 UPDATE t1 SET col1 =col1 * 50000 WHERE col1 =11; -ERROR 22003: Out of range value adjusted for column 'col1' at row 6 +ERROR 22003: Out of range value for column 'col1' at row 6 UPDATE t1 SET col1 =col1 / 0 WHERE col1 > 0; ERROR 22012: Division by 0 UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0; @@ -795,16 +797,16 @@ Warnings: Error 1365 Division by 0 INSERT IGNORE INTO t1 VALUES(1000),(-1000); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 INSERT IGNORE INTO t1 VALUES('1000'),('-1000'); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 INSERT IGNORE INTO t1 VALUES(1000.0),(-1000.0); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 UPDATE IGNORE t1 SET col1=1/NULL where col1=0; SELECT * FROM t1; col1 @@ -835,15 +837,15 @@ INSERT INTO t1 VALUES (-1.1E-37,0),(+3.4E+38,+3.4E+38); INSERT INTO t1 VALUES ('-1.1E-37',0),('+3.4E+38','+3.4E+38'); INSERT INTO t1 (col1) VALUES (3E-46); INSERT INTO t1 (col1) VALUES (+3.4E+39); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES (-1.1E-3); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col1) VALUES ('+3.4E+39'); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES ('-1.1E-3'); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 UPDATE t1 SET col1 =col1 * 5000 WHERE col1 > 0; -ERROR 22003: Out of range value adjusted for column 'col1' at row 2 +ERROR 22003: Out of range value for column 'col1' at row 2 UPDATE t1 SET col2 =col2 / 0 WHERE col2 > 0; ERROR 22012: Division by 0 UPDATE t1 SET col2= MOD(col2,0) WHERE col2 > 0; @@ -862,12 +864,12 @@ Warnings: Error 1365 Division by 0 INSERT IGNORE INTO t1 VALUES (+3.4E+39,-3.4E+39); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 INSERT IGNORE INTO t1 VALUES ('+3.4E+39','-3.4E+39'); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 SELECT * FROM t1; col1 col2 -1.1e-37 0 @@ -887,13 +889,13 @@ INSERT INTO t1 (col1) VALUES (-2.2E-330); INSERT INTO t1 (col1) VALUES (+1.7E+309); Got one of the listed errors INSERT INTO t1 (col2) VALUES (-1.1E-3); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 INSERT INTO t1 (col1) VALUES ('+1.8E+309'); -ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES ('-1.2E-3'); -ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +ERROR 22003: Out of range value for column 'col2' at row 1 UPDATE t1 SET col1 =col1 * 5000 WHERE col1 > 0; -ERROR 22003: Out of range value adjusted for column 'col1' at row 3 +ERROR 22003: Out of range value for column 'col1' at row 3 UPDATE t1 SET col2 =col2 / 0 WHERE col2 > 0; ERROR 22012: Division by 0 UPDATE t1 SET col2= MOD(col2,0) WHERE col2 > 0; @@ -914,9 +916,9 @@ INSERT IGNORE INTO t1 VALUES (+1.9E+309,-1.9E+309); ERROR 22007: Illegal double '1.9E+309' value found during parsing INSERT IGNORE INTO t1 VALUES ('+2.0E+309','-2.0E+309'); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 SELECT * FROM t1; col1 col2 -2.2e-307 0 @@ -991,16 +993,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 was set to data type implicit default; NULL supplied for 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 was set to data type implicit default; NULL supplied for 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 was set to data type implicit default; NULL supplied for 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 was set to data type implicit default; NULL supplied for NOT NULL column 'col1' at row 1 -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'col2' at row 1 -Warning 1263 Column was set to data type implicit default; NULL supplied for 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 @@ -1011,7 +1013,7 @@ CREATE TABLE t1 (col1 INT NOT NULL default 99, col2 CHAR(6) NOT NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "col1" int(11) NOT NULL default '99', + "col1" int(11) NOT NULL DEFAULT '99', "col2" char(6) NOT NULL ) INSERT INTO t1 VALUES (1, 'hello'); @@ -1025,11 +1027,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 was set to data type implicit default; NULL supplied for 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 was set to data type implicit default; NULL supplied for NOT NULL column 'col1' at row 1 -Warning 1263 Column was set to data type implicit default; NULL supplied for 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 @@ -1135,19 +1137,19 @@ ERROR 22007: Incorrect date value: '0' for column 'col1' at row 1 insert into t1 values (0.0,0.0,0.0); ERROR 22007: Incorrect date value: '0' for column 'col1' at row 1 insert into t1 (col1) values (convert('0000-00-00',date)); -ERROR 22007: Truncated incorrect datetime value: '0000-00-00' +ERROR 22007: Incorrect datetime value: '0000-00-00' insert into t1 (col1) values (cast('0000-00-00' as date)); -ERROR 22007: Truncated incorrect datetime value: '0000-00-00' +ERROR 22007: Incorrect datetime value: '0000-00-00' set sql_mode='no_zero_date'; insert into t1 values (0,0,0); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 Warning 1265 Data truncated for column 'col3' at row 1 insert into t1 values (0.0,0.0,0.0); Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col2' at row 1 Warning 1265 Data truncated for column 'col3' at row 1 drop table t1; set sql_mode='traditional'; @@ -1162,15 +1164,15 @@ Warnings: Warning 1265 Data truncated for column 'col1' at row 1 insert ignore into t1 (col1) values (cast('0000-00-00' as date)); Warnings: -Warning 1292 Truncated incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' insert into t1 select * from t1; ERROR 22007: Incorrect date value: '0000-00-00' for column 'col1' at row 1 alter table t1 modify col1 datetime; ERROR 22007: Incorrect datetime value: '0000-00-00' for column 'col1' at row 1 alter ignore table t1 modify col1 datetime; Warnings: -Warning 1264 Out of range value adjusted for column 'col1' at row 1 -Warning 1264 Out of range value adjusted for column 'col1' at row 2 +Warning 1264 Out of range value for column 'col1' at row 1 +Warning 1264 Out of range value for column 'col1' at row 2 insert into t1 select * from t1; ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'col1' at row 1 select * from t1; @@ -1268,9 +1270,9 @@ alter table t1 add primary key(a); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', - `b` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - PRIMARY KEY (`a`) + `a` int(11) NOT NULL DEFAULT '0', + `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1(a int, b timestamp default 20050102030405); @@ -1278,9 +1280,9 @@ alter table t1 add primary key(a); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', - `b` timestamp NOT NULL default '2005-01-02 03:04:05', - PRIMARY KEY (`a`) + `a` int(11) NOT NULL DEFAULT '0', + `b` timestamp NOT NULL DEFAULT '2005-01-02 03:04:05', + PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; set @@sql_mode='traditional'; @@ -1343,7 +1345,7 @@ comment '123456789*123456789*123456789*123456789*123456789*123456789*'; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` int(11) default NULL + `i` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='123456789*123456789*123456789*123456789*123456789*123456789*' drop table t1; set sql_mode= 'traditional'; |