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

Reverted fix away from 4.0, because it may in rare circumstanses

cause compatibility problems. Fix will be enabled in 4.1.
This commit is contained in:
unknown
2003-03-23 11:30:45 +02:00
parent c1719ad057
commit fd8972cfa7

View File

@ -2892,17 +2892,23 @@ bool add_field_to_list(char *field_name, enum_field_types type,
DBUG_RETURN(1);
}
}
#ifdef MYSQL41000
else if (type_modifier & AUTO_INCREMENT_FLAG)
{
net_printf(&thd->net, ER_INVALID_DEFAULT, field_name);
DBUG_RETURN(1);
}
#endif
}
if (!(new_field=new create_field()))
DBUG_RETURN(1);
new_field->field=0;
new_field->field_name=field_name;
#ifdef MYSQL41000
new_field->def= default_value;
#else
new_field->def= (type_modifier & AUTO_INCREMENT_FLAG ? 0 : default_value);
#endif
new_field->flags= type_modifier;
new_field->unireg_check= (type_modifier & AUTO_INCREMENT_FLAG ?
Field::NEXT_NUMBER : Field::NONE);