diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 239a9dce05a..b4636dca7e2 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -132,7 +132,7 @@ drop table t2; create table t2 select now() as a , curtime() as b, curdate() as c , 1+1 as d , 1.0 + 1 as e , 33333333333333333 + 3 as f; describe t2; Field Type Null Key Default Extra -a datetime YES NULL +a datetime NO NULL b time NO NULL c date NO NULL d int(3) NO NULL diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index d8b6581b022..3340328cad6 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -787,7 +787,7 @@ drop table t2; create table t2 select f2 from (select now() f2 from t1) a; show columns from t2; Field Type Null Key Default Extra -f2 datetime YES NULL +f2 datetime NO NULL drop table t2, t1; CREATE TABLE t1( id int PRIMARY KEY, diff --git a/mysql-test/r/func_time_hires.result b/mysql-test/r/func_time_hires.result index 17c55d554bc..0f822456724 100644 --- a/mysql-test/r/func_time_hires.result +++ b/mysql-test/r/func_time_hires.result @@ -39,14 +39,14 @@ t1 CREATE TABLE `t1` ( `sec_to_time(12345)` time DEFAULT NULL, `sec_to_time(12345.6789)` time(4) DEFAULT NULL, `sec_to_time(1234567e-2)` time(6) DEFAULT NULL, - `now()` datetime DEFAULT NULL, + `now()` datetime NOT NULL, `curtime(0)` time NOT NULL, - `utc_timestamp(1)` datetime(1) DEFAULT NULL, + `utc_timestamp(1)` datetime(1) NOT NULL, `utc_time(2)` time(2) NOT NULL, `current_time(3)` time(3) NOT NULL, - `current_timestamp(4)` datetime(4) DEFAULT NULL, - `localtime(5)` datetime(5) DEFAULT NULL, - `localtimestamp(6)` datetime(6) DEFAULT NULL, + `current_timestamp(4)` datetime(4) NOT NULL, + `localtime(5)` datetime(5) NOT NULL, + `localtimestamp(6)` datetime(6) NOT NULL, `time_to_sec(123456)` bigint(17) DEFAULT NULL, `time_to_sec('12:34:56.789')` decimal(19,3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 6e4426ab1b9..db787511d38 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -1693,7 +1693,6 @@ Item_func_now::Item_func_now(THD *thd, uint dec) : last_query_id(0) { decimals= dec; - maybe_null= true; }