summaryrefslogtreecommitdiff
path: root/mysql-test/suite/period/t/delete.test
diff options
context:
space:
mode:
authorNikita Malyavin <nikitamalyavin@gmail.com>2019-10-09 16:48:50 +1000
committerNikita Malyavin <nikitamalyavin@gmail.com>2020-10-14 21:57:58 +1000
commit5896a49820363ec7c393de7d9967fa8dc8f18b1a (patch)
tree8660dacbb085e909f53423609bea44536abe64bb /mysql-test/suite/period/t/delete.test
parentc2ac0ce1f02e3ae2b1de5c07ba40bed25c30dc40 (diff)
downloadmariadb-git-5896a49820363ec7c393de7d9967fa8dc8f18b1a.tar.gz
MDEV-19130 Assertion failed in handler::update_auto_increment
add store/restore_auto_increment in period portion insert/update functions
Diffstat (limited to 'mysql-test/suite/period/t/delete.test')
-rw-r--r--mysql-test/suite/period/t/delete.test29
1 files changed, 28 insertions, 1 deletions
diff --git a/mysql-test/suite/period/t/delete.test b/mysql-test/suite/period/t/delete.test
index 738d77d2c19..2a5f65d80ba 100644
--- a/mysql-test/suite/period/t/delete.test
+++ b/mysql-test/suite/period/t/delete.test
@@ -194,7 +194,34 @@ call sp;
drop table t1;
drop procedure sp;
-
drop table t,t2,t3,log_tbl;
drop view v;
drop procedure log;
+
+--echo # MDEV-19130 Assertion
+--echo # `next_insert_id >= auto_inc_interval_for_cur_row.minimum()'
+--echo # failed in handler::update_auto_increment after error 167
+
+create or replace table t (f tinyint auto_increment null,
+ s timestamp, e timestamp,
+ period for app(s,e), key(f, s));
+insert into t (s,e) values
+ ('2021-08-22 10:28:43', '2023-09-17 00:00:00'),
+ ('2019-05-09 21:45:24', '2020-04-22 14:38:49');
+insert into t (s,e) select s,e from t;
+insert into t (s,e) select s,e from t;
+insert into t (s,e) select s,e from t;
+insert into t (s,e) values ('2015-07-07 00:00:00','2020-03-11 08:48:52');
+insert into t (s,e) select s,e from t;
+insert into t (s,e) select s,e from t;
+
+--replace_regex /row \d+/row ROW/
+--error HA_ERR_AUTOINC_ERANGE
+insert into t select * from t;
+
+--disable_warnings
+delete ignore from t
+ for portion of app from '2015-07-07 00:00:00' to '2020-03-11 08:48:52';
+--enable_warnings
+
+drop table t;