Skip to content

Commit

Permalink
Adding "const" qualifier into a few methods in Field.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Barkov committed Jun 18, 2015
1 parent 091f677 commit 366cda4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions sql/field.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10210,6 +10210,7 @@ Field::set_warning(Sql_condition::enum_warning_level level, uint code,
void Field::set_datetime_warning(Sql_condition::enum_warning_level level,
uint code, const ErrConv *str,
timestamp_type ts_type, int cuted_increment)
const
{
THD *thd= get_thd();
if (thd->really_abort_on_warning() && level >= Sql_condition::WARN_LEVEL_WARN)
Expand Down
6 changes: 3 additions & 3 deletions sql/field.h
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ class Field
null_bit= p_null_bit;
}

inline THD *get_thd() { return table ? table->in_use : current_thd; }
inline THD *get_thd() const { return table ? table->in_use : current_thd; }

enum {
LAST_NULL_BYTE_UNDEF= 0
Expand Down Expand Up @@ -897,7 +897,7 @@ class Field
int cuted_increment) const;
void set_datetime_warning(Sql_condition::enum_warning_level, uint code,
const ErrConv *str, timestamp_type ts_type,
int cuted_increment);
int cuted_increment) const;
inline bool check_overflow(int op_result)
{
return (op_result == E_DEC_OVERFLOW);
Expand Down Expand Up @@ -1682,7 +1682,7 @@ class Field_temporal_with_date: public Field_temporal {
int was_cut, int have_smth_to_conv);
virtual void store_TIME(MYSQL_TIME *ltime) = 0;
bool validate_for_get_date(bool not_zero_date, const MYSQL_TIME *ltime,
ulonglong fuzzydate)
ulonglong fuzzydate) const
{
if (!not_zero_date)
return fuzzydate & TIME_NO_ZERO_DATE;
Expand Down

0 comments on commit 366cda4

Please sign in to comment.