1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Adding "const" qualifier to the MYSQL_TIME parameter of Item_temporal_literal constructors

This commit is contained in:
Alexander Barkov
2018-02-17 19:16:56 +04:00
parent a55ded1b89
commit fed51b80fb

View File

@@ -4163,13 +4163,14 @@ public:
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 @@ public:
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 @@ public:
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 @@ public:
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)
{