1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
--source include/have_falcon.inc
--source include/have_binlog_format_row.inc
--source include/master-slave.inc
--echo **** On Master ****
--disable_warnings
DROP DATABASE IF EXISTS tpcb;
--enable_warnings
CREATE DATABASE tpcb;
USE tpcb;
SET BINLOG_FORMAT = 'ROW';
CREATE TABLE account (
id int,
bid int,
balance decimal(10,2),
filler blob,
PRIMARY KEY(id)
) ENGINE=Falcon;
SHOW CREATE TABLE account;
INSERT INTO account VALUES (1, 2, 1.2, "FRESH ACCOUNT");
INSERT INTO account VALUES (2, 5, 1.2, "FRESH ACCOUNT");
INSERT INTO account VALUES (3, 2, 1.2, "FRESH ACCOUNT");
INSERT INTO account VALUES (4, 2, 1.2, "FRESH ACCOUNT");
SELECT * FROM account;
--echo **** On Slave ****
sync_slave_with_master;
USE tpcb;
SELECT * FROM account;
--echo **** On Master ****
connection master;
UPDATE account SET balance = 3.5 WHERE id = 3;
UPDATE account SET filler = 'Updated' WHERE id = 2;
UPDATE account SET balance = 9.2, bid = 21,
filler = 'Updated' WHERE id = 4;
SELECT * FROM account;
--echo **** On Slave ****
sync_slave_with_master;
SELECT * FROM account;
--echo **** On Master ****
connection master;
DROP DATABASE tpcb;
--echo **** On Slave ****
sync_slave_with_master;
|