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

« back to all changes in this revision

Viewing changes to mysql-test/suite/engines/funcs/t/rpl_create_database.test

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-05-11 18:47:32 UTC
  • mto: (2.1.2 sid) (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20100511184732-jhn055kfhxze24kt
Tags: upstream-5.1.46
ImportĀ upstreamĀ versionĀ 5.1.46

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Tests for replication of statements that manipulate databases.
 
3
#
 
4
# For this test file, we have a number of databases. All databases
 
5
# with "greek" names will be replicated on the slave, while other names
 
6
# (e.g., american) will not be replicated. 
 
7
#
 
8
 
 
9
source include/master-slave.inc;
 
10
 
 
11
# Bug#6391 (binlog-do-db rules ignored)
 
12
# In this case, 'mysqltest_bob' should not be replicated to the slave. 
 
13
--disable_warnings
 
14
DROP DATABASE IF EXISTS mysqltest_prometheus;
 
15
DROP DATABASE IF EXISTS mysqltest_sisyfos;
 
16
DROP DATABASE IF EXISTS mysqltest_bob;
 
17
sync_slave_with_master;
 
18
# This database is not replicated
 
19
DROP DATABASE IF EXISTS mysqltest_bob;
 
20
--enable_warnings
 
21
 
 
22
connection master;
 
23
CREATE DATABASE mysqltest_prometheus;
 
24
CREATE DATABASE mysqltest_sisyfos;
 
25
CREATE DATABASE mysqltest_bob;
 
26
 
 
27
USE mysqltest_sisyfos;
 
28
# These should be replicated
 
29
CREATE TABLE t1 (b int);
 
30
INSERT INTO t1 VALUES(1);
 
31
 
 
32
USE mysqltest_bob;
 
33
# These should *not* be replicated
 
34
CREATE TABLE t2 (b int);
 
35
INSERT INTO t2 VALUES(2);
 
36
 
 
37
# Current database is now 'mysqltest_bob'
 
38
# The following should be replicated
 
39
ALTER DATABASE mysqltest_sisyfos CHARACTER SET latin1;
 
40
 
 
41
USE mysqltest_sisyfos;
 
42
# The following should *not* be replicated
 
43
ALTER DATABASE mysqltest_bob CHARACTER SET latin1;
 
44
 
 
45
SHOW DATABASES;
 
46
sync_slave_with_master;
 
47
SHOW DATABASES;
 
48
 
 
49
connection master;
 
50
DROP DATABASE IF EXISTS mysqltest_sisyfos;
 
51
USE mysqltest_prometheus;
 
52
CREATE TABLE t1 (a INT);
 
53
INSERT INTO t1 VALUES (1);
 
54
CREATE DATABASE mysqltest_sisyfos;
 
55
USE mysqltest_sisyfos;
 
56
CREATE TABLE t2 (a INT);
 
57
let $VERSION=`select version()`;
 
58
SHOW DATABASES;
 
59
sync_slave_with_master;
 
60
SHOW DATABASES;
 
61
USE mysqltest_prometheus;
 
62
SHOW TABLES;
 
63
USE mysqltest_sisyfos;
 
64
SHOW TABLES;
 
65
 
 
66
connection master;
 
67
DROP DATABASE IF EXISTS mysqltest_prometheus;
 
68
DROP DATABASE IF EXISTS mysqltest_sisyfos;
 
69
DROP DATABASE IF EXISTS mysqltest_bob;
 
70
sync_slave_with_master;
 
71
 
 
72
# End of 4.1 tests