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