summaryrefslogtreecommitdiff
path: root/mysql-test/suite/federated/federated_partition.result
blob: 26a6443ffad0c09a2cbaa16c681771a068714207 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
CREATE DATABASE federated;
CREATE DATABASE federated;
drop table if exists t1;
create table federated.t1_1 (s1 int primary key) engine=myisam;
create table federated.t1_2 (s1 int primary key) engine=innodb;
create table t1 (s1 int primary key) engine=federated
partition by list (s1)
(partition p1 values in (1,3)
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_1',
partition p2 values in (2,4)
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_2');
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `s1` int(11) NOT NULL,
  PRIMARY KEY (`s1`)
) ENGINE=FEDERATED DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (s1)
(PARTITION p1 VALUES IN (1,3) CONNECTION = 'mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_1' ENGINE = FEDERATED,
 PARTITION p2 VALUES IN (2,4) CONNECTION = 'mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_2' ENGINE = FEDERATED) */
insert into t1 values (1), (2), (3), (4);
select * from t1;
s1
1
3
2
4
select * from federated.t1_1;
s1
1
3
select * from federated.t1_2;
s1
2
4
drop table t1;
drop table federated.t1_1;
drop table federated.t1_2;
End of 5.1 tests
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;