diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-03-08 10:14:43 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-03-08 10:14:43 +0100 |
commit | 2c80662d231414eb98b5cd4cede069d1482ccc20 (patch) | |
tree | 5f77bee52e409c1e217afbc1e396d110314085e8 /mysql-test/r/func_time.result | |
parent | b27b5793a0d812cb2be535eadd280134efab22a5 (diff) | |
download | mariadb-git-2c80662d231414eb98b5cd4cede069d1482ccc20.tar.gz |
lp:731103 Assertion `maybe_null && item->null_value' failed with ORDER BY LAST_DAY()
Item_func_last_day did not set mayby_null=1
Diffstat (limited to 'mysql-test/r/func_time.result')
-rw-r--r-- | mysql-test/r/func_time.result | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 654ab0f7351..781d2bf3e97 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -812,7 +812,7 @@ create table t1 select last_day('2000-02-05') as a, from_days(to_days("960101")) as b; describe t1; Field Type Null Key Default Extra -a date NO 0000-00-00 +a date YES NULL b date YES NULL select * from t1; a b @@ -1442,3 +1442,29 @@ drop table t1; select maketime(20,61,10)+0; maketime(20,61,10)+0 NULL +create table t1 (f2 int not null) ; +insert into t1 values (0),(0); +select last_day(f2) from t1; +last_day(f2) +NULL +NULL +Warnings: +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '0' +select last_day(f2) from t1 where last_day(f2) is null; +last_day(f2) +NULL +NULL +Warnings: +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '0' +select * from t1 order by last_day (f2); +f2 +0 +0 +Warnings: +Warning 1292 Incorrect datetime value: '0' +Warning 1292 Incorrect datetime value: '0' +drop table t1; |