1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-05 13:16:09 +03:00

MyRocks port: make Field::char_length() a const function

This commit is contained in:
Sergei Petrunia
2016-10-16 11:39:55 +00:00
parent a7091b0679
commit b42248d2f2
2 changed files with 3 additions and 3 deletions

View File

@@ -10598,7 +10598,7 @@ Column_definition::Column_definition(THD *thd, Field *old_field,
length length
*/ */
uint32 Field_blob::char_length() uint32 Field_blob::char_length() const
{ {
switch (packlength) switch (packlength)
{ {

View File

@@ -1335,7 +1335,7 @@ public:
longlong convert_decimal2longlong(const my_decimal *val, bool unsigned_flag, longlong convert_decimal2longlong(const my_decimal *val, bool unsigned_flag,
int *err); int *err);
/* The max. number of characters */ /* The max. number of characters */
virtual uint32 char_length() virtual uint32 char_length() const
{ {
return field_length / charset()->mbmaxlen; return field_length / charset()->mbmaxlen;
} }
@@ -3316,7 +3316,7 @@ public:
bool has_charset(void) const bool has_charset(void) const
{ return charset() == &my_charset_bin ? FALSE : TRUE; } { return charset() == &my_charset_bin ? FALSE : TRUE; }
uint32 max_display_length(); uint32 max_display_length();
uint32 char_length(); uint32 char_length() const;
uint is_equal(Create_field *new_field); uint is_equal(Create_field *new_field);
private: private:
int do_save_field_metadata(uchar *first_byte); int do_save_field_metadata(uchar *first_byte);