mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge branch '10.1' into 10.2
This commit is contained in:
17
sql/field.cc
17
sql/field.cc
@ -9815,13 +9815,18 @@ void Column_definition::create_length_to_internal_length(void)
|
||||
}
|
||||
break;
|
||||
case MYSQL_TYPE_NEWDECIMAL:
|
||||
key_length= pack_length=
|
||||
my_decimal_get_binary_size(my_decimal_length_to_precision((uint)length,
|
||||
decimals,
|
||||
flags &
|
||||
UNSIGNED_FLAG),
|
||||
decimals);
|
||||
{
|
||||
/*
|
||||
This code must be identical to code in
|
||||
Field_new_decimal::Field_new_decimal as otherwise the record layout
|
||||
gets out of sync.
|
||||
*/
|
||||
uint precision= my_decimal_length_to_precision((uint)length, decimals,
|
||||
flags & UNSIGNED_FLAG);
|
||||
set_if_smaller(precision, DECIMAL_MAX_PRECISION);
|
||||
key_length= pack_length= my_decimal_get_binary_size(precision, decimals);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
key_length= pack_length= calc_pack_length(sql_type, (uint)length);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user