mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / suite / federated / federated_transactions.test
blob3cf41a849d6abf564b6179446de300d85e0fd97b
1 source include/have_innodb.inc;
2 source suite/federated/include/federated.inc;
4 connection slave;
5 DROP TABLE IF EXISTS federated.t1;
6 #SHOW ENGINES;
7 CREATE TABLE federated.t1 (
8     `id` int(20) NOT NULL,
9     `name` varchar(32) NOT NULL default ''
10     )
11   DEFAULT CHARSET=latin1 ENGINE=innodb;
13 connection master;
14 DROP TABLE IF EXISTS federated.t1;
15 # # correct connection, same named tables
16 --replace_result $SLAVE_MYPORT SLAVE_PORT
17 eval CREATE TABLE federated.t1 (
18     `id` int(20) NOT NULL,
19     `name` varchar(32) NOT NULL default ''
20     )
21   ENGINE="FEDERATED" DEFAULT CHARSET=latin1
22   CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
24 set autocommit=0;
25 INSERT INTO federated.t1 (id, name) VALUES (1, 'foo');
26 INSERT INTO federated.t1 (id, name) VALUES (2, 'fee');
27 COMMIT;
28 INSERT INTO federated.t1 (id, name) VALUES (3, 'fie');
29 INSERT INTO federated.t1 (id, name) VALUES (4, 'fum');
30 ROLLBACK;
31 set autocommit=1;
32 INSERT INTO federated.t1 (id, name) VALUES (5, 'foe');
33 INSERT INTO federated.t1 (id, name) VALUES (6, 'fig');
35 SELECT * FROM federated.t1;
36 DELETE FROM federated.t1;
38 source suite/federated/include/federated_cleanup.inc;