summaryrefslogtreecommitdiff
path: root/mysql-test/suite/parts
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-07-01 17:53:06 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-07-01 17:53:06 +0300
commit3c2a5ad3e80edc5b3ffffd033732556a8bef13a4 (patch)
tree83793ba771411c9c1c2582d2c73c9b722e7753c5 /mysql-test/suite/parts
parentba5b2e7b291a9b4bfb97dcdf3c53ca49fc91a4e7 (diff)
parent3dff84cd158ed09e9c5b1a390af7571fd671f012 (diff)
downloadmariadb-git-3c2a5ad3e80edc5b3ffffd033732556a8bef13a4.tar.gz
Merge 10.7 into 10.8
Diffstat (limited to 'mysql-test/suite/parts')
-rw-r--r--mysql-test/suite/parts/inc/partition_auto_increment.inc17
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_blackhole.result23
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_innodb.result12
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_maria.result12
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_memory.result12
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_myisam.result12
6 files changed, 77 insertions, 11 deletions
diff --git a/mysql-test/suite/parts/inc/partition_auto_increment.inc b/mysql-test/suite/parts/inc/partition_auto_increment.inc
index b9746ec110f..b19a8cd7749 100644
--- a/mysql-test/suite/parts/inc/partition_auto_increment.inc
+++ b/mysql-test/suite/parts/inc/partition_auto_increment.inc
@@ -873,6 +873,8 @@ SELECT LAST_INSERT_ID();
SELECT * FROM t1;
DROP TABLE t1;
}
+--echo ##############################################################################
+}
if (!$skip_update)
{
@@ -880,13 +882,13 @@ if (!$skip_update)
--echo # MDEV-19622 Assertion failures in
--echo # ha_partition::set_auto_increment_if_higher upon UPDATE on Aria table
--echo #
-CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE=myisam PARTITION BY HASH(a);
+eval CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE=$engine PARTITION BY HASH(a);
INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
}
-if (!$skip_update)
+if (!$skip_delete)
{
--echo #
--echo # MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()'
@@ -897,5 +899,14 @@ REPLACE INTO t1 PARTITION (p0) VALUES (3);
DROP TABLE t1;
}
---echo ##############################################################################
+if (!$skip_truncate)
+{
+--echo #
+--echo # MDEV-21310 AUTO_INCREMENT column throws range error on INSERT in partitioned table |
+--echo # Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' failed.
+--echo #
+eval CREATE TABLE t1 (c INT AUTO_INCREMENT KEY) ENGINE=$engine PARTITION BY LIST (c) (PARTITION p1 VALUES IN (1), PARTITION p2 VALUES IN (2));
+ALTER TABLE t1 TRUNCATE PARTITION p1;
+INSERT INTO t1 PARTITION (p1) (c) SELECT 1;
+DROP TABLE t1;
}
diff --git a/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result b/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result
index 0276385dc29..c017aadcbab 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result
@@ -695,3 +695,26 @@ PARTITIONS 2
SELECT * FROM t1 ORDER BY c1;
c1
DROP TABLE t1;
+#
+# MDEV-19622 Assertion failures in
+# ha_partition::set_auto_increment_if_higher upon UPDATE on Aria table
+#
+CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE='Blackhole' PARTITION BY HASH(a);
+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='Blackhole' PARTITION BY HASH (a) PARTITIONS 3;
+REPLACE INTO t1 PARTITION (p0) VALUES (3);
+DROP TABLE t1;
+#
+# MDEV-21310 AUTO_INCREMENT column throws range error on INSERT in partitioned table |
+# Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' failed.
+#
+CREATE TABLE t1 (c INT AUTO_INCREMENT KEY) ENGINE='Blackhole' PARTITION BY LIST (c) (PARTITION p1 VALUES IN (1), PARTITION p2 VALUES IN (2));
+ALTER TABLE t1 TRUNCATE PARTITION p1;
+INSERT INTO t1 PARTITION (p1) (c) SELECT 1;
+DROP TABLE t1;
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 ce1e3562d4c..f0f0ff21824 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result
@@ -1116,11 +1116,12 @@ SELECT * FROM t1;
a
0
DROP TABLE t1;
+##############################################################################
#
# MDEV-19622 Assertion failures in
# ha_partition::set_auto_increment_if_higher upon UPDATE on Aria table
#
-CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE=myisam PARTITION BY HASH(a);
+CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE='InnoDB' PARTITION BY HASH(a);
INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
@@ -1131,4 +1132,11 @@ DROP TABLE t1;
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;
-##############################################################################
+#
+# MDEV-21310 AUTO_INCREMENT column throws range error on INSERT in partitioned table |
+# Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' failed.
+#
+CREATE TABLE t1 (c INT AUTO_INCREMENT KEY) ENGINE='InnoDB' PARTITION BY LIST (c) (PARTITION p1 VALUES IN (1), PARTITION p2 VALUES IN (2));
+ALTER TABLE t1 TRUNCATE PARTITION p1;
+INSERT INTO t1 PARTITION (p1) (c) SELECT 1;
+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 ad041735ebb..8c063958b27 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_maria.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_maria.result
@@ -1148,11 +1148,12 @@ SELECT * FROM t1;
a
0
DROP TABLE t1;
+##############################################################################
#
# MDEV-19622 Assertion failures in
# ha_partition::set_auto_increment_if_higher upon UPDATE on Aria table
#
-CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE=myisam PARTITION BY HASH(a);
+CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE='Aria' PARTITION BY HASH(a);
INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
@@ -1163,4 +1164,11 @@ DROP TABLE t1;
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;
-##############################################################################
+#
+# MDEV-21310 AUTO_INCREMENT column throws range error on INSERT in partitioned table |
+# Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' failed.
+#
+CREATE TABLE t1 (c INT AUTO_INCREMENT KEY) ENGINE='Aria' PARTITION BY LIST (c) (PARTITION p1 VALUES IN (1), PARTITION p2 VALUES IN (2));
+ALTER TABLE t1 TRUNCATE PARTITION p1;
+INSERT INTO t1 PARTITION (p1) (c) SELECT 1;
+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 d2d1fb6831c..3461f8b13c5 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_memory.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_memory.result
@@ -1129,11 +1129,12 @@ SELECT * FROM t1;
a
0
DROP TABLE t1;
+##############################################################################
#
# MDEV-19622 Assertion failures in
# ha_partition::set_auto_increment_if_higher upon UPDATE on Aria table
#
-CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE=myisam PARTITION BY HASH(a);
+CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE='Memory' PARTITION BY HASH(a);
INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
@@ -1144,4 +1145,11 @@ DROP TABLE t1;
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;
-##############################################################################
+#
+# MDEV-21310 AUTO_INCREMENT column throws range error on INSERT in partitioned table |
+# Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' failed.
+#
+CREATE TABLE t1 (c INT AUTO_INCREMENT KEY) ENGINE='Memory' PARTITION BY LIST (c) (PARTITION p1 VALUES IN (1), PARTITION p2 VALUES IN (2));
+ALTER TABLE t1 TRUNCATE PARTITION p1;
+INSERT INTO t1 PARTITION (p1) (c) SELECT 1;
+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 f92a6ed18c6..525f47bdbd7 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result
@@ -1148,11 +1148,12 @@ SELECT * FROM t1;
a
0
DROP TABLE t1;
+##############################################################################
#
# MDEV-19622 Assertion failures in
# ha_partition::set_auto_increment_if_higher upon UPDATE on Aria table
#
-CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE=myisam PARTITION BY HASH(a);
+CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE='MyISAM' PARTITION BY HASH(a);
INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
@@ -1163,4 +1164,11 @@ DROP TABLE t1;
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;
-##############################################################################
+#
+# MDEV-21310 AUTO_INCREMENT column throws range error on INSERT in partitioned table |
+# Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' failed.
+#
+CREATE TABLE t1 (c INT AUTO_INCREMENT KEY) ENGINE='MyISAM' PARTITION BY LIST (c) (PARTITION p1 VALUES IN (1), PARTITION p2 VALUES IN (2));
+ALTER TABLE t1 TRUNCATE PARTITION p1;
+INSERT INTO t1 PARTITION (p1) (c) SELECT 1;
+DROP TABLE t1;