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

« back to all changes in this revision

Viewing changes to mysql-test/include/rpl_multi_engine3.inc

  • 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
#############################################################
 
2
# Author: JBM
 
3
# Date: 2006-02-23
 
4
# Purpose: To reuse through out test and make maint easier
 
5
#############################################################
 
6
connection master;
 
7
--echo "--- Insert into t1 --" as "";
 
8
 
 
9
--disable_query_log
 
10
INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ',
 
11
                      'Must make it bug free for the customer',
 
12
                       654321.4321,15.21,0,1965,"1905-11-14");
 
13
INSERT INTO t1 VALUES(2,1,'Testing MySQL databases is a cool ',
 
14
                      'Must make it bug free for the customer',
 
15
                       654321.4321,15.21,0,1965,"1965-11-14");
 
16
INSERT INTO t1 VALUES(4,1,'Testing MySQL databases is a cool ',
 
17
                      'Must make it bug free for the customer',
 
18
                       654321.4321,15.21,0,1965,"1985-11-14");
 
19
INSERT INTO t1 VALUES(142,1,'Testing MySQL databases is a cool ',
 
20
                      'Must make it bug free for the customer',
 
21
                       654321.4321,15.21,0,1965,"1995-11-14");
 
22
INSERT INTO t1 VALUES(412,1,'Testing MySQL databases is a cool ',
 
23
                      'Must make it bug free for the customer',
 
24
                       654321.4321,15.21,0,1965,"2005-11-14");
 
25
--enable_query_log
 
26
 
 
27
--echo --- Select from t1 on master --- 
 
28
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
 
29
 
 
30
sync_slave_with_master;
 
31
--echo --- Select from t1 on slave ---
 
32
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
 
33
 
 
34
connection master;
 
35
 
 
36
--echo --- Update t1 on master --
 
37
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
 
38
 
 
39
--echo --- Check the update on master --- 
 
40
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
 
41
 
 
42
# Must give injector thread a little time to get update
 
43
# into the binlog other wise we will miss the update.
 
44
 
 
45
sync_slave_with_master;
 
46
--echo --- Check Update on slave ---
 
47
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
 
48
 
 
49
connection master;
 
50
--echo --- Remove a record from t1 on master ---
 
51
DELETE FROM t1 WHERE id = 42;
 
52
 
 
53
--echo --- Show current count on master for t1 ---
 
54
SELECT COUNT(*) FROM t1;
 
55
 
 
56
sync_slave_with_master;
 
57
--echo --- Show current count on slave for t1 --- 
 
58
SELECT COUNT(*) FROM t1;
 
59
 
 
60
connection master;
 
61
DELETE FROM t1;