summaryrefslogtreecommitdiff
path: root/mysql-test/suite/parts
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2020-05-13 23:30:34 +0300
committerMonty <monty@mariadb.org>2020-05-13 23:30:34 +0300
commitedbf124515b36dc2a5ba40ca469d0d70507734a3 (patch)
tree582bed45569de64cf79f49af7ebe811a9f263d2f /mysql-test/suite/parts
parent6bc4444d7ca81786de98f27669891692c2d2e21c (diff)
downloadmariadb-git-edbf124515b36dc2a5ba40ca469d0d70507734a3.tar.gz
Ensure that auto_increment fields are marked properly on update
MDEV-19622 Assertion failures in ha_partition::set_auto_increment_if_higher upon UPDATE on Aria table
Diffstat (limited to 'mysql-test/suite/parts')
-rw-r--r--mysql-test/suite/parts/inc/partition_auto_increment.inc11
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_innodb.result8
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_maria.result8
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_memory.result8
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_myisam.result8
5 files changed, 43 insertions, 0 deletions
diff --git a/mysql-test/suite/parts/inc/partition_auto_increment.inc b/mysql-test/suite/parts/inc/partition_auto_increment.inc
index 199c8680864..4392d04db8a 100644
--- a/mysql-test/suite/parts/inc/partition_auto_increment.inc
+++ b/mysql-test/suite/parts/inc/partition_auto_increment.inc
@@ -861,6 +861,17 @@ SELECT * FROM t1;
DROP TABLE t1;
}
+if (!$skip_update)
+{
+--echo #
+--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);
+INSERT INTO t1 VALUES (1,1),(2,2);
+UPDATE t1 SET pk = 0;
+DROP TABLE t1;
+}
--echo ##############################################################################
}
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 6250f28eb00..76f1ddfceae 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result
@@ -1101,4 +1101,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);
+INSERT INTO t1 VALUES (1,1),(2,2);
+UPDATE t1 SET pk = 0;
+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 5acce3e9492..5a3902475a9 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_maria.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_maria.result
@@ -1148,4 +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);
+INSERT INTO t1 VALUES (1,1),(2,2);
+UPDATE t1 SET pk = 0;
+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 e622ddaa259..c395f8ed0c9 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_memory.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_memory.result
@@ -1129,4 +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);
+INSERT INTO t1 VALUES (1,1),(2,2);
+UPDATE t1 SET pk = 0;
+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 4e67094b327..792423096b5 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result
@@ -1148,4 +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);
+INSERT INTO t1 VALUES (1,1),(2,2);
+UPDATE t1 SET pk = 0;
+DROP TABLE t1;
##############################################################################