mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
f8866c162b
BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union client/mysqltest.c: Auto merged configure.in: Auto merged include/my_sys.h: Auto merged include/mysql_com.h: Auto merged libmysql/libmysql.c: Auto merged libmysqld/Makefile.am: Auto merged libmysqld/lib_sql.cc: Auto merged myisam/mi_check.c: Auto merged myisam/myisamchk.c: Auto merged myisam/myisamdef.h: Auto merged mysql-test/r/func_group.result: Auto merged mysql-test/r/func_time.result: Auto merged mysql-test/r/null.result: Auto merged mysql-test/r/query_cache.result: Auto merged mysql-test/r/rpl_server_id2.result: Auto merged mysql-test/r/select.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/variables.result: Auto merged mysql-test/t/rpl000015.test: Auto merged mysql-test/t/rpl_error_ignored_table.test: Auto merged mysql-test/t/rpl_log.test: Auto merged mysql-test/t/rpl_log_pos.test: Auto merged mysql-test/t/rpl_max_relay_size.test: Auto merged mysql-test/t/rpl_relayrotate.test: Auto merged mysql-test/t/rpl_rotate_logs.test: Auto merged mysql-test/t/rpl_server_id2.test: Auto merged mysql-test/t/subselect.test: Auto merged mysql-test/t/variables.test: Auto merged mysys/my_pthread.c: Auto merged netware/BUILD/compile-netware-all: Auto merged netware/BUILD/compile-netware-standard: Auto merged netware/BUILD/mwenv: Auto merged netware/Makefile.am: Auto merged netware/my_manage.c: Auto merged netware/my_manage.h: Auto merged netware/mysql_test_run.c: Auto merged scripts/mysql_install_db.sh: Auto merged sql/Makefile.am: Auto merged sql/ha_berkeley.cc: Auto merged sql/ha_berkeley.h: Auto merged sql/ha_innodb.cc: Auto merged sql/ha_innodb.h: Auto merged sql/ha_myisam.cc: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.cc: Auto merged sql/item_subselect.cc: Auto merged sql/item_subselect.h: Auto merged sql/item_sum.cc: Auto merged sql/item_sum.h: Auto merged sql/item_timefunc.cc: Auto merged sql/lock.cc: Auto merged sql/mysql_priv.h: Auto merged sql/opt_range.cc: Auto merged sql/protocol.cc: Auto merged sql/protocol.h: Auto merged sql/repl_failsafe.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_db.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_select.h: Auto merged sql/sql_show.cc: Auto merged sql/sql_string.cc: Auto merged sql/sql_string.h: Auto merged sql/sql_table.cc: Auto merged sql/sql_union.cc: Auto merged sql/sql_yacc.yy: Auto merged tests/client_test.c: Auto merged
56 lines
1.6 KiB
Text
56 lines
1.6 KiB
Text
# 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.
|
|
|
|
source include/master-slave.inc;
|
|
connection master;
|
|
create table t1 (a int primary key);
|
|
# generate an error that goes to the binlog
|
|
--error 1062;
|
|
insert into t1 values (1),(1);
|
|
save_master_pos;
|
|
connection slave;
|
|
# as the t1 table is ignored on the slave, the slave should be able to sync
|
|
sync_with_master;
|
|
# The port number is different when doing the release build with
|
|
# Do-compile, hence we have to replace the port number here accordingly
|
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
|
--replace_column 1 # 8 # 9 # 23 # 33 #
|
|
show slave status;
|
|
# check that the table has been ignored, because otherwise the test is nonsense
|
|
show tables like 't1';
|
|
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;
|
|
connection master;
|
|
--error 0,1053;
|
|
reap;
|
|
connection master1;
|
|
show binlog events from 95;
|
|
save_master_pos;
|
|
connection slave;
|
|
# SQL slave thread should not have stopped (because table of the killed
|
|
# query is in the ignore list).
|
|
sync_with_master;
|