summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/period/r/long_unique.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/period/r/long_unique.result')
-rw-r--r--mysql-test/suite/period/r/long_unique.result17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/suite/period/r/long_unique.result b/mysql-test/suite/period/r/long_unique.result
new file mode 100644
index 00000000..5c5f4297
--- /dev/null
+++ b/mysql-test/suite/period/r/long_unique.result
@@ -0,0 +1,17 @@
+#
+# Assertion `inited == NONE || update_handler != this' failed in
+# handler::ha_write_row
+#
+CREATE TABLE t1 (f VARCHAR(4096), s DATE, e DATE, PERIOD FOR app(s,e), UNIQUE(f)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('foo', '2023-08-30', '2025-07-09'),('bar', '2021-01-01', '2021-12-31');
+DELETE FROM t1 FOR PORTION OF app FROM '2023-08-29' TO '2025-07-01';
+DROP TABLE t1;
+#
+# MDEV-21819 Assertion `inited == NONE || update_handler != this'
+# failed in handler::ha_write_row
+#
+CREATE OR REPLACE TABLE t1 (a INT, b BLOB, s DATE, e DATE, PERIOD FOR app(s,e), UNIQUE(b)) ENGINE=MyISAM PARTITION BY HASH(a) PARTITIONS 2;
+INSERT INTO t1 VALUES (1,'foo','2022-01-01', '2025-01-01');
+DELETE FROM t1 FOR PORTION OF app FROM '2023-01-01' TO '2024-01-01';
+ERROR 23000: Duplicate entry 'foo' for key 'b'
+DROP TABLE t1;