diff options
author | Alexander Barkov <bar@mariadb.org> | 2015-10-22 09:11:23 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2015-10-22 09:11:23 +0400 |
commit | e498d326257b2491c9e4f3ba44e57e32085a389d (patch) | |
tree | dca9518882236faea3630864428cb339ffffe216 /sql | |
parent | bdc03e0579cc5b7fbf07928eeace72a4715cdf52 (diff) | |
download | mariadb-git-e498d326257b2491c9e4f3ba44e57e32085a389d.tar.gz |
Adding "const" qualifier to arguments of date2my_decimal()
and ErrConvString::ErrConvString(String *).
Diffstat (limited to 'sql')
-rw-r--r-- | sql/my_decimal.cc | 2 | ||||
-rw-r--r-- | sql/my_decimal.h | 2 | ||||
-rw-r--r-- | sql/sql_error.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/sql/my_decimal.cc b/sql/my_decimal.cc index 37d4dd25473..be732d4a927 100644 --- a/sql/my_decimal.cc +++ b/sql/my_decimal.cc @@ -320,7 +320,7 @@ my_decimal *seconds2my_decimal(bool sign, } -my_decimal *date2my_decimal(MYSQL_TIME *ltime, my_decimal *dec) +my_decimal *date2my_decimal(const MYSQL_TIME *ltime, my_decimal *dec) { longlong date= (ltime->year*100L + ltime->month)*100L + ltime->day; if (ltime->time_type > MYSQL_TIMESTAMP_DATE) diff --git a/sql/my_decimal.h b/sql/my_decimal.h index 78c71d54b6d..265b370a154 100644 --- a/sql/my_decimal.h +++ b/sql/my_decimal.h @@ -386,7 +386,7 @@ int string2my_decimal(uint mask, const String *str, my_decimal *d) } -my_decimal *date2my_decimal(MYSQL_TIME *ltime, my_decimal *dec); +my_decimal *date2my_decimal(const MYSQL_TIME *ltime, my_decimal *dec); #endif /*defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY) */ diff --git a/sql/sql_error.h b/sql/sql_error.h index 111495fa566..e03c3dd4a93 100644 --- a/sql/sql_error.h +++ b/sql/sql_error.h @@ -567,7 +567,7 @@ public: : ErrConv(), str(str_arg), len(len_arg), cs(cs_arg) {} ErrConvString(const char *str_arg, CHARSET_INFO *cs_arg) : ErrConv(), str(str_arg), len(strlen(str_arg)), cs(cs_arg) {} - ErrConvString(String *s) + ErrConvString(const String *s) : ErrConv(), str(s->ptr()), len(s->length()), cs(s->charset()) {} const char *ptr() const { return err_conv(err_buffer, sizeof(err_buffer), str, len, cs); } |