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

@ -534,3 +534,12 @@ select next value for s;
next value for s
-999
drop sequence s;
#
# MDEV-23823 NEXT VALUE crash on locked view
#
CREATE VIEW v AS SELECT 1;
LOCK TABLE v READ;
SELECT NEXT VALUE FOR v;
ERROR 42S02: 'test.v' is not a SEQUENCE
UNLOCK TABLES;
DROP VIEW v;