MDEV-24018: SIGSEGV in Item_func_nextval::update_table on SELECT SETVAL

Reviewed-by: wlad@mariadb.com
This commit is contained in:
Anel Husakovic 2020-10-27 12:16:53 +01:00
parent e64084d5a3
commit e183aec1d7
2 changed files with 12 additions and 0 deletions

View file

@ -541,5 +541,10 @@ CREATE VIEW v AS SELECT 1;
LOCK TABLE v READ;
SELECT NEXT VALUE FOR v;
ERROR 42S02: 'test.v' is not a SEQUENCE
#
# MDEV-24018: SIGSEGV in Item_func_nextval::update_table on SELECT SETVAL
#
SELECT SETVAL (v,0);
ERROR 42S02: 'test.v' is not a SEQUENCE
UNLOCK TABLES;
DROP VIEW v;

View file

@ -288,5 +288,12 @@ CREATE VIEW v AS SELECT 1;
LOCK TABLE v READ;
--error ER_NOT_SEQUENCE
SELECT NEXT VALUE FOR v;
--echo #
--echo # MDEV-24018: SIGSEGV in Item_func_nextval::update_table on SELECT SETVAL
--echo #
--error ER_NOT_SEQUENCE
SELECT SETVAL (v,0);
UNLOCK TABLES;
DROP VIEW v;