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