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

« back to all changes in this revision

Viewing changes to mysql-test/suite/binlog/r/binlog_innodb_row.result

  • 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
CREATE TABLE t1 (i int unique) ENGINE=innodb;
 
2
reset master;
 
3
begin;
 
4
insert into t1 values (1),(2);
 
5
*** the following UPDATE query wont generate any updates for the binlog ***
 
6
update t1 set i = 3 where i < 3;
 
7
ERROR 23000: Duplicate entry '3' for key 'i'
 
8
commit;
 
9
*** Results of the test: the binlog must have only Write_rows events not any Update_rows ***
 
10
show binlog events from <binlog_start>;
 
11
Log_name        Pos     Event_type      Server_id       End_log_pos     Info
 
12
master-bin.000001       #       Query   #       #       BEGIN
 
13
master-bin.000001       #       Table_map       #       #       table_id: # (test.t1)
 
14
master-bin.000001       #       Write_rows      #       #       table_id: # flags: STMT_END_F
 
15
master-bin.000001       #       Xid     #       #       COMMIT /* XID */
 
16
delete from t1;
 
17
reset master;
 
18
begin;
 
19
insert into t1 values (1),(2);
 
20
*** the following UPDATE query wont generate any updates for the binlog ***
 
21
insert into t1 values (3),(4),(1),(2);
 
22
ERROR 23000: Duplicate entry '1' for key 'i'
 
23
commit;
 
24
*** Results of the test: the binlog must have only one Write_rows event not two ***
 
25
show binlog events from <binlog_start>;
 
26
Log_name        Pos     Event_type      Server_id       End_log_pos     Info
 
27
master-bin.000001       #       Query   #       #       BEGIN
 
28
master-bin.000001       #       Table_map       #       #       table_id: # (test.t1)
 
29
master-bin.000001       #       Write_rows      #       #       table_id: # flags: STMT_END_F
 
30
master-bin.000001       #       Xid     #       #       COMMIT /* XID */
 
31
drop table t1;