~ubuntu-branches/ubuntu/lucid/mysql-dfsg-5.1/lucid-security

« back to all changes in this revision

Viewing changes to mysql-test/r/partition_innodb_plugin.result

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 22:33:55 UTC
  • mto: (1.2.1) (37.1.1 lucid-security)
  • mto: This revision was merged to the branch mainline in revision 36.
  • Revision ID: package-import@ubuntu.com-20120222223355-ku1tb4r70osci6v2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Bug#11766879/Bug#60106: DIFF BETWEEN # OF INDEXES IN MYSQL VS INNODB,
 
3
#                         PARTITONING, ON INDEX CREATE
 
4
#
 
5
call mtr.add_suppression("contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MySQL");
 
6
CREATE TABLE t1 (
 
7
id bigint NOT NULL AUTO_INCREMENT,
 
8
time date,
 
9
id2 bigint not null,
 
10
PRIMARY KEY (id,time)
 
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;
 
21
COUNT(*)
 
22
3
 
23
DROP TABLE t1;
 
24
call mtr.add_suppression("nnoDB: Error: table `test`.`t1` .* Partition.* InnoDB internal");
 
25
#
 
26
# Bug#55091: Server crashes on ADD PARTITION after a failed attempt
 
27
#
 
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;
 
34
# Connection con1
 
35
CREATE TABLE t1 (id INT NOT NULL
 
36
PRIMARY KEY,
 
37
user_num CHAR(10)
 
38
) ENGINE = InnoDB
 
39
KEY_BLOCK_SIZE=4
 
40
PARTITION BY HASH(id) PARTITIONS 1;
 
41
t1#P#p0.ibd
 
42
t1.frm
 
43
t1.par
 
44
SHOW CREATE TABLE t1;
 
45
Table   Create Table
 
46
t1      CREATE TABLE `t1` (
 
47
  `id` int(11) NOT NULL,
 
48
  `user_num` char(10) DEFAULT NULL,
 
49
  PRIMARY KEY (`id`)
 
50
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4
 
51
/*!50100 PARTITION BY HASH (id)
 
52
PARTITIONS 1 */
 
53
SET GLOBAL innodb_file_per_table = OFF;
 
54
# Connection con2
 
55
LOCK TABLE t1 WRITE;
 
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
 
60
t1#P#p0.ibd
 
61
t1.frm
 
62
t1.par
 
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;
 
67
Warnings:
 
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.
 
74
t1.frm
 
75
t1.par
 
76
ALTER TABLE t1 REBUILD PARTITION p0;
 
77
Warnings:
 
78
Warning 1478    InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
 
79
Warning 1478    InnoDB: ignoring KEY_BLOCK_SIZE=4.
 
80
UNLOCK TABLES;
 
81
SHOW CREATE TABLE t1;
 
82
Table   Create Table
 
83
t1      CREATE TABLE `t1` (
 
84
  `id` int(11) NOT NULL,
 
85
  `user_num` char(10) DEFAULT NULL,
 
86
  PRIMARY KEY (`id`)
 
87
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4
 
88
/*!50100 PARTITION BY HASH (id)
 
89
PARTITIONS 3 */
 
90
DROP TABLE t1;
 
91
# Connection default
 
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;
1
95
SET NAMES utf8;
2
96
CREATE TABLE `t``\""e` (a INT, PRIMARY KEY (a))
3
97
ENGINE=InnoDB