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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
b7ed314f
Commit
b7ed314f
authored
May 18, 2011
by
Sergey Glukhov
Browse files
Options
Browse Files
Download
Plain Diff
5.1 -> 5.5 merge
parents
4112a521
3201f92c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+9
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+7
-0
sql/item_timefunc.cc
sql/item_timefunc.cc
+7
-2
No files found.
mysql-test/r/func_time.result
View file @
b7ed314f
...
...
@@ -1389,6 +1389,15 @@ NULL
SELECT DATE_FORMAT('0000-00-11', '%w');
DATE_FORMAT('0000-00-11', '%w')
NULL
#
# Bug#12403504 AFTER FIX FOR #11889186 : ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP > 0
#
SELECT MAKEDATE(11111111,1);
MAKEDATE(11111111,1)
NULL
SELECT WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1);
WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1)
NULL
End of 5.1 tests
#
# Bug#57039: constant subtime expression returns incorrect result.
...
...
mysql-test/t/func_time.test
View file @
b7ed314f
...
...
@@ -902,6 +902,13 @@ SELECT DATE_FORMAT('0000-00-11', '%W');
SELECT
DATE_FORMAT
(
'0000-00-11'
,
'%a'
);
SELECT
DATE_FORMAT
(
'0000-00-11'
,
'%w'
);
--
echo
#
--
echo
# Bug#12403504 AFTER FIX FOR #11889186 : ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP > 0
--
echo
#
SELECT
MAKEDATE
(
11111111
,
1
);
SELECT
WEEK
(
DATE_ADD
(
FROM_DAYS
(
1
),
INTERVAL
1
MONTH
),
1
);
--
echo
End
of
5.1
tests
--
echo
#
...
...
sql/item_timefunc.cc
View file @
b7ed314f
...
...
@@ -1591,6 +1591,11 @@ bool Item_func_from_days::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
return
1
;
bzero
(
ltime
,
sizeof
(
MYSQL_TIME
));
get_date_from_daynr
((
long
)
value
,
&
ltime
->
year
,
&
ltime
->
month
,
&
ltime
->
day
);
if
((
null_value
=
(
fuzzy_date
&
TIME_NO_ZERO_DATE
)
&&
(
ltime
->
year
==
0
||
ltime
->
month
==
0
||
ltime
->
day
==
0
)))
return
TRUE
;
ltime
->
time_type
=
MYSQL_TIMESTAMP_DATE
;
return
0
;
}
...
...
@@ -2779,7 +2784,7 @@ String *Item_func_makedate::val_str(String *str)
long
days
;
if
(
args
[
0
]
->
null_value
||
args
[
1
]
->
null_value
||
year
<
0
||
daynr
<=
0
)
year
<
0
||
year
>
9999
||
daynr
<=
0
)
goto
err
;
if
(
year
<
100
)
...
...
@@ -2822,7 +2827,7 @@ longlong Item_func_makedate::val_int()
long
days
;
if
(
args
[
0
]
->
null_value
||
args
[
1
]
->
null_value
||
year
<
0
||
daynr
<=
0
)
year
<
0
||
year
>
9999
||
daynr
<=
0
)
goto
err
;
if
(
year
<
100
)
...
...
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