1
0
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:
Oleksandr Byelkin
2018-09-14 08:47:22 +02:00
321 changed files with 6852 additions and 195819 deletions

View File

@ -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;