mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merging
sql/sql_parse.cc: Auto merged
This commit is contained in:
@ -5814,19 +5814,31 @@ new_create_field(THD *thd, char *field_name, enum_field_types type,
|
||||
new_field->decimals= NOT_FIXED_DEC;
|
||||
break;
|
||||
}
|
||||
if (!length)
|
||||
if (!length && !decimals)
|
||||
{
|
||||
new_field->length = FLT_DIG+6;
|
||||
new_field->decimals= NOT_FIXED_DEC;
|
||||
}
|
||||
if (new_field->length < new_field->decimals &&
|
||||
new_field->decimals != NOT_FIXED_DEC)
|
||||
{
|
||||
my_error(ER_M_BIGGER_THAN_D, MYF(0), field_name);
|
||||
DBUG_RETURN(NULL);
|
||||
}
|
||||
break;
|
||||
case FIELD_TYPE_DOUBLE:
|
||||
allowed_type_modifier= AUTO_INCREMENT_FLAG;
|
||||
if (!length)
|
||||
if (!length && !decimals)
|
||||
{
|
||||
new_field->length = DBL_DIG+7;
|
||||
new_field->decimals=NOT_FIXED_DEC;
|
||||
}
|
||||
if (new_field->length < new_field->decimals &&
|
||||
new_field->decimals != NOT_FIXED_DEC)
|
||||
{
|
||||
my_error(ER_M_BIGGER_THAN_D, MYF(0), field_name);
|
||||
DBUG_RETURN(NULL);
|
||||
}
|
||||
break;
|
||||
case FIELD_TYPE_TIMESTAMP:
|
||||
if (!length)
|
||||
|
Reference in New Issue
Block a user