mariadb/mysql-test/t/rpl_stm_no_op.test
unknown 1bd50ced73 Cleanup testcases
- Add  missing drop(s)
 - Reset changed variables

NOTE! These kind of problems are easily found with --check-testcases options to mysql-test-run.pl 


mysql-test/extra/rpl_tests/rpl_insert_id_pk.test:
  Add missing drop table
mysql-test/extra/rpl_tests/rpl_loaddata.test:
  Add missing drop table
mysql-test/extra/rpl_tests/rpl_log.test:
  Tables where only dropped on slave, switch to master connection before dropping them
mysql-test/extra/rpl_tests/rpl_multi_update3.test:
  Add missing drop table
mysql-test/extra/rpl_tests/rpl_row_sp006.test:
  Add missing drop database
mysql-test/include/check-testcase.test:
  Add option "--skip-lock-tables" when dumping tables, as noone else is using the tables anyway
mysql-test/r/ndb_cache_multi.result:
  Reset query_cache_size after test on both master and "second" master mysqld
mysql-test/r/partition.result:
  Add missing drop procedure
mysql-test/r/rpl_drop_db.result:
  Add missing drop table
mysql-test/r/rpl_multi_update3.result:
  Add missing drop table
mysql-test/r/rpl_ndb_multi_update3.result:
  Add missing drop table
mysql-test/r/rpl_ndb_sp006.result:
  Add missing drop database
mysql-test/r/rpl_stm_no_op.result:
  Add missing drop table
mysql-test/r/rpl_variables.result:
  Reset slave_net_timeout to it's default value after test
mysql-test/t/ndb_cache_multi.test:
  Reset query_cahche_size after test
mysql-test/t/partition.test:
  Add missing drop procedure
mysql-test/t/rpl_drop_db.test:
  Add missing drop table
mysql-test/t/rpl_stm_no_op.test:
  Add missing drop table
mysql-test/t/rpl_variables.test:
  Reset slave_net_timeout to it's default value after test
2006-05-31 23:34:28 +02:00

93 lines
2.2 KiB
Text

# It's true only in statement-based replication that a statement which
# updates no rows (UPDATE/DELETE) is binlogged; in row-based
# replication, as we log modified rows, nothing is binlogged in this
# case. So this test is meaningul only in statement-based (and if it was
# enabled in row-based, it would fail as expected).
-- source include/have_binlog_format_statement.inc
source include/master-slave.inc;
# see if DROP DATABASE is binlogged even if no effect
connection slave;
create database mysqltest;
connection master;
drop database if exists mysqltest;
sync_slave_with_master;
# can't read dir
--replace_result "Errcode: 1" "Errcode: X" "Errcode: 2" "Errcode: X" \\ /
--error 1049
show tables from mysqltest;
# see if DROP TABLE is binlogged even if no effect
connection slave;
create table t1 (a int);
connection master;
drop table if exists t1;
sync_slave_with_master;
# table does not exist
--error 1146
select * from t1;
# see if single-table DELETE is binlogged even if no effect
connection master;
create table t1 (a int, b int);
sync_slave_with_master;
insert into t1 values(1,1);
connection master;
delete from t1;
sync_slave_with_master;
select * from t1;
# see if single-table UPDATE is binlogged even if no effect
insert into t1 values(1,1);
connection master;
insert into t1 values(2,1);
update t1 set a=2;
sync_slave_with_master;
select * from t1;
# End of 4.1 tests
# see if multi-table UPDATE is binlogged even if no effect (BUG#13348)
connection master;
create table t2 (a int, b int);
delete from t1;
insert into t1 values(1,1);
insert into t2 values(1,1);
sync_slave_with_master;
# force a difference to see if master's multi-UPDATE will correct it
update t1 set a=2;
connection master;
UPDATE t1, t2 SET t1.a = t2.a;
sync_slave_with_master;
select * from t1;
select * from t2;
# See if multi-table DELETE is binlogged even if no effect
connection master;
delete from t1;
delete from t2;
sync_slave_with_master;
# force a difference to see if master's multi-DELETE will correct it
insert into t1 values(1,1);
insert into t2 values(1,1);
connection master;
DELETE t1.*, t2.* from t1, t2;
sync_slave_with_master;
select * from t1;
select * from t2;
# cleanup
connection master;
drop table t1, t2;
sync_slave_with_master;