mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-33739 Check field type of the first field in check_sequence_fields()
This avoids non-integral types breaking the call of sequence_structure().
This commit is contained in:
@ -349,6 +349,12 @@ bool check_sequence_fields(LEX *lex, List<Create_field> *fields,
|
||||
reason= my_get_err_msg(ER_SEQUENCE_TABLE_HAS_WRONG_NUMBER_OF_COLUMNS);
|
||||
goto err;
|
||||
}
|
||||
if (!sequence_definition::is_allowed_value_type(
|
||||
fields->head()->type_handler()->field_type()))
|
||||
{
|
||||
reason= fields->head()->field_name.str;
|
||||
goto err;
|
||||
}
|
||||
row_structure= sequence_structure(fields->head()->type_handler());
|
||||
if (field_count != array_elements(row_structure.fields)-1)
|
||||
{
|
||||
|
Reference in New Issue
Block a user