Debian Codegraph @

mysql-test/suite/federated/federated_bug_25714.test

raw
1 # Check that path to the specific test program has been setup
2 if (!$MYSQL_BUG25714)
3 {
4 skip Need bug25714 test program;
5 }
6
7 source suite/federated/include/federated.inc;
8
9 connection master;
10 # Disable concurrent inserts to avoid test failures when reading
11 # data from concurrent connections (insert might return before
12 # the data is actually in the table).
13 SET @OLD_MASTER_CONCURRENT_INSERT= @@GLOBAL.CONCURRENT_INSERT;
14 SET @@GLOBAL.CONCURRENT_INSERT= 0;
15
16 #
17 # use a user with the password, so that the test client $MYSQL_BUG25714
18 # would be able to connect when ssl and certificate validation are
19 # enabled by default (MDEV-31857, MDEV-31855)
20 #
21 create user [email protected] identified by 'def';
22 grant all privileges on federated.* to [email protected];
23
24 connection slave;
25 SET @OLD_SLAVE_CONCURRENT_INSERT= @@GLOBAL.CONCURRENT_INSERT;
26 SET @@GLOBAL.CONCURRENT_INSERT= 0;
27
28 create user [email protected] identified by 'def';
29 grant all privileges on federated.* to [email protected];
30
31 CREATE TABLE federated.t1 (
32 `id` int auto_increment primary key,
33 `value` int
34 ) ENGINE=MyISAM;
35 INSERT INTO federated.t1 SET value=1;
36 INSERT INTO federated.t1 SET value=2;
37 INSERT INTO federated.t1 SET value=2;
38
39 connection master;
40
41 --replace_result $SLAVE_MYPORT SLAVE_PORT
42 eval CREATE TABLE federated.t1 (
43 `id` int auto_increment primary key,
44 `value` int
45 ) ENGINE=FEDERATED
46 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
47
48 SELECT * from federated.t1;
49
50 INSERT INTO federated.t1 SET value=4;
51
52 SELECT LAST_INSERT_ID();
53
54 --exec $MYSQL_BUG25714 $SLAVE_MYPORT
55 --exec $MYSQL_BUG25714 $MASTER_MYPORT
56
57 SELECT * from federated.t1;
58
59 DROP TABLE federated.t1;
60 drop user [email protected];
61 SET @@GLOBAL.CONCURRENT_INSERT= @OLD_MASTER_CONCURRENT_INSERT;
62 connection slave;
63 DROP TABLE federated.t1;
64 drop user [email protected];
65 SET @@GLOBAL.CONCURRENT_INSERT= @OLD_SLAVE_CONCURRENT_INSERT;
66
67 source suite/federated/include/federated_cleanup.inc;