diff options
Diffstat (limited to 'mysql-test/r/cast.result')
-rw-r--r-- | mysql-test/r/cast.result | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index ac7be28d736..03b4b84e461 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -268,37 +268,37 @@ cast(010203101112.121314 as datetime) 0001-02-03 10:11:12 select cast(120010203101112.121314 as datetime); cast(120010203101112.121314 as datetime) -0000-00-00 00:00:00 +NULL Warnings: Warning 1292 Incorrect datetime value: '120010203101112.121314' select cast(cast(1.1 as decimal) as datetime); cast(cast(1.1 as decimal) as datetime) -0000-00-00 00:00:00 +NULL Warnings: Warning 1292 Incorrect datetime value: '1' select cast(cast(-1.1 as decimal) as datetime); cast(cast(-1.1 as decimal) as datetime) -0000-00-00 00:00:00 +NULL Warnings: Warning 1292 Incorrect datetime value: '-1' select cast('0' as date); cast('0' as date) -0000-00-00 +NULL Warnings: Warning 1292 Incorrect datetime value: '0' select cast('' as date); cast('' as date) -0000-00-00 +NULL Warnings: Warning 1292 Incorrect datetime value: '' select cast('0' as datetime); cast('0' as datetime) -0000-00-00 00:00:00 +NULL Warnings: Warning 1292 Incorrect datetime value: '0' select cast('' as datetime); cast('' as datetime) -0000-00-00 00:00:00 +NULL Warnings: Warning 1292 Incorrect datetime value: '' select cast('0' as time); @@ -306,7 +306,7 @@ cast('0' as time) 00:00:00 select cast('' as time); cast('' as time) -00:00:00 +NULL Warnings: Warning 1292 Truncated incorrect time value: '' select cast(NULL as DATE); @@ -323,13 +323,13 @@ cast(NULL as BINARY) NULL select cast(cast(120010203101112.121314 as double) as datetime); cast(cast(120010203101112.121314 as double) as datetime) -0000-00-00 00:00:00 +NULL select cast(cast(1.1 as double) as datetime); cast(cast(1.1 as double) as datetime) 0000-00-00 00:00:01 select cast(cast(-1.1 as double) as datetime); cast(cast(-1.1 as double) as datetime) -0000-00-00 00:00:00 +NULL explain extended select cast(10 as double(5,2)); id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used @@ -786,4 +786,10 @@ SELECT CAST(TIME('10:20:30') AS DATE) + INTERVAL 1 DAY; CAST(TIME('10:20:30') AS DATE) + INTERVAL 1 DAY NULL Warnings: -Warning 1292 Truncated incorrect date value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' +SET SQL_MODE=ALLOW_INVALID_DATES; +SELECT DATE("foo"); +DATE("foo") +NULL +Warnings: +Warning 1292 Incorrect datetime value: 'foo' |