1
source include/have_log_bin.inc;
2
source include/not_embedded.inc;
4
# Checking that the drop of a database does not replicate anything in
5
# addition to the drop of the database
8
create database testing_1;
10
create table t1 (a int);
11
create function sf1 (a int) returns int return a+1;
12
create trigger tr1 before insert on t1 for each row insert into t2 values (2*new.a);
13
create procedure sp1 (a int) insert into t1 values(a);
14
drop database testing_1;
15
source include/show_binlog_events.inc;
17
# BUG#38773: DROP DATABASE cause switch to stmt-mode when there are
18
# temporary tables open
22
create temporary table tt1 (a int);
23
create table t1 (a int);
24
insert into t1 values (1);
26
drop database if exists mysqltest1;
28
insert into t1 values (1);
30
source include/show_binlog_events.inc;
36
--echo # Bug#11765416 58381: FAILED DROP DATABASE CAN BREAK STATEMENT
37
--echo # BASED REPLICATION
41
DROP DATABASE IF EXISTS db1;
42
DROP TABLE IF EXISTS t3;
46
CREATE TABLE db1.t1 (a INT);
47
CREATE TABLE db1.t2 (b INT, KEY(b)) engine=innodb;
48
CREATE TABLE t3 (a INT, KEY (a), FOREIGN KEY(a) REFERENCES db1.t2(b))
52
--error ER_ROW_IS_REFERENCED
53
DROP DATABASE db1; # Fails because of the fk
54
SHOW TABLES FROM db1; # t1 was dropped, t2 remains
55
--source include/show_binlog_events.inc # Check that the binlog drops t1