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
fed51b80
Commit
fed51b80
authored
Feb 17, 2018
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding "const" qualifier to the MYSQL_TIME parameter of Item_temporal_literal constructors
parent
a55ded1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
sql/item.h
sql/item.h
+8
-7
No files found.
sql/item.h
View file @
fed51b80
...
...
@@ -4163,13 +4163,14 @@ class Item_temporal_literal :public Item_basic_constant
Constructor for Item_date_literal.
@param ltime DATE value.
*/
Item_temporal_literal
(
THD
*
thd
,
MYSQL_TIME
*
ltime
)
:
Item_basic_constant
(
thd
)
Item_temporal_literal
(
THD
*
thd
,
const
MYSQL_TIME
*
ltime
)
:
Item_basic_constant
(
thd
)
{
collation
.
set
(
&
my_charset_numeric
,
DERIVATION_NUMERIC
,
MY_REPERTOIRE_ASCII
);
decimals
=
0
;
cached_time
=
*
ltime
;
}
Item_temporal_literal
(
THD
*
thd
,
MYSQL_TIME
*
ltime
,
uint
dec_arg
)
:
Item_temporal_literal
(
THD
*
thd
,
const
MYSQL_TIME
*
ltime
,
uint
dec_arg
)
:
Item_basic_constant
(
thd
)
{
collation
.
set
(
&
my_charset_numeric
,
DERIVATION_NUMERIC
,
MY_REPERTOIRE_ASCII
);
...
...
@@ -4205,7 +4206,7 @@ class Item_temporal_literal :public Item_basic_constant
class
Item_date_literal
:
public
Item_temporal_literal
{
public:
Item_date_literal
(
THD
*
thd
,
MYSQL_TIME
*
ltime
)
Item_date_literal
(
THD
*
thd
,
const
MYSQL_TIME
*
ltime
)
:
Item_temporal_literal
(
thd
,
ltime
)
{
max_length
=
MAX_DATE_WIDTH
;
...
...
@@ -4234,7 +4235,7 @@ class Item_date_literal: public Item_temporal_literal
class
Item_time_literal
:
public
Item_temporal_literal
{
public:
Item_time_literal
(
THD
*
thd
,
MYSQL_TIME
*
ltime
,
uint
dec_arg
)
:
Item_time_literal
(
THD
*
thd
,
const
MYSQL_TIME
*
ltime
,
uint
dec_arg
)
:
Item_temporal_literal
(
thd
,
ltime
,
dec_arg
)
{
max_length
=
MIN_TIME_WIDTH
+
(
decimals
?
decimals
+
1
:
0
);
...
...
@@ -4255,7 +4256,7 @@ class Item_time_literal: public Item_temporal_literal
class
Item_datetime_literal
:
public
Item_temporal_literal
{
public:
Item_datetime_literal
(
THD
*
thd
,
MYSQL_TIME
*
ltime
,
uint
dec_arg
)
:
Item_datetime_literal
(
THD
*
thd
,
const
MYSQL_TIME
*
ltime
,
uint
dec_arg
)
:
Item_temporal_literal
(
thd
,
ltime
,
dec_arg
)
{
max_length
=
MAX_DATETIME_WIDTH
+
(
decimals
?
decimals
+
1
:
0
);
...
...
@@ -4301,7 +4302,7 @@ class Item_date_literal_for_invalid_dates: public Item_date_literal
in sql_mode=TRADITIONAL.
*/
public:
Item_date_literal_for_invalid_dates
(
THD
*
thd
,
MYSQL_TIME
*
ltime
)
Item_date_literal_for_invalid_dates
(
THD
*
thd
,
const
MYSQL_TIME
*
ltime
)
:
Item_date_literal
(
thd
,
ltime
)
{
}
bool
get_date
(
MYSQL_TIME
*
ltime
,
ulonglong
fuzzy_date
)
{
...
...
@@ -4319,7 +4320,7 @@ class Item_datetime_literal_for_invalid_dates: public Item_datetime_literal
{
public:
Item_datetime_literal_for_invalid_dates
(
THD
*
thd
,
MYSQL_TIME
*
ltime
,
uint
dec_arg
)
const
MYSQL_TIME
*
ltime
,
uint
dec_arg
)
:
Item_datetime_literal
(
thd
,
ltime
,
dec_arg
)
{
}
bool
get_date
(
MYSQL_TIME
*
ltime
,
ulonglong
fuzzy_date
)
{
...
...
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