mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
copy from test-extra-5.1 to main tree
BitKeeper/etc/ignore: Added mysql-test/suite/funcs_1/r/innodb_views.warnings mysql-test/suite/funcs_1/r/memory_trig_03e.warnings mysql-test/suite/funcs_1/r/memory_views.warnings mysql-test/suite/funcs_1/r/myisam_trig_03e.warnings mysql-test/suite/funcs_1/r/myisam_views.warnings mysql-test/suite/funcs_1/r/ndb_trig_03e.warnings mysql-test/suite/funcs_1/r/ndb_views.warnings mysql-test/suite/partitions/r/diff mysql-test/suite/partitions/r/partition_bit_ndb.warnings mysql-test/suite/partitions/r/partition_special_innodb.warnings mysql-test/suite/partitions/r/partition_special_myisam.warnings storage/archive/archive_reader mysql-test/suite/funcs_1/r/innodb_trig_03e.warnings to the ignore list mysql-test/suite/funcs_2/include/check_charset.inc: inserted newline at the end of file. mysql-test/suite/objects/include/drop_all.inc: inserted newline at the end of file. mysql-test/suite/partitions/include/partition_key_32col.inc: inserted newline at the end of file. mysql-test/suite/rpl/data/rpl_mixed.dat: inserted newline at the end of file. mysql-test/suite/rpl/include/rpl_mixed_check_event.inc: inserted newline at the end of file. mysql-test/suite/rpl/include/rpl_mixed_check_select.inc: inserted newline at the end of file. mysql-test/suite/rpl/include/rpl_mixed_check_user.inc: inserted newline at the end of file. mysql-test/suite/rpl/include/rpl_mixed_check_view.inc: inserted newline at the end of file.
This commit is contained in:
86
mysql-test/suite/rpl/include/rpl_mixed_ddl.inc
Normal file
86
mysql-test/suite/rpl/include/rpl_mixed_ddl.inc
Normal file
@ -0,0 +1,86 @@
|
||||
#########################################
|
||||
# Author: Serge Kozlov skozlov@mysql.com
|
||||
# Date: 07/10/2006
|
||||
# Purpose: testing the replication in mixed mode
|
||||
# Requirements: define binlog format for mysqld as in example below:
|
||||
# ./mysql-test-run.pl --mysqld=--binlog-format=mixed
|
||||
#########################################
|
||||
|
||||
--source include/master-slave.inc
|
||||
|
||||
# Check MIXED on both master and slave
|
||||
connection master;
|
||||
--echo ==========MASTER==========
|
||||
--source suite/rpl/include/rpl_mixed_show_binlog_format.inc
|
||||
connection slave;
|
||||
--echo ==========SLAVE===========
|
||||
--source suite/rpl/include/rpl_mixed_show_binlog_format.inc
|
||||
connection master;
|
||||
|
||||
|
||||
# DDL for databases
|
||||
--echo
|
||||
--echo ******************** DDL for database ********************
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS test_rpl;
|
||||
DROP DATABASE IF EXISTS test_rpl_1;
|
||||
--enable_warnings
|
||||
CREATE DATABASE test_rpl_1 CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||
ALTER DATABASE test_rpl_1 CHARACTER SET latin1 COLLATE latin1_general_ci;
|
||||
DROP DATABASE test_rpl_1;
|
||||
CREATE DATABASE test_rpl CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||
ALTER DATABASE test_rpl CHARACTER SET latin1 COLLATE latin1_swedish_ci;
|
||||
--source suite/rpl/include/rpl_mixed_check_db.inc
|
||||
|
||||
USE test_rpl;
|
||||
|
||||
# DDL for tables
|
||||
--echo
|
||||
--echo ******************** DDL for tables ********************
|
||||
eval CREATE TABLE t0 (a int auto_increment not null, c int not null, PRIMARY KEY(a), KEY index2 (c)) ENGINE=$engine_type;
|
||||
ALTER TABLE t0 DROP INDEX index2;
|
||||
ALTER TABLE t0 ADD COLUMN b char(254);
|
||||
ALTER TABLE t0 ADD INDEX index1 (b);
|
||||
ALTER TABLE t0 DROP COLUMN c;
|
||||
RENAME TABLE t0 TO t1;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
--source suite/rpl/include/rpl_mixed_check_table.inc
|
||||
|
||||
# DDL for logfiles
|
||||
# skipped
|
||||
|
||||
# DDL for tablespaces
|
||||
# skipped
|
||||
|
||||
# DDL for indexes
|
||||
--echo
|
||||
--echo ******************** DDL for indexes ********************
|
||||
ALTER TABLE t2 ADD COLUMN d datetime;
|
||||
CREATE INDEX index2 on t2 (d);
|
||||
CREATE INDEX index3 on t2 (a, d);
|
||||
--source suite/rpl/include/rpl_mixed_check_table.inc
|
||||
ALTER TABLE t2 DROP COLUMN d;
|
||||
|
||||
|
||||
# BINLOG EVENTS
|
||||
--echo
|
||||
--echo
|
||||
--echo ******************** SHOW BINLOG EVENTS ********************
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 1;
|
||||
sync_slave_with_master;
|
||||
# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID
|
||||
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test_rpl > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql
|
||||
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test_rpl > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql
|
||||
|
||||
connection master;
|
||||
drop database test_rpl;
|
||||
sync_slave_with_master;
|
||||
|
||||
# Let's compare. Note: If they match test will pass, if they do not match
|
||||
# the test will show that the diff statement failed and not reject file
|
||||
# will be created. You will need to go to the mysql-test dir and diff
|
||||
# the files your self to see what is not matching
|
||||
|
||||
--exec diff $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql;
|
Reference in New Issue
Block a user