1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-23823 Crash in SELECT NEXT VALUE on locked view

Make open_table() fail if sequence should be opened, but it turns out to
be locked view.
This commit is contained in:
Vladislav Vaintroub
2020-09-28 09:49:46 +02:00
parent d9d9c30b70
commit a6987d9fb9
3 changed files with 26 additions and 0 deletions

View File

@ -280,3 +280,13 @@ select next value for s;
flush tables;
select next value for s;
drop sequence s;
--echo #
--echo # MDEV-23823 NEXT VALUE crash on locked view
--echo #
CREATE VIEW v AS SELECT 1;
LOCK TABLE v READ;
--error ER_NOT_SEQUENCE
SELECT NEXT VALUE FOR v;
UNLOCK TABLES;
DROP VIEW v;