summaryrefslogtreecommitdiff
path: root/mysql-test/main/partition_innodb.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/partition_innodb.result')
-rw-r--r--mysql-test/main/partition_innodb.result42
1 files changed, 42 insertions, 0 deletions
diff --git a/mysql-test/main/partition_innodb.result b/mysql-test/main/partition_innodb.result
index cdfe619cb29..f3d24347ff9 100644
--- a/mysql-test/main/partition_innodb.result
+++ b/mysql-test/main/partition_innodb.result
@@ -928,6 +928,48 @@ DROP view v;
DROP TABLE t;
set sql_mode= @save_sql_mode;
#
+# Bug#28573894 ALTER PARTITIONED TABLE ADD AUTO_INCREMENT DIFF RESULT
+#
+CREATE TABLE t (a VARCHAR(10) NOT NULL,b INT,PRIMARY KEY (b)) ENGINE=INNODB
+PARTITION BY RANGE (b)
+(PARTITION pa VALUES LESS THAN (2),
+PARTITION pb VALUES LESS THAN (20),
+PARTITION pc VALUES LESS THAN (30),
+PARTITION pd VALUES LESS THAN (40));
+INSERT INTO t
+VALUES('A',0),('B',1),('C',2),('D',3),('E',4),('F',5),('G',25),('H',35);
+CREATE TABLE t_copy LIKE t;
+INSERT INTO t_copy SELECT * FROM t;
+ALTER TABLE t ADD COLUMN r INT UNSIGNED NOT NULL AUTO_INCREMENT,
+ADD UNIQUE KEY (r,b);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t_copy ADD COLUMN r INT UNSIGNED NOT NULL AUTO_INCREMENT,
+ADD UNIQUE KEY (r,b), ALGORITHM=COPY;
+affected rows: 8
+info: Records: 8 Duplicates: 0 Warnings: 0
+SELECT * FROM t;
+a b r
+A 0 1
+B 1 2
+C 2 3
+D 3 4
+E 4 5
+F 5 6
+G 25 7
+H 35 8
+SELECT * FROM t_copy;
+a b r
+A 0 1
+B 1 2
+C 2 3
+D 3 4
+E 4 5
+F 5 6
+G 25 7
+H 35 8
+DROP TABLE t,t_copy;
+#
# Bug#26390658 RENAMING A PARTITIONED TABLE DOES NOT UPDATE
# MYSQL.INNODB_TABLE_STATS
#