diff options
Diffstat (limited to 'mysql-test/suite/period/t/update.test')
-rw-r--r-- | mysql-test/suite/period/t/update.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/suite/period/t/update.test b/mysql-test/suite/period/t/update.test index d4a2080ea0a..66d3bc1e9bf 100644 --- a/mysql-test/suite/period/t/update.test +++ b/mysql-test/suite/period/t/update.test @@ -183,3 +183,21 @@ update ignore t1 set id = 2429681664; update ignore t1 for portion of p from '1995-07-06' to '2009-01-12' set f = 1; drop table t1; + +--echo # +--echo # MDEV-22805 SIGSEGV in check_fields on UPDATE (optimized builds) | Assertion `thd->lex->sql_command == SQLCOM_UPDATE' failed. +--echo # +CREATE TABLE t1 (a INT, b DATE, c DATE, PERIOD FOR APPTIME(b, c)); + +INSERT INTO t1 VALUES(1, '1999-01-01', '2018-12-12'); + +# Without a patch the following statement crashs a server built in debug mode +--error ER_NOT_SUPPORTED_YET +UPDATE t1 FOR PORTION OF APPTIME FROM (SELECT '1999-01-01' FROM t1 WHERE a=2) TO '2018-01-01' SET a = 100; + +CREATE VIEW v1 AS SELECT * FROM t1; +--error ER_IT_IS_A_VIEW +UPDATE v1 FOR PORTION OF APPTIME FROM (SELECT '1999-01-01' FROM t1 WHERE a=2) TO '2018-01-01' SET a = 100; + +DROP VIEW v1; +DROP TABLE t1; |