~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/suite/federated/federated_bug_25714.test

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 # Check that path to the specific test program has been setup
 
2
if (`select LENGTH("$MYSQL_BUG25714") = 0`)
 
3
{
 
4
  skip Need bug25714 test program;
 
5
}
 
6
 
 
7
source 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
connection slave;
 
17
SET @OLD_SLAVE_CONCURRENT_INSERT= @@GLOBAL.CONCURRENT_INSERT;
 
18
SET @@GLOBAL.CONCURRENT_INSERT= 0;
 
19
--disable_warnings
 
20
DROP TABLE IF EXISTS federated.bug_13118_table;
 
21
--enable_warnings
 
22
 
 
23
CREATE TABLE federated.t1 (
 
24
    `id` int auto_increment primary key, 
 
25
        `value` int
 
26
    ) ENGINE=MyISAM;
 
27
INSERT INTO federated.t1 SET value=1;
 
28
INSERT INTO federated.t1 SET value=2;
 
29
INSERT INTO federated.t1 SET value=2;
 
30
 
 
31
connection master;
 
32
--disable_warnings
 
33
DROP TABLE IF EXISTS federated.t1;
 
34
--enable_warnings
 
35
 
 
36
--replace_result $SLAVE_MYPORT SLAVE_PORT
 
37
eval CREATE TABLE federated.t1 (
 
38
    `id` int auto_increment primary key, 
 
39
        `value` int
 
40
    ) ENGINE=FEDERATED
 
41
    CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
 
42
 
 
43
SELECT * from federated.t1;
 
44
 
 
45
INSERT INTO federated.t1 SET value=4;
 
46
 
 
47
SELECT LAST_INSERT_ID();
 
48
 
 
49
--exec $MYSQL_BUG25714 $SLAVE_MYPORT
 
50
--exec $MYSQL_BUG25714 $MASTER_MYPORT
 
51
 
 
52
SELECT * from federated.t1;
 
53
 
 
54
DROP TABLE federated.t1;
 
55
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_MASTER_CONCURRENT_INSERT;
 
56
connection slave;
 
57
DROP TABLE federated.t1;
 
58
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_SLAVE_CONCURRENT_INSERT;
 
59
 
 
60
 
 
61
 
 
62
source federated_cleanup.inc;