Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
6ce719c5
Commit
6ce719c5
authored
Nov 16, 2006
by
ramil/ram@myoffice.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/usr/home/ram/work/bug23653/my50-bug23653
into mysql.com:/usr/home/ram/work/bug23653/my51-bug23653
parents
8f92859e
b4dd41de
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+3
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+6
-0
sql/item_timefunc.cc
sql/item_timefunc.cc
+2
-1
No files found.
mysql-test/r/func_time.result
View file @
6ce719c5
...
@@ -1047,6 +1047,9 @@ union
...
@@ -1047,6 +1047,9 @@ union
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 HOUR)),'%k') As H);
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 HOUR)),'%k') As H);
H
H
5
5
select last_day('0000-00-00');
last_day('0000-00-00')
NULL
End of 4.1 tests
End of 4.1 tests
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;
timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;
...
...
mysql-test/t/func_time.test
View file @
6ce719c5
...
@@ -565,6 +565,12 @@ union
...
@@ -565,6 +565,12 @@ union
union
union
(
select
time_format
(
timediff
(
now
(),
DATE_SUB
(
now
(),
INTERVAL
5
HOUR
)),
'%k'
)
As
H
);
(
select
time_format
(
timediff
(
now
(),
DATE_SUB
(
now
(),
INTERVAL
5
HOUR
)),
'%k'
)
As
H
);
#
# Bug #23653: crash if last_day('0000-00-00')
#
select
last_day
(
'0000-00-00'
);
--
echo
End
of
4.1
tests
--
echo
End
of
4.1
tests
explain
extended
select
timestampdiff
(
SQL_TSI_WEEK
,
'2001-02-01'
,
'2001-05-01'
)
as
a1
,
explain
extended
select
timestampdiff
(
SQL_TSI_WEEK
,
'2001-02-01'
,
'2001-05-01'
)
as
a1
,
...
...
sql/item_timefunc.cc
View file @
6ce719c5
...
@@ -3244,7 +3244,8 @@ String *Item_func_str_to_date::val_str(String *str)
...
@@ -3244,7 +3244,8 @@ String *Item_func_str_to_date::val_str(String *str)
bool
Item_func_last_day
::
get_date
(
TIME
*
ltime
,
uint
fuzzy_date
)
bool
Item_func_last_day
::
get_date
(
TIME
*
ltime
,
uint
fuzzy_date
)
{
{
if
(
get_arg0_date
(
ltime
,
fuzzy_date
&
~
TIME_FUZZY_DATE
))
if
(
get_arg0_date
(
ltime
,
fuzzy_date
&
~
TIME_FUZZY_DATE
)
||
(
ltime
->
month
==
0
))
return
1
;
return
1
;
uint
month_idx
=
ltime
->
month
-
1
;
uint
month_idx
=
ltime
->
month
-
1
;
ltime
->
day
=
days_in_month
[
month_idx
];
ltime
->
day
=
days_in_month
[
month_idx
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment