Commit fed51b80 authored by Alexander Barkov's avatar Alexander Barkov

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

parent a55ded1b
......@@ -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)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment