summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@oracle.com>2011-08-23 15:13:17 +0200
committerMattias Jonsson <mattias.jonsson@oracle.com>2011-08-23 15:13:17 +0200
commit0fca2269425df6a1e2224bb3185a76d3a2608fbf (patch)
tree6daacdb9bfada33232e37ad4631034daad35fc5d /mysql-test/t
parent58cf757f0b28108884fd0c9f641ba31296dc6c45 (diff)
downloadmariadb-git-0fca2269425df6a1e2224bb3185a76d3a2608fbf.tar.gz
Bug#11766879/Bug#60106: DIFF BETWEEN # OF INDEXES IN MYSQL VS INNODB,
PARTITONING, ON INDEX CREATE If the first partition succeeded in adding a index, but a successive partition failed, then the first partition had still the new index. The fix reverts the added indexes from previous partitions on failure.
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/partition_innodb_plugin.test27
1 files changed, 25 insertions, 2 deletions
diff --git a/mysql-test/t/partition_innodb_plugin.test b/mysql-test/t/partition_innodb_plugin.test
index 626e5d19b99..efcf5c282a7 100644
--- a/mysql-test/t/partition_innodb_plugin.test
+++ b/mysql-test/t/partition_innodb_plugin.test
@@ -1,10 +1,33 @@
--source include/have_partition.inc
--source include/have_innodb_plugin.inc
-# Remove the line below when bug#53307 is solved.
---source include/not_valgrind.inc
let $MYSQLD_DATADIR= `SELECT @@datadir`;
+--echo #
+--echo # Bug#11766879/Bug#60106: DIFF BETWEEN # OF INDEXES IN MYSQL VS INNODB,
+--echo # PARTITONING, ON INDEX CREATE
+--echo #
+CREATE TABLE t1 (
+ id bigint NOT NULL AUTO_INCREMENT,
+ time date,
+ id2 bigint not null,
+ PRIMARY KEY (id,time)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8
+/*!50100 PARTITION BY RANGE(TO_DAYS(time))
+(PARTITION p10 VALUES LESS THAN (734708) ENGINE = InnoDB,
+ PARTITION p20 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;
+
+INSERT INTO t1 (time,id2) VALUES ('2011-07-24',1);
+INSERT INTO t1 (time,id2) VALUES ('2011-07-25',1);
+INSERT INTO t1 (time,id2) VALUES ('2011-07-25',1);
+
+--error ER_DUP_ENTRY
+CREATE UNIQUE INDEX uk_time_id2 on t1(time,id2);
+
+SELECT COUNT(*) FROM t1;
+
+DROP TABLE t1;
+
call mtr.add_suppression("nnoDB: Error: table `test`.`t1` .* Partition.* InnoDB internal");
--echo #
--echo # Bug#55091: Server crashes on ADD PARTITION after a failed attempt