From b42248d2f2583d29142cf9b0c81c1994249edbcb Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Sun, 16 Oct 2016 11:39:55 +0000 Subject: MyRocks port: make Field::char_length() a const function --- sql/field.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql/field.h') diff --git a/sql/field.h b/sql/field.h index f550dad1c6c..0bb9da83827 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1335,7 +1335,7 @@ public: longlong convert_decimal2longlong(const my_decimal *val, bool unsigned_flag, int *err); /* The max. number of characters */ - virtual uint32 char_length() + virtual uint32 char_length() const { return field_length / charset()->mbmaxlen; } @@ -3316,7 +3316,7 @@ public: bool has_charset(void) const { return charset() == &my_charset_bin ? FALSE : TRUE; } uint32 max_display_length(); - uint32 char_length(); + uint32 char_length() const; uint is_equal(Create_field *new_field); private: int do_save_field_metadata(uchar *first_byte); -- cgit v1.2.1