mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +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:
@ -149,3 +149,14 @@ CREATE SEQUENCE t1 engine=innodb;
|
||||
--error ER_SEQUENCE_INVALID_TABLE_STRUCTURE
|
||||
ALTER IGNORE TABLE t1 ADD CHECK (start_value < minimum_value);
|
||||
DROP SEQUENCE t1;
|
||||
|
||||
#
|
||||
# MDEV-19320 Sequence gets corrupted and produces ER_KEY_NOT_FOUND (Can't
|
||||
# find record) after ALTER .. ORDER BY
|
||||
#
|
||||
|
||||
CREATE SEQUENCE s;
|
||||
--error ER_SEQUENCE_INVALID_TABLE_STRUCTURE
|
||||
ALTER TABLE s ORDER BY cache_size;
|
||||
SELECT NEXTVAL(s);
|
||||
DROP SEQUENCE s;
|
||||
|
Reference in New Issue
Block a user