1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
Mattias Jonsson
2011-08-23 15:13:17 +02:00
parent 58cf757f0b
commit 0fca226942
3 changed files with 66 additions and 3 deletions

View File

@ -1,3 +1,25 @@
#
# Bug#11766879/Bug#60106: DIFF BETWEEN # OF INDEXES IN MYSQL VS INNODB,
# PARTITONING, ON INDEX CREATE
#
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);
CREATE UNIQUE INDEX uk_time_id2 on t1(time,id2);
ERROR 23000: Duplicate entry '2011-07-25-1' for key 'uk_time_id2'
SELECT COUNT(*) FROM t1;
COUNT(*)
3
DROP TABLE t1;
call mtr.add_suppression("nnoDB: Error: table `test`.`t1` .* Partition.* InnoDB internal");
#
# Bug#55091: Server crashes on ADD PARTITION after a failed attempt