1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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

This commit is contained in:
serg@serg.mylan
2004-06-09 00:08:24 +02:00
parent 5d947f7b97
commit a8a8da3920
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;