diff options
Diffstat (limited to 'mysql-test/suite/period')
-rw-r--r-- | mysql-test/suite/period/r/delete.result | 12 | ||||
-rw-r--r-- | mysql-test/suite/period/t/delete.test | 14 |
2 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/suite/period/r/delete.result b/mysql-test/suite/period/r/delete.result index 428200a4564..451017e5340 100644 --- a/mysql-test/suite/period/r/delete.result +++ b/mysql-test/suite/period/r/delete.result @@ -353,6 +353,18 @@ id s e datediff(e, s) 1 1999-01-01 1999-01-03 2 1 2018-12-10 2018-12-12 2 2 1999-01-01 1999-01-03 2 +# +# MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED +# +create or replace table t1 (id int, s date, e date, period for apptime(s,e)); +create or replace procedure sp() +delete from t1 for portion of othertime from '2000-01-01' to '2018-01-01'; +call sp; +ERROR HY000: Period `othertime` is not found in table +call sp; +ERROR HY000: Period `othertime` is not found in table +drop table t1; +drop procedure sp; drop table t,t2,t3,log_tbl; drop view v; drop procedure log; diff --git a/mysql-test/suite/period/t/delete.test b/mysql-test/suite/period/t/delete.test index 00bc314160f..738d77d2c19 100644 --- a/mysql-test/suite/period/t/delete.test +++ b/mysql-test/suite/period/t/delete.test @@ -181,6 +181,20 @@ delete from t for portion of apptime from '1999-01-03' to '2018-12-10'; --sorted_result select *, datediff(e, s) from t; +--echo # +--echo # MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED +--echo # +create or replace table t1 (id int, s date, e date, period for apptime(s,e)); +create or replace procedure sp() +delete from t1 for portion of othertime from '2000-01-01' to '2018-01-01'; +--error ER_PERIOD_NOT_FOUND +call sp; +--error ER_PERIOD_NOT_FOUND +call sp; +drop table t1; +drop procedure sp; + + drop table t,t2,t3,log_tbl; drop view v; drop procedure log; |