1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00
This commit is contained in:
monty@mysql.com
2004-06-10 11:58:16 +03:00
parent 7fb04c4f5f
commit c56a16b598

View File

@ -3157,10 +3157,12 @@ bool add_field_to_list(char *field_name, enum_field_types type,
break;
case FIELD_TYPE_DECIMAL:
if (!length)
if (new_field->length= new_field->decimals)
{
if ((new_field->length= new_field->decimals))
new_field->length++;
else
new_field->length=10; // Default length for DECIMAL
new_field->length= 10; // Default length for DECIMAL
}
if (new_field->length < MAX_FIELD_WIDTH) // Skip wrong argument
{
new_field->length+=sign_len;