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
d641028f
Commit
d641028f
authored
Jul 10, 2013
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix func_time.test - WEEK(), WEEKDAY(), WEEKOFYEAR() must require TIME_NO_ZERO_IN_DATE
parent
b29bffff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
sql/item_timefunc.cc
sql/item_timefunc.cc
+3
-3
No files found.
sql/item_timefunc.cc
View file @
d641028f
...
...
@@ -1053,7 +1053,7 @@ longlong Item_func_week::val_int()
DBUG_ASSERT
(
fixed
==
1
);
uint
year
;
MYSQL_TIME
ltime
;
if
(
get_arg0_date
(
&
ltime
,
TIME_NO_ZERO_DATE
))
if
(
get_arg0_date
(
&
ltime
,
TIME_NO_ZERO_DATE
|
TIME_NO_ZERO_IN_DATE
))
return
0
;
return
(
longlong
)
calc_week
(
&
ltime
,
week_mode
((
uint
)
args
[
1
]
->
val_int
()),
...
...
@@ -1066,7 +1066,7 @@ longlong Item_func_yearweek::val_int()
DBUG_ASSERT
(
fixed
==
1
);
uint
year
,
week
;
MYSQL_TIME
ltime
;
if
(
get_arg0_date
(
&
ltime
,
TIME_NO_ZERO_DATE
))
if
(
get_arg0_date
(
&
ltime
,
TIME_NO_ZERO_DATE
|
TIME_NO_ZERO_IN_DATE
))
return
0
;
week
=
calc_week
(
&
ltime
,
(
week_mode
((
uint
)
args
[
1
]
->
val_int
())
|
WEEK_YEAR
),
...
...
@@ -1080,7 +1080,7 @@ longlong Item_func_weekday::val_int()
DBUG_ASSERT
(
fixed
==
1
);
MYSQL_TIME
ltime
;
if
(
get_arg0_date
(
&
ltime
,
TIME_NO_ZERO_DATE
))
if
(
get_arg0_date
(
&
ltime
,
TIME_NO_ZERO_DATE
|
TIME_NO_ZERO_IN_DATE
))
return
0
;
return
(
longlong
)
calc_weekday
(
calc_daynr
(
ltime
.
year
,
ltime
.
month
,
...
...
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