Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into mysql.com:/usr/home/ram/work/bug23938/my50-bug23938 sql/item_timefunc.cc: Auto merged
This commit is contained in:
commit
e976ea37b0
@ -348,6 +348,10 @@ Warnings:
|
|||||||
Warning 1292 Truncated incorrect INTEGER value: '-1e+30'
|
Warning 1292 Truncated incorrect INTEGER value: '-1e+30'
|
||||||
Warning 1292 Truncated incorrect INTEGER value: '1e+30'
|
Warning 1292 Truncated incorrect INTEGER value: '1e+30'
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
select isnull(date(NULL)), isnull(cast(NULL as DATE));
|
||||||
|
isnull(date(NULL)) isnull(cast(NULL as DATE))
|
||||||
|
1 1
|
||||||
|
End of 4.1 tests
|
||||||
select cast('1.2' as decimal(3,2));
|
select cast('1.2' as decimal(3,2));
|
||||||
cast('1.2' as decimal(3,2))
|
cast('1.2' as decimal(3,2))
|
||||||
1.20
|
1.20
|
||||||
|
@ -176,7 +176,13 @@ INSERT INTO t1 SET f1 = +1.0e+30 ;
|
|||||||
SELECT f1 AS double_val, CAST(f1 AS SIGNED INT) AS cast_val FROM t1;
|
SELECT f1 AS double_val, CAST(f1 AS SIGNED INT) AS cast_val FROM t1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
# End of 4.1 tests
|
#
|
||||||
|
# Bug #23938: cast(NULL as DATE)
|
||||||
|
#
|
||||||
|
|
||||||
|
select isnull(date(NULL)), isnull(cast(NULL as DATE));
|
||||||
|
|
||||||
|
--echo End of 4.1 tests
|
||||||
|
|
||||||
|
|
||||||
#decimal-related additions
|
#decimal-related additions
|
||||||
|
@ -2644,7 +2644,10 @@ longlong Item_date_typecast::val_int()
|
|||||||
DBUG_ASSERT(fixed == 1);
|
DBUG_ASSERT(fixed == 1);
|
||||||
TIME ltime;
|
TIME ltime;
|
||||||
if (args[0]->get_date(<ime, TIME_FUZZY_DATE))
|
if (args[0]->get_date(<ime, TIME_FUZZY_DATE))
|
||||||
|
{
|
||||||
|
null_value= 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
return (longlong) (ltime.year * 10000L + ltime.month * 100 + ltime.day);
|
return (longlong) (ltime.year * 10000L + ltime.month * 100 + ltime.day);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user