mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
8adce14f70
mysql-test/t/rpl_row_USER.test: Changed test to allow ndbcluster engine to be use mysql-test/r/rpl_row_USER.result: Changed test to allow ndbcluster engine to be use mysql-test/t/rpl_bit.test: Changed test to allow ndbcluster engine to be use mysql-test/r/rpl_bit.result: Changed test to allow ndbcluster engine to be use mysql-test/r/rpl_log_pos.result: Changed test to allow ndbcluster engine to be use mysql-test/t/rpl_log_pos.test: Changed test to allow ndbcluster engine to be use mysql-test/r/not_ndb_table.require: Needed a way to tell some test case to skip running it default-storage-engine was set to ndb mysql-test/t/rpl_000015.test: Updated test case mysql-test/r/rpl_000015.result: Updated test case mysql-test/t/rpl_loaddata2.test: Updated test case mysql-test/r/rpl_loaddata2.result: Updated test case mysql-test/t/rpl_loadfile.test: Updated test case mysql-test/r/rpl_loadfile.result: Updated test case mysql-test/include/not_ndb_table.inc: added comment header. mysql-test/t/rpl_foreign_key_innodb.test: Skip test when NDB is forced mysql-test/t/rpl_optimize.test: Skip test when NDB is forced mysql-test/t/rpl000005.test: updated test case mysql-test/r/rpl000005.result: updated test case mysql-test/t/rpl_user_variables.test: Test clean up for CRBR testing mysql-test/r/rpl_user_variables.result: Test clean up for CRBR testing mysql-test/r/rpl_timezone.result: Test clean up for CRBR testing mysql-test/t/rpl_timezone.test: Test clean up for CRBR testing
60 lines
2.1 KiB
Text
60 lines
2.1 KiB
Text
###################################
|
|
# Change Author: JBM
|
|
# Change Date: 2006-01-17
|
|
# Change: Added order by
|
|
###################################
|
|
#
|
|
# Test of replicating user variables
|
|
#
|
|
###################################
|
|
|
|
-- source include/master-slave.inc
|
|
# Disable PS as the log positions differs
|
|
--disable_ps_protocol
|
|
|
|
|
|
# Clean up old slave's binlogs.
|
|
# The slave is started with --log-slave-updates
|
|
# and this test does SHOW BINLOG EVENTS on the slave's
|
|
# binlog. But previous tests can influence the current test's
|
|
# binlog (e.g. a temporary table in the previous test has not
|
|
# been explicitly deleted, or it has but the slave hasn't had
|
|
# enough time to catch it before STOP SLAVE,
|
|
# and at the beginning of the current
|
|
# test the slave immediately writes DROP TEMPORARY TABLE this_old_table).
|
|
# We wait for the slave to have written all he wants to the binlog
|
|
# (otherwise RESET MASTER may come too early).
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
reset master;
|
|
connection master;
|
|
|
|
create table t1(n char(30));
|
|
set @i1:=12345678901234, @i2:=-12345678901234, @i3:=0, @i4:=-1;
|
|
set @s1:='This is a test', @r1:=12.5, @r2:=-12.5;
|
|
set @n1:=null;
|
|
set @s2:='', @s3:='abc\'def', @s4:= 'abc\\def', @s5:= 'abc''def';
|
|
insert into t1 values (@i1), (@i2), (@i3), (@i4);
|
|
insert into t1 values (@r1), (@r2);
|
|
insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5);
|
|
insert into t1 values (@n1);
|
|
insert into t1 values (@n2); # not explicitely set before
|
|
insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1);
|
|
insert into t1 values (@a+(@b:=@a+1));
|
|
set @q:='abc';
|
|
insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2'));
|
|
set @a:=5;
|
|
insert into t1 values (@a),(@a);
|
|
# To flush the pending event, we add the following statement. RBR can
|
|
# concatenate the result of several statements, which SBR cannot.
|
|
select * from t1 where n = '<nonexistant>';
|
|
connection master1; # see if variable is reset in binlog when thread changes
|
|
insert into t1 values (@a),(@a),(@a*5);
|
|
SELECT * FROM t1 ORDER BY n;
|
|
sync_slave_with_master;
|
|
SELECT * FROM t1 ORDER BY n;
|
|
connection master;
|
|
drop table t1;
|
|
sync_slave_with_master;
|
|
stop slave;
|