1# Embedded server doesn't support binlog
2-- source include/not_embedded.inc
3-- source include/have_log_bin.inc
4
5--disable_warnings
6drop table if exists t1,t2;
7--enable_warnings
8
9# Check if a partly-completed INSERT SELECT in a MyISAM table goes into the
10# binlog
11
12create table t1(a int, unique(a));
13insert into t1 values(2);
14create table t2(a int);
15insert into t2 values(1),(2);
16reset master;
17--error ER_DUP_ENTRY
18insert into t1 select * from t2;
19# The above should produce an error, but still be in the binlog;
20# verify the binlog :
21let $VERSION=`select version()`;
22source include/show_binlog_events.inc;
23select * from t1;
24drop table t1, t2;
25
26# Verify that a partly-completed CREATE TABLE .. SELECT does not
27# get into the binlog (Bug #6682)
28create table t1(a int);
29insert into t1 values(1),(1);
30reset master;
31--error ER_DUP_ENTRY
32create table t2(unique(a)) select a from t1;
33# The above should produce an error, *and* not appear in the binlog
34let $VERSION=`select version()`;
35source include/show_binlog_events.inc;
36drop table t1;
37
38# End of 4.1 tests
39