Commit c56a16b5 authored by monty@mysql.com's avatar monty@mysql.com

Cleanup

parent 7fb04c4f
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment