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
b21dc119
Commit
b21dc119
authored
Dec 24, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-21389 Derive Item_func_month from Item_long_func
parent
59a08874
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
18 deletions
+3
-18
sql/item_timefunc.h
sql/item_timefunc.h
+3
-18
No files found.
sql/item_timefunc.h
View file @
b21dc119
...
...
@@ -170,28 +170,13 @@ class Item_func_dayofmonth :public Item_long_func_date_field
};
class
Item_func_month
:
public
Item_func
class
Item_func_month
:
public
Item_
long_
func
{
public:
Item_func_month
(
THD
*
thd
,
Item
*
a
)
:
Item_func
(
thd
,
a
)
{
collation
.
set_numeric
();
}
Item_func_month
(
THD
*
thd
,
Item
*
a
)
:
Item_
long_
func
(
thd
,
a
)
{
}
longlong
val_int
();
double
val_real
()
{
DBUG_ASSERT
(
fixed
==
1
);
return
(
double
)
Item_func_month
::
val_int
();
}
String
*
val_str
(
String
*
str
)
{
longlong
nr
=
val_int
();
if
(
null_value
)
return
0
;
str
->
set
(
nr
,
collation
.
collation
);
return
str
;
}
bool
get_date
(
MYSQL_TIME
*
ltime
,
ulonglong
fuzzydate
)
{
return
get_date_from_int
(
ltime
,
fuzzydate
);
}
const
char
*
func_name
()
const
{
return
"month"
;
}
const
Type_handler
*
type_handler
()
const
{
return
&
type_handler_long
;
}
bool
fix_length_and_dec
()
{
decimals
=
0
;
...
...
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