1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-05 12:42:17 +03:00

Don't allow ALTER TABLE ... ORDER BY on SEQUENCE objects

MDEV-19320 Sequence gets corrupted and produces ER_KEY_NOT_FOUND
           (Can't find record) after ALTER .. ORDER BY
This commit is contained in:
Monty
2020-06-07 16:30:50 +03:00
parent e6a6382f15
commit a9bee9884a
3 changed files with 23 additions and 0 deletions

View File

@ -208,6 +208,11 @@ bool check_sequence_fields(LEX *lex, List<Create_field> *fields)
reason= "Sequence tables cannot have any constraints";
goto err;
}
if (lex->alter_info.flags & ALTER_ORDER)
{
reason= "ORDER BY";
goto err;
}
for (field_no= 0; (field= it++); field_no++)
{