~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# TBF - difference in row level logging
 
2
-- source include/have_binlog_format_mixed_or_statement.inc
 
3
-- source include/master-slave.inc
 
4
 
 
5
--disable_warnings
 
6
drop database if exists mysqltest1;
 
7
--enable_warnings
 
8
create database mysqltest1;
 
9
 
 
10
use mysqltest1;
 
11
create table t1 (a int);
 
12
insert into t1 values(9);
 
13
select * from mysqltest1.t1;
 
14
sync_slave_with_master;
 
15
show databases like 'mysqltest1'; # should be empty
 
16
select * from test.t1;
 
17
# cleanup
 
18
connection master;
 
19
drop table t1;
 
20
drop database mysqltest1;
 
21
sync_slave_with_master;
 
22
 
 
23
#
 
24
# BUG#6353:
 
25
#   Option --replicate-rewrite-db should work together with LOAD DATA INFILE
 
26
#
 
27
 
 
28
connection slave;
 
29
--disable_warnings
 
30
drop database if exists rewrite;
 
31
--enable_warnings
 
32
create database rewrite;
 
33
 
 
34
connection master;
 
35
use test;
 
36
create table t1 (a date, b date, c date not null, d date);
 
37
load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',';
 
38
load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES;
 
39
sync_slave_with_master;
 
40
 
 
41
connection slave;
 
42
select * from rewrite.t1;
 
43
 
 
44
connection master;
 
45
truncate table t1;
 
46
load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d);
 
47
sync_slave_with_master;
 
48
 
 
49
connection slave;
 
50
select * from rewrite.t1;
 
51
 
 
52
connection master;
 
53
drop table t1;
 
54
create table t1 (a text, b text);
 
55
load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''';
 
56
sync_slave_with_master;
 
57
 
 
58
connection slave;
 
59
select concat('|',a,'|'), concat('|',b,'|') from rewrite.t1;
 
60
 
 
61
connection master;
 
62
drop table t1;
 
63
create table t1 (a int, b char(10));
 
64
load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines;
 
65
sync_slave_with_master;
 
66
 
 
67
connection slave;
 
68
select * from rewrite.t1;
 
69
 
 
70
connection master;
 
71
truncate table t1;
 
72
load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines;
 
73
sync_slave_with_master;
 
74
 
 
75
connection slave;
 
76
# The empty line last comes from the end line field in the file
 
77
select * from rewrite.t1;
 
78
 
 
79
drop database rewrite;
 
80
 
 
81
connection master;
 
82
drop table t1;
 
83
 
 
84
# End of 4.1 tests