diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/sql/item.cc b/sql/item.cc index 56af69be427..35c5ab8cc3d 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -3187,33 +3187,6 @@ inline static uint32 adjust_max_effective_column_length(Field *field_par, uint32 max_length) { uint32 new_max_length= field_par->max_display_length(); - uint32 sign_length= (field_par->flags & UNSIGNED_FLAG) ? 0 : 1; - - switch (field_par->type()) - { - case MYSQL_TYPE_INT24: - /* - Compensate for MAX_MEDIUMINT_WIDTH being 1 too long (8) - compared to the actual number of digits that can fit into - the column. - */ - new_max_length+= 1; - /* fall through */ - case MYSQL_TYPE_LONG: - case MYSQL_TYPE_TINY: - case MYSQL_TYPE_SHORT: - - /* Take out the sign and add a conditional sign */ - new_max_length= new_max_length - 1 + sign_length; - break; - - /* BINGINT is always 20 no matter the sign */ - case MYSQL_TYPE_LONGLONG: - /* make gcc happy */ - default: - break; - } - /* Adjust only if the actual precision based one is bigger than specified */ return new_max_length > max_length ? new_max_length : max_length; } |