1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-15971 Split the code for CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH into methods in Field

This commit is contained in:
Alexander Barkov
2018-04-22 13:30:31 +04:00
parent 6242036f27
commit c555dc768f
4 changed files with 72 additions and 13 deletions

View File

@ -951,6 +951,34 @@ public:
};
class Information_schema_character_attributes
{
uint32 m_octet_length;
uint32 m_char_length;
bool m_is_set;
public:
Information_schema_character_attributes()
:m_octet_length(0), m_char_length(0), m_is_set(false)
{ }
Information_schema_character_attributes(uint32 octet_length,
uint32 char_length)
:m_octet_length(octet_length), m_char_length(char_length), m_is_set(true)
{ }
bool has_octet_length() const { return m_is_set; }
bool has_char_length() const { return m_is_set; }
uint32 octet_length() const
{
DBUG_ASSERT(has_octet_length());
return m_octet_length;
}
uint char_length() const
{
DBUG_ASSERT(has_char_length());
return m_char_length;
}
};
class Type_handler
{
protected: