~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-201203300109

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2011-11-08 11:31:13 UTC
  • Revision ID: package-import@ubuntu.com-20111108113113-3ulw01fvi4vn8m25
Tags: upstream-5.5.17
ImportĀ upstreamĀ versionĀ 5.5.17

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Replication of session variables.
 
2
# FOREIGN_KEY_CHECKS is tested in rpl_insert_id.test
 
3
 
 
4
source include/master-slave.inc;
 
5
drop table if exists t1;
 
6
create table t1(a varchar(100),b int);
 
7
set @@session.sql_mode=pipes_as_concat;
 
8
insert into t1 values('My'||'SQL', 1);
 
9
set @@session.sql_mode=default;
 
10
insert into t1 values('1'||'2', 2);
 
11
select * from t1 where b<3 order by a;
 
12
save_master_pos;
 
13
connection slave;
 
14
sync_with_master;
 
15
select * from t1 where b<3 order by a;
 
16
connection master;
 
17
# if the slave does the next sync_with_master fine, then it means it accepts the
 
18
# two lines of ANSI syntax below, which is what we want to check.
 
19
set @@session.sql_mode=ignore_space;
 
20
insert into t1 values(password          ('MySQL'), 3);
 
21
set @@session.sql_mode=ansi_quotes;
 
22
create table "t2" ("a" int);
 
23
drop table t1, t2;
 
24
set @@session.sql_mode=default;
 
25
create table t1(a int auto_increment primary key);
 
26
create table t2(b int, a int);
 
27
set @@session.sql_auto_is_null=1;
 
28
insert into t1 values(null);
 
29
insert into t2 select 1,a from t1 where a is null;
 
30
set @@session.sql_auto_is_null=0;
 
31
insert into t1 values(null);
 
32
insert into t2 select 2,a from t1 where a is null;
 
33
select * from t2 order by b;
 
34
save_master_pos;
 
35
connection slave;
 
36
sync_with_master;
 
37
select * from t2 order by b;
 
38
connection master;
 
39
drop table t1,t2;
 
40
save_master_pos;
 
41
connection slave;
 
42
sync_with_master;