1 #############################################################
4 # Purpose: To reuse through out test and make maint easier
5 #############################################################
7 --echo "--- Insert into t1 --" as "";
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");
27 --echo --- Select from t1 on master ---
28 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
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;
36 --echo --- Update t1 on master --
37 UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
39 --echo --- Check the update on master ---
40 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
42 # Must give injector thread a little time to get update
43 # into the binlog other wise we will miss the update.
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;
50 --echo --- Remove a record from t1 on master ---
51 DELETE FROM t1 WHERE id = 42;
53 --echo --- Show current count on master for t1 ---
54 SELECT COUNT(*) FROM t1;
56 sync_slave_with_master;
57 --echo --- Show current count on slave for t1 ---
58 SELECT COUNT(*) FROM t1;