From 2f11f1d3a9b4138315d4f0bcf3e8725dbfb25e02 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Dec 2006 13:53:34 +0400 Subject: 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. mysql-test/r/strict.result: Fix for bug #22824: strict, datetime, NULL, wrong warning - test result. mysql-test/t/strict.test: Fix for bug #22824: strict, datetime, NULL, wrong warning - test case. sql/item_cmpfunc.cc: Fix for bug #22824: strict, datetime, NULL, wrong warning - turn off MODE_NO_ZERO_DATE in order not to get extra warinings in the save_in_field(). --- mysql-test/t/strict.test | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mysql-test/t/strict.test') diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test index 6ebbb53ed8e..0c38385c508 100644 --- a/mysql-test/t/strict.test +++ b/mysql-test/t/strict.test @@ -1208,3 +1208,14 @@ create table t1 (i int) comment '123456789*123456789*123456789*123456789*123456789*123456789*'; show create table t1; drop table t1; + +# +# Bug #22824: strict, datetime, NULL, wrong warning +# + +set @@sql_mode='NO_ZERO_DATE'; +create table t1(a datetime not null); +select count(*) from t1 where a is null; +drop table t1; + +--echo End of 5.0 tests -- cgit v1.2.1