summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/versioning
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/versioning')
-rw-r--r--mysql-test/suite/versioning/r/alter.result13
-rw-r--r--mysql-test/suite/versioning/r/data.result6
-rw-r--r--mysql-test/suite/versioning/r/partition.result23
-rw-r--r--mysql-test/suite/versioning/t/alter.test15
-rw-r--r--mysql-test/suite/versioning/t/partition.test38
5 files changed, 89 insertions, 6 deletions
diff --git a/mysql-test/suite/versioning/r/alter.result b/mysql-test/suite/versioning/r/alter.result
index b3c342fd..52c35f47 100644
--- a/mysql-test/suite/versioning/r/alter.result
+++ b/mysql-test/suite/versioning/r/alter.result
@@ -846,8 +846,17 @@ Note 1060 Duplicate column name 'v'
alter table `b` add column if not exists ( p bit );
drop table `b`;
#
-# End of 10.4 tests
+# MDEV-30528 Assertion !mbmaxlen || ... failed
+# in dtype_get_at_most_n_mbchars()
#
+CREATE TABLE t(f TEXT) WITH SYSTEM VERSIONING CHARACTER SET utf8 ENGINE=InnoDB;
+INSERT INTO t VALUES ('foo');
+DELETE FROM t;
+ALTER TABLE t ADD FULLTEXT (f);
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+DROP TABLE t;
+# End of 10.4 tests
#
# MDEV-21941 RENAME doesn't work for system time or period fields
#
@@ -871,6 +880,4 @@ t1 CREATE TABLE `t1` (
PERIOD FOR SYSTEM_TIME (`x`, `y`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
drop table t1;
-#
# End of 10.5 tests
-#
diff --git a/mysql-test/suite/versioning/r/data.result b/mysql-test/suite/versioning/r/data.result
index c7fe141c..08ab03ff 100644
--- a/mysql-test/suite/versioning/r/data.result
+++ b/mysql-test/suite/versioning/r/data.result
@@ -10,6 +10,7 @@ set timestamp=unix_timestamp('1991-01-02 00:00');
delete from t1 where x=2;
set timestamp=default;
#MYSQL_DUMP --compact test
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -19,6 +20,7 @@ CREATE TABLE `t1` (
INSERT INTO `t1` VALUES
(3);
#MYSQL_DUMP --compact --as-of="1990-01-02 00:00" test
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -30,6 +32,7 @@ INSERT INTO `t1` VALUES
(2),
(3);
#MYSQL_DUMP --compact --as-of="1990-08-02 00:00" --databases test
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */;
@@ -45,6 +48,7 @@ INSERT INTO `t1` VALUES
(2),
(3);
#MYSQL_DUMP --compact --as-of="1990-08-04 00:00" test t1
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -87,6 +91,7 @@ select x, check_fields(x, row_start, row_end) from t2 for system_time all order
x check_fields(x, row_start, row_end)
1 [CORRECT]
2 [CORRECT]
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -194,6 +199,7 @@ insert t1 (x) values (2);
delete from t1 where x=1;
mariadb-dump: Cannot use --dump-history for table `t1` with transaction-precise history
mariadb-dump: Cannot use --dump-history for table `t1` with transaction-precise history
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result
index 4c1486d0..02cecea6 100644
--- a/mysql-test/suite/versioning/r/partition.result
+++ b/mysql-test/suite/versioning/r/partition.result
@@ -3447,4 +3447,27 @@ ERROR HY000: Maybe missing parameters: no rotation condition for multiple HISTOR
#
# End of 10.5 tests
#
+#
+# MDEV-31903 Server crashes in _ma_reset_history upon UNLOCK table with auto-create history partitions
+#
+set timestamp= unix_timestamp('2000-01-01 00:00:00');
+create table t1 (x int) engine=aria with system versioning partition by system_time interval 1 hour auto partitions 3;
+insert into t1 values (1);
+create table t2 (x int) engine=aria;
+create trigger tr after insert on t2 for each row update t1 set x= x + 11;
+lock tables t1 write, t2 write;
+update t1 set x= x + 1;
+set timestamp= unix_timestamp('2000-01-01 13:00:00');
+insert into t2 values (5);
+unlock tables;
+drop table t1, t2;
+set timestamp= default;
+#
+# MDEV-29872 MSAN/Valgrind uninitialised value errors in TABLE::vers_switch_partition
+#
+create table t (a int) with system versioning partition by system_time limit 100 partitions 3;
+drop table t;
+#
+# End of 10.9 tests
+#
set global innodb_stats_persistent= @save_persistent;
diff --git a/mysql-test/suite/versioning/t/alter.test b/mysql-test/suite/versioning/t/alter.test
index 44f52ddf..85448d21 100644
--- a/mysql-test/suite/versioning/t/alter.test
+++ b/mysql-test/suite/versioning/t/alter.test
@@ -743,9 +743,20 @@ alter table `b` add column if not exists ( p bit );
drop table `b`;
--echo #
---echo # End of 10.4 tests
+--echo # MDEV-30528 Assertion !mbmaxlen || ... failed
+--echo # in dtype_get_at_most_n_mbchars()
--echo #
+CREATE TABLE t(f TEXT) WITH SYSTEM VERSIONING CHARACTER SET utf8 ENGINE=InnoDB;
+INSERT INTO t VALUES ('foo');
+DELETE FROM t;
+--enable_info
+ALTER TABLE t ADD FULLTEXT (f);
+--disable_info
+DROP TABLE t;
+
+--echo # End of 10.4 tests
+
--echo #
--echo # MDEV-21941 RENAME doesn't work for system time or period fields
--echo #
@@ -767,6 +778,4 @@ show create table t1;
# cleanup
drop table t1;
---echo #
--echo # End of 10.5 tests
---echo #
diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test
index 3699ac28..5707746f 100644
--- a/mysql-test/suite/versioning/t/partition.test
+++ b/mysql-test/suite/versioning/t/partition.test
@@ -2673,5 +2673,43 @@ create table t (a int) with system versioning partition by system_time partition
--echo # End of 10.5 tests
--echo #
+--echo #
+--echo # MDEV-31903 Server crashes in _ma_reset_history upon UNLOCK table with auto-create history partitions
+--echo #
+set timestamp= unix_timestamp('2000-01-01 00:00:00');
+create table t1 (x int) engine=aria with system versioning partition by system_time interval 1 hour auto partitions 3;
+insert into t1 values (1);
+
+create table t2 (x int) engine=aria;
+create trigger tr after insert on t2 for each row update t1 set x= x + 11;
+lock tables t1 write, t2 write;
+update t1 set x= x + 1;
+set timestamp= unix_timestamp('2000-01-01 13:00:00');
+insert into t2 values (5);
+unlock tables;
+drop table t1, t2;
+set timestamp= default;
+
+--echo #
+--echo # MDEV-29872 MSAN/Valgrind uninitialised value errors in TABLE::vers_switch_partition
+--echo #
+create table t (a int) with system versioning partition by system_time limit 100 partitions 3;
+let $emb= `select if(version() like '%embedded%', 1, 0)`;
+if (!$emb)
+{
+ --disable_result_log
+ --disable_query_log
+ --error ER_DELAYED_NOT_SUPPORTED
+ insert delayed into t () values ();
+ --enable_query_log
+ --enable_result_log
+}
+# cleanup
+drop table t;
+
+--echo #
+--echo # End of 10.9 tests
+--echo #
+
set global innodb_stats_persistent= @save_persistent;
--source suite/versioning/common_finish.inc