mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
613fb54f95
Adaptions to make it work with NDB. mysql-test/extra/binlog_tests/binlog.test: Using replace_regex to remove table id. mysql-test/extra/binlog_tests/blackhole.test: Using replace_regex to remove table id. mysql-test/extra/binlog_tests/ctype_cp932.test: Using replace_regex to remove table id. mysql-test/extra/binlog_tests/ctype_cp932_binlog.test: Using replace_regex to remove table id. mysql-test/extra/binlog_tests/ctype_ucs_binlog.test: Using replace_regex to remove table id. mysql-test/extra/binlog_tests/drop_temp_table.test: Using replace_regex to remove table id. mysql-test/extra/binlog_tests/insert_select-binlog.test: Using replace_regex to remove table id. mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test: Using replace_regex to remove table id. mysql-test/extra/rpl_tests/rpl_flsh_tbls.test: Using replace_regex to remove table id. mysql-test/extra/rpl_tests/rpl_log.test: Using replace_regex to remove table id. mysql-test/extra/rpl_tests/rpl_multi_query.test: Using replace_regex to remove table id. mysql-test/extra/rpl_tests/rpl_row_charset.test: Using replace_regex to remove table id. mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test: Using replace_regex to remove table id. mysql-test/extra/rpl_tests/rpl_stm_charset.test: Using replace_regex to remove table id. mysql-test/include/rpl_row_basic.inc: Removing sync with master on cleanup since there are engines that does not work in a "syncronized" fashion on dropping tables. mysql-test/r/binlog_row_binlog.result: Result change mysql-test/r/binlog_row_blackhole.result: Result change mysql-test/r/binlog_row_ctype_cp932.result: Result change mysql-test/r/binlog_row_ctype_ucs.result: Result change mysql-test/r/binlog_row_insert_select.result: Result change mysql-test/r/binlog_row_mix_innodb_myisam.result: Result change mysql-test/r/ctype_cp932_binlog_row.result: Result change mysql-test/r/rpl_row_basic_11bugs.result: Result change mysql-test/r/rpl_row_basic_2myisam.result: Result change mysql-test/r/rpl_row_basic_3innodb.result: Result change mysql-test/r/rpl_row_charset.result: Result change mysql-test/r/rpl_row_create_table.result: Result change mysql-test/r/rpl_row_delayed_ins.result: Result change mysql-test/r/rpl_row_log.result: Result change mysql-test/r/rpl_row_log_innodb.result: Result change mysql-test/r/rpl_row_max_relay_size.result: Result change mysql-test/r/rpl_row_sp008.result: Result change mysql-test/t/binlog_stm_binlog.test: Using replace_regex to remove table id. mysql-test/t/ndb_binlog_ddl_multi.test: Using replace_regex to remove table id. mysql-test/t/ndb_binlog_ignore_db.test: Using replace_regex to remove table id. mysql-test/t/rpl_heap.test: Using replace_regex to remove table id. mysql-test/t/rpl_loaddata_s.test: Using replace_regex to remove table id. mysql-test/t/rpl_ndb_blob.test: Using replace_regex to remove table id. mysql-test/t/rpl_ndb_disk.test: Using replace_regex to remove table id. mysql-test/t/rpl_row_basic_11bugs.test: Using replace_regex to remove table id. mysql-test/t/rpl_row_create_table.test: Using replace_regex to remove table id. mysql-test/t/rpl_row_drop.test: Using replace_regex to remove table id. mysql-test/t/rpl_row_sp008.test: Using replace_regex to remove table id. mysql-test/t/rpl_sp.test: Using replace_regex to remove table id. mysql-test/t/sp.test: Using replace_regex to remove table id. mysql-test/t/sp_notembedded.test: Using replace_regex to remove table id. mysql-test/t/user_var-binlog.test: Using replace_regex to remove table id. sql/ha_ndbcluster_binlog.cc: Assign_new_table_id() now takes table share. Removed gratuitous friend declaration of ndb_add_binlog_index(). Turning of binlogging during execution of ndb_add_binlog_index(). sql/handler.h: Removed gratuitous friend declaration of ndb_add_binlog_index(). sql/log.cc: Adding debug printout. sql/log_event.cc: Closing thread tables on dummy event. sql/rpl_injector.cc: Added support for new locking scheme. sql/rpl_injector.h: Added support for new locking scheme.
55 lines
1.7 KiB
Text
55 lines
1.7 KiB
Text
# depends on the binlog output
|
|
# Test of replicating FLUSH TABLES to make
|
|
# RENAME TABLE work with MERGE tables on the slave.
|
|
# Test of FLUSH NO_WRITE_TO_BINLOG by the way.
|
|
#
|
|
-- source include/master-slave.inc
|
|
|
|
create table t1 (a int);
|
|
insert into t1 values (10);
|
|
create table t2 (a int);
|
|
create table t3 (a int) engine=merge union(t1);
|
|
create table t4 (a int);
|
|
# We force the slave to open t3 (because we want to try confusing him) with this :
|
|
insert into t4 select * from t3;
|
|
rename table t1 to t5, t2 to t1;
|
|
# RENAME may have confused the master (this is a known bug): so FLUSH tables,
|
|
# first don't write it to the binlog, to test the NO_WRITE_TO_BINLOG keyword.
|
|
flush no_write_to_binlog tables;
|
|
# Check that it's not in the binlog.
|
|
--replace_result $SERVER_VERSION SERVER_VERSION
|
|
--replace_column 2 # 5 #
|
|
--replace_regex /table_id: [0-9]+/table_id: #/
|
|
eval SHOW BINLOG EVENTS FROM $rename_event_pos ;
|
|
# Check that the master is not confused.
|
|
select * from t3;
|
|
# This FLUSH should go into the binlog to not confuse the slave.
|
|
flush tables;
|
|
# Check that it's in the binlog.
|
|
--replace_result $SERVER_VERSION SERVER_VERSION
|
|
--replace_column 2 # 5 #
|
|
--replace_regex /table_id: [0-9]+/table_id: #/
|
|
eval SHOW BINLOG EVENTS FROM $rename_event_pos ;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
# Check that the slave is not confused.
|
|
select * from t3;
|
|
# Note that all this confusion may cause warnings 'table xx is open on rename'
|
|
# in the .err files; these are not fatal and are not reported by mysql-test-run.
|
|
|
|
stop slave;
|
|
connection master;
|
|
drop table t1;
|
|
connection slave;
|
|
flush tables with read lock;
|
|
start slave;
|
|
sleep 1;
|
|
--error 1192
|
|
stop slave;
|
|
|
|
connection master;
|
|
drop table t3, t4, t5;
|
|
|
|
# End of 4.1 tests
|
|
|