~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# BUG#45574: 
 
2
# SP: CREATE DATABASE|TABLE IF NOT EXISTS not binlogged if routine exists.
 
3
#
 
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
 
8
#   exists.  
 
9
#
 
10
#   This problem caused some of the tests to fail randomly on PB or PB2.
 
11
#
 
12
#   Test is implemented as follows:
 
13
#
 
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; 
 
17
#
 
18
#  Note: 
 
19
#  rpl_create_if_not_exists.test tests other cases.
 
20
#
 
21
#  References:
 
22
#  http://dev.mysql.com/doc/refman/5.1/en/sql-syntax-data-definition.html
 
23
#
 
24
 
 
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;
 
29
disable_warnings;
 
30
 
 
31
DROP DATABASE IF EXISTS mysqltest;
 
32
 
 
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;
 
40
 
 
41
source include/master-slave-end.inc;