diff options
Diffstat (limited to 'mysql-test/r/cast.result')
-rw-r--r-- | mysql-test/r/cast.result | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index 1e39c03696f..13ce2e53367 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -43,6 +43,8 @@ cast(5 as unsigned) -6.0 select cast(NULL as signed), cast(1/0 as signed); cast(NULL as signed) cast(1/0 as signed) NULL NULL +Warnings: +Warning 1365 Division by 0 select cast(1 as double(5,2)); cast(1 as double(5,2)) 1.00 @@ -160,6 +162,8 @@ cast(cast("2011-04-05 8:46:06.123456" AS datetime(6)) as time(6)) select cast(NULL as unsigned), cast(1/0 as unsigned); cast(NULL as unsigned) cast(1/0 as unsigned) NULL NULL +Warnings: +Warning 1365 Division by 0 select cast("A" as binary) = "a", cast(BINARY "a" as CHAR) = "A"; cast("A" as binary) = "a" cast(BINARY "a" as CHAR) = "A" 0 1 @@ -404,7 +408,7 @@ create table t1 select cast(_koi8r'ÔÅÓÔ' as char character set cp1251) as t; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `t` varchar(4) CHARACTER SET cp1251 NOT NULL + `t` varchar(4) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select @@ -423,6 +427,7 @@ cast(1000 as CHAR(3)) 100 Warnings: Warning 1292 Truncated incorrect BINARY(3) value: '1000' +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 select cast(_latin1'ab' AS char) as c1, cast(_latin1'a ' AS char) as c2, @@ -456,6 +461,7 @@ c1 c2 c3 c4 c5 Warnings: Warning 1292 Truncated incorrect CHAR(2) value: 'фгх' Warning 1292 Truncated incorrect CHAR(2) value: 'Ñ„ ' +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 select cast(_koi8r'ÆÇ' AS nchar) as c1, cast(_koi8r'Æ ' AS nchar) as c2, @@ -586,8 +592,8 @@ t1 CREATE TABLE `t1` ( `cast(1 as signed)` int(2) NOT NULL, `cast(1 as double(5,2))` double(5,2) DEFAULT NULL, `cast(1 as decimal(5,3))` decimal(5,3) NOT NULL, - `cast("A" as binary)` varbinary(1) NOT NULL, - `cast("A" as char(100))` varbinary(100) NOT NULL, + `cast("A" as binary)` varbinary(1) DEFAULT NULL, + `cast("A" as char(100))` varbinary(100) DEFAULT NULL, `cast("2001-1-1" as DATE)` date DEFAULT NULL, `cast("2001-1-1" as DATETIME)` datetime DEFAULT NULL, `cast("1:2:3" as TIME)` time DEFAULT NULL @@ -746,6 +752,7 @@ DROP TABLE t1; # LONGTEXT, UNION, USER VARIABLE # Bug#14096619 UNABLE TO RESTORE DATABASE DUMP # +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT CONCAT(CAST(REPEAT('9', 1000) AS SIGNED)), CONCAT(CAST(REPEAT('9', 1000) AS UNSIGNED)); Warnings: |