mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 14:02:32 +01:00
bfb18f9ad5
mysql-test/lib/mtr_cases.pl: updated the code for combination mysql-test/mysql-test-run.pl: added soft switching of binlog format mysql-test/lib/mtr_misc.pl: added new sub mtr_diff_opts mysql-test/suite/rpl/r/rpl_invoked_features.result: updated result mysql-test/suite/rpl/t/rpl_invoked_features.test: updated test mysql-test/suite/rpl/t/rpl_misc_functions.test: updated test mysql-test/suite/rpl/t/rpl_session_var.test: updated test
65 lines
1.8 KiB
Text
65 lines
1.8 KiB
Text
# Replication of session variables.
|
|
# FOREIGN_KEY_CHECKS is tested in rpl_insert_id.test
|
|
|
|
source include/master-slave.inc;
|
|
drop table if exists t1;
|
|
create table t1(a varchar(100),b int);
|
|
set @@session.sql_mode=pipes_as_concat;
|
|
insert into t1 values('My'||'SQL', 1);
|
|
set @@session.sql_mode=default;
|
|
insert into t1 values('1'||'2', 2);
|
|
select * from t1 where b<3 order by a;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
select * from t1 where b<3 order by a;
|
|
connection master;
|
|
# if the slave does the next sync_with_master fine, then it means it accepts the
|
|
# two lines of ANSI syntax below, which is what we want to check.
|
|
set @@session.sql_mode=ignore_space;
|
|
insert into t1 values(password ('MySQL'), 3);
|
|
set @@session.sql_mode=ansi_quotes;
|
|
create table "t2" ("a" int);
|
|
drop table t1, t2;
|
|
set @@session.sql_mode=default;
|
|
create table t1(a int auto_increment primary key);
|
|
create table t2(b int, a int);
|
|
set @@session.sql_auto_is_null=1;
|
|
insert into t1 values(null);
|
|
insert into t2 select 1,a from t1 where a is null;
|
|
set @@session.sql_auto_is_null=0;
|
|
insert into t1 values(null);
|
|
insert into t2 select 2,a from t1 where a is null;
|
|
select * from t2 order by b;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
select * from t2 order by b;
|
|
connection master;
|
|
drop table t1,t2;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
|
|
#
|
|
# Bug #29878 Garbage data generation when executing SESSION_USER() on a slave.
|
|
#
|
|
|
|
connection master;
|
|
CREATE TABLE t1 (
|
|
`id` int(11) NOT NULL auto_increment,
|
|
`data` varchar(100),
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=MyISAM;
|
|
--disable_warnings
|
|
INSERT INTO t1(data) VALUES(SESSION_USER());
|
|
--enable_warnings
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
SELECT length(data) < 100 FROM t1;
|
|
connection master;
|
|
drop table t1;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|