1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

different (simpler and more compatible) fix for bug#4046

This commit is contained in:
unknown
2004-06-09 00:08:24 +02:00
parent 548f024089
commit e6c916ffa8
3 changed files with 14 additions and 1 deletions

View File

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