1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Fix for bug #22824: strict, datetime, NULL, wrong warning

During optimization we replace NULL with 0 for not null 
date{time} fields, so uset MODE_NO_ZERO_DATE flag for a while 
as we don't want to give extra warnings.
This commit is contained in:
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
2006-12-21 13:53:34 +04:00
parent 6a304f3fc1
commit d779739834
3 changed files with 20 additions and 1 deletions

View File

@@ -1352,3 +1352,10 @@ t1 CREATE TABLE `t1` (
`i` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='123456789*123456789*123456789*123456789*123456789*123456789*'
drop table t1;
set @@sql_mode='NO_ZERO_DATE';
create table t1(a datetime not null);
select count(*) from t1 where a is null;
count(*)
0
drop table t1;
End of 5.0 tests