Loading Docs/manual.texi +3 −0 Original line number Diff line number Diff line Loading @@ -44538,6 +44538,9 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.39 @itemize @bullet @item Fixed that date-part extract functions works with dates where day and/or month is 0. @item Extended argument length in option files from 256 to 512 chars. @item Fixed problem with shutdown when @code{INSERT DELAYED} was waiting for mysql-test/r/func_time.result +4 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ dayofmonth("1997-01-02") dayofmonth(19970323) 2 23 month("1997-01-02") year("98-02-03") dayofyear("1997-12-31") 1 1998 365 month("2001-02-00") year("2001-00-00") 2 2001 DAYOFYEAR("1997-03-03") WEEK("1998-03-03") QUARTER(980303) 62 9 1 HOUR("1997-03-03 23:03:22") MINUTE("23:03:22") SECOND(230322) Loading Loading @@ -184,6 +186,8 @@ extract(MINUTE_SECOND FROM "10:11:12") 1112 extract(SECOND FROM "1999-01-02 10:11:12") 12 extract(MONTH FROM "2001-02-00") 2 ctime hour(ctime) 2001-01-12 12:23:40 12 monthname(date) Loading mysql-test/t/func_time.test +2 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ select date_format("1997-01-02 03:04:05", "%M %W %D %Y %y %m %d %h %i %s %w"); select date_format("1997-01-02", concat("%M %W %D ","%Y %y %m %d %h %i %s %w")); select dayofmonth("1997-01-02"),dayofmonth(19970323); select month("1997-01-02"),year("98-02-03"),dayofyear("1997-12-31"); select month("2001-02-00"),year("2001-00-00"); select DAYOFYEAR("1997-03-03"), WEEK("1998-03-03"), QUARTER(980303); select HOUR("1997-03-03 23:03:22"), MINUTE("23:03:22"), SECOND(230322); select week(19980101),week(19970101),week(19980101,1),week(19970101,1); Loading Loading @@ -100,6 +101,7 @@ select extract(HOUR_SECOND FROM "10:11:12"); select extract(MINUTE FROM "10:11:12"); select extract(MINUTE_SECOND FROM "10:11:12"); select extract(SECOND FROM "1999-01-02 10:11:12"); select extract(MONTH FROM "2001-02-00"); create table t1 (ctime varchar(20)); insert into t1 values ('2001-01-12 12:23:40'); Loading sql/item.cc +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ bool Item::get_date(TIME *ltime,bool fuzzydate) char buff[40]; String tmp(buff,sizeof(buff)),*res; if (!(res=val_str(&tmp)) || str_to_TIME(res->ptr(),res->length(),ltime,0) == TIMESTAMP_NONE) str_to_TIME(res->ptr(),res->length(),ltime,fuzzydate) == TIMESTAMP_NONE) { bzero((char*) ltime,sizeof(*ltime)); return 1; Loading sql/sql_parse.cc +0 −9 Original line number Diff line number Diff line Loading @@ -1851,15 +1851,6 @@ mysql_execute_command(void) } if (check_db_used(thd,tables) || end_active_trans(thd)) goto error; for (TABLE_LIST *tmp = tables; tmp; tmp = tmp->next) { if (!(tmp->lock_type == TL_READ_NO_INSERT ? !check_table_access(thd, SELECT_ACL, tmp) : (!check_table_access(thd, INSERT_ACL, tmp) || !check_table_access(thd, UPDATE_ACL, tmp) || !check_table_access(thd, DELETE_ACL, tmp)))) goto error; } thd->in_lock_tables=1; if (!(res=open_and_lock_tables(thd,tables))) { Loading Loading
Docs/manual.texi +3 −0 Original line number Diff line number Diff line Loading @@ -44538,6 +44538,9 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.39 @itemize @bullet @item Fixed that date-part extract functions works with dates where day and/or month is 0. @item Extended argument length in option files from 256 to 512 chars. @item Fixed problem with shutdown when @code{INSERT DELAYED} was waiting for
mysql-test/r/func_time.result +4 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ dayofmonth("1997-01-02") dayofmonth(19970323) 2 23 month("1997-01-02") year("98-02-03") dayofyear("1997-12-31") 1 1998 365 month("2001-02-00") year("2001-00-00") 2 2001 DAYOFYEAR("1997-03-03") WEEK("1998-03-03") QUARTER(980303) 62 9 1 HOUR("1997-03-03 23:03:22") MINUTE("23:03:22") SECOND(230322) Loading Loading @@ -184,6 +186,8 @@ extract(MINUTE_SECOND FROM "10:11:12") 1112 extract(SECOND FROM "1999-01-02 10:11:12") 12 extract(MONTH FROM "2001-02-00") 2 ctime hour(ctime) 2001-01-12 12:23:40 12 monthname(date) Loading
mysql-test/t/func_time.test +2 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ select date_format("1997-01-02 03:04:05", "%M %W %D %Y %y %m %d %h %i %s %w"); select date_format("1997-01-02", concat("%M %W %D ","%Y %y %m %d %h %i %s %w")); select dayofmonth("1997-01-02"),dayofmonth(19970323); select month("1997-01-02"),year("98-02-03"),dayofyear("1997-12-31"); select month("2001-02-00"),year("2001-00-00"); select DAYOFYEAR("1997-03-03"), WEEK("1998-03-03"), QUARTER(980303); select HOUR("1997-03-03 23:03:22"), MINUTE("23:03:22"), SECOND(230322); select week(19980101),week(19970101),week(19980101,1),week(19970101,1); Loading Loading @@ -100,6 +101,7 @@ select extract(HOUR_SECOND FROM "10:11:12"); select extract(MINUTE FROM "10:11:12"); select extract(MINUTE_SECOND FROM "10:11:12"); select extract(SECOND FROM "1999-01-02 10:11:12"); select extract(MONTH FROM "2001-02-00"); create table t1 (ctime varchar(20)); insert into t1 values ('2001-01-12 12:23:40'); Loading
sql/item.cc +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ bool Item::get_date(TIME *ltime,bool fuzzydate) char buff[40]; String tmp(buff,sizeof(buff)),*res; if (!(res=val_str(&tmp)) || str_to_TIME(res->ptr(),res->length(),ltime,0) == TIMESTAMP_NONE) str_to_TIME(res->ptr(),res->length(),ltime,fuzzydate) == TIMESTAMP_NONE) { bzero((char*) ltime,sizeof(*ltime)); return 1; Loading
sql/sql_parse.cc +0 −9 Original line number Diff line number Diff line Loading @@ -1851,15 +1851,6 @@ mysql_execute_command(void) } if (check_db_used(thd,tables) || end_active_trans(thd)) goto error; for (TABLE_LIST *tmp = tables; tmp; tmp = tmp->next) { if (!(tmp->lock_type == TL_READ_NO_INSERT ? !check_table_access(thd, SELECT_ACL, tmp) : (!check_table_access(thd, INSERT_ACL, tmp) || !check_table_access(thd, UPDATE_ACL, tmp) || !check_table_access(thd, DELETE_ACL, tmp)))) goto error; } thd->in_lock_tables=1; if (!(res=open_and_lock_tables(thd,tables))) { Loading