~ubuntu-branches/ubuntu/trusty/mysql-5.5/trusty-updates

« back to all changes in this revision

Viewing changes to mysql-test/extra/binlog_tests/database.test

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2015-04-20 09:30:47 UTC
  • mfrom: (1.1.22)
  • Revision ID: package-import@ubuntu.com-20150420093047-yd9g5p2hesgvlzwm
Tags: 5.5.43-0ubuntu0.14.04.1
* SECURITY UPDATE: Update to 5.5.43 to fix security issues (LP: #1444616)
  - http://www.oracle.com/technetwork/topics/security/cpuapr2015-2365600.html
  - CVE-2015-0433
  - CVE-2015-0441
  - CVE-2015-0499
  - CVE-2015-0501
  - CVE-2015-0505
  - CVE-2015-2568
  - CVE-2015-2571
  - CVE-2015-2573

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
FLUSH STATUS;
33
33
 
 
34
--echo
 
35
--echo # 'DROP TABLE IF EXISTS <deleted tables>' is binlogged
 
36
--echo # when 'DROP DATABASE' fails and at least one table is deleted
 
37
--echo # from the database.
 
38
RESET MASTER;
 
39
CREATE DATABASE testing_1;
 
40
USE testing_1;
 
41
CREATE TABLE t1(c1 INT);
 
42
CREATE TABLE t2(c1 INT);
 
43
 
 
44
let $prefix= `SELECT UUID()`;
 
45
--echo # Create a file in the database directory
 
46
--replace_result $prefix FAKE_FILE
 
47
eval SELECT 'hello' INTO OUTFILE 'fake_file.$prefix';
 
48
 
 
49
--echo
 
50
--echo # 'DROP DATABASE' will fail if there is any other file in the the
 
51
--echo # database directory
 
52
 
 
53
# Use '/' instead of '\' in the error message. On windows platform, dir is
 
54
# formed with '\'.
 
55
--replace_regex /\\testing_1\\*/\/testing_1\//
 
56
--error 1010
 
57
DROP DATABASE testing_1;
 
58
let $wait_binlog_event= DROP TABLE IF EXIST;
 
59
source include/wait_for_binlog_event.inc;
 
60
let $MYSQLD_DATADIR= `SELECT @@datadir`;
 
61
 
 
62
--echo
 
63
--echo # Remove the fake file.
 
64
--remove_file $MYSQLD_DATADIR/testing_1/fake_file.$prefix
 
65
--echo # Now we can drop the database.
 
66
DROP DATABASE testing_1;
 
67
 
34
68
 
35
69
--echo #
36
70
--echo # Bug#11765416 58381: FAILED DROP DATABASE CAN BREAK STATEMENT
37
71
--echo #              BASED REPLICATION
38
72
--echo #
39
73
 
 
74
USE test;
40
75
--disable_warnings
41
76
DROP DATABASE IF EXISTS db1;
42
77
DROP TABLE IF EXISTS t3;