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
e5144f4b
Commit
e5144f4b
authored
Dec 10, 2018
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup: Datetime() constructors accepting Longlong_hybrid/Sec6 do not need THD
Removing the unused THD* parameter.
parent
8cf7e345
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
sql/field.cc
sql/field.cc
+3
-3
sql/sql_type.h
sql/sql_type.h
+4
-4
No files found.
sql/field.cc
View file @
e5144f4b
...
...
@@ -5118,7 +5118,7 @@ int Field_timestamp::store(longlong nr, bool unsigned_val)
Longlong_hybrid
tmp
(
nr
,
unsigned_val
);
ErrConvInteger
str
(
tmp
);
THD
*
thd
=
get_thd
();
Datetime
dt
(
thd
,
&
error
,
tmp
,
Timestamp
::
DatetimeOptions
(
thd
));
Datetime
dt
(
&
error
,
tmp
,
Timestamp
::
DatetimeOptions
(
thd
));
return
store_TIME_with_warning
(
thd
,
&
dt
,
&
str
,
error
);
}
...
...
@@ -5596,7 +5596,7 @@ int Field_datetime::store(longlong nr, bool unsigned_val)
Longlong_hybrid
tmp
(
nr
,
unsigned_val
);
ErrConvInteger
str
(
tmp
);
THD
*
thd
=
get_thd
();
Datetime
dt
(
thd
,
&
error
,
tmp
,
Datetime
::
Options
(
thd
));
Datetime
dt
(
&
error
,
tmp
,
Datetime
::
Options
(
thd
));
return
store_TIME_with_warning
(
&
dt
,
&
str
,
error
);
}
...
...
@@ -6314,7 +6314,7 @@ int Field_date_common::store(longlong nr, bool unsigned_val)
Longlong_hybrid
tmp
(
nr
,
unsigned_val
);
ErrConvInteger
str
(
tmp
);
THD
*
thd
=
get_thd
();
Datetime
dt
(
thd
,
&
error
,
tmp
,
Date
::
Options
(
thd
));
Datetime
dt
(
&
error
,
tmp
,
Date
::
Options
(
thd
));
return
store_TIME_with_warning
(
&
dt
,
&
str
,
error
);
}
...
...
sql/sql_type.h
View file @
e5144f4b
...
...
@@ -1950,14 +1950,14 @@ class Datetime: public Temporal_with_date
}
protected:
Datetime
(
THD
*
thd
,
int
*
warn
,
const
Sec6
&
nr
,
date_mode_t
flags
)
Datetime
(
int
*
warn
,
const
Sec6
&
nr
,
date_mode_t
flags
)
:
Temporal_with_date
(
warn
,
nr
,
flags
)
{
date_to_datetime_if_needed
();
DBUG_ASSERT
(
is_valid_value_slow
());
}
Datetime
(
THD
*
thd
,
int
*
warn
,
const
Sec9
&
nr
,
date_mode_t
fuzzydate
)
:
Datetime
(
thd
,
warn
,
static_cast
<
const
Sec6
>
(
nr
),
fuzzydate
)
:
Datetime
(
warn
,
static_cast
<
const
Sec6
>
(
nr
),
fuzzydate
)
{
if
(
is_valid_datetime
()
&&
time_round_mode_t
(
fuzzydate
)
==
TIME_FRAC_ROUND
)
...
...
@@ -1966,8 +1966,8 @@ class Datetime: public Temporal_with_date
}
public:
Datetime
(
THD
*
thd
,
int
*
warn
,
const
Longlong_hybrid
&
nr
,
date_mode_t
mode
)
:
Datetime
(
thd
,
warn
,
Sec6
(
nr
),
mode
)
Datetime
(
int
*
warn
,
const
Longlong_hybrid
&
nr
,
date_mode_t
mode
)
:
Datetime
(
warn
,
Sec6
(
nr
),
mode
)
{
}
Datetime
(
THD
*
thd
,
int
*
warn
,
double
nr
,
date_mode_t
fuzzydate
)
:
Datetime
(
thd
,
warn
,
Sec9
(
nr
),
fuzzydate
)
...
...
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