summaryrefslogtreecommitdiff
path: root/mysql-test/suite/parts
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-06-27 10:14:37 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-06-27 10:14:37 +0300
commit01d757036f5753fbbb54c6fef4bd7b312981ed88 (patch)
tree046889d0bec8d3202b7553584c7e9b5583c9e6b0 /mysql-test/suite/parts
parentaf929146ed5d10f7cafe1091346e50a873eed3f1 (diff)
parentc86b1389de5fe44fbd659bb50d95017bc19324a5 (diff)
downloadmariadb-git-01d757036f5753fbbb54c6fef4bd7b312981ed88.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/suite/parts')
-rw-r--r--mysql-test/suite/parts/inc/part_alter_values.inc8
-rw-r--r--mysql-test/suite/parts/inc/partition_auto_increment.inc11
-rw-r--r--mysql-test/suite/parts/r/partition_alter_innodb.result7
-rw-r--r--mysql-test/suite/parts/r/partition_alter_maria.result7
-rw-r--r--mysql-test/suite/parts/r/partition_alter_myisam.result7
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_innodb.result7
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_maria.result7
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_memory.result7
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_myisam.result7
9 files changed, 68 insertions, 0 deletions
diff --git a/mysql-test/suite/parts/inc/part_alter_values.inc b/mysql-test/suite/parts/inc/part_alter_values.inc
index ca18faa5758..d3b63a4610f 100644
--- a/mysql-test/suite/parts/inc/part_alter_values.inc
+++ b/mysql-test/suite/parts/inc/part_alter_values.inc
@@ -78,3 +78,11 @@ if (`SELECT IF('$engine' != 'InnoDB', 1, 0)`)
--remove_files_wildcard $MYSQLTEST_VARDIR/tmp/mdev_27065 *
--rmdir $MYSQLTEST_VARDIR/tmp/mdev_27065
+
+--echo #
+--echo # MDEV-26127 Assertion `err != DB_DUPLICATE_KEY' failed or InnoDB: Failing assertion: id != 0 on ALTER ... REBUILD PARTITION
+--echo #
+--eval CREATE TABLE t1 (c INT) ENGINE=$engine PARTITION BY KEY(c) PARTITIONS 4;
+LOCK TABLES t1 WRITE, t1 AS a READ;
+ALTER TABLE t1 REBUILD PARTITION p0;
+DROP TABLE t1;
diff --git a/mysql-test/suite/parts/inc/partition_auto_increment.inc b/mysql-test/suite/parts/inc/partition_auto_increment.inc
index 4392d04db8a..2997dd9de4f 100644
--- a/mysql-test/suite/parts/inc/partition_auto_increment.inc
+++ b/mysql-test/suite/parts/inc/partition_auto_increment.inc
@@ -873,5 +873,16 @@ UPDATE t1 SET pk = 0;
DROP TABLE t1;
}
+if (!$skip_update)
+{
+--echo #
+--echo # MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()'
+--echo # ha_partition::set_auto_increment_if_higher
+--echo #
+eval CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE=$engine PARTITION BY HASH (a) PARTITIONS 3;
+REPLACE INTO t1 PARTITION (p0) VALUES (3);
+DROP TABLE t1;
+}
+
--echo ##############################################################################
}
diff --git a/mysql-test/suite/parts/r/partition_alter_innodb.result b/mysql-test/suite/parts/r/partition_alter_innodb.result
index ae3caaa4981..6afa133f989 100644
--- a/mysql-test/suite/parts/r/partition_alter_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter_innodb.result
@@ -61,3 +61,10 @@ PARTITION p1 VALUES LESS THAN MAXVALUE
Warnings:
Warning 1618 <DATA DIRECTORY> table option of old schema is ignored
DROP TABLE t1;
+#
+# MDEV-26127 Assertion `err != DB_DUPLICATE_KEY' failed or InnoDB: Failing assertion: id != 0 on ALTER ... REBUILD PARTITION
+#
+CREATE TABLE t1 (c INT) ENGINE=InnoDB PARTITION BY KEY(c) PARTITIONS 4;;
+LOCK TABLES t1 WRITE, t1 AS a READ;
+ALTER TABLE t1 REBUILD PARTITION p0;
+DROP TABLE t1;
diff --git a/mysql-test/suite/parts/r/partition_alter_maria.result b/mysql-test/suite/parts/r/partition_alter_maria.result
index 358ffbdfbe7..eca8378430f 100644
--- a/mysql-test/suite/parts/r/partition_alter_maria.result
+++ b/mysql-test/suite/parts/r/partition_alter_maria.result
@@ -95,3 +95,10 @@ PARTITION p1 VALUES LESS THAN MAXVALUE
Warnings:
Warning 1618 <INDEX DIRECTORY> table option of old schema is ignored
DROP TABLE t2;
+#
+# MDEV-26127 Assertion `err != DB_DUPLICATE_KEY' failed or InnoDB: Failing assertion: id != 0 on ALTER ... REBUILD PARTITION
+#
+CREATE TABLE t1 (c INT) ENGINE=Aria PARTITION BY KEY(c) PARTITIONS 4;;
+LOCK TABLES t1 WRITE, t1 AS a READ;
+ALTER TABLE t1 REBUILD PARTITION p0;
+DROP TABLE t1;
diff --git a/mysql-test/suite/parts/r/partition_alter_myisam.result b/mysql-test/suite/parts/r/partition_alter_myisam.result
index 9d76881fdfa..ba1a0fe05c4 100644
--- a/mysql-test/suite/parts/r/partition_alter_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter_myisam.result
@@ -68,6 +68,13 @@ PARTITION p1 VALUES LESS THAN MAXVALUE
Warnings:
Warning 1618 <INDEX DIRECTORY> table option of old schema is ignored
DROP TABLE t2;
+#
+# MDEV-26127 Assertion `err != DB_DUPLICATE_KEY' failed or InnoDB: Failing assertion: id != 0 on ALTER ... REBUILD PARTITION
+#
+CREATE TABLE t1 (c INT) ENGINE=MyISAM PARTITION BY KEY(c) PARTITIONS 4;;
+LOCK TABLES t1 WRITE, t1 AS a READ;
+ALTER TABLE t1 REBUILD PARTITION p0;
+DROP TABLE t1;
create table t1 ( c1 int, c2 int, c3 varchar(100)) delay_key_write=1
partition by key(c1) (
partition p01 data directory = 'MYSQL_TMP_DIR'
diff --git a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result
index 76f1ddfceae..e5414c81616 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result
@@ -1109,4 +1109,11 @@ CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE=myisam
INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
+#
+# MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()'
+# ha_partition::set_auto_increment_if_higher
+#
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE='InnoDB' PARTITION BY HASH (a) PARTITIONS 3;
+REPLACE INTO t1 PARTITION (p0) VALUES (3);
+DROP TABLE t1;
##############################################################################
diff --git a/mysql-test/suite/parts/r/partition_auto_increment_maria.result b/mysql-test/suite/parts/r/partition_auto_increment_maria.result
index 5a3902475a9..ad041735ebb 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_maria.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_maria.result
@@ -1156,4 +1156,11 @@ CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE=myisam
INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
+#
+# MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()'
+# ha_partition::set_auto_increment_if_higher
+#
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE='Aria' PARTITION BY HASH (a) PARTITIONS 3;
+REPLACE INTO t1 PARTITION (p0) VALUES (3);
+DROP TABLE t1;
##############################################################################
diff --git a/mysql-test/suite/parts/r/partition_auto_increment_memory.result b/mysql-test/suite/parts/r/partition_auto_increment_memory.result
index c395f8ed0c9..d2d1fb6831c 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_memory.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_memory.result
@@ -1137,4 +1137,11 @@ CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE=myisam
INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
+#
+# MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()'
+# ha_partition::set_auto_increment_if_higher
+#
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE='Memory' PARTITION BY HASH (a) PARTITIONS 3;
+REPLACE INTO t1 PARTITION (p0) VALUES (3);
+DROP TABLE t1;
##############################################################################
diff --git a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result
index 792423096b5..f92a6ed18c6 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result
@@ -1156,4 +1156,11 @@ CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE=myisam
INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
+#
+# MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()'
+# ha_partition::set_auto_increment_if_higher
+#
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE='MyISAM' PARTITION BY HASH (a) PARTITIONS 3;
+REPLACE INTO t1 PARTITION (p0) VALUES (3);
+DROP TABLE t1;
##############################################################################