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

« back to all changes in this revision

Viewing changes to mysql-test/extra/rpl_tests/rpl_stm_EE_err2.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
# Author: JBM
 
3
# Date: 2006-01-11
 
4
# Purpose: Second test case from
 
5
#          rpl_EE_err.test split out
 
6
#          from orginal to make the
 
7
#          first work with both RBR and SBR
 
8
###################################
 
9
#REQUIREMENT: An INSERT with a faked duplicate entry error on
 
10
#master should be replicated to slave and force the slave to stop
 
11
#(since the slave can't cause a faked error to re-occur).
 
12
###################################
 
13
 
 
14
-- source include/master-slave.inc
 
15
 
 
16
connection master;
 
17
eval create table t1 (a int, unique(a)) engine=$engine_type;
 
18
set sql_log_bin=0;
 
19
insert into t1 values(2);
 
20
set sql_log_bin=1;
 
21
 
 
22
--error ER_DUP_ENTRY
 
23
insert into t1 values(1),(2);
 
24
drop table t1;
 
25
 
 
26
connection slave;
 
27
--source include/wait_for_slave_sql_to_stop.inc
 
28
let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
 
29
let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
 
30
--echo Error: "$error" (expected different error codes on master and slave)
 
31
--echo Errno: "$errno" (expected 0)
 
32
drop table t1;
 
33
 
 
34
# End of 4.1 tests
 
35