2
# SP: CREATE DATABASE|TABLE IF NOT EXISTS not binlogged if routine exists.
4
# There is an inconsistency with DROP DATABASE|TABLE|EVENT IF EXISTS and
5
# CREATE DATABASE|TABLE|EVENT IF NOT EXISTS. DROP IF EXISTS statements are
6
# binlogged even if either the DB, TABLE or EVENT does not exist. In
7
# contrast, Only the CREATE EVENT IF NOT EXISTS is binlogged when the EVENT
10
# This problem caused some of the tests to fail randomly on PB or PB2.
12
# Test is implemented as follows:
14
# i) test each "CREATE TEMPORARY TABLE IF EXISTS" (DDL), found in MySQL
15
# 5.1 manual, on existent objects;
16
# ii) show binlog events;
19
# rpl_create_if_not_exists.test tests other cases.
22
# http://dev.mysql.com/doc/refman/5.1/en/sql-syntax-data-definition.html
25
source include/master-slave.inc;
26
#CREATE TEMPORARY TABLE statements are not binlogged in row mode,
27
#So it must be test by itself.
28
source include/have_binlog_format_mixed_or_statement.inc;
31
DROP DATABASE IF EXISTS mysqltest;
33
CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int);
34
CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int);
35
CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp;
36
CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp;
37
CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp;
38
CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp;
39
source include/show_binlog_events.inc;
41
source include/master-slave-end.inc;