2
# Bug#11766879/Bug#60106: DIFF BETWEEN # OF INDEXES IN MYSQL VS INNODB,
3
# PARTITONING, ON INDEX CREATE
5
call mtr.add_suppression("contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MySQL");
7
id bigint NOT NULL AUTO_INCREMENT,
11
) ENGINE=InnoDB DEFAULT CHARSET=utf8
12
/*!50100 PARTITION BY RANGE(TO_DAYS(time))
13
(PARTITION p10 VALUES LESS THAN (734708) ENGINE = InnoDB,
14
PARTITION p20 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;
15
INSERT INTO t1 (time,id2) VALUES ('2011-07-24',1);
16
INSERT INTO t1 (time,id2) VALUES ('2011-07-25',1);
17
INSERT INTO t1 (time,id2) VALUES ('2011-07-25',1);
18
CREATE UNIQUE INDEX uk_time_id2 on t1(time,id2);
19
ERROR 23000: Duplicate entry '2011-07-25-1' for key 'uk_time_id2'
20
SELECT COUNT(*) FROM t1;
24
call mtr.add_suppression("nnoDB: Error: table `test`.`t1` .* Partition.* InnoDB internal");
26
# Bug#55091: Server crashes on ADD PARTITION after a failed attempt
28
SET @old_innodb_file_format = @@global.innodb_file_format;
29
SET @old_innodb_file_per_table = @@global.innodb_file_per_table;
30
SET @old_innodb_strict_mode = @@global.innodb_strict_mode;
31
SET @@global.innodb_file_format = Barracuda,
32
@@global.innodb_file_per_table = ON,
33
@@global.innodb_strict_mode = ON;
35
CREATE TABLE t1 (id INT NOT NULL
40
PARTITION BY HASH(id) PARTITIONS 1;
46
t1 CREATE TABLE `t1` (
47
`id` int(11) NOT NULL,
48
`user_num` char(10) DEFAULT NULL,
50
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4
51
/*!50100 PARTITION BY HASH (id)
53
SET GLOBAL innodb_file_per_table = OFF;
56
# ALTER fails because COMPRESSED/KEY_BLOCK_SIZE
57
# are incompatible with innodb_file_per_table = OFF;
58
ALTER TABLE t1 ADD PARTITION PARTITIONS 1;
59
ERROR HY000: Got error 1478 from storage engine
63
# This SET is not needed to reproduce the bug,
64
# it is here just to make the test case more realistic
65
SET innodb_strict_mode = OFF;
66
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
68
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
69
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
70
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
71
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
72
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
73
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
76
ALTER TABLE t1 REBUILD PARTITION p0;
78
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
79
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
83
t1 CREATE TABLE `t1` (
84
`id` int(11) NOT NULL,
85
`user_num` char(10) DEFAULT NULL,
87
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4
88
/*!50100 PARTITION BY HASH (id)
92
SET @@global.innodb_strict_mode = @old_innodb_strict_mode;
93
SET @@global.innodb_file_format = @old_innodb_file_format;
94
SET @@global.innodb_file_per_table = @old_innodb_file_per_table;
2
96
CREATE TABLE `t``\""e` (a INT, PRIMARY KEY (a))