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

« back to all changes in this revision

Viewing changes to mysql-test/suite/ndb/t/ndb_binlog_format.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
#
 
2
# test different behavior of ndb using different binlog formats
 
3
#
 
4
 
 
5
-- source include/have_blackhole.inc
 
6
-- source include/have_ndb.inc
 
7
-- source include/have_log_bin.inc
 
8
 
 
9
--disable_warnings
 
10
drop table if exists t1, t2, t3;
 
11
--enable_warnings
 
12
 
 
13
#
 
14
# Bug #29222 Statement mode replicates both statement and
 
15
# rows when writing to an NDB table
 
16
#
 
17
CREATE TABLE t1 (m INT, n INT) ENGINE=MYISAM;
 
18
CREATE TABLE t2 (b INT, c INT) ENGINE=BLACKHOLE;
 
19
CREATE TABLE t3 (e INT, f INT) ENGINE=NDB;
 
20
RESET MASTER;
 
21
SET SESSION BINLOG_FORMAT=STATEMENT;
 
22
INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2);
 
23
INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2);
 
24
UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c;
 
25
# A transaction here is not necessary, but I wanted to group the bad statements
 
26
START TRANSACTION;
 
27
INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2);
 
28
UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f;
 
29
UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c;
 
30
COMMIT;
 
31
--source include/show_binlog_events.inc
 
32
DROP TABLE t1, t2, t3;
 
33