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

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/t/rpl_loaddata_charset.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
#
 
2
# Check LOAD DATA + character sets + replication
 
3
#
 
4
source include/master-slave.inc;
 
5
 
 
6
#
 
7
# Bug#15126 character_set_database is not replicated
 
8
# (LOAD DATA INFILE need it)
 
9
#
 
10
connection master;
 
11
create table t1 (a varchar(10) character set utf8);
 
12
load data infile '../../std_data/loaddata6.dat' into table t1;
 
13
set @@character_set_database=koi8r;
 
14
load data infile '../../std_data/loaddata6.dat' into table t1;
 
15
set @@character_set_database=DEFAULT;
 
16
load data infile '../../std_data/loaddata6.dat' into table t1;
 
17
load data infile '../../std_data/loaddata6.dat' into table t1;
 
18
load data infile '../../std_data/loaddata6.dat' into table t1;
 
19
set @@character_set_database=koi8r;
 
20
load data infile '../../std_data/loaddata6.dat' into table t1;
 
21
set @@character_set_database=DEFAULT;
 
22
load data infile '../../std_data/loaddata6.dat' into table t1 character set koi8r;
 
23
 
 
24
select hex(a) from t1;
 
25
 
 
26
save_master_pos;
 
27
connection slave;
 
28
sync_with_master;
 
29
 
 
30
select hex(a) from t1;
 
31
connection master;
 
32
drop table t1;
 
33
sync_slave_with_master;
 
34
 
 
35
#
 
36
# Bug#45516 
 
37
#   When slave SQL thread executing LOAD DATA command, the
 
38
#   thd->variables.collation_database was not set properly to the default
 
39
#   database charset
 
40
#
 
41
 
 
42
echo -------------test bug#45516------------------;
 
43
 
 
44
# LOAD DATA INFILE
 
45
let $LOAD_LOCAL=1;
 
46
source include/rpl_loaddata_charset.inc;
 
47
 
 
48
# LOAD DATA LOCAL INFILE
 
49
let $LOAD_LOCAL=0;
 
50
source include/rpl_loaddata_charset.inc;