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:
@ -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++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user