summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/strict.result6
-rw-r--r--mysql-test/t/strict.test8
2 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result
index 94f4637cd05..3b2fda4248a 100644
--- a/mysql-test/r/strict.result
+++ b/mysql-test/r/strict.result
@@ -1393,4 +1393,10 @@ create table t1 (f1 set('a','a'));
ERROR HY000: Column 'f1' has duplicated value 'a' in SET
create table t1 (f1 enum('a','a'));
ERROR HY000: Column 'f1' has duplicated value 'a' in ENUM
+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
diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test
index fe731f4b0a1..7dd38920b3d 100644
--- a/mysql-test/t/strict.test
+++ b/mysql-test/t/strict.test
@@ -1258,4 +1258,12 @@ create table t1 (f1 set('a','a'));
--error 1291
create table t1 (f1 enum('a','a'));
+#
+# 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