diff options
author | unknown <jmiller@mysql.com> | 2005-12-23 14:45:02 +0100 |
---|---|---|
committer | unknown <jmiller@mysql.com> | 2005-12-23 14:45:02 +0100 |
commit | a9e979a96bc2ed17c6a95439d0eaceb5dd0dd1ad (patch) | |
tree | 428957e6aba387f791eec74f79262ffb9e263751 /mysql-test/t | |
parent | 90c221be54d0f778de0de267e4b7a7d877ecb367 (diff) | |
download | mariadb-git-a9e979a96bc2ed17c6a95439d0eaceb5dd0dd1ad.tar.gz |
Updated tests from Lars Review
BitKeeper/deleted/.del-rpl_row_view.test~91ced6f754fb06a7:
Delete: mysql-test/t/rpl_row_view.test
BitKeeper/deleted/.del-rpl_row_view.result~7ec7f00e6d6beca9:
Delete: mysql-test/r/rpl_row_view.result
mysql-test/t/rpl_view.test:
Updated to work for both SBR and RBR per lars review comments
mysql-test/r/rpl_view.result:
Updated results file
mysql-test/t/rpl_timezone-master.opt:
Rename: mysql-test/t/rpl_stm_timezone-master.opt -> mysql-test/t/rpl_timezone-master.opt
mysql-test/t/rpl_timezone-slave.opt:
Rename: mysql-test/t/rpl_stm_timezone-slave.opt -> mysql-test/t/rpl_timezone-slave.opt
BitKeeper/deleted/.del-rpl_row_timezone-master.opt~59152d4b828ae88d:
Delete: mysql-test/t/rpl_row_timezone-master.opt
BitKeeper/deleted/.del-rpl_row_timezone-slave.opt~6e899f3565026efd:
Delete: mysql-test/t/rpl_row_timezone-slave.opt
BitKeeper/deleted/.del-rpl_row_timezone.test~eb6bbf4edaa18f2d:
Delete: mysql-test/t/rpl_row_timezone.test
BitKeeper/deleted/.del-rpl_row_timezone.result~ea5c5977bb4da1cf:
Delete: mysql-test/r/rpl_row_timezone.result
mysql-test/r/rpl_timezone.result:
Updated results file
mysql-test/t/rpl_timezone.test:
Remove comment
mysql-test/t/rpl_rewrt_db-slave.opt:
Rename: mysql-test/t/rpl_stm_rewrt_db-slave.opt -> mysql-test/t/rpl_rewrt_db-slave.opt
mysql-test/t/rpl_rewrt_db.test:
Rename: mysql-test/t/rpl_stm_rewrt_db.test -> mysql-test/t/rpl_rewrt_db.test
mysql-test/r/rpl_rewrt_db.result:
Rename: mysql-test/r/rpl_stm_rewrt_db.result -> mysql-test/r/rpl_rewrt_db.result
BitKeeper/deleted/.del-rpl_row_rewrt_db-slave.opt~d63094f08f0f222c:
Delete: mysql-test/t/rpl_row_rewrt_db-slave.opt
BitKeeper/deleted/.del-rpl_row_rewrt_db.test~2aa70363e3b25660:
Delete: mysql-test/t/rpl_row_rewrt_db.test
BitKeeper/deleted/.del-rpl_row_rewrt_db.result~a1f2f21a8d2ed591:
Delete: mysql-test/r/rpl_row_rewrt_db.result
mysql-test/t/rpl_loaddata_m-master.opt:
Rename: mysql-test/t/rpl_stm_loaddata_m-master.opt -> mysql-test/t/rpl_loaddata_m-master.opt
mysql-test/t/rpl_loaddata_m.test:
Updated test to work with both SBR and RBR. RBR show bug. Bug# 15942. Test will be added to disable.def until bug corrected
mysql-test/r/rpl_loaddata_m.result:
new results file for test case
BitKeeper/deleted/.del-rpl_stm_err_ignoredtable.test~bfe9b63deec27fb2:
Delete: mysql-test/t/rpl_stm_err_ignoredtable.test
mysql-test/t/rpl_err_ignoredtable-slave.opt:
Rename: mysql-test/t/rpl_stm_err_ignoredtable-slave.opt -> mysql-test/t/rpl_err_ignoredtable-slave.opt
mysql-test/t/rpl_err_ignoredtable.test:
Updated test to work with both SBR and RBR
mysql-test/r/rpl_err_ignoredtable.result:
Updated results file
mysql-test/t/rpl_user_variables.test:
Works with both SBR and RBR
mysql-test/r/rpl_user_variables.result:
Rename: mysql-test/r/rpl_stm_user_variables.result -> mysql-test/r/rpl_user_variables.result
BitKeeper/deleted/.del-rpl_row_user_variables.result~f7e7536de1d8b8b0:
Delete: mysql-test/r/rpl_row_user_variables.result
BitKeeper/deleted/.del-rpl_stm_user_variables.test~84f68bdef965db77:
Delete: mysql-test/t/rpl_stm_user_variables.test
BitKeeper/deleted/.del-rpl_row_user_variables.test~cca11b4f4d044a26:
Delete: mysql-test/t/rpl_row_user_variables.test
mysql-test/t/rpl_row_log.test:
Updated comment to correct statement
mysql-test/t/disabled.def:
Updated with Bug# 15963
mysql-test/t/rpl_ddl.test:
Updated to work with SBR and RBR
mysql-test/r/rpl_ddl.result:
Updated results
BitKeeper/deleted/.del-rpl_row_ddl.test~d1339fea669fc00a:
Delete: mysql-test/t/rpl_row_ddl.test
BitKeeper/deleted/.del-rpl_row_ddl.result~ce73af252273e6bc:
Delete: mysql-test/r/rpl_row_ddl.result
Diffstat (limited to 'mysql-test/t')
24 files changed, 182 insertions, 327 deletions
diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index f32ed667864..683cd4558ea 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -25,3 +25,5 @@ type_time : Bug#15805 rpl000002 : Bug#15920 Temporary tables are not binlogged in SBR ps_7ndb : Bug#15923 Core dump in RBR mode when executing test suite sp_trans : Bug#15924 Code dump in RBR mode when executing test suite +rpl_loaddata_m : Bug#15942 RBR ignores --binlog_ignore_db +rpl_ddl : Bug#15963 SBR does not show "Definer" correctly diff --git a/mysql-test/t/rpl_row_ddl.test b/mysql-test/t/rpl_ddl.test index 2433d6a83a7..d08406334d1 100644 --- a/mysql-test/t/rpl_row_ddl.test +++ b/mysql-test/t/rpl_ddl.test @@ -29,7 +29,6 @@ # --source include/have_innodb.inc ---source include/have_binlog_format_row.inc --source include/master-slave.inc let $engine_type= "InnoDB"; -- source extra/rpl_tests/rpl_ddl.test diff --git a/mysql-test/t/rpl_stm_err_ignoredtable-slave.opt b/mysql-test/t/rpl_err_ignoredtable-slave.opt index cb49119bfcb..cb49119bfcb 100644 --- a/mysql-test/t/rpl_stm_err_ignoredtable-slave.opt +++ b/mysql-test/t/rpl_err_ignoredtable-slave.opt diff --git a/mysql-test/t/rpl_err_ignoredtable.test b/mysql-test/t/rpl_err_ignoredtable.test new file mode 100644 index 00000000000..81aa76225be --- /dev/null +++ b/mysql-test/t/rpl_err_ignoredtable.test @@ -0,0 +1,64 @@ +# Test for +# Bug #797: If a query is ignored on slave (replicate-ignore-table) the slave +# still checks that it has the same error as on the master. + +# Requires statement logging +-- source include/master-slave.inc + +connection master; +create table t1 (a int primary key); +create table t4 (a int primary key); +# generate an error that goes to the binlog +--error 1062 +insert into t1 values (1),(1); +insert into t4 values (1),(2); +save_master_pos; +connection slave; +# as the t1 table is ignored on the slave, the slave should be able to sync +sync_with_master; +# check that the table has been ignored, because otherwise the test is nonsense +show tables like 't1'; +show tables like 't4'; +SELECT * FROM test.t4; +connection master; +drop table t1; +save_master_pos; +connection slave; +sync_with_master; + +# Now test that even critical errors (connection killed) +# are ignored if rules allow it. +# The "kill" idea was copied from rpl000001.test. + +connection master1; +select get_lock('crash_lock%20C', 10); + +connection master; +create table t2 (a int primary key); +insert into t2 values(1); +create table t3 (id int); +insert into t3 values(connection_id()); +send update t2 set a = a + 1 + get_lock('crash_lock%20C', 10); + +connection master1; +real_sleep 2; +select (@id := id) - id from t3; +kill @id; +drop table t2,t3; +insert into t4 values (3),(4); +connection master; +--error 0,1053,2013 +reap; +connection master1; +save_master_pos; +connection slave; +sync_with_master; +SELECT * FROM test.t4; + +connection master1; +DROP TABLE test.t4; +save_master_pos; +connection slave; +sync_with_master; +# End of 4.1 tests +# Adding comment for force manual merge 5.0 -> wl1012. delete me if needed diff --git a/mysql-test/t/rpl_stm_loaddata_m-master.opt b/mysql-test/t/rpl_loaddata_m-master.opt index 9d4a8f0b95e..9d4a8f0b95e 100644 --- a/mysql-test/t/rpl_stm_loaddata_m-master.opt +++ b/mysql-test/t/rpl_loaddata_m-master.opt diff --git a/mysql-test/t/rpl_loaddata_m.test b/mysql-test/t/rpl_loaddata_m.test new file mode 100644 index 00000000000..01ef89d4efc --- /dev/null +++ b/mysql-test/t/rpl_loaddata_m.test @@ -0,0 +1,49 @@ +# See if the master logs LOAD DATA INFILE correctly when binlog_*_db rules +# exist. +# This is for BUG#1100 (LOAD DATA INFILE was half-logged). +###################################################### +# Change Author: JBM +# Change Date: 2005-12-22 +# Change: Test rewritten to remove show binlog events +# and to test the option better + Cleanup +###################################################### +-- source include/master-slave.inc + +--disable_warnings +drop database if exists mysqltest; +--enable_warnings + +connection master; +# 'test' database should be ignored by the slave +USE test; +CREATE TABLE t1(a INT, b INT, UNIQUE(b)); +LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE test.t1; +SELECT COUNT(*) FROM test.t1; + +# 'mysqltest' database should NOT be ignored by the slave +CREATE DATABASE mysqltest; +USE mysqltest; +CREATE TABLE t1(a INT, b INT, UNIQUE(b)); +LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE mysqltest.t1; +SELECT COUNT(*) FROM mysqltest.t1; + +# Now lets check the slave to see what we have :-) +save_master_pos; +connection slave; +sync_with_master; + +SHOW DATABASES; + +USE test; +SHOW TABLES; + +USE mysqltest; +SHOW TABLES; +SELECT COUNT(*) FROM mysqltest.t1; + +#show binlog events; +connection master; +DROP DATABASE mysqltest; +DROP TABLE test.t1; + +# End of test diff --git a/mysql-test/t/rpl_row_rewrt_db-slave.opt b/mysql-test/t/rpl_rewrt_db-slave.opt index a462ad19ba0..a462ad19ba0 100644 --- a/mysql-test/t/rpl_row_rewrt_db-slave.opt +++ b/mysql-test/t/rpl_rewrt_db-slave.opt diff --git a/mysql-test/t/rpl_stm_rewrt_db.test b/mysql-test/t/rpl_rewrt_db.test index c66ced46717..c66ced46717 100644 --- a/mysql-test/t/rpl_stm_rewrt_db.test +++ b/mysql-test/t/rpl_rewrt_db.test diff --git a/mysql-test/t/rpl_row_log.test b/mysql-test/t/rpl_row_log.test index 290a08ff75a..29abf5bb93e 100644 --- a/mysql-test/t/rpl_row_log.test +++ b/mysql-test/t/rpl_row_log.test @@ -1,4 +1,4 @@ -# Requires statement logging +# Requires row base logging -- source include/have_binlog_format_row.inc -- source extra/rpl_tests/rpl_log.test diff --git a/mysql-test/t/rpl_row_rewrt_db.test b/mysql-test/t/rpl_row_rewrt_db.test deleted file mode 100644 index 8781b361d87..00000000000 --- a/mysql-test/t/rpl_row_rewrt_db.test +++ /dev/null @@ -1,83 +0,0 @@ -# TBF - difference in row level logging --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - ---disable_warnings -drop database if exists mysqltest1; ---enable_warnings -create database mysqltest1; - -use mysqltest1; -create table t1 (a int); -insert into t1 values(9); -select * from mysqltest1.t1; -sync_slave_with_master; -show databases like 'mysqltest1'; # should be empty -select * from test.t1; -# cleanup -connection master; -drop table t1; -drop database mysqltest1; -sync_slave_with_master; - -# -# BUG#6353: -# Option --replicate-rewrite-db should work together with LOAD DATA INFILE -# - -connection slave; ---disable_warnings -drop database if exists rewrite; ---enable_warnings -create database rewrite; - -connection master; -use test; -create table t1 (a date, b date, c date not null, d date); -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; -sync_slave_with_master; - -connection slave; -select * from rewrite.t1; - -connection master; -truncate table t1; -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); -sync_slave_with_master; - -connection slave; -select * from rewrite.t1; - -connection master; -drop table t1; -create table t1 (a text, b text); -load data infile '../../std_data/loaddata2.dat' into table t1 fields terminated by ',' enclosed by ''''; -sync_slave_with_master; - -connection slave; -select concat('|',a,'|'), concat('|',b,'|') from rewrite.t1; - -connection master; -drop table t1; -create table t1 (a int, b char(10)); -load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; -sync_slave_with_master; - -connection slave; -select * from rewrite.t1; - -connection master; -truncate table t1; -load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; -sync_slave_with_master; - -connection slave; -# The empty line last comes from the end line field in the file -select * from rewrite.t1; - -drop database rewrite; - -connection master; -drop table t1; - diff --git a/mysql-test/t/rpl_row_timezone-slave.opt b/mysql-test/t/rpl_row_timezone-slave.opt deleted file mode 100644 index c383fd9f17d..00000000000 --- a/mysql-test/t/rpl_row_timezone-slave.opt +++ /dev/null @@ -1,2 +0,0 @@ ---default-time-zone=Europe/Moscow - diff --git a/mysql-test/t/rpl_row_user_variables.test b/mysql-test/t/rpl_row_user_variables.test deleted file mode 100644 index 2ebb668b1a8..00000000000 --- a/mysql-test/t/rpl_row_user_variables.test +++ /dev/null @@ -1,4 +0,0 @@ -# row-based and statement binlog difference in result files --- source include/have_binlog_format_row.inc --- source extra/rpl_tests/rpl_user_variables.test - diff --git a/mysql-test/t/rpl_row_view.test b/mysql-test/t/rpl_row_view.test deleted file mode 100644 index 6d460d58df6..00000000000 --- a/mysql-test/t/rpl_row_view.test +++ /dev/null @@ -1,47 +0,0 @@ -# NYI - row-based cannot use CREATE ... SELECT ---source include/have_binlog_format_row.inc - -source include/master-slave.inc; ---disable_warnings -drop table if exists t1,v1; -drop view if exists t1,v1; -sync_slave_with_master; ---enable_warnings - -# -# Check that createion drop of view is replicated, also check replication of -# updating of view -# -connection master; -create table t1 (a int); -insert into t1 values (1); -create view v1 as select a from t1; -insert into v1 values (2); -select * from v1 order by a; -sync_slave_with_master; -# view already have to be on slave -select * from v1 order by a; -connection master; -update v1 set a=3 where a=1; -select * from v1 order by a; -sync_slave_with_master; -select * from v1 order by a; -connection master; -delete from v1 where a=2; -select * from v1 order by a; -sync_slave_with_master; -select * from v1 order by a; -connection master; -# 'alter view' internally maped to creation, but still check that it works -alter view v1 as select a as b from t1; -sync_slave_with_master; -select * from v1 order by 1; -connection master; -drop view v1; -sync_slave_with_master; -#error, because view have to be removed from slave --- error 1146 -select * from v1 order by a; -connection master; -drop table t1; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_stm_ddl.test b/mysql-test/t/rpl_stm_ddl.test deleted file mode 100644 index 54548114f86..00000000000 --- a/mysql-test/t/rpl_stm_ddl.test +++ /dev/null @@ -1,35 +0,0 @@ -######################## rpl_ddl.test ######################## -# # -# DDL statements (sometimes with implicit COMMIT) executed # -# by the master and it's propagation into the slave # -# # -############################################################## - -# -# NOTE, PLEASE BE CAREFUL, WHEN MODIFYING THE TESTS !! -# -# 1. !All! objects to be dropped, renamed, altered ... must be created -# in AUTOCOMMIT= 1 mode before AUTOCOMMIT is set to 0 and the test -# sequences start. -# -# 2. Never use a test object, which was direct or indirect affected by a -# preceeding test sequence again. -# Except table d1.t1 where ONLY DML is allowed. -# -# If one preceeding test sequence hits a (sometimes not good visible, -# because the sql error code of the statement might be 0) bug -# and these rules are ignored, a following test sequence might earn ugly -# effects like failing 'sync_slave_with_master', crashes of the slave or -# abort of the test case etc.. -# -# 3. The assignment of the DDL command to be tested to $my_stmt can -# be a bit difficult. "'" must be avoided, because the test -# routine "include/rpl_stmt_seq.inc" performs a -# eval SELECT CONCAT('######## ','$my_stmt',' ########') as ""; -# - ---source include/have_innodb.inc ---source include/have_binlog_format_statement.inc ---source include/master-slave.inc -let $engine_type= "InnoDB"; --- source extra/rpl_tests/rpl_ddl.test diff --git a/mysql-test/t/rpl_stm_err_ignoredtable.test b/mysql-test/t/rpl_stm_err_ignoredtable.test deleted file mode 100644 index a426be27b59..00000000000 --- a/mysql-test/t/rpl_stm_err_ignoredtable.test +++ /dev/null @@ -1,8 +0,0 @@ -# Test for -# Bug #797: If a query is ignored on slave (replicate-ignore-table) the slave -# still checks that it has the same error as on the master. - -# Requires statement logging --- source include/have_binlog_format_statement.inc --- source extra/rpl_tests/rpl_err_ignoredtable.test - diff --git a/mysql-test/t/rpl_stm_rewrt_db-slave.opt b/mysql-test/t/rpl_stm_rewrt_db-slave.opt deleted file mode 100644 index a462ad19ba0..00000000000 --- a/mysql-test/t/rpl_stm_rewrt_db-slave.opt +++ /dev/null @@ -1 +0,0 @@ -"--replicate-rewrite-db=test->rewrite" "--replicate-rewrite-db=mysqltest1->test" diff --git a/mysql-test/t/rpl_stm_timezone-master.opt b/mysql-test/t/rpl_stm_timezone-master.opt deleted file mode 100644 index 8e43bfbbb7e..00000000000 --- a/mysql-test/t/rpl_stm_timezone-master.opt +++ /dev/null @@ -1 +0,0 @@ ---default-time-zone=Europe/Moscow diff --git a/mysql-test/t/rpl_stm_timezone.test b/mysql-test/t/rpl_stm_timezone.test deleted file mode 100644 index 0cd6dbf5d89..00000000000 --- a/mysql-test/t/rpl_stm_timezone.test +++ /dev/null @@ -1,129 +0,0 @@ -# TBF - difference in row level logging --- source include/have_binlog_format_statement.inc - -# Test of replication of time zones. - -# There is currently some bug possibly in prepared statements (this -# test fails with --ps-protocol): sys_var_thd_time_zone::value_ptr() -# is called only at prepare time, not at execution time. So, -# thd->time_zone_used is not equal to 1 (it is back to 0, because of -# reset_thd_for_next_command called at execution time), so the -# timezone used in CONVERT_TZ is not binlogged. To debug (by Guilhem -# and possibly Konstantin). - ---disable_ps_protocol - -source include/master-slave.inc; - -# Some preparations -let $VERSION=`select version()`; -set timestamp=100000000; # for fixed output of mysqlbinlog -create table t1 (t timestamp); -create table t2 (t char(32)); - -connection slave; -select @@time_zone; - -# -# Let us check how well replication works when we are saving datetime -# value in TIMESTAMP field. -# -connection master; -select @@time_zone; -insert into t1 values ('20050101000000'), ('20050611093902'); -set time_zone='UTC'; -insert into t1 values ('20040101000000'), ('20040611093902'); -select * from t1; -sync_slave_with_master; -set time_zone='UTC'; -select * from t1; - -# Let us check also that setting of time_zone back to default also works -# well -connection master; -delete from t1; -set time_zone='Europe/Moscow'; -insert into t1 values ('20040101000000'), ('20040611093902'); -select * from t1; -sync_slave_with_master; -set time_zone='Europe/Moscow'; -select * from t1; -connection master; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001 - -# Let us check with LOAD DATA INFILE -# (we do it after mysqlbinlog because the temp files names are not constant) -connection master; -delete from t1; -set time_zone='UTC'; -load data infile '../../std_data/rpl_timezone.dat' into table t1; -select * from t1; -sync_slave_with_master; -set time_zone='UTC'; -select * from t1; -set time_zone='Europe/Moscow'; - -# Put back values of before the LOAD -connection master; -set time_zone='Europe/Moscow'; -delete from t1; -insert into t1 values ('20040101000000'), ('20040611093902'); - -# -# Now let us check how well we replicate statments reading TIMESTAMP fields -# (We should see the same data on master and on slave but it should differ -# from originally inserted) -# -set time_zone='MET'; -insert into t2 (select t from t1); -select * from t1; -sync_slave_with_master; -select * from t2; - -# -# Now let us check how well we replicate various CURRENT_* functions -# -connection master; -delete from t2; -set timestamp=1000072000; -insert into t2 values (current_timestamp), (current_date), (current_time); -sync_slave_with_master; -select * from t2; - -# -# At last let us check replication of FROM_UNIXTIME/UNIX_TIMESTAMP functions. -# -connection master; -delete from t2; -insert into t2 values (from_unixtime(1000000000)), - (unix_timestamp('2001-09-09 03:46:40')); -select * from t2; -sync_slave_with_master; -# We should get same result on slave as on master -select * from t2; - -# -# Let us check that we are allowing to set global time_zone with -# replication -# -connection master; -set global time_zone='MET'; - -# -# Let us see if CONVERT_TZ(@@time_zone) replicates -# -delete from t2; -set time_zone='UTC'; -insert into t2 values(convert_tz('2004-01-01 00:00:00','MET',@@time_zone)); -insert into t2 values(convert_tz('2005-01-01 00:00:00','MET','Japan')); -select * from t2; -sync_slave_with_master; -select * from t2; - -# Clean up -connection master; -drop table t1, t2; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_stm_user_variables.test b/mysql-test/t/rpl_stm_user_variables.test deleted file mode 100644 index af4e46cdace..00000000000 --- a/mysql-test/t/rpl_stm_user_variables.test +++ /dev/null @@ -1,5 +0,0 @@ -# row-based and statement binlog difference in result files --- source include/have_binlog_format_statement.inc --- source extra/rpl_tests/rpl_user_variables.test - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_row_timezone-master.opt b/mysql-test/t/rpl_timezone-master.opt index 8e43bfbbb7e..8e43bfbbb7e 100644 --- a/mysql-test/t/rpl_row_timezone-master.opt +++ b/mysql-test/t/rpl_timezone-master.opt diff --git a/mysql-test/t/rpl_stm_timezone-slave.opt b/mysql-test/t/rpl_timezone-slave.opt index 191182c329c..191182c329c 100644 --- a/mysql-test/t/rpl_stm_timezone-slave.opt +++ b/mysql-test/t/rpl_timezone-slave.opt diff --git a/mysql-test/t/rpl_row_timezone.test b/mysql-test/t/rpl_timezone.test index 047a458f09f..e78f1e1899e 100644 --- a/mysql-test/t/rpl_row_timezone.test +++ b/mysql-test/t/rpl_timezone.test @@ -1,6 +1,3 @@ -# TBF - difference in row level logging --- source include/have_binlog_format_row.inc - # Test of replication of time zones. # There is currently some bug possibly in prepared statements (this @@ -51,8 +48,11 @@ sync_slave_with_master; set time_zone='Europe/Moscow'; select * from t1; connection master; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001 +# Change Author: JBM +# Change Date: 2005-12-22 +# Change: Comment out the exec of the binlog so test works for both SBR and RBR +#--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +#--exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001 # Let us check with LOAD DATA INFILE # (we do it after mysqlbinlog because the temp files names are not constant) @@ -74,7 +74,7 @@ insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); # # Now let us check how well we replicate statments reading TIMESTAMP fields -# (We should see the same data on master and on slave but it should differ +# (We should see the same data on master and on slave but it should differ # from originally inserted) # set time_zone='MET'; @@ -127,3 +127,4 @@ select * from t2; connection master; drop table t1, t2; sync_slave_with_master; + diff --git a/mysql-test/t/rpl_user_variables.test b/mysql-test/t/rpl_user_variables.test new file mode 100644 index 00000000000..b46a0fad02e --- /dev/null +++ b/mysql-test/t/rpl_user_variables.test @@ -0,0 +1,53 @@ +# +# 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; +sync_slave_with_master; +select * from t1; +connection master; +drop table t1; +sync_slave_with_master; +stop slave; diff --git a/mysql-test/t/rpl_stm_view.test b/mysql-test/t/rpl_view.test index 39f39705f77..0e8c7514488 100644 --- a/mysql-test/t/rpl_stm_view.test +++ b/mysql-test/t/rpl_view.test @@ -1,5 +1,4 @@ # NYI - row-based cannot use CREATE ... SELECT ---source include/have_binlog_format_statement.inc source include/master-slave.inc; --disable_warnings @@ -10,7 +9,7 @@ reset master; --enable_warnings # -# Check that createion drop of view is replicated, also check replication of +# Check that creation drop of view is replicated, also check replication of # updating of view # connection master; @@ -46,5 +45,8 @@ select * from v1 order by a; connection master; drop table t1; sync_slave_with_master; ---replace_column 2 # 5 # -show binlog events limit 1,100; +# Change Author: JBM +# Change Date: 2005-12-22 +# Change: Commented out binlog events to work with SBR and RBR +#--replace_column 2 # 5 # +# show binlog events limit 1,100; |