1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Don't allow illegal create options for SEQUENCE

MDEV-19977 Assertion `(0xFUL & mode) == LOCK_S ||
           (0xFUL & mode) == LOCK_X' failed in lock_rec_lock
This commit is contained in:
Monty
2020-06-07 16:23:44 +03:00
parent fad348a9a6
commit e6a6382f15
5 changed files with 97 additions and 1 deletions

View File

@ -203,6 +203,11 @@ bool check_sequence_fields(LEX *lex, List<Create_field> *fields)
reason= "Sequence tables cannot have any keys";
goto err;
}
if (lex->alter_info.check_constraint_list.elements > 0)
{
reason= "Sequence tables cannot have any constraints";
goto err;
}
for (field_no= 0; (field= it++); field_no++)
{
@ -210,7 +215,8 @@ bool check_sequence_fields(LEX *lex, List<Create_field> *fields)
if (my_strcasecmp(system_charset_info, field_def->field_name,
field->field_name.str) ||
field->flags != field_def->flags ||
field->type_handler() != field_def->type_handler)
field->type_handler() != field_def->type_handler ||
field->check_constraint || field->vcol_info)
{
reason= field->field_name.str;
goto err;