Debian Codegraph @

mysql-test/suite/federated/federated_transactions.test

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